-
Notifications
You must be signed in to change notification settings - Fork 231
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
REST API: add ssz encoding for publishBlock #4154
Conversation
if forked.kind != node.dag.cfg.blockForkAtEpoch( | ||
getForkedBlockField(forked, slot).epoch): | ||
getForkedBlockField(forked, slot).epoch): | ||
return RestApiResponse.jsonError(Http400, InvalidBlockObjectError) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I think this check should be moved to gossip_validation.validateBeaconBlock
(so that it applies to all sources of blocks). It's also a new check that wasn't present in the pure JSON version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope it was there too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gossip checks this implicitly via signature check, if nothing else
Co-authored-by: Etan Kissling <etan@status.im>
a83f983
to
2de8412
Compare
https://ethereum.github.io/beacon-APIs/#/Beacon/publishBlock implementation for SSZ encoded blocks.