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: ensure only canonical state is returned if requested by number/hash #4517

Merged
merged 1 commit into from
Sep 7, 2023

Conversation

mattsse
Copy link
Collaborator

@mattsse mattsse commented Sep 7, 2023

Closes #4515

Closes #4514

while we can also lookup the pending block by number, this breaks cross-client behaviour since only canonical state should be available if requested via block number or hash.

This removes a if num == latest + 1 check and adds more docs

@mattsse mattsse added C-bug An unexpected or incorrect behavior A-rpc Related to the RPC implementation labels Sep 7, 2023
@codecov
Copy link

codecov bot commented Sep 7, 2023

Codecov Report

Merging #4517 (b9ec8a5) into main (82a5ffa) will increase coverage by 0.02%.
Report is 1 commits behind head on main.
The diff coverage is 0.00%.

Impacted file tree graph

Files Changed Coverage Δ
crates/rpc/rpc/src/eth/api/mod.rs 61.50% <ø> (ø)
crates/storage/provider/src/providers/mod.rs 19.52% <ø> (+1.64%) ⬆️
crates/storage/provider/src/traits/state.rs 27.11% <0.00%> (-0.96%) ⬇️

... and 9 files with indirect coverage changes

Flag Coverage Δ
integration-tests 16.73% <0.00%> (+<0.01%) ⬆️
unit-tests 63.91% <0.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
reth binary 29.71% <ø> (ø)
blockchain tree 83.58% <ø> (ø)
pipeline 90.56% <ø> (ø)
storage (db) 75.33% <0.00%> (+0.26%) ⬆️
trie 94.84% <ø> (-0.04%) ⬇️
txpool 47.47% <ø> (ø)
networking 77.48% <ø> (+0.01%) ⬆️
rpc 57.44% <ø> (-0.01%) ⬇️
consensus 63.32% <ø> (-0.09%) ⬇️
revm 31.74% <ø> (ø)
payload builder 6.34% <ø> (ø)
primitives 86.48% <ø> (-0.03%) ⬇️

📢 Have feedback on the report? Share it here.

Copy link
Member

@Rjected Rjected left a comment

Choose a reason for hiding this comment

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

I see, this makes sense for compatibility / conformance

@mattsse mattsse added this pull request to the merge queue Sep 7, 2023
Merged via the queue into main with commit 1ed5ae1 Sep 7, 2023
24 checks passed
@mattsse mattsse deleted the matt/enforce-canonical-state branch September 7, 2023 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rpc Related to the RPC implementation C-bug An unexpected or incorrect behavior
Projects
None yet
2 participants