-
Notifications
You must be signed in to change notification settings - Fork 1
support full trace log #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Standard payload builders are not used and can completely be removed |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -335,6 +335,19 @@ where | |
| cancel: block_cancel, | ||
| } = args; | ||
|
|
||
| // Log block build start | ||
| { | ||
| use reth_monitor::{get_global_tracer, TransactionProcessId}; | ||
| let block_number = config.parent_header.number + 1; | ||
| if let Some(tracer) = get_global_tracer() { | ||
| tracer.log_block( | ||
| config.parent_header.hash(), | ||
| block_number, | ||
| TransactionProcessId::SeqBlockBuildStart, | ||
| ); | ||
| } | ||
| } | ||
|
|
||
| // We log only every 100th block to reduce usage | ||
| let span = if cfg!(feature = "telemetry") | ||
| && config | ||
|
|
@@ -571,6 +584,21 @@ where | |
| &resolve_payload, | ||
| ) | ||
| .await; | ||
|
|
||
| // Log block build end | ||
| if let Some(payload) = resolve_payload.get() { | ||
| use reth_monitor::{get_global_tracer, TransactionProcessId}; | ||
| let block_hash = payload.block().hash(); | ||
| let block_number = payload.block().header().number; | ||
| if let Some(tracer) = get_global_tracer() { | ||
| tracer.log_block( | ||
| B256::from(*block_hash), | ||
| block_number, | ||
| TransactionProcessId::SeqBlockBuildEnd, | ||
| ); | ||
| } | ||
| } | ||
|
Comment on lines
+589
to
+600
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is incorrect. We should add this inside the resolve_best_payload function, after |
||
|
|
||
| self.record_flashblocks_metrics( | ||
| &ctx, | ||
| &info, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -112,6 +112,21 @@ where | |
| let _ = p2p_tx.send(Message::from_flashblock_payload(payload)).await; | ||
| } | ||
| Some(payload) = built_payload_rx.recv() => { | ||
| // Log block send start | ||
| { | ||
| use reth_monitor::{get_global_tracer, TransactionProcessId}; | ||
| use alloy_primitives::B256; | ||
| let block_hash = payload.block().hash(); | ||
| let block_number = payload.block().header().number; | ||
| if let Some(tracer) = get_global_tracer() { | ||
| tracer.log_block( | ||
| B256::from(*block_hash), | ||
| block_number, | ||
| TransactionProcessId::SeqBlockSendStart, | ||
| ); | ||
| } | ||
| } | ||
|
Comment on lines
+115
to
+128
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove this. This is unnecessary because you can add this log directly inside the reth repo instead, since this message will be handled on the engine state tree handler |
||
|
|
||
| // Update engine tree state with locally built block payloads | ||
| if let Err(e) = payload_events_handle.send(Events::BuiltPayload(payload.clone())) { | ||
| warn!(e = ?e, "failed to send BuiltPayload event"); | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Standard payload builders are not used and can completely be removed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should specify the patch version here?