Skip to content
Merged
Show file tree
Hide file tree
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
54 changes: 27 additions & 27 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "builder"
version = "0.6.1"
version = "0.6.2"
description = "signet builder example"

edition = "2024"
Expand Down
3 changes: 1 addition & 2 deletions src/tasks/block/sim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,7 @@ impl SimulatorTask {
///
/// A `Result` containing the built block or an error.
#[instrument(skip_all, fields(
tx_count = sim_items.len(),
millis_to_deadline = finish_by.duration_since(Instant::now()).as_millis()
starting_cache_size = sim_items.len()
))]
pub async fn handle_build(
&self,
Expand Down
6 changes: 3 additions & 3 deletions src/tasks/cache/bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use tokio::{
task::JoinHandle,
time::{self, Duration},
};
use tracing::{Instrument, debug, debug_span, error, trace};
use tracing::{Instrument, debug, error, trace, trace_span};

/// Poll interval for the bundle poller in milliseconds.
const POLL_INTERVAL_MS: u64 = 1000;
Expand Down Expand Up @@ -71,7 +71,7 @@ impl BundlePoller {

async fn task_future(mut self, outbound: UnboundedSender<TxCacheBundle>) {
loop {
let span = debug_span!("BundlePoller::loop", url = %self.config.tx_pool_url);
let span = trace_span!("BundlePoller::loop", url = %self.config.tx_pool_url);

// Enter the span for the next check.
let _guard = span.enter();
Expand All @@ -92,7 +92,7 @@ impl BundlePoller {
.inspect_err(|err| debug!(%err, "Error fetching bundles"))
{
let _guard = span.entered();
debug!(count = ?bundles.len(), "found bundles");
trace!(count = ?bundles.len(), "found bundles");
for bundle in bundles.into_iter() {
if let Err(err) = outbound.send(bundle) {
error!(err = ?err, "Failed to send bundle - channel is dropped");
Expand Down
9 changes: 2 additions & 7 deletions src/tasks/cache/tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use reqwest::{Client, Url};
use serde::{Deserialize, Serialize};
use std::time::Duration;
use tokio::{sync::mpsc, task::JoinHandle, time};
use tracing::{Instrument, debug, debug_span, trace};
use tracing::{Instrument, debug, debug_span, trace, trace_span};

/// Poll interval for the transaction poller in milliseconds.
const POLL_INTERVAL_MS: u64 = 1000;
Expand Down Expand Up @@ -114,19 +114,14 @@ impl TxPoller {

async fn task_future(mut self, outbound: mpsc::UnboundedSender<TxEnvelope>) {
loop {
let span = debug_span!("TxPoller::loop", url = %self.config.tx_pool_url);

// Enter the span for the next check.
let _guard = span.enter();
let span = trace_span!("TxPoller::loop", url = %self.config.tx_pool_url);

// Check this here to avoid making the web request if we know
// we don't need the results.
if outbound.is_closed() {
trace!("No receivers left, shutting down");
break;
}
// exit the span after the check.
drop(_guard);

if let Ok(transactions) =
self.check_tx_cache().instrument(span.clone()).await.inspect_err(|err| {
Expand Down
4 changes: 3 additions & 1 deletion src/tasks/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,9 @@ impl EnvTask {
self.host_provider
.get_block_by_number(host_block_number.into())
.into_future()
.instrument(debug_span!(parent: &span, "EnvTask::fetch_host_block")),
.instrument(
debug_span!(parent: &span, "EnvTask::fetch_host_block").or_current()
),
// We want to check that we're able to sign for the block we're gonna start building.
// If not, we just want to skip all the work.
self.quincey.preflight_check(host_block_number + 1).in_current_span(),
Expand Down