[MEL] - Implement a Unified Replay Binary for MEL#4553
Open
rauljordan wants to merge 18 commits intomasterfrom
Open
[MEL] - Implement a Unified Replay Binary for MEL#4553rauljordan wants to merge 18 commits intomasterfrom
rauljordan wants to merge 18 commits intomasterfrom
Conversation
…ro into raul/mel-unified-binary
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #4553 +/- ##
==========================================
- Coverage 34.16% 33.99% -0.18%
==========================================
Files 494 499 +5
Lines 58932 59271 +339
==========================================
+ Hits 20137 20152 +15
- Misses 35249 35581 +332
+ Partials 3546 3538 -8 |
Contributor
❌ 15 Tests Failed:
View the top 3 failed tests by shortest run time
📣 Thoughts on this report? Let Codecov know! | Powered by Codecov |
…ro into raul/mel-unified-binary
…ro into raul/mel-unified-binary
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.
This PR brings over changes from #4152 into master.
Summary
unified-replaybinary (cmd/unified-replay/) that combines both MEL (Message Extraction Layer) message extraction and block production into a single WASM-compilable replay programGetEndParentChainBlockHashhost I/O opcode to support MEL provingmelwavmiopackage providing WASM imports and native stubs for MELHow it Works
The unified replay binary is quite easy to understand in pythonic pseudocode. It essentially either runs message extraction or block production depending on some of the input or computed values. This means that validation of Arbitrum becomes a message extraction followed by execution of those extracted messages:
Changes
New files
cmd/unified-replay/main.go— Unified replay entry point handling two modes: block production (when a MEL message hash is present) and message extraction (walking parent chain blocks backward to extract messages)cmd/unified-replay/db.go— Preimage-backed database adapter for state trie lookups during replaycmd/unified-replay/preimage_resolver.go— WAVM preimage resolver and blob reader implementationsmelwavmio/— MEL-specific WAVM I/O package with WASM importsModified files
GlobalStateto 4 bytes32 slots with backward-compatible hashing, addedGetEndParentChainBlockHashopcode, and made binary output filenames configurablebuild-unified-replay-envandbuild-unified-wasm-bintargets