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

ethclient.Client should support for upcoming block definitions (safe, unsafe, finalized) #24829

Closed
marioevz opened this issue May 6, 2022 · 2 comments

Comments

@marioevz
Copy link
Member

marioevz commented May 6, 2022

Rationale

  • Why should this feature exist?
    Engine API has concept for safe and finalized payloads within the ForkchoiceUpdated directive.
    The execution spec does not require yet that these blocks are made available through the JSON-RPC, but it has been suggested and discussed several times in the ACD calls for example.
    The ethclient.Client now support latest (nil) and pending (-1), but it would be useful to also support these new block concepts.

  • What are the use-cases?
    For the end-user it would be helpful to have these available, but also for implementing tests in hive, we currently use the ethclient.Client module to obtain information from JSON-RPC, and part of the new tests for the Engine API require that we query for safe and finalized (I am not sure of the state of unsafe but it has been mentioned).

Implementation

  • Do you have ideas regarding the implementation of this feature?
    At the moment it would be simply a matter of adding the string definitions (safe, finalized and maybe unsafe) to this function, even if setting the block number parameter to any of these strings results in error, we could this way start preparing the tests for when the actual definitions are included in the spec.

  • Are you willing to implement this feature?
    Yes

@mkalinin
Copy link
Contributor

mkalinin commented May 7, 2022

unsafe isn't considered anymore, related PR has been updated recently ethereum/execution-apis#200

@holiman
Copy link
Contributor

holiman commented May 12, 2022

The ethclient just needs to pass a string, @MariusVanDerWijden has a PR to fix this in the go-ethereum RPC layer instead

@holiman holiman closed this as completed May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants