trace_block: Support overwriting execute_block#9871
Merged
Conversation
This is required for example for parachains that require special extensions to be registered (e.g. `ProofSizeExt`) to succeed the block execution. This pull request changes the signature of `spawn_tasks` which now requires a `tracing_execute_block` parameter. If your chain is a solochain, just set the parameter to `None` or overwrite it if you need any special handling. For parachain builders, this value can be set to `cumulus_service::ParachainTracingExecuteBlock`.
2 tasks
Member
Author
|
/cmd fmt |
skunert
approved these changes
Oct 8, 2025
| client: Arc<Client>, | ||
| executor: SubscriptionTaskExecutor, | ||
| _phantom: PhantomData<(BE, Block)>, | ||
| block_execute: Option<Arc<dyn TracingExecuteBlock<Block>>>, |
Contributor
There was a problem hiding this comment.
Can we please name it the same everywhere?
Suggested change
| block_execute: Option<Arc<dyn TracingExecuteBlock<Block>>>, | |
| execute_block: Option<Arc<dyn TracingExecuteBlock<Block>>>, |
| /// | ||
| /// The execution should be done sync on the same thread, because the caller will register | ||
| /// special tracing collectors. | ||
| fn execute_block(&self, orig_hash: Block::Hash, block: Block) -> sp_blockchain::Result<()>; |
Contributor
There was a problem hiding this comment.
Why do we need the orig_hash as parameter here? As far as I see none of the implementations use it.
Member
Author
There was a problem hiding this comment.
The implementation in my magical branch will use it :) Also it is any way important to be able to load data based on the correct block hash.
lexnv
approved these changes
Oct 9, 2025
|
All GitHub workflows were cancelled due to failure one of the required jobs. |
trace_block: Support overwriting the execute_blocktrace_block: Support overwriting execute_block
Member
Author
|
/cmd prdoc --bump major --audience node_dev |
…-audience node_dev'
athei
approved these changes
Oct 10, 2025
xermicus
approved these changes
Oct 10, 2025
alvicsam
pushed a commit
that referenced
this pull request
Oct 17, 2025
This is required for example for parachains that require special extensions to be registered (e.g. `ProofSizeExt`) to succeed the block execution. This pull request changes the signature of `spawn_tasks` which now requires a `tracing_execute_block` parameter. If your chain is a solochain, just set the parameter to `None` or overwrite it if you need any special handling. For parachain builders, this value can be set to `cumulus_service::ParachainTracingExecuteBlock`. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
EgrPrty
pushed a commit
that referenced
this pull request
Nov 6, 2025
This is a backport of #9871. Its not a 1:1 backport to avoid many of the breaking changes. This PR makes an attempt to automatically detect parachains based on metadata and the presence of the weight reclaim transaction extension. It is not perfect, but should work well for all the production chains. In the non-backported versions proof recording is properly enabled, so this whole mechanism is temporary. --------- Co-authored-by: Egor_P <egor@parity.io>
EgrPrty
pushed a commit
that referenced
this pull request
Nov 10, 2025
This is a backport of #9871. Its not a 1:1 backport to avoid many of the breaking changes. This PR makes an attempt to automatically detect parachains based on metadata and the presence of the weight reclaim transaction extension. It is not perfect, but should work well for all the production chains. In the non-backported versions proof recording is properly enabled, so this whole mechanism is temporary. After this is approved, will backport to more versions. --------- Co-authored-by: Egor_P <egor@parity.io>
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.
This is required for example for parachains that require special extensions to be registered (e.g.
ProofSizeExt) to succeed the block execution.This pull request changes the signature of
spawn_taskswhich now requires atracing_execute_blockparameter. If your chain is a solochain, just set the parameter toNoneor overwrite it if you need any special handling. For parachain builders, this value can be set tocumulus_service::ParachainTracingExecuteBlock.