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

proof, trie: refactor MPTProofCache and add revive tests #129

Open
wants to merge 66 commits into
base: state_expiry_mvp0.1_dev
Choose a base branch
from

Conversation

asyukii
Copy link

@asyukii asyukii commented Nov 3, 2023

Description

  • MPTProofCache is removed and its relevant fields and functions are combined into MPTProof
  • Add random tests to trie revive

Changes

  • New interface TrieProof
  • Trie interface's TryRevive method now takes TrieProof instead of MPTProofCache and returns key value mapping
  • MPTProof implements TrieProof interface

0xbundler and others added 30 commits October 17, 2023 16:43
fix: verify proof first then only revive

remove comments

edit function comments

verify child hash while constructing trie from proof

remove unnecessary comments and parameters
state/statedb: support state expiry;
state/state_object: add revive trie, access state, etc.;
minor fix

change rpc blockNum to hash
state/statedb: fetch expired state from remote;
minor change to key

remove journal codes
trie/epochmeta: trie integrate epoch meta storage;
ethdb/fullstatedb: support proof cache;
trie/epochmeta: opt query & commit logic;
bugfix: fix remote full state db params;
bugfix: fix state copy issues, remote cache;
more fixes

Squashed commit of the following:

commit 45e7deacede8ebecd2625cc09c609d0b92f96515
Author: 0xbundler <[email protected]>
Date:   Mon Sep 4 11:50:49 2023 +0800

    trie/proof: fix child hash validate bug;

    bugfix: fix state copy issues, remote cache;
trie: commit account meta, revive state bug;
ethdb/fullstatedb: fix cache bug, cannot share by key;
pruner: fix some epoch meta db error;
metrics: add more metrics for state expiry;
fullstatedb: opt storage trie init method;
metrics: add more cost time metrics;
pruner: refactor expired prune;
trie/trie: fix some migrate issues;
trie: fix compile error;
asyukii and others added 29 commits October 17, 2023 16:50
trie/inspect: opt inspect in PBSS mode;
add server related for snap sync

edit
trie/trie: fix some update epoch bugs;
state/state_object: fix epoch update issue;
state/statedb: fix oom issue;
trie: fix rebase error;
trie/trie: merge epoch meta & trie store in PBSS;
trie/trie: reuse node cache, prevent resolve again;
pruner: opt concurrent logic;
state/state_object: add access state in prefetch;
state/state_object: add more expired metrics;
trie: fix local review leaf expand bug;
lint: fix some golang lint;
test(trie): fix TestRandom error

fix

fix

Revert "test(trie): fix TestRandom error"

This reverts commit c0bd559.

fix

msg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants