Skip to content

feat(zk): add zero-knowledge range proof service for private settlements - #1022

Merged
Abdulazeem-code merged 2 commits into
Abdulazeem-code:mainfrom
eeshasalaudeen734-creator:fix/935-zk-proof-service
Oct 24, 2026
Merged

Abdulazeem-code merged 2 commits into
Abdulazeem-code:mainfrom
eeshasalaudeen734-creator:fix/935-zk-proof-service

Conversation

@eeshasalaudeen734-creator

Copy link
Copy Markdown
Contributor

Summary

Adds the backend zero-knowledge proof service requested in #935. The service generates Groth16 range proofs proving that a settlement amount is strictly greater than zero and below the configured maximum, while only revealing a Poseidon commitment and the public limit.

Related Issue

Closes #935

Changes

  • Added stellar-payment-platform/src/services/zkProofService.js with:
    • proof generation for 0 < amount < maxLimit
    • Poseidon commitment binding without revealing the amount or blinding factor
    • compact binary-to-hex serialization of the proof and public signals
    • cached local verification with a sub-50ms steady-state target
    • input validation for amounts, limits, encodings and commitments
  • Added stellar-payment-platform/zk/rangeProof.circom and the compiled Groth16 artifacts.
  • Added stellar-payment-platform/tests/zkProofService.test.js covering generation, valid proof acceptance, tampered proof rejection, tampered commitment rejection, malformed encodings and verification latency.
  • Added snarkjs and ffjavascript dependencies.
  • Documented usage, artifact regeneration and the trusted-setup caveat in stellar-payment-platform/zk/README.md.

Verification

node node_modules/jest/bin/jest.js tests/zkProofService.test.js --runInBand --forceExit

Result: 10/10 tests passing. Steady-state verification measured below the 50ms acceptance target (median ~20ms locally).

Checklist

  • Tests added/updated
  • Documentation updated
  • No secrets or private keys committed
  • Issue linked with Closes #935

Notes

The checked-in proving key was generated from a local test setup. It is not suitable for protecting production funds; the README documents how to regenerate the artifacts and why a production trusted setup and audited circuit are required.

@vercel

vercel Bot commented Oct 21, 2026

Copy link
Copy Markdown

@eeshasalaudeen734-creator is attempting to deploy a commit to the Abdulazeem's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Oct 21, 2026

Copy link
Copy Markdown

@eeshasalaudeen734-creator Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Strips the payload this branch picked up (deleted api.js, truncated payment-dashboard/vite.config.js, unhooked package.json). No functional change to the branch's own work.
@vercel

vercel Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
stellar-tags Ready Ready Preview Oct 24, 2026 8:03pm UTC

@Abdulazeem-code
Abdulazeem-code merged commit 3b838ee into Abdulazeem-code:main Oct 24, 2026
9 of 17 checks passed

This branch was successfully deployed

1 active deployment
Preview — 86682f8f Deployed Oct 24, 2026 by vercel[bot]
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.

[Backend] Zero-Knowledge Proof Generation Service for Private Settlement Routing

2 participants