Skip to content

mtca: write to tiles - #8900

Merged
jsha merged 5 commits into
mainfrom
do-the-thing
Jul 28, 2026
Merged

mtca: write to tiles#8900
jsha merged 5 commits into
mainfrom
do-the-thing

Conversation

@jsha

@jsha jsha commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

This wires up tiles.Frontier to the MTCA's initialization and sequencing code paths.

As of this change we are writing correctly-calculated RootHashes into the DB and properly-formed TBSCertificateLogEntry (wrapped in MTCLogEntry) into the tiles, along with all the hashes needed.

Add a Preflight() that loads the frontier into memory before Loop() starts.

Add Frontier.Clone() so sequence() can create a working copy but not reassign its in-memory state until signing and storing the checkpoint succeeds.

Replace Frontier.Flush(), with two methods Stage() and Publish() to write to a pending area and to the live area, respectively. This is not a full implementation of #8902. In particular we will still need code to recover state from the pending area on startup. And we should refine Publish() to use CopyObject instead of writing the same tiles from scratch.

Move fake S3 into its own package, bs3/bs3test.

Unittests written by Claude, reviewed and edited by me.

Base automatically changed from mtca-meets-profiles to main July 27, 2026 16:41
Add a `Preflight()` that loads the frontier into memory before `Loop()` starts.

Add `Frontier.Clone()` so `sequence()` can create a working copy but not
reassign its in-memory state until signing and storing the checkpoint succeeds.

Replace Frontier.Flush(), with two methods `Stage()` and `Publish()` to write to
a pending area and to the live area, respectively. This is not a full
implementation of #8902. In particular we will still need code to recover state
from the pending area on startup. And we should refine `Publish()` to use
`CopyObject` instead of writing the same tiles from scratch.

Move fake S3 into its own package, bs3/bs3test.

Unittests written by Claude, reviewed and edited by me.
@jsha
jsha marked this pull request as ready for review July 28, 2026 00:47
@jsha
jsha requested a review from a team as a code owner July 28, 2026 00:47
@jsha
jsha requested a review from ezekiel July 28, 2026 00:47
@github-actions

Copy link
Copy Markdown
Contributor

@jsha, 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.

ezekiel
ezekiel previously approved these changes Jul 28, 2026
@ezekiel
ezekiel requested review from a team and aarongable and removed request for a team July 28, 2026 20:24

@beautifulentropy beautifulentropy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks really good, just a proposal and a small comment regarding your recent refactor commit.

Comment thread mtca/mtca.go Outdated
Comment thread mtca/mtca.go
aarongable
aarongable previously approved these changes Jul 28, 2026
Comment thread mtca/mtca.go Outdated
Comment thread trees/tiles/tiles.go
Comment thread trees/tiles/tiles.go Outdated
@jsha
jsha dismissed stale reviews from aarongable and ezekiel via e6df237 July 28, 2026 21:33
Comment thread trees/tiles/tiles.go Outdated
@jsha
jsha merged commit 3ebcb61 into main Jul 28, 2026
18 checks passed
@jsha
jsha deleted the do-the-thing branch July 28, 2026 22:45
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.

4 participants