Skip to content

Commit 934788c

Browse files
committed
address review feedback
1 parent 1990579 commit 934788c

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

bin/submit_transaction.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use builder::config::HostProvider;
1111
use init4_bin_base::{
1212
deps::{
1313
metrics::{counter, histogram},
14-
tracing,
14+
tracing::{debug, error},
1515
},
1616
init4,
1717
utils::{from_env::FromEnv, signer::LocalOrAwsConfig},
@@ -52,16 +52,17 @@ async fn main() {
5252
let _guard = init4();
5353

5454
let config = Config::from_env().unwrap();
55-
tracing::trace!("connecting to provider");
55+
debug!(?config.recipient_address, "connecting to provider");
56+
5657
let provider = config.provider().await;
5758
let recipient_address = config.recipient_address;
5859
let sleep_time = config.sleep_time;
5960

6061
loop {
61-
tracing::debug!("attempting transaction");
62+
debug!(?recipient_address, "attempting transaction");
6263
send_transaction(&provider, recipient_address).await;
6364

64-
tracing::debug!(sleep_time, "sleeping");
65+
debug!(sleep_time, "sleeping");
6566
tokio::time::sleep(tokio::time::Duration::from_secs(sleep_time)).await;
6667
}
6768
}
@@ -78,18 +79,17 @@ async fn send_transaction(provider: &HostProvider, recipient_address: Address) {
7879
let dispatch_start_time: Instant = Instant::now();
7980

8081
// dispatch the transaction
81-
tracing::debug!("dispatching transaction");
8282
let result = provider.send_transaction(tx).await.unwrap();
8383

8484
// wait for the transaction to mine
8585
let receipt = match timeout(Duration::from_secs(240), result.get_receipt()).await {
8686
Ok(Ok(receipt)) => receipt,
8787
Ok(Err(e)) => {
88-
tracing::error!(error = ?e, "failed to get transaction receipt");
88+
error!(error = ?e, "failed to get transaction receipt");
8989
return;
9090
}
9191
Err(_) => {
92-
tracing::error!("timeout waiting for transaction receipt");
92+
error!("timeout waiting for transaction receipt");
9393
counter!("txn_submitter.tx_timeout").increment(1);
9494
return;
9595
}
@@ -99,6 +99,6 @@ async fn send_transaction(provider: &HostProvider, recipient_address: Address) {
9999

100100
// record metrics for how long it took to mine the transaction
101101
let mine_time = dispatch_start_time.elapsed().as_secs();
102-
tracing::debug!(success = receipt.status(), mine_time, hash, "transaction mined");
102+
debug!(success = receipt.status(), mine_time, hash, "transaction mined");
103103
histogram!("txn_submitter.tx_mine_time").record(mine_time as f64);
104104
}

src/tasks/block/sim.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ impl Simulator {
8282
block: BlockEnv,
8383
) -> eyre::Result<BuiltBlock> {
8484
let db = self.create_db().await.unwrap();
85-
85+
8686
let block_build: BlockBuild<_, NoOpInspector> = BlockBuild::new(
8787
db,
8888
constants,

src/tasks/submit.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use init4_bin_base::deps::{
2121
use signet_sim::BuiltBlock;
2222
use signet_types::{SignRequest, SignResponse};
2323
use signet_zenith::{
24-
BundleHelper::{self, submitCall, BlockHeader, FillPermit2},
24+
BundleHelper::{self, BlockHeader, FillPermit2, submitCall},
2525
Zenith::{self, IncorrectHostBlock},
2626
};
2727
use std::time::{Instant, UNIX_EPOCH};
@@ -32,7 +32,7 @@ pub const BASE_FEE_PER_GAS: u128 = 10 * GWEI_TO_WEI as u128;
3232
/// Base max priority fee per gas to use as a starting point for retry bumps
3333
pub const BASE_MAX_PRIORITY_FEE_PER_GAS: u128 = 2 * GWEI_TO_WEI as u128;
3434
/// Base maximum fee per blob gas to use as a starting point for retry bumps
35-
pub const BASE_MAX_FEE_PER_BLOB_GAS: u128 = 1 * GWEI_TO_WEI as u128;
35+
pub const BASE_MAX_FEE_PER_BLOB_GAS: u128 = GWEI_TO_WEI as u128;
3636

3737
macro_rules! spawn_provider_send {
3838
($provider:expr, $tx:expr) => {

0 commit comments

Comments
 (0)