feat: add getLeafValue procedure #2262
Merged
partylikeits1983 merged 35 commits intoagglayerfrom Jan 21, 2026
Merged
Conversation
Co-authored-by: igamigo <ignacio.amigo@lambdaclass.com>
Co-authored-by: Marti <marti@miden.team>
Collaborator
|
Also, for completeness we should be looking at V2 of the AggLayer contracts. For |
Contributor
Author
|
@mmagician Lets first merge #2238, then will rebase this PR against |
mmagician
approved these changes
Jan 20, 2026
Collaborator
mmagician
left a comment
There was a problem hiding this comment.
LGTM bar the duplicated file ✅
mmagician
approved these changes
Jan 21, 2026
bobbinth
reviewed
Jan 25, 2026
| const LEAF_DATA_NUM_WORDS = 8 | ||
| const LEAF_DATA_START_PTR = 0 | ||
|
|
||
| #! Given the leaf data key returns the leaf value. |
Contributor
There was a problem hiding this comment.
nit: might have been good to explain somewhere (briefly) that LFEAF_VALUE is just a sequential hash of LEAF_DATA using `Keccak hash function.
mmagician
added a commit
that referenced
this pull request
Jan 27, 2026
mmagician
added a commit
that referenced
this pull request
Jan 27, 2026
mmagician
added a commit
that referenced
this pull request
Jan 27, 2026
commit 193c618 Merge: 2dfa097 c1aec4d Author: Alexander John Lee <77119221+partylikeits1983@users.noreply.github.com> Date: Wed Jan 21 09:32:04 2026 -0500 Merge pull request #2262 from 0xMiden/ajl-agglayer-get-leaf-value feat: add `getLeafValue` procedure commit c1aec4d Merge: 1567d89 2dfa097 Author: riemann <aleqvids@gmail.com> Date: Wed Jan 21 09:00:06 2026 -0500 Merge branch 'agglayer' into ajl-agglayer-get-leaf-value commit 1567d89 Author: riemann <aleqvids@gmail.com> Date: Tue Jan 20 11:09:03 2026 -0500 fix: rm redundant file commit 8ebdc7b Merge: f200752 1a3b8a3 Author: riemann <aleqvids@gmail.com> Date: Mon Jan 19 18:31:18 2026 -0500 chore: merge agglayer commit f200752 Author: Marti <marti@miden.team> Date: Thu Jan 15 11:27:09 2026 +0000 fix: put data under correct key in advice map commit 1388770 Author: Marti <marti@miden.team> Date: Thu Jan 15 11:26:40 2026 +0000 fix: verify hash matches commitment commit d51bed1 Author: riemann <aleqvids@gmail.com> Date: Wed Jan 14 14:44:10 2026 -0500 feat: add hardcoded expected hash to test commit d61f836 Author: riemann <aleqvids@gmail.com> Date: Wed Jan 14 14:38:11 2026 -0500 refactor: deduplicate execute_program_with_default_host commit f9f2d57 Merge: a926316 d6b9954 Author: Alexander John Lee <77119221+partylikeits1983@users.noreply.github.com> Date: Wed Jan 14 13:00:24 2026 -0500 chore: pipe words to memory instead of manual `adv_loadw` commit d6b9954 Author: riemann <aleqvids@gmail.com> Date: Wed Jan 14 12:52:09 2026 -0500 refactor: add stack comments commit af29827 Author: Marti <marti@miden.team> Date: Wed Jan 14 11:36:41 2026 +0000 chore: pipe words to memory commit a926316 Merge: 359b3ef 3c3c29e Author: Marti <marti@miden.team> Date: Wed Jan 14 10:23:10 2026 +0000 Merge branch 'ajl-solidity-type-conversions' into ajl-agglayer-get-leaf-value commit 3c3c29e Author: riemann <aleqvids@gmail.com> Date: Tue Jan 13 20:25:30 2026 -0500 fix: update script roots commit 393ee03 Merge: d9c309a f93dc34 Author: riemann <aleqvids@gmail.com> Date: Tue Jan 13 19:49:30 2026 -0500 Merge branch 'agglayer' into ajl-solidity-type-conversions commit d9c309a Author: riemann <aleqvids@gmail.com> Date: Tue Jan 13 14:54:47 2026 -0500 refactor: rename file to eth_address_format commit 2288c0d Author: riemann <aleqvids@gmail.com> Date: Tue Jan 13 14:51:32 2026 -0500 refactor: rearrange EthAddressFormat commit 1264d24 Author: riemann <aleqvids@gmail.com> Date: Tue Jan 13 14:42:40 2026 -0500 refactor: rename to EthAddressFormat commit 359b3ef Author: riemann <aleqvids@gmail.com> Date: Tue Jan 13 14:17:43 2026 -0500 refactor: update test name commit a1a1c3d Author: Alexander John Lee <77119221+partylikeits1983@users.noreply.github.com> Date: Tue Jan 13 10:01:44 2026 -0500 Update crates/miden-agglayer/src/eth_address.rs Co-authored-by: Marti <marti@miden.team> commit a8e35d3 Author: riemann <aleqvids@gmail.com> Date: Mon Jan 12 18:24:46 2026 -0500 feat: implement AdviceMap key based getLeafValue procedure commit 576f907 Author: riemann <aleqvids@gmail.com> Date: Mon Jan 12 11:43:31 2026 -0500 feat: init getLeafValue() test commit a5f3309 Merge: ee0765c 4c6289d Author: riemann <aleqvids@gmail.com> Date: Mon Jan 12 10:21:09 2026 -0500 Merge branch 'ajl-solidity-type-conversions' into ajl-agglayer-get-leaf-value commit 4c6289d Author: riemann <aleqvids@gmail.com> Date: Fri Jan 9 17:48:11 2026 -0500 revert: undo drop addr4 in ethereum_address_to_account_id commit 3dc29f6 Author: riemann <aleqvids@gmail.com> Date: Fri Jan 9 17:46:28 2026 -0500 refactor: simplify from_account_id() & u32 check commit 99161e3 Author: riemann <aleqvids@gmail.com> Date: Fri Jan 9 17:21:11 2026 -0500 refactor: use u32assert2 commit 049e8be Author: riemann <aleqvids@gmail.com> Date: Fri Jan 9 17:17:56 2026 -0500 fix: lint doc check commit 43cbcf3 Author: riemann <aleqvids@gmail.com> Date: Fri Jan 9 16:58:57 2026 -0500 fix: clippy commit 3d45e7f Author: riemann <aleqvids@gmail.com> Date: Fri Jan 9 16:50:34 2026 -0500 refactor: simplify ethereum_address_to_account_id proc commit 2d0a89a Author: riemann <aleqvids@gmail.com> Date: Fri Jan 9 16:31:33 2026 -0500 refactor: improve EthAddress representation clarity and MASM alignment commit 99bcee7 Author: Alexander John Lee <77119221+partylikeits1983@users.noreply.github.com> Date: Fri Jan 9 16:12:06 2026 -0500 Update crates/miden-agglayer/src/utils.rs Co-authored-by: igamigo <ignacio.amigo@lambdaclass.com> commit 5dd9c85 Author: riemann <aleqvids@gmail.com> Date: Fri Jan 9 14:36:20 2026 -0500 refactor: update logic & comments to little endian commit a8238b6 Author: riemann <aleqvids@gmail.com> Date: Fri Jan 9 12:03:10 2026 -0500 refactor: implement suggestions & refactor commit 779ab24 Author: riemann <aleqvids@gmail.com> Date: Thu Jan 8 21:27:11 2026 -0500 refactor: use crypto util functions commit c71d9df Author: riemann <aleqvids@gmail.com> Date: Thu Jan 8 19:58:20 2026 -0500 refactor: rm unnecessary indirection commit 3c84da6 Author: riemann <aleqvids@gmail.com> Date: Thu Jan 8 19:17:49 2026 -0500 fix: formatting commit 46143c8 Author: riemann <aleqvids@gmail.com> Date: Thu Jan 8 19:14:48 2026 -0500 feat: add Solidity<>Miden address type conversion functions
mmagician
added a commit
that referenced
this pull request
Jan 27, 2026
Co-authored-by: Alexander John Lee <77119221+partylikeits1983@users.noreply.github.com>
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.
Resolves #2220
Builds on top of: #2238
This PR implements this solidity function in MASM:
To quickly test that the masm implementation of
get_leaf_valuematches the agglayer Solidity implementation, you can expirement by running this basic solidity contract in Remix:Link to Remix: Remix
Copy and paste this code into remix and run this test
test_keccak_hash_get_leaf_value:cargo test test_keccak_hash_get_leaf_value --package miden-testing