Repository navigation
Conversation
`lean_da::commit`, re-exported as `leanvm::lean_da::commit`, panicked on an empty payload, a partial blob, or more than `DA_MAX_ROWS` blobs, with no `# Panics` section, while `aggregate` checked the same size and returned `AggregationError::InvalidBlobSize`.
Public API change, kept minimal: `commit` now returns `Result<(Hash, DaWitness), BlobSizeError>`, and `BlobSizeError { symbols }` (std `Display` and `Error`, like `AggregationError`) is re-exported from `leanvm::lean_da`. Callers add `.unwrap()` or `?`; nothing else in the public surface moves.
- One size check, `checked_row_count`, behind both the error and the prover-internal asserts: `encode_rows` and `commit_codewords` keep panicking on a bad size and document it under `# Panics`.
- `aggregate` drops its own copy of the check and maps the commit's error to the unchanged `InvalidBlobSize { symbols }`; an empty `blobs` still means a node without DA.
- Negative tests: each rejected size (empty, one symbol short of and past a blob, one blob past the limit) returns the error with its length, and the api test checks a partial blob through the public re-export.
No proof, transcript or commitment changes: the lean_da, rec_aggregation and leanvm tests pass unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TomWambsgans
added a commit
that referenced
this pull request
Nov 8, 2026
…icking (#705) Co-Authored-By: Thomas Coratger <60488569+tcoratger@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
|
merged here d3dcf43 |
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
Public API change.
leanvm::lean_da::commitpanicked on an empty payload, a partial blob, or more thanDA_MAX_ROWSblobs, and its docs said nothing about it. A user computing the root they expect hit the panic, whileaggregatechecks the same rule and returnsAggregationError::InvalidBlobSize. It now returns a typed error:commitErr(BlobSizeError { symbols: 0 })Err(..)DA_MAX_ROWSErr(..)(root, witness)Ok((root, witness)), same rootchecked_row_count, now backs both the error and the internal asserts.encode_rowsandcommit_codewordsstay prover-internal, still assert, and now document it under# Panics.aggregatedrops its own copy of the rule and maps the commit's error throughFrom<BlobSizeError> for AggregationErrorto the sameInvalidBlobSize { symbols }. The order of its checks is unchanged (rate, thenTooLarge, then the blob size), and an emptyblobsstill means a node with no DA payload.Checks
commit_rejects_payloads_that_are_not_whole_blobs_within_the_limit: red (a panic inencode_rows) with the check removed, green with it.api.rs: checks the exact error of a partial blob through the public re-export.cargo test --release -p lean_da -p rec_aggregation -p leanvm, clippy and rustdoc: pass. An independent review found no correctness issue, and its doc and duplication notes are applied.🤖 Generated with Claude Code