Skip to content

engine payload bodies rpc endpoints#6644

Merged
hexoscott merged 1 commit intoerigontech:develfrom
hexoscott:get-payload-bodies
Jan 24, 2023
Merged

engine payload bodies rpc endpoints#6644
hexoscott merged 1 commit intoerigontech:develfrom
hexoscott:get-payload-bodies

Conversation

@hexoscott
Copy link
Contributor

@hexoscott hexoscott commented Jan 20, 2023

Very basic implementation for get payload bodies rpc calls. Once we have Hive tests for these calls I can pick this back up and work through any issues.

Implementation of ethereum/execution-apis#352.

@hexoscott hexoscott requested a review from yperbasis January 20, 2023 20:25
@hexoscott hexoscott force-pushed the get-payload-bodies branch 2 times, most recently from 00d05f0 to 624cd5c Compare January 23, 2023 09:47
@hexoscott hexoscott force-pushed the get-payload-bodies branch 2 times, most recently from ef541bd to 25a7201 Compare January 23, 2023 13:47
Copy link
Member

Choose a reason for hiding this comment

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

Slot numbers in CL are different from block numbers in the EL. This field refers to the block rather than the slot number (see Item 6 of the spec). Please rename to StartBlockNumber or simply Start. And it's "start" in json per the spec.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/p2p-interface.md#beaconblocksbyrange

This is where I got the name for the json from, it mentions not to confuse this with the block number which we're OK on. I think we need to keep the start_slot, but can rename the field name no problem?

Copy link
Member

@yperbasis yperbasis Jan 23, 2023

Choose a reason for hiding this comment

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

The p2p spec is different from the Engine API spec.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Turns out we don't need this type at all anyway, the last comment here negates the need for it

Copy link
Member

Choose a reason for hiding this comment

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

Trailing null blocks (blocks after the latest available) should be truncated (see Item 3 of the spec). In our database we don't allow any gaps in canonical blocks, so it's OK to truncate starting from the first missing block.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK good to know. There were some comments on this when I initially looked at the PR, looks like that has been finalised now so will update our code.

Copy link
Member

Choose a reason for hiding this comment

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

This method should have 2 parameters (start, count) per the spec, not one, similar to how ForkchoiceUpdatedV1 has 2 parameters.

@hexoscott hexoscott merged commit 4dcba50 into erigontech:devel Jan 24, 2023
@hexoscott hexoscott deleted the get-payload-bodies branch January 31, 2023 15:24
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