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 RPCStateManager Inconsistincy #3323

Merged
merged 2 commits into from
Mar 18, 2024
Merged

Fix RPCStateManager Inconsistincy #3323

merged 2 commits into from
Mar 18, 2024

Conversation

scorbajio
Copy link
Contributor

@scorbajio scorbajio commented Mar 16, 2024

This change fixes a bug in the RPCStateManager that results in an empty account being returned when provider is responding that account does not exist. This should partially address #3301.

Copy link

codecov bot commented Mar 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.90%. Comparing base (a70312d) to head (6a74731).

Additional details and impacted files

Impacted file tree graph

Flag Coverage Δ
block 88.43% <ø> (ø)
blockchain 91.61% <ø> (ø)
client 84.85% <ø> (ø)
common 98.43% <ø> (ø)
devp2p 82.12% <ø> (ø)
ethash ∅ <ø> (∅)
evm 74.16% <ø> (ø)
genesis 99.98% <ø> (ø)
rlp ∅ <ø> (∅)
statemanager 77.08% <100.00%> (+0.07%) ⬆️
trie 89.01% <ø> (-0.32%) ⬇️
tx 95.08% <ø> (ø)
util 89.34% <ø> (ø)
vm 79.87% <ø> (ø)
wallet 88.35% <ø> (ø)

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

Copy link
Member

@jochem-brouwer jochem-brouwer left a comment

Choose a reason for hiding this comment

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

What about the case if the account is in the state, but it is empty? If you would request the account on the DefaultStateManager it will return the empty account, but the RPC will now return undefined.

We can also decide not to fix this, since these accounts got wiped years back with EIP-158 (I guess I am fine with not fixing this)?

Copy link
Member

@holgerd77 holgerd77 left a comment

Choose a reason for hiding this comment

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

Ok, since @jochem-brouwer already expressed being ok with not fully fixing towards the old „empty account“ blocks, I will take this in so it can still make it into todays releases! 🤩

@holgerd77 holgerd77 merged commit e38a521 into master Mar 18, 2024
36 checks passed
@holgerd77 holgerd77 deleted the fix-sm-inconsistincy branch March 18, 2024 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants