erigontech / erigontech/erigon
Commitment improvements
- Dominant language
- Go
- Stars
- 3.6k
- Forks
- 1.5k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 455
Description
This continues and inherits some tasks from previous epic https://github.com/erigontech/erigon/issues/13884
- [ ] warmUp should use ReadOnly patricia trie implementation instead of re-implementing the trie. Assess depth of warmup #20550 (not done: `warmupKey` still hand-decodes branch bytes, warmuper.go:150-207)
- [ ] warmUp should be used while IBS executes or `applyState` flushing state changes to the SharedDomain - so every branch is already in cache ATM of `ComputeCommitment()`
- [x] warmUp cache should be hidden behind `PatriciaContext` implementation #20277 (done in #21380 — `WarmupCache` deleted, `commitment.BranchCache` now sits on the commitment domain below `PatriciaContext`)
- [x] Configurability of the trie: tumblers for metrics, memoization, key referencing (btw not on trie side, schema here), deferred hashes derival, deferred branch writes #20553
- [x] SetTrace: replace trace bool with io.Writer #20551 (done in #21859)
- [ ] Cell should embed `cellEncodeState`. So Cell become a structure of state `Update` and encodable information `cellEncodeState` (or better naming)
- [ ] encoding of the `hph.root` and regular cell is different within 1 field ordering. Blocked by correct commit rebuild and task above https://github.com/erigontech/erigon/issues/17612
- [ ] investigate cache for deferred branch writes - should it use proxy map at all or could be better implemented
- [x] `integration commitment rebuild`s domain files and history with same state roots for sequential and concurrent commitment trie
- [ ] `fold`: avoid merge with previous branchData value — encode whole row at once instead. #20549 (not done: #20548 was closed unmerged; `be.merger.Merge(prev, update)` still in `CollectUpdate`, commitment.go:509)
- [ ] deferred branch write re-reads previous branch value while it had it atm of being encoded into ETL
- [ ] Simplify "state" value encoding - 712b could become something around 150b - no need to encode empty maps and always-zero state
- [ ] https://github.com/erigontech/erigon/issues/17773
- [ ] make `unfold` more readable https://github.com/erigontech/erigon/issues/13234
Contributor guide
Assessment
This issue has not been assessed yet.