CodeReview: State Expiry#37
Open
setunapo wants to merge 52 commits intosetunapo:state_expiry_basefrom
Open
Conversation
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 <1226241521@qq.com>
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 <1226241521@qq.com>
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 <90364156+cryyl@users.noreply.github.com> 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 <1226241521@qq.com> Date: Tue Apr 18 16:58:00 2023 +0800 state expriy: implement of MPT read and write Signed-off-by: cryyl <1226241521@qq.com> 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 <garyrong0905@gmail.com>
This file contains hidden or 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
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