avalanchego
avalanchego copied to clipboard
Pchain Merkle DB
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
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.
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.