You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[testnet] Cache execution state when staging blocks. (#5367) (#5388)
Backport of #5367.
## Motivation
When we discard a transaction during block staging, we restart block
execution from the start, which is wasteful and causes long delays.
## Proposal
Cache the execution state after each transaction and restore it if the
next one fails.
Conflicts resolved for backport:
- `chain.rs`: Preserved testnet's
`previous_message_blocks_view`/`previous_event_blocks_view` params while
taking the PR's `&mut ProposedBlock` and `BundleExecutionPolicy` changes
- `chain_worker/state.rs`: Fixed `handle_block_proposal` to call
`self.chain.execute_block()` directly (returns `BlockExecutionOutcome`)
instead of `self.execute_block()` (returns `Block`)
- `client/mod.rs`: Applied `chain_client` changes to the unified
`client/mod.rs`, added `max_block_limit_errors` field to
`ChainClientOptions`
- `wasm_worker_tests.rs`: Adapted the new
`test_memory_auto_retry_vs_abort_consistency` test to testnet's
`TestEnvironment` API (no `execute_proposal()`/`executing_worker()`
methods; `sync Bytecode::load_from_file`)
## Test Plan
Tests have been added.
## Release Plan
- Release SDK.
## Links
- PR to main: #5367
- [reviewer
checklist](https://github.com/linera-io/linera-protocol/blob/main/CONTRIBUTING.md#reviewer-checklist)
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CLI.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -131,6 +131,11 @@ Client implementation and command-line tool for the Linera blockchain
131
131
*`--max-pending-message-bundles <MAX_PENDING_MESSAGE_BUNDLES>` — The maximum number of incoming message bundles to include in a block proposal
132
132
133
133
Default value: `10`
134
+
*`--max-block-limit-errors <MAX_BLOCK_LIMIT_ERRORS>` — Maximum number of message bundles to discard from a block proposal due to block limit errors before discarding all remaining bundles.
135
+
136
+
Discarded bundles can be retried in the next block.
137
+
138
+
Default value: `3`
134
139
*`--max-new-events-per-block <MAX_NEW_EVENTS_PER_BLOCK>` — The maximum number of new stream events to include in a block proposal
0 commit comments