Repository navigation
Conversation
propose_commit_batch now clears any evidence previously computed for the batch, and commit_proposed_batch clears it when it takes the proposed arguments. Since commit_proposed_batch can span several messages, a failure after the first one leaves the batch in place without its arguments; its evidence must not validate arguments proposed for it afterwards. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
commit_proposed_batch no longer awaits self-calls to extend its instruction budget. A failure after an await rolled back only the failing message, leaving the operations applied before it live and certified_data stale. Committing in one message makes the commit all-or-nothing again, as it was before 0.30.2, at the cost of bounding a proposed batch by the per-message instruction limit. commit_batch keeps the extension. Co-Authored-By: Claude Opus 5.5 (1M context) <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.
Description
Two changes to how the asset canister commits a proposed batch.
1. Commit a proposed batch in a single message. Since #4450,
commit_proposed_batchawaits a self-call once it passes 35B instructions, and setscertified_dataonly after the last operation. If an operation fails after such an await, only the failing message rolls back: the operations applied before it stay live, and the certified tree no longer matchescertified_datauntil the next successful commit.commit_proposed_batchnow runs the state machine to completion within one message, so any failure, including running out of instructions, rolls back the whole commit, as before 0.30.2. The cost is that a proposed batch is again bounded by the per-message instruction limit.commit_batchkeeps the self-call extension.This changes
ic_certified_assets::commit_proposed_batchfromasync fntofn(breaking for direct callers of the crate); the Candid interface is unchanged.2. Discard computed evidence when a batch's arguments change.
propose_commit_batchnow clears any evidence previously computed for the batch, andcommit_proposed_batchclears it when it takes the proposed arguments, so evidence always describes the arguments the batch currently holds and new arguments need a freshcompute_evidence.How Has This Been Tested?
evidence_does_not_carry_over_to_reproposed_argumentscovers change 2 (fails without it).ic-certified-assetslib tests pass; clippy is clean.src/distributed/assetstorage.wasm.gzrebuilt with./scripts/update-frontend-canister.sh --release-build.Checklist:
🤖 Generated with Claude Code