avalanchego icon indicating copy to clipboard operation
avalanchego copied to clipboard

Pchain Merkle DB

Open abi87 opened this issue 1 year ago • 2 comments

Why this should be merged

It shouldn't!

How this works

Just trying to rebuild P-chain state on top of the MerkleDB. This requires also starting to define what should be merklelized (and prepared for state sync) and what is strictly local state.

How this was tested

  • [X] Move all state.State UTs to state.MerkleState and make them pass
  • [X] Pass all e2e tests
  • [X] Sync mainnet
  • [X] Sync mainnet again a few times, logging merkle root and checking it does not vary across runs (thanks @darioush for the suggestion)
  • [ ] Check diffs correctness against state.State implementation
  • [X] Reintroduce state.State metrics into state.MerkleState
  • [ ] ~~Rebase over stakers_update_ops to make sure stakers update operations are duly ported to merkleDB~~
  • [ ] Enable profiling

abi87 avatar Jul 20 '23 22:07 abi87

This PR has become stale because it has been open for 30 days with no activity. Adding the lifecycle/frozen label will cause this PR to ignore lifecycle events.

github-actions[bot] avatar Oct 08 '23 00:10 github-actions[bot]

This PR has become stale because it has been open for 30 days with no activity. Adding the lifecycle/frozen label will cause this PR to ignore lifecycle events.

github-actions[bot] avatar Mar 24 '24 00:03 github-actions[bot]