Add tile-backed proof generation#54
Draft
achamayou wants to merge 2 commits into
Draft
Conversation
This was referenced Jul 13, 2026
achamayou
force-pushed
the
achamayou/tiles-writers
branch
2 times, most recently
from
July 20, 2026 19:51
eca982d to
6e2c46d
Compare
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
achamayou
force-pushed
the
achamayou/tiles-proofs
branch
from
July 25, 2026 21:13
1d868c1 to
77c129a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part 3 of the tiled-storage work, now rebased directly onto latest
mainafter #52 and #53 merged.HashSourceTplus tile-backed, memory-backed, and combined implementations;ProofEngineTroots, inclusion proofs byte-identical toTreeT::path()/past_path(), and RFC 6962 consistency proofs and verification;TreeT::subtree_root()accessor for complete resident subtrees without changing hashing semantics;Tree::hash_functionaliases and reject unsafe index conversions or arithmetic overflow;Compatibility
Tile hashes and proof assembly use the tree's existing
HASH_FUNCTION; leaf and node hashing behavior is unchanged. Inclusion proofs remain byte-for-byte compatible with existing merklecpp paths, and the default SHA-256 implementation remains OpenSSL-independent.CI
tiles_level2remains behindLONG_TESTS. CI runs its roughly 65,000-file workload once on Linux (g++, Release, OpenSSL off) instead of on Windows, where it exceeded the 900-second timeout. CodeQL still builds the long-test target.Validation
tiles_level2withLONG_TESTS=ONon Linux