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

feat: remoteDb only delay syncs for specified peers #130

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

Conversation

asyukii
Copy link

@asyukii asyukii commented Nov 6, 2023

Description

RemoteDB will check if the peer request is from a specified peer before delaying its sync.

Rationale

RemoteDB shouldn't delay sync for peers that it doesn't care about, since the primary purpose of delaying sync is to provide suitable proof for a particular state expiry enabled node.

Changes

  • Add StateExpiryAllowedNodes to Node.P2P config
  • ShouldKeep1EpochBehind now checks for peerID

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 <124862913+0xbundler@users.noreply.github.com>
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 28 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;
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