Skip to content

tiles: add Frontier to read/write tiles#8896

Open
jsha wants to merge 8 commits into
mainfrom
write-tiles-only
Open

tiles: add Frontier to read/write tiles#8896
jsha wants to merge 8 commits into
mainfrom
write-tiles-only

Conversation

@jsha

@jsha jsha commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Frontier is loaded at MTCA startup, tracks appended entries and hash tiles, and writes them to storage.

Implementation is written by me. The unittest in tiles_test.go was written by Claude and reviewed and lightly edited by me (including rewriting the comments in my own words).

Move subtree's mth() function out from the unittest and export it, since it's needed to calculate a hash to append to a parent tile once its child tile becomes full.

Fixes #8894

Frontier is loaded at MTCA startup, tracks appended entries and hash tiles, and
writes them to storage.

Implementation is written by me. The unittest in tiles_test.go was written by
Claude and reviewed and lightly edited by me (including rewriting the comments
in my own words).
@jsha
jsha marked this pull request as ready for review July 21, 2026 20:00
@jsha
jsha requested a review from a team as a code owner July 21, 2026 20:00
@jsha
jsha requested a review from ezekiel July 21, 2026 20:00
@jsha

jsha commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

FYI to reviewers: I was going to implement RootHash in another branch, but it wound up being quick enough I decided to include it in this one. Also, in implementing RootHash it became clear I should switch up the design to allow empty tiles on the frontier and forbid full ones (instead of the other way around). So I did that refactoring and everything got a little bit nicer.

ezekiel
ezekiel previously approved these changes Jul 23, 2026

@ezekiel ezekiel 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.

It is cool to see this pull together the entry Bundles and factored-out S3 code to get to the point of a really well-structured and readable tiles package.

Just two tiny comments to consider from me.

Comment thread trees/tiles/tiles.go
Comment thread trees/subtree/subtree.go
@ezekiel
ezekiel requested review from a team and aarongable and removed request for a team July 23, 2026 00:07
Comment thread trees/subtree/subtree.go
Comment thread trees/tiles/tiles.go Outdated
Comment thread trees/tiles/tiles.go
Comment thread trees/tiles/tiles.go
Comment thread trees/tiles/tiles.go Outdated
Comment thread trees/tiles/tiles.go Outdated
Comment thread trees/tiles/tiles.go Outdated
Comment thread trees/tiles/tiles.go Outdated
Comment thread trees/subtree/subtree.go Outdated
Comment thread trees/tiles/tiles.go
@jsha

jsha commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

Pushed responses to most; will think about where to put MTH().

@jsha jsha mentioned this pull request Jul 24, 2026
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: write tiles to storage

3 participants