-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat(pruner): account history #4000
Conversation
Codecov Report
... and 10 files with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more.
|
b9a7784
to
13131a4
Compare
)?; | ||
|
||
let mut cursor = provider.tx_ref().cursor_write::<tables::AccountHistory>()?; | ||
while let Some(result) = cursor.next()? { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we just add a short summary comment on what we're doing on this loop?
a lot of if-else conditions.... having a short summary before diving in is helpful imo
edit: something like the PR summary actually
670667f
to
f7c0d81
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm,
love the tests
Resolves #3692
Prunes:
AccountChangeSet
table: all block number keys (and their subkeys which are account addresses) which need to be prunedAccountHistory
table:highest_block_number
less than or equal to the target block number for pruning, delete the shard completely.highest_block_number
greater than the target block number for pruning, filter block numbers inside the shard which are less than the target block number for pruning.