forked from bnb-chain/bsc
-
Notifications
You must be signed in to change notification settings - Fork 1
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
CodeReview: State Expiry #37
Open
setunapo
wants to merge
52
commits into
setunapo:state_expiry_base
Choose a base branch
from
node-real:state_expiry_develop
base: state_expiry_base
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
CodeReview: State Expiry #37
setunapo
wants to merge
52
commits into
setunapo:state_expiry_base
from
node-real:state_expiry_develop
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
types: add state epoch;
txpool: add hard fork & witness check; trie: add MPTProofCache, include verify proof, MPTProofNubs; trie: add trie node type; core/StateTransition: add witness verify;
refactor(trie): change prefixKey to prefixKeyHex feat(trie): add ReviveTrie() refactor(MPTProof): change RootKey to RootKeyHex refactor: fix VerifyProof and ExpireByPrefix bugs feat(revive): add ReviveTrie and UTs minor: edit some comments refactor(trie): add resolveHash and comments
Signed-off-by: cryyl <[email protected]>
state/journal: add revive journal; state/stateDB: opt revive state; state/state_object: record AccessedState, opt pending revive trie; state/journal: add access state journal;
fix: fix some compile error and ut failures;
add TryRevive again refactor: add getter for MPTProofNub
StateEpoch: add new epoch type, add expired utility function; StateObject: support complete state R&W, opt revive trie cache & state; Snapshot: support parse state epoch; EVM: opt sLoad & sStore error handle, add EVM error collection;
stateObject: opt revive state query;
Signed-off-by: cryyl <[email protected]>
State expire: implementation of MPT R&W
fix logic error fix logic error fix comments Squashed commit of the following: commit 27110c9 Merge: 1cf57da 9c2297d Author: cryyl <[email protected]> Date: Wed Apr 26 10:34:14 2023 +0800 Merge pull request #91 from cryyl/state_expire_mpt State expire: implementation of MPT R&W commit 9c2297d Author: cryyl <[email protected]> Date: Tue Apr 18 16:58:00 2023 +0800 state expriy: implement of MPT read and write Signed-off-by: cryyl <[email protected]> fix
blockchain: handle shadow node tree; statedb: using shadow node database, commit later; trie: support resolve shadow node, and r&w, add root node parse;
trie/shadownode: support shadow node history store & query; trie/shadownode_difflayer: support diff layers flatten to DB;
complete estimate gas and revive state add test and function comments remove TODO
everything is fine at this point refactor(trie): add shadow logic to MPT Revive add shadow logic
chore: remove comment refactor(trie): change variable naming add epoch parameter to tryRevive refactor(trie): restructure if-else statements refactor(trie): restructure if-else statements deconstruct if layers minor comment minor typo
trie/shadownode: support commit root node & shadow nodes;
fix: fix some broken UTs; parlia: add state epoch config;
trie: fix trie hash root node bug; state/statedb: add system contracts to expiry white list; state/state_object: using expiry white list; state/state_object: opt shadow node diff layers update;
state/state_object: opt snap state query, opt insert dup check; state/statedb: fix copy bugs; trie/trie: opt trie root epoch bug, remove node's epoch methods;
state/state_object: recall dirty revive trie for accuracy expired info; vm/evm: fix sstore calculate expired state gas bug; ethapi/api: fix EstimateGasAndReviveState resolve witness issues; trie/trie: opt shadow hash calculation, recalloect branch node epoch map; trie/trie: keep as hashNode when meet expired node, opt expired node checking; trie/trie: fix expired check bug when child is nil;
feat(prune): inline prune expired nodes fix dereference codes fix: raw node fix: add BEP-206 prune rules
trie/shadow_node_history: remove history when in pruning mode;
pruner: opt init with chain config; state/statedb: generate witness fron pendingReviveTrie; log: add some logs;
fix: temporarily do not prune account trie node fix: estimate size for root node
setunapo
pushed a commit
that referenced
this pull request
Mar 27, 2024
…unt-check (#24765) * cmd/geth, core/state/snapshot: rework journal loading, implement account-check * core/state/snapshot, cmd/geth: polish code (#37) * core/state/snapshot: minor nits * core/state/snapshot: simplify error logic * cmd/geth: go format Co-authored-by: rjl493456442 <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
NA