Skip to content

feat(withdraw): ZK-073 redesign relayer binding and zero-relayer semantics - #458

Draft
s6pa1rta3n-lab wants to merge 1 commit into
ANAVHEOBA:mainfrom
s6pa1rta3n-lab:fix-issue-349
Draft

feat(withdraw): ZK-073 redesign relayer binding and zero-relayer semantics#458
s6pa1rta3n-lab wants to merge 1 commit into
ANAVHEOBA:mainfrom
s6pa1rta3n-lab:fix-issue-349

Conversation

@s6pa1rta3n-lab

Copy link
Copy Markdown

Summary

Wave Issue Key: ZK-073
Resolves #349

Redesigns relayer binding and zero-relayer semantics across Noir circuits, SDK, and Soroban smart contracts:

  • Canonical relayer encoding: Absent relayer is represented as None in SDK and encoded as canonical 0x00 32-byte field element with fee=0.
  • Circuit enforcement: Bidirectional validation in circuits/lib/src/validation/relayer.nr enforces that zero relayer requires zero fee, and non-zero fee requires non-zero relayer.
  • Contract enforcement: validate_relayer_and_fee in Soroban contract rejects malformed relayers and inconsistent fee structures.
  • Regression test suite: Distinguishes absent relayer from malformed relayer across SDK, Noir circuits, and Soroban contracts.

Verification

  • Noir circuits: nargo check --workspace & nargo test --package withdraw (35/35 tests pass).
  • TypeScript SDK: npm run build & npm test (57/57 suites pass, 860/860 tests pass).
  • Soroban Contracts: cargo test (93/93 tests pass).
  • Ticket Verification: node scripts/zk_ticket_check.mjs --issue-key ZK-073 --run (all derived ticket checks passed).

Payout Routing

  • EVM (Base/Arbitrum/Polygon/ETH): 0xF46C9F6d70C50BF81ef3588AB523a90a594a2F89
  • Stellar: GCL6OXAMLD75BMTINA6EMRUDWK5THQUSHMYNLSNBCJAPZJHNYJTUNIBC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ZK-073: Redesign relayer binding and zero-relayer semantics across SDK and contract code

1 participant