Repository navigation
Insert the note commitment tree in chunks of 10,000 blocks, keep per-block as an information row - #3
Merged
Conversation
…n information row One batch_insert per chunk with a checkpoint per block; a block with no leaves gets its checkpoint at the last leaf before it. The mode is chosen by a page option or tree=per-block, recorded in every result, and a per-block row is printed with its bar and never a verdict. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
…s chunked, say what the wallet does Empty-block checkpoints keep a sorted list of the ids kept, skip a block older than the newest 100 and prune after being added, in both modes. The summary refuses any chunked size but chunk-10000 and a missing or unknown tree_insert_asked. The CHANGELOG, docs and code comment say every block having a checkpoint is this harness's choice. The unused append_block is gone, and the tests cover ranges at the chunk size and starts next to a shard boundary. Co-Authored-By: Claude <noreply@anthropic.com>
The checkpoint count already catches growth; the time bound only guards against a quadratic path. Co-Authored-By: Claude <noreply@anthropic.com>
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.
What this changes and why:
ShardTree::batch_insertper chunk, a checkpoint per block kept (an empty block's checkpoint is added at the last leaf before it), and every leaf hashed. A 50,000-block first scan is five chunks; the daily range of 3,456 blocks is one.tree=per-block). Every result recordstree_insertandtree_insert_asked. The summary gives a per-block row no verdict, accepts onlychunk-10000as chunked, and refuses a result whose mode is missing or differs from the one asked.Tests run (see CONTRIBUTING.md):
cargo fmt --check,cargo clippy --all-targets --locked -- -D warnings,cargo test --release --locked(tree_insert 9: chunked and per-block give the same root at every checkpoint, the same final root and the same witnesses, with empty blocks, chunk boundaries, ranges of 9,999, 10,000 and 10,001 blocks, and starts at 65,533 to 65,536).node --test tests/node.test.mjs tests/charts.test.mjs: 196 pass.For a result under
community-results/: commit built, device, browser:Not applicable.
AI disclosure: no AI assistance / AI-assisted (tool and what it did):
AI-assisted: Claude Code wrote the change, the tests and the docs; separate AI review passes audited the code and challenged the tests.
🤖 Generated with Claude Code