Skip to content

Compress Groth16 points without blst-java (ZeroJ ADR-0062) - #11

Closed
satran004 wants to merge 1 commit into
mainfrom
fix/adr-0062-proofcompressor
Closed

satran004 wants to merge 1 commit into
mainfrom
fix/adr-0062-proofcompressor

Conversation

@satran004

Copy link
Copy Markdown
Member

Prepares the usecases for ZeroJ PR #108 (ADR-0062). That PR removes the transitive foundation.icon:blst-java dependency (D3: a full move to an FFM binding of a source-built, checksum-pinned libblst). Code that imports supranational.blst.* will no longer compile against the next ZeroJ release.

Stacked on #10 (fix/demo-privacy-hardening), the top of the open #8 → #9 → #10 stack.

Changes

  • identity-kyc, nft-ownership, personhood-airdrop, selective-disclosure: ProofCompressor compresses through Bls12381Codecs.g{1,2}ToCompressed(g{1,2}FromUncompressed(..)) instead of new P{1,2}_Affine(..).compress().
    • The output bytes are identical (standard ZCash/IETF serialization).
    • The decode also checks subgroup membership, so a malformed point now fails here instead of on-chain.
  • account-ownership: production code already used Bls12381Codecs, but ProofCompressorTest used blst-java as its reference.
    • The test now checks fixed known answers for [k]G (k = 1, 2, 3, 7, 42, 12345, 987654321) and infinity on G1 and G2.
    • The expected bytes were computed independently with py_ecc 8.0.0. The k = 1 values match the published generator encodings.

Bls12381Codecs is already in ZeroJ 0.1.0-pre13, so this merges on the current pin and doesn't wait for a ZeroJ release.

Verification (local, Yaci DevKit running)

Build ZeroJ version Result
identity-kyc 0.1.0-pre13 (pinned) 14 passed
nft-ownership 0.1.0-pre13 28 passed, DevKit E2E ran
personhood-airdrop 0.1.0-pre13 39 passed, DevKit E2E ran
selective-disclosure 0.1.0-pre13 14 passed
account-ownership 0.1.0-pre13 and ZeroJ PR #108 snapshot 48 passed, 4 opt-in skipped
reusable-kyc (unchanged) ZeroJ PR #108 snapshot, -Dkyc.e2e=true 26 passed, DevKit E2E ran
the four migrated builds ZeroJ PR #108 snapshot 14 / 28 / 39 / 14 passed

Unchanged builds: the other eight builds (DPP, private-voting, pedersen-commitments, proof-of-reserves, the four minimal examples) pass unchanged on the ZeroJ #108 snapshot with DevKit E2E.

Opt-in tests not run (CI doesn't run them either): account-ownership's screenshot capture, the circuit measurement, and the full 19M-constraint key generation and proof.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MJrQUCDE5qGWa2qBzneFXL

ZeroJ ADR-0062 drops the transitive foundation.icon:blst-java dependency in
favour of an FFM binding, so code that imports supranational.blst no longer
compiles against the next ZeroJ release.

- identity-kyc, nft-ownership, personhood-airdrop, selective-disclosure:
  ProofCompressor compresses through Bls12381Codecs instead of
  P1_Affine/P2_Affine. Output bytes are identical; the decode also checks
  subgroup membership.
- account-ownership: ProofCompressorTest compared against blst-java's
  compress(); it now checks independent py_ecc 8.0.0 known answers for
  [k]G (k = 1, 2, 3, 7, 42, 12345, 987654321) and infinity on G1 and G2.

Bls12381Codecs is in ZeroJ 0.1.0-pre13, so this works on the current pin
and on the post-ADR-0062 snapshot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MJrQUCDE5qGWa2qBzneFXL
Base automatically changed from fix/demo-privacy-hardening to main November 22, 2026 04:08
@satran004 satran004 closed this Nov 22, 2026
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.

1 participant