Skip to content

Commit 9ef1835

Browse files
committed
address review feedback
1 parent 5e0bf75 commit 9ef1835

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ integration = []
2828
init4-bin-base = { version = "0.3.4", features = ["perms"] }
2929

3030
# TODO: Change sdk crate dependencies back to `main` after alloy / revm updates are merged
31-
signet-constants = { git = "https://github.com/init4tech/signet-sdk", branch = "dylan/block-number" }
32-
signet-sim = { git = "https://github.com/init4tech/signet-sdk", branch = "dylan/block-number" }
33-
signet-tx-cache = { git = "https://github.com/init4tech/signet-sdk", branch = "dylan/block-number" }
34-
signet-types = { git = "https://github.com/init4tech/signet-sdk", branch = "dylan/block-number" }
35-
signet-zenith = { git = "https://github.com/init4tech/signet-sdk", branch = "dylan/block-number" }
31+
signet-constants = { git = "https://github.com/dylanlott/signet-sdk", branch = "dylan/moar-logs" }
32+
signet-sim = { git = "https://github.com/dylanlott/signet-sdk", branch = "dylan/moar-logs" }
33+
signet-tx-cache = { git = "https://github.com/dylanlott/signet-sdk", branch = "dylan/moar-logs" }
34+
signet-types = { git = "https://github.com/dylanlott/signet-sdk", branch = "dylan/moar-logs" }
35+
signet-zenith = { git = "https://github.com/dylanlott/signet-sdk", branch = "dylan/moar-logs" }
3636

37-
trevm = { version = "0.20.10", features = ["concurrent-db", "test-utils"] }
37+
trevm = { version = "0.20.12", features = ["concurrent-db", "test-utils"] }
3838

3939
alloy = { version = "0.12.6", features = [
4040
"full",

bin/submit_transaction.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use builder::config::HostProvider;
88
use init4_bin_base::{
99
deps::{
1010
metrics::{counter, histogram},
11-
tracing,
11+
tracing::{debug, error},
1212
},
1313
init4,
1414
utils::{from_env::FromEnv, signer::LocalOrAwsConfig},
@@ -44,16 +44,17 @@ async fn main() {
4444
let _guard = init4();
4545

4646
let config = Config::from_env().unwrap();
47-
tracing::trace!("connecting to provider");
47+
debug!(?config.recipient_address, "connecting to provider");
48+
4849
let provider = config.provider().await;
4950
let recipient_address = config.recipient_address;
5051
let sleep_time = config.sleep_time;
5152

5253
loop {
53-
tracing::debug!("attempting transaction");
54+
debug!(?recipient_address, "attempting transaction");
5455
send_transaction(&provider, recipient_address).await;
5556

56-
tracing::debug!(sleep_time, "sleeping");
57+
debug!(sleep_time, "sleeping");
5758
tokio::time::sleep(tokio::time::Duration::from_secs(sleep_time)).await;
5859
}
5960
}
@@ -70,18 +71,17 @@ async fn send_transaction(provider: &HostProvider, recipient_address: Address) {
7071
let dispatch_start_time: Instant = Instant::now();
7172

7273
// dispatch the transaction
73-
tracing::debug!("dispatching transaction");
7474
let result = provider.send_transaction(tx).await.unwrap();
7575

7676
// wait for the transaction to mine
7777
let receipt = match timeout(Duration::from_secs(240), result.get_receipt()).await {
7878
Ok(Ok(receipt)) => receipt,
7979
Ok(Err(e)) => {
80-
tracing::error!(error = ?e, "failed to get transaction receipt");
80+
error!(error = ?e, "failed to get transaction receipt");
8181
return;
8282
}
8383
Err(_) => {
84-
tracing::error!("timeout waiting for transaction receipt");
84+
error!("timeout waiting for transaction receipt");
8585
counter!("txn_submitter.tx_timeout").increment(1);
8686
return;
8787
}
@@ -91,6 +91,6 @@ async fn send_transaction(provider: &HostProvider, recipient_address: Address) {
9191

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

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)