Fix multiple ZK integration issues: domain sep, schema parity, addres…#423
Open
soomtochukwu wants to merge 1 commit intoANAVHEOBA:mainfrom
Open
Fix multiple ZK integration issues: domain sep, schema parity, addres…#423soomtochukwu wants to merge 1 commit intoANAVHEOBA:mainfrom
soomtochukwu wants to merge 1 commit intoANAVHEOBA:mainfrom
Conversation
…s binding ## Wave Ticket Wave Issue Key: `ZK-011`, `ZK-071`, `ZK-072`, `ZK-073` Linked issue: - Closes ANAVHEOBA#255 - Closes ANAVHEOBA#347 - Closes ANAVHEOBA#348 - Closes ANAVHEOBA#349 ## What Changed - **ANAVHEOBA#255 (ZK-011)**: Added `COMMITMENT_DOMAIN_SEP` and updated `compute_commitment` in circuits and SDK to include domain separation tag and denomination for proper hash distinctness. - **ANAVHEOBA#347 (ZK-071)**: Fixed Public Input Schema parity by dynamically assembling `pool_id` and `denomination` on the smart contract side and reducing the submitted ZK proof payload down to the expected 6 fields. - **ANAVHEOBA#348 (ZK-072)**: Replaced the "lossy" address decoding with a cryptographic address hashing validation. `execute` now takes `recipient_address` directly and checks it against the public input `recipient` hash. - **ANAVHEOBA#349 (ZK-073)**: Updated `relayer` binding logic to clearly enforce `STELLAR_ZERO_ACCOUNT` sentinel behaviors when an optional relayer isn't passed in. - **Ignore**: Add `test_snapshots` and `target` to `.gitignore`. Note: The current implementation has been successfully tested on the contract side and all Rust/Soroban unit tests pass properly (21/21 ok). We have noticed that running the SDK test suite via Jest generates roughly 43 test failures; however, after cross-validating the `main` branch, we identified that these same Jest/TS failures were already present upstream before applying our modifications and are completely unrelated to these ZK ticket resolution logic changes. ## Validation - [x] I linked the ZK ticket keys above. - [x] I ran the derived checks locally for the ticket I am implementing. - [x] I updated tests or fixtures when the ticket changed circuit or witness behavior.
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.
…s binding
Wave Ticket
Wave Issue Key:
ZK-011,ZK-071,ZK-072,ZK-073Linked issue:
What Changed
COMMITMENT_DOMAIN_SEPand updatedcompute_commitmentin circuits and SDK to include domain separation tag and denomination for proper hash distinctness.pool_idanddenominationon the smart contract side and reducing the submitted ZK proof payload down to the expected 6 fields.executenow takesrecipient_addressdirectly and checks it against the public inputrecipienthash.relayerbinding logic to clearly enforceSTELLAR_ZERO_ACCOUNTsentinel behaviors when an optional relayer isn't passed in.test_snapshotsandtargetto.gitignore.Note: The current implementation has been successfully tested on the contract side and all Rust/Soroban unit tests pass properly (21/21 ok). We have noticed that running the SDK test suite via Jest generates roughly 43 test failures; however, after cross-validating the
mainbranch, we identified that these same Jest/TS failures were already present upstream before applying our modifications and are completely unrelated to these ZK ticket resolution logic changes.Validation
Wave Ticket
Wave Issue Key:
ZK-___Linked issue:
What Changed
Validation
node scripts/zk_ticket_check.mjs --issue-key ZK-___.Validation output: