Skip to content

viewing, core: constraint set 11 (fullnode 60a7d03) for chain 22 - #11

Merged
dendisuhubdy merged 2 commits into
mainfrom
feat/cs11-chain22
Nov 21, 2026
Merged

dendisuhubdy merged 2 commits into
mainfrom
feat/cs11-chain22

Conversation

@dendisuhubdy

Copy link
Copy Markdown
Member

The explorer's Poseidon2 copy (the viewing WASM and randscan-core::notecommit) moves to zkVM constraint set 11, the build in fullnode PR #194 (feat/cs11-revendor 60a7d031) for chain 22 and v0.8.7. Chain cut: once this is deployed, viewing keys pasted into randscan.org open chain-22 envelopes only, not chain-21 ones. Do not merge or deploy before the cut. Nothing is deployed from this PR.

What moved

  • crates/randscan-core/src/poseidon2_constants.rs is fullnode 60a7d03's Grain table, copied verbatim (ZKVM-107; it is the table p3-goldilocks 0.7.0 ships). The viewing crate compiles it by #[path].
  • notecommit tests pin set-11 values:
    • the permutation's known answers;
    • the table SHA-256 a0289c4f…;
    • the shared vector's pk/from/cm;
    • the chain-15 openings, re-committed.
  • randscan-viewing/tests/vectors.json and fixtures/memo.json are re-sealed with fullnode 60a7d03's zkvm crate (a throwaway generator, not committed). Keys, note, salt and inputs are the same as before. fixtures/chain20_block1664_attest.json keeps the public openings and now carries their set-11 commitments (see its _source).
  • frontend/public/viewing/randscan_viewing_bg.wasm is rebuilt with wasm-pack build --release --target web (sha256 c6c04411…7ecc). The JS glue is byte-identical.
  • tests/real_node.rs no longer passes --bundle-gas-limit, so the node writes its own pin. It accepts 20 479 (set 9) or 22 527 (set 11), so CI still passes against the latest release (v0.8.6), and the test also works on a set-11 node.

Left for the cut (not guessable now)

  • DEFAULT_EXPECTED_CHAIN_ID / DEFAULT_EXPECTED_GENESIS (randscan-core/src/types/chain.rs), frontend/src/lib/chainPin.ts and the deployed RANDSCAN_EXPECTED_GENESIS still name chain 21 ca76c276…. They move to chain 22's genesis hash once it exists.

Tests (build droplet, Rust 1.98.1)

Run Result
crates/randscan-viewing: cargo test all pass (vectors, memo, ownership, rebuild, rpl_disclosure, poseidon2, lib)
cargo test -p randscan-core 73 passed
cargo test --all pass. No DATABASE_URL, so the Postgres-backed and real-node cases skipped
frontend: npm test 86 passed, 1 skipped
rebuilt WASM key_info on the vectors' spend key the set-11 nk c82fc432…

Not run: real_node.rs against a set-11 rand-node (no Postgres on the build host).

🤖 Generated with Claude Code

https://claude.ai/code/session_01YGaYNLS2uLR7w6m2JtejVo

…, chain 22) — the Grain Poseidon2 table, set-11 vectors, the viewing wasm rebuilt

Set 11 replaced the Poseidon2 round constants (ZKVM-107, the Grain table
p3-goldilocks 0.7.0 ships), which moves every viewing key, pk, ovk, address,
commitment, nullifier and H_IN the explorer recomputes in the browser and in
the indexer.

- randscan-core/src/poseidon2_constants.rs: fullnode 60a7d03's file verbatim
  (the viewing crate compiles it by #[path]); its tests compare the table with
  p3-goldilocks' and pin the new known-answer vectors.
- notecommit tests: the set-11 permutation vectors, the table's SHA-256
  (a0289c4f...), the shared vector's pk/from/cm, the chain-15 openings
  re-committed under set 11.
- randscan-viewing tests/vectors.json and fixtures/memo.json re-sealed by a
  throwaway generator against the fullnode 60a7d03 zkvm crate from the same
  keys, note, salt and inputs; fixtures/chain20_block1664_attest.json keeps
  chain 20's public openings with their set-11 commitments (noted in _source).
- frontend/public/viewing/randscan_viewing_bg.wasm rebuilt with wasm-pack from
  this source (the JS glue is unchanged).
- real_node.rs: no --bundle-gas-limit (the node writes its own pin) and the
  check accepts set 9's 20 479 or set 11's 22 527, so it runs on either build.

Not moved here, at the cut: DEFAULT_EXPECTED_GENESIS / chainPin.ts (chain 21).

Build droplet, Rust 1.98.1: randscan-viewing cargo test all pass (8 suites);
randscan-core 73 passed; cargo test --all passes (no DATABASE_URL, so the
Postgres and real-node cases skip); frontend npm test 86 passed, 1 skipped; the
rebuilt wasm's key_info derives the set-11 nk from the vectors' spend key.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YGaYNLS2uLR7w6m2JtejVo
@codecov

codecov Bot commented Nov 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@dendisuhubdy
dendisuhubdy merged commit c3b1144 into main Nov 21, 2026
8 checks passed
@dendisuhubdy
dendisuhubdy deleted the feat/cs11-chain22 branch November 21, 2026 04:51
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