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

fix: always deserialize Block::totalDifficulty to None #312

Merged
merged 5 commits into from
Oct 16, 2024

Conversation

gregorydemay
Copy link
Collaborator

@gregorydemay gregorydemay commented Oct 16, 2024

As explained in #311, the field totalDifficulty was removed from the official Ethereum JSON RPC Block schema in ethereum/execution-apis#570, leading to inconsistent answers between providers when calling the EVM RPC canister with eth_getBlockByNumber. This seems to affect all blocks and not only post-merge blocks.

As a workaround, the EVM RPC canister no longer deserializes the field totalDifficulty in the provider's JSON response and set the Candid returned value for evm_rpc_types::Block::totalDifficulty always to None to be backwards-compatible.

@gregorydemay gregorydemay linked an issue Oct 16, 2024 that may be closed by this pull request
@gregorydemay gregorydemay marked this pull request as ready for review October 16, 2024 12:34
@gregorydemay gregorydemay merged commit 4b4942a into main Oct 16, 2024
4 checks passed
@gregorydemay gregorydemay deleted the gdemay/fix-total-difficulty branch October 16, 2024 15:08
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.

Block::totalDifficulty is inconsistent between providers
3 participants