Skip to content

CLAIM note followup: helper functions & refactoring#2270

Merged
partylikeits1983 merged 29 commits intoagglayerfrom
ajl-claim-note-follow-up
Jan 22, 2026
Merged

CLAIM note followup: helper functions & refactoring#2270
partylikeits1983 merged 29 commits intoagglayerfrom
ajl-claim-note-follow-up

Conversation

@partylikeits1983
Copy link
Contributor

This PR refactors ClaimNoteParams into a nested struct and ties in address conversion utility procedures into the CLAIM note flow.

Resolves item 1.1 & 2.8 of: #2237

@partylikeits1983 partylikeits1983 force-pushed the ajl-claim-note-follow-up branch 3 times, most recently from b64be66 to 4b56f47 Compare January 14, 2026 01:13
@partylikeits1983 partylikeits1983 changed the base branch from ajl-agglayer-asset-conversion to ajl-solidity-type-conversions January 14, 2026 01:14
@partylikeits1983 partylikeits1983 force-pushed the ajl-claim-note-follow-up branch from 4b56f47 to e0c959b Compare January 14, 2026 01:17
@partylikeits1983 partylikeits1983 added no changelog This PR does not require an entry in the `CHANGELOG.md` file agglayer PRs or issues related to AggLayer bridging integration labels Jan 14, 2026
@partylikeits1983 partylikeits1983 self-assigned this Jan 14, 2026
@partylikeits1983 partylikeits1983 marked this pull request as ready for review January 14, 2026 20:12
@partylikeits1983 partylikeits1983 requested review from bobbinth and removed request for bobbinth January 14, 2026 20:19
Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thank you. Not a full review, but I left some comments inline about how the code can be improved further.

Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thank you. I left some more comments inline.

Base automatically changed from ajl-solidity-type-conversions to agglayer January 16, 2026 08:13
Base automatically changed from agglayer to next January 16, 2026 08:48
@partylikeits1983 partylikeits1983 changed the base branch from next to agglayer January 16, 2026 17:59
@@ -128,17 +130,57 @@ proc batch_pipe_double_words
exec.mem::pipe_double_words_preimage_to_memory drop
end
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bobbinth this is where I validate that the advice map keys passed to the claim procedure do in fact hash to the values in the AdviceMap. Since this writes to global memory, then does an FPI call to the bridge, do we need to validate again that the destination_address is valid and the values in the AdviceMap were not tampered with?

Comment on lines +148 to +158
proc get_destination_account_id_data
mem_load.DESTINATION_ADDRESS_4
mem_load.DESTINATION_ADDRESS_3
mem_load.DESTINATION_ADDRESS_2
mem_load.DESTINATION_ADDRESS_1
mem_load.DESTINATION_ADDRESS_0
# => [address[5]]

exec.eth_address::to_account_id
# => [prefix, suffix]
end
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot that the values were already in global memory, this procedure does not need to read from the AdviceMap, which simplifies things a lot.

Copy link
Collaborator

@mmagician mmagician left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few comments I left still worth addressing in this PR, but once these are done - ready to merge ✅
This looks much cleaner overall, thank you!

Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thank you! I left some comments inline - but I would address anything that is non-trivial in a follow-up PR.

Comment on lines +86 to +87
/// Global index (uint256 as 8 u32 values)
pub global_index: [u32; 8],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would introduce a GlobalIndex type for this - but let's do it in a follow-up.

Comment on lines +256 to +257
// TODO: Make CLAIM note a Network Note once NoteAttachment PR lands
let tag = NoteTag::new(0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note attachment PR has already been merged, but let's make this change in the follow-up.

@partylikeits1983 partylikeits1983 merged commit a36bc67 into agglayer Jan 22, 2026
15 checks passed
@partylikeits1983 partylikeits1983 deleted the ajl-claim-note-follow-up branch January 22, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agglayer PRs or issues related to AggLayer bridging integration no changelog This PR does not require an entry in the `CHANGELOG.md` file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants