perf(state): measure contextual verification phases - #782
Open
evan-forbes wants to merge 44 commits into
Open
Conversation
evan-forbes
force-pushed
the
perf/contextual-profile-milestone
branch
from
August 23, 2026 04:43
baf893d to
0a60c5b
Compare
evan-forbes
force-pushed
the
perf/contextual-phase-metrics
branch
from
August 23, 2026 04:43
da49f60 to
a66e320
Compare
evan-forbes
force-pushed
the
perf/contextual-phase-metrics
branch
from
August 23, 2026 05:53
a66e320 to
ce7eaf6
Compare
evan-forbes
force-pushed
the
perf/contextual-profile-milestone
branch
from
August 23, 2026 08:11
f9a5cea to
e0904a8
Compare
evan-forbes
force-pushed
the
perf/contextual-phase-metrics
branch
from
August 23, 2026 08:11
ce7eaf6 to
91c7ce2
Compare
evan-forbes
force-pushed
the
perf/contextual-profile-milestone
branch
from
August 23, 2026 16:46
e0904a8 to
cb86ca8
Compare
evan-forbes
force-pushed
the
perf/contextual-phase-metrics
branch
from
August 23, 2026 16:46
91c7ce2 to
8a61e72
Compare
evan-forbes
marked this pull request as ready for review
August 23, 2026 17:25
evan-forbes
force-pushed
the
perf/contextual-profile-milestone
branch
from
August 23, 2026 17:45
cb86ca8 to
da87178
Compare
evan-forbes
force-pushed
the
perf/contextual-phase-metrics
branch
from
August 23, 2026 17:45
8a61e72 to
09a498a
Compare
Main added the checked-in `rpc_openrpc.rs` artifact and its staleness check in #764. This branch edits the `getblocktemplate` and `submitblock` doc comments that the artifact derives from, so `cargo xtask check-rpc-artifacts` fails after rebasing onto main. Regenerate the artifact so it matches the doc comments.
evan-forbes
force-pushed
the
perf/contextual-phase-metrics
branch
from
August 23, 2026 18:42
09a498a to
7de3197
Compare
evan-forbes
force-pushed
the
perf/contextual-phase-metrics
branch
from
August 23, 2026 18:52
7de3197 to
d555395
Compare
evan-forbes
force-pushed
the
perf/contextual-profile-milestone
branch
from
August 23, 2026 18:52
267890e to
b8b1f4c
Compare
evan-forbes
force-pushed
the
perf/contextual-profile-milestone
branch
from
August 23, 2026 19:38
b8b1f4c to
bdf35bb
Compare
evan-forbes
force-pushed
the
perf/contextual-phase-metrics
branch
from
August 23, 2026 19:38
d555395 to
abc601b
Compare
…ntory' into perf/contextual-profile-milestone
…e' into perf/contextual-phase-metrics
…ntory' into perf/contextual-profile-milestone
…e' into perf/contextual-phase-metrics
…ntory' into perf/contextual-profile-milestone
…e' into perf/contextual-phase-metrics
# Conflicts: # crates/zakura-state/src/service.rs # crates/zakura-state/src/service/tests.rs
…tual-profile-milestone
…tual-profile-milestone
…tual-profile-milestone
…tual-profile-milestone
evan-forbes
changed the base branch from
perf/contextual-profile-milestone
to
main
September 4, 2026 17:18
evan-forbes
force-pushed
the
perf/contextual-phase-metrics
branch
from
September 4, 2026 18:03
fc47ef7 to
d71d7ea
Compare
evan-forbes
changed the base branch from
main
to
perf/contextual-profile-milestone
September 4, 2026 18:04
czarcas7ic
reviewed
Sep 4, 2026
| "state.contextual.mined.transparent_spend.duration_seconds", | ||
| transparent_spend_start.elapsed(), | ||
| ); | ||
| let spent_utxos = spent_utxos?; |
Contributor
There was a problem hiding this comment.
The copied unspent outputs now stay in memory for the rest of validation, so we use more memory than before. We could free that copy as soon as the spending checks finish, like the old code did.
czarcas7ic
approved these changes
Sep 4, 2026
Base automatically changed from
perf/contextual-profile-milestone
to
feat/optimistic-mined-block-inventory
September 7, 2026 18:41
Base automatically changed from
feat/optimistic-mined-block-inventory
to
main
September 8, 2026 15:46
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
chain construction, and state-writer snapshot cloning;
state update;
Chain::push;Motivation
The preserved memo-enabled field run reduced the median transaction phase to
1.795 ms. Its median state commit remained 34.338 ms. PR #781 separates writer
queue delay from writer execution. This PR splits writer execution so the fleet
can identify the next material optimization without inferring phase costs from
aggregate quantiles.
Safety
The change adds elapsed-time capture and histograms only. It does not move a
check, change state ownership, or alter chain selection.
The outer
parallel_updateduration includes task scheduling and completion.The
parallel_task.*durations overlap because block commitment, Sprout anchorvalidation, and chain update run concurrently. Only
parallel_updatemeasurestheir critical-path wall time.
Benchmark scope
This PR adds observability. It does not claim a runtime speedup. A synthetic
microbenchmark would not show whether these histograms partition the production
contextual interval. The state tests exercise every instrumented success and
error path. The next fleet run must compare each mined-only phase count with
the outer contextual count, then rank phase means from matching campaign
deltas. Concurrent
parallel_task.*means must not be added together.Verification
cargo test -p zakura-consensus -p zakura-state --lib --lockedcargo clippy -p zakura-state -p zakura-consensus --all-targets -- -D warningscargo check -p zakura-state -p zakura-consensus --all-targets --lockedcargo fmt --all -- --checkgit diff --check./scripts/changelog.py checkThis PR adds
docs/changelog/unreleased/782.mdwith an internal-only marker.Stack