-
Notifications
You must be signed in to change notification settings - Fork 115
feat(AggLayer claim e2e #4): e2e bridge-in flow with real bridge data #2413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
ff51513
feat: infra for reading full real claim data
mmagician 41a91c7
chore: move deser structs to test_utils.rs
mmagician f24574a
feat: use real claim data in bridge in test
mmagician b813eb0
fix: reverse keccak hash elements in ProofData serialization for MASM…
cursoragent 1fddf1e
refactor: replace mem_stream with mem_loadw_be in calculate_root
cursoragent c9d3211
chore: mem_loadw_le for merkle paths
mmagician cfa4c9a
chore: use LE for local word storage
mmagician f00766c
chore: mem_loadw_le for expected root
mmagician c8e2a7b
test: prepare leaf in LE-felt order
mmagician 609863e
chore: use LE for word storage in MMR frontier and canonical zeros
cursoragent 1daf2d1
chore: simplify inline comments
mmagician 3d7eca7
lints
mmagician e1fc980
chore: re-enable bridge-in tests
mmagician 5eab793
chore: remove dead code
mmagician 903ab2c
remove keccak_digest_to_word_strings; use SmtRoot/ExitRoot
mmagician 7d852f2
chore: avoid loc mem, keep is_odd on stack
mmagician e8c4306
lints
mmagician bdb93c2
remove unused import
mmagician File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
82 changes: 82 additions & 0 deletions
82
crates/miden-agglayer/solidity-compat/test-vectors/claim_asset_vectors.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| { | ||
| "amount": "0x00000000000000000000000000000000000000000000000000005af3107a4000", | ||
| "destination_address": "0x00000000b0E79c68cafC54802726C6F102Cca300", | ||
| "destination_network": 20, | ||
| "global_exit_root": "0xe1cbfbde30bd598ee9aa2ac913b60d53e3297e51ed138bf86c500dd7d2391e7d", | ||
| "global_index": "0x0000000000000000000000000000000000000000000000010000000000039e88", | ||
| "leaf_type": 0, | ||
| "leaf_value": "0xc58420b9b4ba439bb5f6f68096270f4df656553ec67150d4d087416b9ef6ea9d", | ||
| "mainnet_exit_root": "0x31d3268d3a0145d65482b336935fa07dab0822f7dccd865f361d2bf122c4905c", | ||
| "metadata_hash": "0x945d61756eddd06a335ceff22d61480fc2086e85e74a55db5485f814626247d5", | ||
| "origin_network": 0, | ||
| "origin_token_address": "0x2DC70fb75b88d2eB4715bc06E1595E6D97c34DFF", | ||
| "rollup_exit_root": "0x8452a95fd710163c5fa8ca2b2fe720d8781f0222bb9e82c2a442ec986c374858", | ||
| "smt_proof_local_exit_root": [ | ||
| "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
| "0xad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5", | ||
| "0xb4c11951957c6f8f642c4af61cd6b24640fec6dc7fc607ee8206a99e92410d30", | ||
| "0xe37d456460231cf80063f57ee83a02f70d810c568b3bfb71156d52445f7a885a", | ||
| "0xe58769b32a1beaf1ea27375a44095a0d1fb664ce2dd358e7fcbfb78c26a19344", | ||
| "0x0eb01ebfc9ed27500cd4dfc979272d1f0913cc9f66540d7e8005811109e1cf2d", | ||
| "0x887c22bd8750d34016ac3c66b5ff102dacdd73f6b014e710b51e8022af9a1968", | ||
| "0x3236bf576fca1adf85917ec7888c4b89cce988564b6028f7d66807763aaa7b04", | ||
| "0x9867cc5f7f196b93bae1e27e6320742445d290f2263827498b54fec539f756af", | ||
| "0x054ba828046324ff4794fce22adefb23b3ce749cd4df75ade2dc9f41dd327c31", | ||
| "0x4e9220076c344bf223c7e7cb2d47c9f0096c48def6a9056e41568de4f01d2716", | ||
| "0xca6369acd49a7515892f5936227037cc978a75853409b20f1145f1d44ceb7622", | ||
| "0x5a925caf7bfdf31344037ba5b42657130d049f7cb9e87877317e79fce2543a0c", | ||
| "0xc1df82d9c4b87413eae2ef048f94b4d3554cea73d92b0f7af96e0271c691e2bb", | ||
| "0x5c67add7c6caf302256adedf7ab114da0acfe870d449a3a489f781d659e8becc", | ||
| "0x4111a1a05cc06ad682bb0f213170d7d57049920d20fc4e0f7556a21b283a7e2a", | ||
| "0x77a0f8b0e0b4e5a57f5e381b3892bb41a0bcdbfdf3c7d591fae02081159b594d", | ||
| "0x361122b4b1d18ab577f2aeb6632c690713456a66a5670649ceb2c0a31e43ab46", | ||
| "0x5a2dce0a8a7f68bb74560f8f71837c2c2ebbcbf7fffb42ae1896f13f7c7479a0", | ||
| "0xb46a28b6f55540f89444f63de0378e3d121be09e06cc9ded1c20e65876d36aa0", | ||
| "0xc65e9645644786b620e2dd2ad648ddfcbf4a7e5b1a3a4ecfe7f64667a3f0b7e2", | ||
| "0xf4418588ed35a2458cffeb39b93d26f18d2ab13bdce6aee58e7b99359ec2dfd9", | ||
| "0x5a9c16dc00d6ef18b7933a6f8dc65ccb55667138776f7dea101070dc8796e377", | ||
| "0x4df84f40ae0c8229d0d6069e5c8f39a7c299677a09d367fc7b05e3bc380ee652", | ||
| "0xcdc72595f74c7b1043d0e1ffbab734648c838dfb0527d971b602bc216c9619ef", | ||
| "0x0abf5ac974a1ed57f4050aa510dd9c74f508277b39d7973bb2dfccc5eeb0618d", | ||
| "0xb8cd74046ff337f0a7bf2c8e03e10f642c1886798d71806ab1e888d9e5ee87d0", | ||
| "0x838c5655cb21c6cb83313b5a631175dff4963772cce9108188b34ac87c81c41e", | ||
| "0x662ee4dd2dd7b2bc707961b1e646c4047669dcb6584f0d8d770daf5d7e7deb2e", | ||
| "0x388ab20e2573d171a88108e79d820e98f26c0b84aa8b2f4aa4968dbb818ea322", | ||
| "0x93237c50ba75ee485f4c22adf2f741400bdf8d6a9cc7df7ecae576221665d735", | ||
| "0x8448818bb4ae4562849e949e17ac16e0be16688e156b5cf15e098c627c0056a9" | ||
| ], | ||
| "smt_proof_rollup_exit_root": [ | ||
| "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
| "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
| "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
| "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
| "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
| "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
| "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
| "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
| "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
| "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
| "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
| "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
| "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
| "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
| "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
| "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
| "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
| "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
| "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
| "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
| "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
| "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
| "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
| "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
| "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
| "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
| "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
| "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
| "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
| "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
| "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
| "0x0000000000000000000000000000000000000000000000000000000000000000" | ||
| ] | ||
| } |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder do we have an incorrect documentation for the
mem_streaminstruction or it was just already updated to work with the latest VM which uses LE.If we have
[1, 2, 3, 4, 5, 6, 7, 8]memory layout, where1is placed at memory address0and8at memory address7, then themem_streamwill load this double word onto the stack in the reversed order:[8, 7, 6, 5, 4, 3, 2, 1], where 8 is placed at the top. At the same time in themem_streamdocs it is written:Stack transition:
[C, B, A, a, ... ] -> [E, D, A, a', ... ], where[E, D] ← [mem[a..(a+4)], mem[(a+4)..(a+8)]],a' ← a+8.So it describes the transition in LE, not BE.
Also the necessity of whiting the LE
mem_streamby your own made me think whether should we create the LE version of themem_stream(the same way it was done withmem_storew_leand the others) and rename the currentmem_streaminto themem_stream_be.