Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add SSZ support to light client beacon api endpoints #14408

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

guha-rahul
Copy link

What type of PR is this?
Feature

What does this PR do? Why is it needed?
This pr adds SSZ support to /eth/v1/beacon/light_client/finality_update and /eth/v1/beacon/light_client/optimistic_update endpoints.

Which issues(s) does this PR fix?
partially addresses #12991

Comment on lines +287 to +299
Pubkeys := make([][]byte, 512)
for i := range Pubkeys {
Pubkeys[i] = make([]byte, 48)
}
NextSyncCommitteeBranch := make([][]byte, 5)
for i := range NextSyncCommitteeBranch {
NextSyncCommitteeBranch[i] = make([]byte, 32)
}
update.NextSyncCommitteeBranch = NextSyncCommitteeBranch
update.NextSyncCommittee = &eth.SyncCommittee{
Pubkeys: Pubkeys,
AggregatePubkey: make([]byte, 48),
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very wrong. You are replacing the correct data coming from NewLightClientFinalityUpdateFromBeaconState with empty values. This is what will be returned to the caller in production

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants