DART v1 updates#2
Open
Neopallium wants to merge 16 commits intomainfrom
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces an explicit inner-proof byte-size bound (10 KiB) and expands use of bounded collections across several proof types, making proof serialization more predictable and safer for constrained environments.
Changes:
- Add
MAX_INNER_PROOF_SIZE = 10 * 1024and thread it throughDartLimitsasMaxInnerProofSize. - Introduce
BoundedCanonical<T, S>to store canonically-serialized inner proofs in aBoundedVec<u8, S>and update many proofs to use it. - Convert additional public-input collections (e.g., key lists) from
VectoBoundedVecand propagateT: DartLimitsgenerics through proof/host-protocol APIs and tests/benches.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/sender_affirmation_verify_test.rs | Updates test call sites for new generic proof types. |
| src/serde_impl.rs | Adds serde human-hex support for BoundedVec<u8, _>. |
| src/error.rs | Refactors/extends error variants for new bounds-related failures. |
| src/bp/mod.rs | Adds MaxInnerProofSize to DartLimits, renames limits type, and updates tests for new generics. |
| src/bp/mint_split.rs | Makes finish generic over T: DartLimits and returns bounded-inner proof type. |
| src/bp/leg/proofs.rs | Threads T: DartLimits into settlement leg affirmation proofs and bounds mediator inner proof. |
| src/bp/leg/instant.rs | Threads T: DartLimits into instant settlement affirmations. |
| src/bp/leg.rs | Threads T: DartLimits into settlement leg proof types and bounds inner proof sizes. |
| src/bp/keys.rs | Bounds inner key-registration proofs and maps key-list overflow to new error. |
| src/bp/key_distribution_proof.rs | Uses BoundedVec for recipient public keys and bounds inner proof bytes. |
| src/bp/fee_split.rs | Makes fee split host protocol finish methods generic over T and uses bounded inner proofs. |
| src/bp/fee.rs | Makes fee proofs generic over T and bounds inner proof sizes; updates batched proof container types. |
| src/bp/encode.rs | Introduces BoundedCanonical wrapper for bounded canonical serialization. |
| src/bp/batched.rs | Updates batched proof enum variants to carry T: DartLimits-parameterized proofs. |
| src/bp/asset.rs | Makes minting proof generic over T and stores inner proof bytes via BoundedCanonical. |
| src/bp/affirmation_proofs.rs | Threads T through affirmation split host protocol finish and proof structs; bounds inner proofs. |
| src/bp/account_reg_split.rs | Makes registration split finish generic over T and returns T-parameterized proof. |
| src/bp/account.rs | Makes account registration proof generic over T and bounds inner proof bytes. |
| dart-testing-cli/src/lib.rs | Updates CLI code paths to specify ::<()> for new generic proof APIs. |
| dart-common/src/lib.rs | Adds MAX_INNER_PROOF_SIZE constant (10 KiB). |
| benches/proof_benchmark.rs | Updates benchmark call sites for new generic proof APIs. |
| benches/fee_payments.rs | Updates fee benchmarks for new generic proof APIs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
71d6a68 to
372e747
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 39 out of 46 changed files in this pull request and generated 6 comments.
Comments suppressed due to low confidence (1)
dart-testing-cli/src/lib.rs:468
- Schema change adds a NOT NULL
heightcolumn viaCREATE TABLE IF NOT EXISTS .... If an existing DB already has these tables (withoutheight), this will not migrate them, and later inserts/queries that referenceheightwill fail. Consider adding a migration (e.g.,ALTER TABLE ... ADD COLUMN height ... DEFAULT ...) or make the column nullable with a default for backward compatibility.
// Asset tree roots table
self.conn.execute(
"CREATE TABLE IF NOT EXISTS asset_root_history (
id INTEGER PRIMARY KEY AUTOINCREMENT,
block_number INTEGER NOT NULL,
height INTEGER NOT NULL,
root_data BLOB NOT NULL
)",
[],
)?;
// Account tree roots table
self.conn.execute(
"CREATE TABLE IF NOT EXISTS account_root_history (
id INTEGER PRIMARY KEY AUTOINCREMENT,
block_number INTEGER NOT NULL,
height INTEGER NOT NULL,
root_data BLOB NOT NULL
)",
[],
)?;
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.
Use a 10K inner proof size limit. Also use
BoundedVecfor list of public keys in a few more proofs.