Skip to content

Fix multiple ZK integration issues: domain sep, schema parity, addres…#423

Open
soomtochukwu wants to merge 1 commit intoANAVHEOBA:mainfrom
soomtochukwu:fix/zk-issues
Open

Fix multiple ZK integration issues: domain sep, schema parity, addres…#423
soomtochukwu wants to merge 1 commit intoANAVHEOBA:mainfrom
soomtochukwu:fix/zk-issues

Conversation

@soomtochukwu
Copy link
Copy Markdown

…s binding

Wave Ticket

Wave Issue Key: ZK-011, ZK-071, ZK-072, ZK-073

Linked issue:

What Changed

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

  • I linked the ZK ticket keys above.
  • I ran the derived checks locally for the ticket I am implementing.
  • I updated tests or fixtures when the ticket changed circuit or witness behavior.

Wave Ticket

Wave Issue Key: ZK-___

Linked issue:

  • Closes #

What Changed

Validation

  • I linked the ZK ticket key above.
  • I ran node scripts/zk_ticket_check.mjs --issue-key ZK-___.
  • I ran the derived checks locally for the ticket I am implementing.
  • I updated tests or fixtures when the ticket changed circuit or witness behavior.

Validation output:

paste the command output here

…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment