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

REST API: add ssz encoding for publishBlock #4154

Merged
merged 3 commits into from
Sep 29, 2022
Merged

REST API: add ssz encoding for publishBlock #4154

merged 3 commits into from
Sep 29, 2022

Conversation

cheatfate
Copy link
Contributor

https://ethereum.github.io/beacon-APIs/#/Beacon/publishBlock implementation for SSZ encoded blocks.

@github-actions
Copy link

github-actions bot commented Sep 20, 2022

Unit Test Results

       9 files  ±0     678 suites  ±0   20m 3s ⏱️ + 1m 0s
1 996 tests ±0  1 847 ✔️ ±0  149 💤 ±0  0 ±0 
8 114 runs  ±0  7 941 ✔️ ±0  173 💤 ±0  0 ±0 

Results for commit 2de8412. ± Comparison against base commit eea13ee.

♻️ This comment has been updated with latest results.

Comment on lines 782 to 784
if forked.kind != node.dag.cfg.blockForkAtEpoch(
getForkedBlockField(forked, slot).epoch):
getForkedBlockField(forked, slot).epoch):
return RestApiResponse.jsonError(Http400, InvalidBlockObjectError)
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Member

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

beacon_chain/spec/eth2_apis/rest_beacon_calls.nim Outdated Show resolved Hide resolved
@zah zah merged commit a845450 into unstable Sep 29, 2022
@zah zah deleted the ssz-publish-block branch September 29, 2022 21:00
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.

None yet

4 participants