Feat/block replay time#7205
Open
rob-stacks wants to merge 16 commits into
Open
Conversation
Coverage Report for CI Build 26511304685Coverage decreased (-3.4%) to 82.325%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions13725 previously-covered lines in 183 files lost coverage.
Coverage Stats
💛 - Coveralls |
There was a problem hiding this comment.
Pull request overview
Adds wall-clock execution timing metrics to transactions returned by the Nakamoto blockreplay / blocksimulate RPC responses, intended as a fallback when hardware profiling isn’t available. The PR also attempts to update the OpenAPI schema for the replay transaction object.
Changes:
- Add per-transaction wall-clock timing collection (
execution_stats) during block (re)mining. - Refactor transaction RPC response to include an optional nested
profilerobject and attach timing data. - Update RPC schema + add changelog fragment (schema update currently has blocking correctness issues).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
stackslib/src/net/api/blockreplay.rs |
Adds timing tracker and exposes it in replay/simulate transaction responses; refactors profiler fields into a nested object. |
stackslib/src/net/api/tests/blockreplay.rs |
Adds a basic assertion referencing the new timing field. |
docs/rpc/components/schemas/block-replay-transaction.schema.yaml |
Attempts to document execution_stats (currently invalid schema + mismatched response shape). |
changelog.d/block_replay_execution_stats.added |
Changelog entry for the new execution_stats response data. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
federico-stacks
left a comment
There was a problem hiding this comment.
Heads-up: a bunch of jobs failed including OpenApi validation
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
This simple patch adds a new information to every transaction in the blockreplay/simulate api: execution_time_millis
It is the amount of wall-clock milliseconds required for executing the transaction. It is a simple fallback for those platform
without hardware profiler support.
Note: the patch fixes a bunch of error in the openapi schema
Applicable issues
Additional info (benefits, drawbacks, caveats)
Checklist
docs/property-testing.md)changelog.d/README.md)rpc/openapi.yamlfor RPC endpoints,event-dispatcher.mdfor new events)clarity-benchmarkingrepo