Skip to content

mtca: Serve checkpoints after sequencing and signing - #8974

Open
beautifulentropy wants to merge 3 commits into
paving-a-path-to-a-proper-publisher-08from
paving-a-path-to-a-proper-publisher-09
Open

mtca: Serve checkpoints after sequencing and signing#8974
beautifulentropy wants to merge 3 commits into
paving-a-path-to-a-proper-publisher-08from
paving-a-path-to-a-proper-publisher-09

Conversation

@beautifulentropy

@beautifulentropy beautifulentropy commented Aug 24, 2026

Copy link
Copy Markdown
Member
  • mtca: Serve the checkpoint at the end of each sequencing pass and after InitLog
  • mtca: Serve the latest checkpoint in Preflight, covering a process that stopped between publishing tiles and serving
  • mtca: Write the checkpoint with If-Match on the last ETag, or If-None-Match: * for a first write, and return ErrCheckpointChanged on 412
  • bs3/bs3test: Track ETags, enforce If-Match and If-None-Match with 412, and return 404 for a missing key
  • test/integration: Ensure the mtca and sunlight checkpoints concur

Cleanup:

  • cmd: Remove the unused MirrorConfig
  • trees/checkpoint: Remove SignedNoteForServing, replaced by SignedNote
  • trees/cosignature: Remove the SignatureLine method, replaced by the SignatureLine function
  • trees/tiles: Remove WriteCheckpoint, moved to mtca

Closes #9004

@beautifulentropy
beautifulentropy marked this pull request as ready for review August 24, 2026 16:18
@beautifulentropy
beautifulentropy requested a review from a team as a code owner August 24, 2026 16:18
@github-actions

Copy link
Copy Markdown
Contributor

@beautifulentropy, this PR appears to contain configuration and/or SQL schema changes. Please ensure that a corresponding deployment ticket has been filed with the new values.

@aarongable aarongable left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM with nits, modulo upstream PR being updated for tests to pass.

Comment thread cmd/boulder-mtca/main.go Outdated
Comment thread mtca/mtca.go Outdated
Comment thread mtca/mtca.go Outdated
@jsha

jsha commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Could you fill out the PR description? Also, a PR naming nit: CQRP refers to "Chrome's Landmark Service", not "CQRP Landmark Service." But I think it would be simplest to say "mtca: serve checkpoints with 2 cosignatures," and mention in the description that this is a requirement of the CQRP.

https://googlechrome.github.io/chromerootprogram/cqrp/draft-policy/

@beautifulentropy
beautifulentropy force-pushed the paving-a-path-to-a-proper-publisher-09 branch from 79101b0 to d6c1da1 Compare August 27, 2026 18:37
@beautifulentropy beautifulentropy changed the title mtca: Serve CQRP Landmark Service compatible checkpoints mtca: Serve checkpoints Sep 1, 2026
@beautifulentropy
beautifulentropy force-pushed the paving-a-path-to-a-proper-publisher-09 branch from d6c1da1 to 108e240 Compare September 1, 2026 21:44
@beautifulentropy
beautifulentropy force-pushed the paving-a-path-to-a-proper-publisher-09 branch 2 times, most recently from 57e86fa to f3b8801 Compare September 2, 2026 16:52
@beautifulentropy beautifulentropy changed the title mtca: Serve checkpoints mtca: Serve checkpoints after sequencing and signing Sep 2, 2026
@beautifulentropy
beautifulentropy force-pushed the paving-a-path-to-a-proper-publisher-09 branch from f3b8801 to ec16d7a Compare September 2, 2026 16:57
Comment thread bs3/bs3test/bs3test.go
Comment on lines +30 to +32
// PutObject fails with 412 Precondition Failed when IfNoneMatch is set and the
// key exists, or when IfMatch does not match the stored ETag. GetObject fails
// with 404 Not Found for a missing key.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd put these comments on PutObject and GetObject directly, since they're lacking doc comments.

Comment thread mtca/mtca.go
if err != nil {
return fmt.Errorf("checkpoint of tree size %d MTCA signature: %s", tree.N, err)
}
// Produce a signed note containing the MTCA's cosignature line.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: I've resisted commenting about having a blank line after every error-handling stanza because we don't have an official stance on that style, but I think we'd all agree that there should be a blank line before section-header comments.

Suggested change
// Produce a signed note containing the MTCA's cosignature line.
// Produce a signed note containing the MTCA's cosignature line.

Comment thread mtca/mtca.go
func (m *mtca) writeCheckpoint(ctx context.Context, signedNote []byte, prevETag *string) (*string, error) {
bucket := m.s3c.Bucket()
key := path.Join(m.logID.TilePrefix(), "checkpoint")
if prevETag == nil {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

My preference would be for the previous etag to be non-optional. That just means that the CA should read the current checkpoint file during startup, so it's initialized before the first call to writeCheckpoint.

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.

mtca: Serve checkpoint after sequencing and signing

3 participants