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(trie): handle root key and value during pruned integrity verification #2296

Merged
merged 3 commits into from
Sep 20, 2022

Conversation

faustbrian
Copy link
Contributor

@faustbrian faustbrian commented Sep 20, 2022

Resolves an issue where the function would fail when only the root key is present as a key but not the root value.

@faustbrian faustbrian marked this pull request as draft September 20, 2022 10:57
@codecov
Copy link

codecov bot commented Sep 20, 2022

Codecov Report

Merging #2296 (53688c0) into master (554aaef) will increase coverage by 2.12%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

Flag Coverage Δ
block 92.82% <ø> (?)
blockchain 88.47% <ø> (?)
client 86.99% <100.00%> (+0.04%) ⬆️
common 98.09% <ø> (?)
devp2p 92.37% <ø> (?)
ethash ∅ <ø> (∅)
evm 79.23% <ø> (ø)
rlp ∅ <ø> (?)
statemanager 88.43% <ø> (?)
trie 90.36% <100.00%> (?)
tx 97.98% <ø> (ø)
util 91.67% <ø> (?)
vm 85.31% <ø> (ø)

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

@faustbrian faustbrian marked this pull request as ready for review September 20, 2022 11:09
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.

LGTM

@holgerd77
Copy link
Member

Just for my understanding: what are the practical implications of this issue?

@holgerd77 holgerd77 merged commit 5ca079f into master Sep 20, 2022
@holgerd77 holgerd77 deleted the faustbrian-patch-1 branch September 20, 2022 13:42
@jochem-brouwer
Copy link
Member

The verifyPrunedIntegrity method had a bug where it would always return false on tries where we persist the root. The reason is that the ROOT_DB_KEY can never be reached from the trie, and it was not added as a key to ignore in the verifyPrunedIntegrity, so it would always return false when using persisted-root tries.

@faustbrian
Copy link
Contributor Author

@holgerd77 when do things usually get released? Has been 3 weeks now and I currently use the repository directly locally because this hasn't landed on NPM yet.

@holgerd77
Copy link
Member

@holgerd77 when do things usually get released? Has been 3 weeks now and I currently use the repository directly locally because this hasn't landed on NPM yet.

Ah, sorry, haven't found "the right" moment yet, since we have still some issues open (like #2295) which are also somewhat pressing and I hoped that we could get this fixed along and release in sync. Maybe we'll just have to do this in 2 or more rounds though and I'll just move over to a more regular release cycle, will likely still more things trickling in resulting from first-time breaking release usage.

I'll give last minute fix tries another 2-3 days until the end of the week and then prepare new releases at the beginning of next week no matter what status we'll have on some selected hanging ones (issues).

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