mirror_worker: cosigner key, /metadata, and add-checkpoint#261
mirror_worker: cosigner key, /metadata, and add-checkpoint#261lukevalenta wants to merge 2 commits into
Conversation
c2b6fdd to
e68a4a6
Compare
|
/bonk review |
|
PR #261 – Mirror Worker: cosigner key, /metadata, and add‑checkpoint SummaryThe changes introduce full support for the mirror’s cosigner key, a Findings (ordered by severity)
Overall AssessmentThe implementation fulfills the feature requirements, adheres to the C2SP mirror specification, and includes robust testing and documentation. No functional regressions or lint failures are evident. Minor stylistic tweaks are optional. Recommendation: Approve and merge. |
e68a4a6 to
691037e
Compare
Addressed.
Already in the single-chained form. |
5ef8208 to
8b0f5db
Compare
8b0f5db to
299d2a1
Compare
ab6cc24 to
ac6a7c0
Compare
|
/bonk review again |
|
PR #261 – Mirror Worker: cosigner key, SummaryThe changes introduce full support for the mirror’s cosigner key, a Findings
RecommendationThe implementation satisfies the feature requirements, passes all unit tests, and shows no lint or build issues. I recommend approval and merge. |
Build on the crate skeleton with the mirror's key handling and the pending-checkpoint submission path: - Parse trusted per-origin log keys (ML-DSA-44 / subtree/v1) from config and verify submitted checkpoints against them. - Load the mirror's own ML-DSA-44 cosigner key and publish its SPKI, algorithm, and per-log config at GET /metadata. - Handle POST /add-checkpoint via a per-origin MirrorState Durable Object, whose single-threaded fetch handler makes the check-verify-persist update of the pending checkpoint atomic. The MirrorState DO also defines committed and next-entry state and RPCs beyond what add-checkpoint uses; these are covered by the DO's format/round-trip unit tests and will be used by the add-entries endpoint.
ac6a7c0 to
1686137
Compare
Fix some additional nits from an offline AI review. * Bound /commit by the persisted-entry frontier (next_entry) rather than pending, enforcing committed <= next_entry. * Propagate DO storage read errors instead of defaulting to the zero state, which could let an old_size == 0 request roll back a real checkpoint (same fix applied to witness_worker). * Build the mirror signer from the already-decoded DER rather than re-parsing the PEM.
Build on the crate skeleton (#260) with the mirror's key handling and the pending-checkpoint submission path:
The MirrorState DO also defines committed and next-entry state and RPCs beyond what add-checkpoint uses; these are covered by the DO's format/round-trip unit tests and will be used by the add-entries endpoint.