Skip to content

Document tiled storage and add performance coverage - #56

Draft
Amaury Chamayou (achamayou) wants to merge 12 commits into
achamayou/tiled-treefrom
achamayou/tiles-docs
Draft

Document tiled storage and add performance coverage#56
Amaury Chamayou (achamayou) wants to merge 12 commits into
achamayou/tiled-treefrom
achamayou/tiles-docs

Conversation

@achamayou

Copy link
Copy Markdown
Member

Summary

Part 5 of the tiled-storage stack; depends on #55. This PR adds no storage semantics.

  • add README usage, build, and testing guidance;
  • add the full tiled-storage lifecycle and lower-level API guide;
  • add an illustrated, diagram-led walkthrough of tile files, memory state, flush/compaction, and proofs;
  • finalize the design specification testing and compatibility sections;
  • add time_tiles coverage for append, flush, compaction, and memory/tile-served proofs;
  • build documentation on pull requests without publishing it.

Stack

  1. Add durable tlog-tiles storage primitives #52 — tile formats and durable storage
  2. Add incremental tile and entry-bundle writers #53 — incremental writers
  3. Add tile-backed proof generation #54 — proof generation and hash sources
  4. Add the TiledTree lifecycle wrapper #55TiledTree lifecycle
  5. This PR: user documentation and performance coverage

Validation

  • complete 20-test suite
  • tiles_level2 and time_tiles with LONG_TESTS=ON
  • documentation build
  • balanced Markdown code fences and clean diff checks

Add HashSourceT (abstract subtree-root resolver), TileHashSourceT
(resolves from full tiles, with an LRU tile cache), ProofEngineT
(inclusion/consistency proofs and their verifiers, built on mth_range),
MemoryHashSourceT (resolves from a resident in-memory tree), and
CombinedHashSourceT (memory first, falling back to tiles).

Add the sole essential core change: TreeT::subtree_root(), a read-only,
non-hashing accessor that lets proofs be served from the resident tree,
plus the <limits> include it needs. No other merklecpp.h changes.

Add tiles_proofs tests, cross-checking tile-derived inclusion and
consistency proofs against merkle::TreeT as the oracle across a range
of sizes, including tile-boundary crossings. Move the memory-only
subtree_root proof coverage and the ProofEngineProbe hostile-arithmetic
edge cases here from tree coverage, since they exercise the proof
engine and core accessor rather than TiledTree lifecycle. Add
tiles_level2 for end-to-end coverage of the level-2 tile path.

Introduce the LONG_TESTS CMake option, gate tiles_level2 behind it, and
enable it in CI (and CodeQL) so long-running tile coverage runs on pull
requests.

Document the compatibility statement, the optional core accessor, and
the HashSource/ProofEngineT API and algorithms in the design doc.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use the current default tree hash function for public proof aliases, reject index conversions that cannot be represented safely, and align the design and level-2 coverage notes with the rebased implementation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: c504572c-322f-4950-8682-edf4a7fd2c5b
Co-authored-by: eddyashton <6000239+eddyashton@users.noreply.github.com>
Add TiledTreeT: a fresh-only tiled tree (rejects an existing tile
namespace rather than adopting it), append/flush/root, flushed/
immutable size tracking, interrupted-flush recovery (a failed flush
seals the attempted full-tile boundary without advancing flushed
size), optional compaction with configurable retention, a rollback
boundary that only ever permits retracting the un-tiled frontier,
noexcept move construction with no copy, mixed tile+memory proofs, and
an explicit no-internal-synchronization / external-serialization
contract for the store and tree it wraps.

Add tiles_tree tests covering the empty tree, move construction,
fresh-only rejection of an existing tile namespace, flush/compaction
(including exact-multiple and retention-margin cases), and rollback
(pre-flush, post-flush, exact-boundary, compacted, and interrupted-
flush recovery). The memory-only subtree_root/ProofEngineProbe cases
already moved to tiles_proofs are not duplicated here.

Add tiles_hashes, exercising the tiled tree, writer and proof engine
under SHA384/SHA512, and wire the OpenSSL 384/512 aliases for every
tiled-storage component.

Document the TiledTreeT API, the flush/compaction invariants and
progressive-production algorithm, pruning, and the consolidated
lifecycle/safety risks and edge cases in the design doc.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add the README 'Tiled storage' and 'Building and testing' sections
covering the TiledTree usage snippet, the fresh-only/rejection
contract, LONG_TESTS, and links to the guide and design doc.

Add doc/tiles-guide.md (a how-to for flushing, compaction, rollback,
proofs, and the lower-level building blocks) and
doc/tiles-illustrated.md (a worked, diagram-led walkthrough of the
tiled tree lifecycle). No new storage semantics: these are
documentation-only additions over the tiled-storage API completed in
earlier branches.

Add time_tiles, benchmarking append, flush, in-memory and tile-served
inclusion/consistency proofs, and compaction against a plain in-memory
Tree baseline; wire it into the existing LONG_TESTS group alongside
tiles_level2.

Enable the documentation workflow on pull requests (building, but not
publishing, the site) so doc changes get functional CI coverage.

Finalize the design doc's testing-strategy and build/backwards-
compatibility-impact sections, completing the document that has grown
incrementally across the previous branches.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

2 participants