RFC 0004: expand cross-engine state to decision-ready proposal#73
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Third RFC expansion in the series (after #70 RFC 0001 and #72 RFC 0002). Same shape: take an open-design RFC with N candidates and M open questions, commit to specifics, reduce both.
This one closes the "one state root across WASM and EVM" claim that's been deferred since v0.3 shipped.
What changed
Picks option (b)
The original RFC laid out 4 design candidates with no recommendation. This revision commits to option (b): unified KV addressed by
(engine, identity, key)triples. The case against (a), (c), (d) is in the body. Short version:Concrete byte-level encoding
Cross-engine reads, no cross-engine writes (v0)
extern host fn evm_storage_read(addr, key) -> [u8; 32](gated on RFC 0002)readU64(module, slot)signaturePerformance: <5-10% slowdown target
Back-of-envelope: prefix encoding adds ~10ns to the ~120ns
state_gethot path = ~8%. With per-instance prefix caching, drops well under 1ns. Real numbers from the implementation issue (#50).4-phase implementation roadmap
Total ~850 LoC. Smallest of the runtime-side RFC implementations.
Open questions reduced 6 -> 1
Why now
RFC 0001 and 0002 are now decision-ready (PRs #70 and #72). Continuing the expansion push leaves 0003 (project metadata) and 0005 (third-party protocols) — neither of which blocks any open implementation issue. RFC 0004, by contrast, is the pre-condition to #50 (the cross-engine state sharing implementation), which is the next sensible runtime-side ship.
The implementation will move significantly faster against a decision-ready RFC. The week we want to start #50 is the week this RFC needs to be at this level of detail.
What this PR does NOT do
What unblocks next
After 0004 is accepted, #50 implementation can start with clear specs. The four phases map directly to four small PRs.
The remaining unexpanded RFCs (0003 project metadata, 0005 third-party protocols) are lower priority — neither blocks a tracked implementation issue. The position paper #67 gains another concrete RFC to cite.