fix: Various trace issues - #2487
Conversation
| let chain_tip = self | ||
| .db | ||
| .load_chain_tip() | ||
| .instrument(info_span!("load_chain_tip")) |
There was a problem hiding this comment.
This might be unnecessary
There was a problem hiding this comment.
The function itself should be instrumented ideally
| })?; | ||
| self.db | ||
| .upsert_block_header(header) | ||
| .instrument(info_span!("persist_block_header")) |
There was a problem hiding this comment.
We might prefer just to instrument the function declaration with the macro.
There was a problem hiding this comment.
Yep, we might actually want to instrument both upsert_block_header() and insert_validated_private_transaction() instead?
There was a problem hiding this comment.
Yes I think lets rather do that.
| })?; | ||
| self.db | ||
| .upsert_block_header(header) | ||
| .instrument(info_span!("persist_block_header")) |
There was a problem hiding this comment.
Yep, we might actually want to instrument both upsert_block_header() and insert_validated_private_transaction() instead?
There was a problem hiding this comment.
I wonder if we shouldn't remove the feature, and instead make it a CLI toggle? Separate PR though :)
| })?; | ||
| self.db | ||
| .upsert_block_header(header) | ||
| .instrument(info_span!("persist_block_header")) |
There was a problem hiding this comment.
Yes I think lets rather do that.
| let chain_tip = self | ||
| .db | ||
| .load_chain_tip() | ||
| .instrument(info_span!("load_chain_tip")) |
There was a problem hiding this comment.
The function itself should be instrumented ideally
Summary
1. Adds instrumentation for the pre-validate_block part of sign block stack:
Fixed (acquire_permit and load_chain_tip):
2. Fixes orphaned spans we are seeing on devnet:
Fixed (added tracing forest support to Validator for this):
And sequencer side also:
Each block is its own rooted
sync_blocktree instead of an endless chain undersync, andwrite_blockis stitched underapply_blockacross the channel hop (previously it would have printed as a separate orphan tree). The sequencer side shows the same stitching underblock_builder.commit_block → apply_block_with_proving_inputs → apply_block → write_block.Changelog