Feat/deterministic batch operation ordering (#553)#694
Merged
Jagadeeshftw merged 1 commit intoJagadeeshftw:masterfrom Mar 2, 2026
Merged
Conversation
|
@Chucks1093 is attempting to deploy a commit to the Jagadeesh B's projects Team on Vercel. A member of the Team first needs to authorize it. |
Owner
|
please resolve the conflicts |
Contributor
Author
|
Okay on it |
f96a7c9 to
fdd7ece
Compare
Contributor
Author
|
@Jagadeeshftw can you quickly merge? |
Owner
|
@Chucks1093 Can you please resolve the conflicts? |
fdd7ece to
4469941
Compare
Contributor
Author
|
@Jagadeeshftw please review and merge |
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.
Closes #553
Changes
contracts/bounty_escrow/contracts/escrow/src/lib.rsorder_batch_lock_items(sort bybounty_id, ascending)order_batch_release_items(sort bybounty_id, ascending)batch_lock_fundsandbatch_release_fundsto processordered_itemsinstead of caller-provided order.# Ordering Guaranteedocs to both batch functions.soroban/contracts/program-escrow/src/lib.rsorder_batch_registration_items(sort byprogram_id, ascending)batch_register_programsto run validation, duplicate checks, auth collection, and execution over sorted input.# Ordering Guaranteedocs tobatch_register_programs.contracts/bounty_escrow/contracts/escrow/src/test.rstest_batch_lock_funds_deterministic_ordering_by_bounty_idtest_batch_release_funds_deterministic_ordering_by_bounty_idsoroban/contracts/program-escrow/src/test.rstest_batch_register_order_independent_resultsDeterministic Ordering Guarantee
Batch operations covered in this PR now execute in deterministic, contract-defined order independent of caller input:
batch_lock_funds-> ascendingbounty_idbatch_release_funds-> ascendingbounty_idbatch_register_programs-> ascendingprogram_idThis reduces input-order ambiguity and improves reproducibility across clients/indexers.
Testing
Executed locally:
contracts/bounty_escrow/contracts/escrowcargo test --lib -- --nocapture-> 517 passedsoroban/contracts/program-escrowcargo test --lib -- --nocapture-> 24 passedNotes
contracts/program-escrow(top-level, non-soroban path) currently has pre-existing syntax errors (unclosed/mismatched delimiters) and fails to compile independently; this PR does not modify that crate.