feat(proofs): add bounded historical proof history#142
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Important
This is a stacked PR on top of #141. PR #141 owns the canonical-cursor
reference-index runtime; this PR should be reviewed only for bounded historical
proof storage and RPC changes. After #141 merges, this PR can be retargeted to
its target branch.
Summary
eth_getProofrequests on both normal and authenticated RPCproofs init,proofs prune, andproofs unwindoperator commandsThe versioned-trie implementation is adapted from Base commit
b2673bbd927cb34d7cfad4d448bfbd5bd30eae88under MIT; Morph owns the integration,MDBX backend, lifecycle, RPC policy, and tests.
Behavior
--proofs-historyproofs initanchors the proof database at the current canonical tip; there is no backward backfill, schema migration, or automatic data deletionproofs pruneexplicitlyeth_getProofaccepts only the inclusive durable window, checks the latest stored canonical hash, and limits each request to 1,024 storage keysdebug_proofsSyncStatusreports earliest/latest bounds from one MDBX snapshot<chain-datadir>/historical-proofs; cold snapshots remain whole-data-directory copiesCLI
Optional node settings:
--proofs-history.storage-path <PATH>--proofs-history.window <BLOCKS>--proofs-history.verification-interval <BLOCKS>Validation
cargo fmt --all -- --checkcargo test --workspace --no-fail-fastcargo clippy --workspace --all-targets --all-features -- -D warningsmorph-proofsandmorph-proofs-exexeth_getProofmatchScope
This PR does not add a reference-index disable flag, reference-index status RPC,
snapshot format, compatibility migration, or benchmark harness. Live long-running
network sync, Hive/geth datasets, and performance benchmarks remain separate validation work.