feat(remittance): add signed split allocation quotes#1064
Open
jamilahmadzai wants to merge 1 commit into
Open
Conversation
Author
|
Checked the failing CI jobs after opening this PR. The failures are outside the touched scope:
This PR only changes cargo test -p remittance_split test_get_split_allocations_signed -- --nocapture
git diff --check |
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.
Summary
Closes #1011.
Adds an authenticated allocation-quote path for
remittance_split:get_split_allocations_hash(caller, total_amount, deadline)so callers can compute the exact quote hash off-chain.get_split_allocations_signed(caller, total_amount, deadline, request_hash)to validate amount, deadline, hash binding, and caller authorization before returning allocations.allocfunctional tag, network id, current contract address, caller address, total amount, and deadline.get_split_allocationspath so signed and unsigned quote semantics stay in lockstep.Security notes
deadline <= nowexpires,deadline > now + MAX_DEADLINE_WINDOW_SECSis invalid, and the exact max-window boundary is accepted.Tests
cargo test -p remittance_split test_get_split_allocations_signed -- --nocapturecargo clippy -p remittance_split --all-targetscompleted with existing warnings.git diff --checkKnown baseline: the full
cargo test -p remittance_split -- --nocapturesuite is currently red on existing tests unrelated to this change. The failures include older tests still initializing splits with50/30/15/5-style values whileinitialize_splitnow validates basis points summing to10_000, plus an existing event-topic assertion. The focused tests added for this issue pass.Bounty: GrantFox OSS campaign for issue #1011.