crypto-org-chain / crypto-org-chain/cronos
Problem: memiavl don't support exporting a subtree for execution
- Dominant language
- Go
- Stars
- 336
- Forks
- 299
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 4
Description
## Context
To re-execute a part of stf in zk-prover, we can't load the whole tree in memory, we'll need to find the minimal sub-tree that's enough for the stf execution.
## Solution
for example to prove the execution of a range of blocks `[a, b]`:
1. load memiavl tree at version `a-1`.
2. replay the range of blocks `[a, b]`, and mark the touched nodes (both read and write) whose version `< a`.
3. export those marked nodes.
Contributor guide
Research direction
Start by locating how the memiavl tree is loaded at version a-1 and how the STF replay over blocks [a, b] accesses state. Trace how touched nodes, including reads and writes with versions below a, could be identified and exported. Done means the exported minimal subtree is sufficient to re-execute the selected range without loading the whole tree.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- blockchain, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100