Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 38 additions & 37 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,41 +314,42 @@ impl RollupBoostServer {
if execution_mode.is_disabled() {
debug!(message = "execution mode is disabled, skipping FCU call to builder", "head_block_hash" = %fork_choice_state.head_block_hash);
} else if should_send_to_builder {
let span: Option<BoxedSpan> = if let Some(payload_attributes) =
payload_attributes.clone()
{
let mut parent_span = self
.payload_trace_context
.tracer
.start_with_context("build-block", &Context::current());
let local_payload_id = l2_response.payload_id.expect("local payload_id is None");
parent_span.set_attribute(KeyValue::new(
"parent_hash",
fork_choice_state.head_block_hash.to_string(),
));
parent_span.set_attribute(KeyValue::new(
"timestamp",
payload_attributes.payload_attributes.timestamp as i64,
));
parent_span
.set_attribute(KeyValue::new("payload_id", local_payload_id.to_string()));
let ctx =
Context::current().with_remote_span_context(parent_span.span_context().clone());
self.payload_trace_context
.store(
local_payload_id,
fork_choice_state.head_block_hash,
parent_span,
)
.await;
Some(
self.payload_trace_context
let span: Option<BoxedSpan> =
if let (Some(payload_attributes), Some(local_payload_id)) =
(payload_attributes.clone(), l2_response.payload_id)
{
let mut parent_span = self
.payload_trace_context
.tracer
.start_with_context("fcu", &ctx),
)
} else {
None
};
.start_with_context("build-block", &Context::current());

parent_span.set_attribute(KeyValue::new(
"parent_hash",
fork_choice_state.head_block_hash.to_string(),
));
parent_span.set_attribute(KeyValue::new(
"timestamp",
payload_attributes.payload_attributes.timestamp as i64,
));
parent_span
.set_attribute(KeyValue::new("payload_id", local_payload_id.to_string()));
let ctx = Context::current()
.with_remote_span_context(parent_span.span_context().clone());
self.payload_trace_context
.store(
local_payload_id,
fork_choice_state.head_block_hash,
parent_span,
)
.await;
Some(
self.payload_trace_context
.tracer
.start_with_context("fcu", &ctx),
)
} else {
None
};

// async call to builder to trigger payload building and sync
let builder_client = self.builder_client.clone();
Expand All @@ -372,10 +373,10 @@ impl RollupBoostServer {
.await;
}
}
let payload_id_str = external_payload_id
.map(|id| id.to_string())
.unwrap_or_default();
if response.is_invalid() {
let payload_id_str = external_payload_id
.map(|id| id.to_string())
.unwrap_or_default();
error!(message = "builder rejected fork_choice_updated_v3 with attributes", "url" = ?builder_client.auth_rpc, "payload_id" = payload_id_str, "validation_error" = %response.payload_status.status);
} else if let Some(external_id) = external_payload_id {
info!(
Expand Down
Loading