Repository navigation
Conversation
… the docs (agentrust-io#178) docs/mmr-checkpoint.md said the registry conforms to draft-mih-scitt-checkpointed-local-log without a revision. It now names -02 and the SCITT MMR profile it builds on, says the checkpoint is the registry's JSON form rather than -02's COSE form, and gives the field mapping and the places trace_verify differs from -02. tests/test_mmr_kat39.py runs the -02 vectors against trace_verify: - the 21-entry log at every prefix: node count, peaks, concatenated commitment and its SHA-256 - the four-checkpoint chain mapped to the JSON shape, through verify_checkpoint_link and verify_checkpoint_chain, with the proofs trace_verify generates compared to the vectors' - the negative cases: eleven are refused by the chain verifier; the leaf_count case is checked as MMR arithmetic because the registry checkpoint has no leaf_count; a proof on a first checkpoint and a no-growth checkpoint are pinned as differences from -02 The vectors are pinned byte-exact under tests/fixtures/cll-02/ with the upstream commit, and .gitattributes keeps their line endings. No verifier behaviour changes. Signed-off-by: Raghuvar Karthik Durga <177662415+drk-ram@users.noreply.github.com>
drk-ram
force-pushed
the
feat/cll-02-mmr-vectors-178
branch
from
November 25, 2026 16:40
6ce7dc3 to
dafdb80
Compare
rajnisht7
reviewed
Nov 30, 2026
rajnisht7
left a comment
Member
There was a problem hiding this comment.
Docs look mostly good, but the new “Where trace_verify differs from -02” section is incomplete.
- Key rotation: CLL-02 §2 lets you rotate by appending an entry signed by the old key that names the new one. We reject any key_id change in verify_checkpoint_link because the JSON format has no rotation statement. This should be listed as a difference.
- Log identity: CLL-02 uses the CWT pair (iss, sub). We only map sub -> log_id and have no iss. Worth saying explicitly that this is a partial mapping.
- Cadence: CLL-02 §4.4 requires a declared cadence once you start publishing. We don’t carry it. The mapping table should note that we’re claiming MMR construction compatibility, not full checkpoint-discipline conformance.
- sub-per-checkpoint-is-first-seen: Upstream marks this expected_result: "first-seen", not FAIL. The test treats it as a refused negative. The verifier correctly rejects an identity change mid-chain, but the characterisation should be “identity-switch / continuity case”, not “upstream negative that fails”.
- new_peaks: The mapping table says the full peak list is in consistency_proof.new_peaks. That’s only true for checkpoints that actually have a proof (first checkpoint and no-growth ones don’t).
The first-checkpoint proof acceptance and no-growth behaviour are already correctly documented and pinned, no change needed there. Tests and MMR construction coverage look good.
Would be good to add the missing differences to the conformance section (and a small note on the sub- vector) so readers don’t treat this as full CLL-02 checkpoint conformance.
This branch has not been deployed
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.
What and why
Closes #178 (steps 1 and 2; the optional COSE emitter in step 3 is not part of this PR).
docs/mmr-checkpoint.mdsaid the registry conforms todraft-mih-scitt-checkpointed-local-logwithout naming a revision, and nothing in CI checked the MMR layer against anyone else's answers.Docs. The status line now names
draft-mih-scitt-checkpointed-local-log-02and the MMR profile it builds on (draft-bryce-cose-receipts-mmr-profile-03, nowdraft-ietf-scitt-receipts-mmr-profile). A new "Conformance to CLL -02" section says what is claimed: the MMR construction conforms; the checkpoint stays the registry's JSON form, signed over a JSON digest, and is not -02's COSE wire form. It adds the field mapping table and lists wheretrace_verifydiffers from -02.Tests.
tests/test_mmr_kat39.pynow also runs the -02 vectors againsttrace_verify. The vectors are pinned byte-exact intests/fixtures/cll-02/(upstream commit43300c3,SHA256SUMSchecked by a test,.gitattributeskeeps the line endings):log_size0 to 39): node count, peak hashes, concatenatedcommitment,commitment_sha256.cp1tocp4are mapped into the registry's JSON checkpoint, re-signed with the vectors' fixture key, and run throughverify_checkpoint_linkandverify_checkpoint_chain. The consistency proofstrace_verifygenerates for 4 to 11 and 11 to 39 equal the vectors' proofs.fail-*vector that has a counterpart in the JSON form, plussub-per-checkpoint-is-first-seen.Registry impact
registry/Checks
pytestpassestools/validate_registry.py,tools/validate_producers.py)docs/anchor-format.mdis updated in the same PR, and existing inclusion proofs still verify. Neither changed: no verifier code is touched.Notes for reviewers
What the negatives show. Ten
fail-*vectors are refused byverify_checkpoint_chainwith a named reason: a wrong or incompletelog_size, a missing, tampered, mis-sized, mis-ordered or short proof, a commitment that does not extend the previous one, a skipped registration, and a no-growth checkpoint with a changed commitment.sub-per-checkpoint-is-first-seenis refused too, as alog_idmismatch. The other fourfail-*vectors do not become refusals, and the tests say so instead of hiding it:fail-leaf-count-mismatch: the registry checkpoint has noleaf_count, so the vector cannot reach its verifier. The test holds it to_mmr.leaf_count(log_size), which the honest vectors satisfy and this one does not.fail-proof-on-first:trace_verifydoes not refuse it. The registry's proof is outside the signed body and a first checkpoint's proof is never read. -02 requires refusal. I pinned today's behaviour and listed it in the docs rather than change a published verifier in this PR. If you want it refused, it is a short check inverify_checkpoint_chain, and the pinned test flips.fail-commitment-cbor-arrayandfail-proof-legacy-mapbreak -02 wire encodings. The registry's JSON proof is thesize_a/size_b/old_peaks/witness/new_peaksshape thatfail-proof-legacy-mapdescribes, so neither has a counterpart. A test fails if a refresh adds a vector id the tests do not account for.No-growth checkpoints.
cp3repeatscp2's size._mmr.verify_consistencyaccepts the unchanged case and rejects the changed one, butverify_checkpoint_linkrequiresmmr_sizeto strictly increase, so any chain containingcp3is refused. The registry adds a leaf per checkpoint and never emits one, so this is a difference from -02, not a bug. The tests check both layers, thatcp1,cp2,cp4verify as a chain, and that the full four fail at exactly one link.Mapping.
rootis the right-to-left bag of the vectors' peaks, folded independently in a test rather than throughroot_from_peaks.new_peaksis the peaks the consistency-paths reach followed by the right-peaks, which equals the commitment's peaks for the honest proofs. The negatives use the same mapping, so a truncated right-peaks list shortensnew_peaks.Mutation check. I mutated
_mmr.pyand_checkpoint.pyone change at a time in a scratch copy: interior hash position, leaf prefix, peak bagging order, the old-peak path comparison, proof size check, strict growth,prev_sizecontinuity,log_id, and the missing-proof check. Each is killed by these tests. Thenew_peakscount check and theroot_bcheck each survive when removed alone, because either one refuses a truncated right-peaks list. Removing both is killed.Validation, Python 3.11.9, Windows:
python -m unittest tests.test_mmr_kat39: 25 tests OK.python -m pytest tests/test_mmr_kat39.py -q: 25 passed, 54 subtests passed.coverage run --branch): 306 statements and 76 branches, one miss, the pre-existingunittest.main()guard. Everything added is covered.ruff check .: all checks passed.python tools/validate_registry.pyandpython tools/validate_producers.py: valid.git diff origin/main...HEAD --check: clean.python -m unittest discover -s tests(the CI command, withsrconPYTHONPATHbecausetrace_verifyis not pip-installed here): 462 tests, 1 failure.test_release_safeguards.py::TestInstalledArtifactChecks::test_actual_chain_controlsasserts a/-terminated path suffix and fails on Windows. WithoutPYTHONPATH, four more installed-package tests fail withNo module named trace_verify. All five fail the same way onorigin/mainand none touches this change.When the CLL maintainers ship a new revision, refresh
tests/fixtures/cll-02/and the revision named indocs/mmr-checkpoint.mdtogether. A test fails if the docs stop naming the fixture's draft revisions.