feat(rfc49): catalog-sampling rewire + ciphertext strip (WS-A..E)#1196
Closed
branarakic wants to merge 1 commit into
Closed
feat(rfc49): catalog-sampling rewire + ciphertext strip (WS-A..E)#1196branarakic wants to merge 1 commit into
branarakic wants to merge 1 commit into
Conversation
OT-RFC-49 "hosting follows access": curated/private CGs stop having cores prove the private ciphertext chunk and instead prove ONLY the public `_catalog` leaves. Cores hold zero private bytes; private data stays member-held. Contract (atomic redeploy — traps 1+2 ship together): - RandomSamplingLib.Challenge: snapshot (challengeLeafCount, challengeRoot) at issuance; submitProof verifies the PINNED pair and deletes the 4 live reads (kills the proof-race). - DKGKnowledgeAssets: catalogRoots/catalogLeafCounts + getters/setter/event; ciphertext maps deprecated-in-place (slot-preserving, avoids the masquerade footgun). - KnowledgeAssetsLifecycle: PublishParams/UpdateParams ciphertext->catalog; errors renamed; ACK_DIGEST_VERSION prefixed onto the publish/update ACK preimage (Trap 3, raw abi.encodePacked not EIP-712). - RandomSampling: curated draw + proof target ciphertext->catalog; stale exclusion comments corrected. - RandomSamplingStorage: clearOutstandingChallenges migration fn + version bump. Off-chain (must byte-agree with the contract verify): - core/crypto: computeCatalogRoot (single source of truth) over catalog leaves only (Trap 2 interleave); ack.ts ACK_DIGEST_VERSION + catalog members. - random-sampling: prover proves the catalog leaves read from the served `_catalog`; catalog-extractor; ciphertext-chunk extractor removed. - publisher (WS-D): computes the catalog commitment, ships PLAINTEXT catalog, inverts the storage-ACK "must be encrypted" gate to "must carry+verify catalogRoot"; byteSize = catalog footprint; shared catalogCommittedLeaves filter (excludes the post-publish committedRoot stamp) used by BOTH producer and prover so they cannot drift. - agent (WS-A): swmHostMode.stripCiphertext flag (default ON) — cores decline ALL private-ciphertext custody for curated CGs, retire the serve responders, gossip-off private fan-out; CLI plumbing. - agent: publishFromSharedMemory auto-injects the `_catalog` for curated CGs so the raw from-SWM publish shortcut works too (idempotent, before the seal). Validated: 721 evm tests; ACK contract-recovers-signer e2e; parity e2e (rebuilt root == on-chain catalogRoot, committedRoot excluded); 105/105 swm + 44/44 core crypto. Devnet (4 cores + 2 edges): stripped cores hold ZERO ciphertext + prove the catalog; finalize AND from-SWM paths both green; a strip-OFF baseline core holds the ciphertext (discriminator). Testnet, backcompat waived (clean break). Remaining is out-of-band: manual atomic redeploy + clear-challenges at an epoch boundary, internal authorization review, cross-rotation soak, DMaaST/HOLOS partner re-publish. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jun 16, 2026
Contributor
Author
|
Closing as redundant — the RFC-49 catalog-sampling strip (WS-A..E) landed on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OT-RFC-49 — catalog-sampling rewire + ciphertext strip
"Hosting follows access": for curated/private CGs, cores stop proving the private ciphertext chunk and instead prove only the public
_catalogleaves. Cores hold zero private bytes; private data stays member-held. Stacked onfeat/rfc49-public-projection(the SWM-half / catalog-model work is in its own PRs; this PR is only the contract+strip half).Testnet; backcompat waived (clean break — legacy curated KCs re-publish).
Contract change (one atomic redeploy — traps 1+2 must ship together)
RandomSamplingLib.Challengesnapshots(challengeLeafCount, challengeRoot)at issuance;submitProofverifies the pinned pair and deletes the 4 live reads → kills the proof-race (an update mid-period no longer fails an honest prover).DKGKnowledgeAssetsgainscatalogRoots/catalogLeafCounts+ getters/setter/event; the ciphertext maps are deprecated in place (slot-preserving — avoids the "legacy ciphertext root masquerades as catalog root" footgun and never shifts_authorKaNumberHighWater).KnowledgeAssetsLifecyclePublishParams/UpdateParamsciphertext→catalog (same byte widths); errors renamed;ACK_DIGEST_VERSIONprefixed onto the publish/update ACK preimage (Trap 3 — rawabi.encodePacked, not the EIP-712 domain).RandomSamplingcurated draw + proof target swapped ciphertext→catalog.RandomSamplingStorageclearOutstandingChallengesmigration fn + version bump.Off-chain (must byte-agree with the contract verify)
computeCatalogRoot(core/crypto) — single source of truth, a catalog-leaves-only tree (Trap 2 interleave);ack.tsversion + catalog members._catalog; ciphertext-chunk extractor removed.catalogRoot";byteSize= catalog footprint. A sharedcatalogCommittedLeavesfilter (excludes the post-publishcommittedRootstamp) is used by both the producer and the prover so they cannot drift.swmHostMode.stripCiphertextflag (default ON): cores decline all private-ciphertext custody for curated CGs, retire the serve responders, gossip-off private fan-out; CLI plumbing.publishFromSharedMemoryauto-injects the_catalogfor curated CGs so the raw/api/shared-memoryfrom-SWM publish shortcut works too (idempotent, before the author seal).The load-bearing invariant
The catalog leaf-hash + tree shape are byte-identical at publisher / contract / prover, and
catalogLeafCountis the post-dedupeV10MerkleTree.leafCount.Validation
EpochStorage/ShardingTableversion asserts).getCatalogRoot,committedRootcorrectly excluded.scripts/devnet-test-rfc49-catalog-sampling.sh: stripped cores hold zero ciphertext and prove the_catalog; a strip-OFF baseline core holds the ciphertext (non-vacuousness discriminator); finalize AND from-SWM publish paths both green; member edges hold the private data.Not in this PR (out-of-band / operational)
RandomSamplingStorageat an epoch boundary, runningclearOutstandingChallengesas part of the cut.🤖 Generated with Claude Code