Skip to content

ONLY COSE receipts in snapshots#7711

Merged
maxtropets merged 6 commits intomicrosoft:mainfrom
maxtropets:f/snapshot-cose-receipts
Mar 11, 2026
Merged

ONLY COSE receipts in snapshots#7711
maxtropets merged 6 commits intomicrosoft:mainfrom
maxtropets:f/snapshot-cose-receipts

Conversation

@maxtropets
Copy link
Copy Markdown
Collaborator

@maxtropets maxtropets commented Mar 5, 2026

Towards #7401.

Snapshots now carry COSE-signed receipts, which will be supported both by old ledgers signing both ways (classic + COSE), and new (COSE-only).

This will also enable PQC via COSE signature in the future, as the receipt format will remain COSE.

This needs #7712 to be merged for backwards compatibility with 6.x.

@maxtropets maxtropets self-assigned this Mar 5, 2026
@maxtropets maxtropets force-pushed the f/snapshot-cose-receipts branch 3 times, most recently from 55ebee0 to 2961443 Compare March 6, 2026 16:25
@maxtropets maxtropets force-pushed the f/snapshot-cose-receipts branch from 2961443 to e6657ce Compare March 6, 2026 16:35
@maxtropets maxtropets added the run-long-test Run Long Test job label Mar 6, 2026
@maxtropets maxtropets changed the title [Draft] COSE receipts in the snapshots COSE receipts in the snapshots Mar 9, 2026
@maxtropets maxtropets changed the title COSE receipts in the snapshots COSE receipts in snapshots Mar 9, 2026
@maxtropets maxtropets changed the title COSE receipts in snapshots ONLY COSE receipts in snapshots Mar 9, 2026
@maxtropets maxtropets marked this pull request as ready for review March 9, 2026 13:32
@maxtropets maxtropets requested a review from a team as a code owner March 9, 2026 13:32
Copilot AI review requested due to automatic review settings March 9, 2026 13:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates snapshot receipt handling to use COSE receipts (while retaining support for parsing legacy JSON receipts), enabling COSE-only ledgers and future PQC-friendly receipts.

Changes:

  • Switch snapshot generation to record/store COSE signatures rather than classic (node-cert-based) signatures.
  • Extend snapshot receipt deserialisation/verification to detect and handle COSE vs JSON receipt formats.
  • Update Python snapshot parsing to verify COSE receipts and update recovery test expectations.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/recovery.py Updates expected error string when snapshot signer doesn’t match the provided previous service identity.
src/node/test/snapshotter.cpp Adjusts snapshotter test helper to record a dummy COSE signature instead of classic signature fields.
src/node/snapshotter.h Removes classic signature fields from pending snapshot info and records COSE signatures for snapshot receipts.
src/node/snapshot_serdes.h Adds COSE receipt parsing/verification path and switches snapshot receipt serialisation to COSE.
src/node/node_state.h Hooks snapshotter signature recording to the COSE signatures table rather than classic signatures.
python/src/ccf/ledger.py Adds snapshot receipt verification dispatch (COSE vs JSON) and COSE snapshot receipt verification using service identity from the snapshot.

Comment thread src/node/snapshot_serdes.h
Comment thread python/src/ccf/ledger.py
Comment thread python/src/ccf/ledger.py
@maxtropets maxtropets removed the run-long-test Run Long Test job label Mar 11, 2026
@maxtropets maxtropets merged commit e75668a into microsoft:main Mar 11, 2026
17 checks passed
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.

3 participants