Skip to content

Commit 8b5ee58

Browse files
committed
add max prio gas to tx sender
1 parent c55b780 commit 8b5ee58

File tree

2 files changed

+35
-16
lines changed

2 files changed

+35
-16
lines changed

README.md

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,23 @@ This crate contains an example block builder in the Signet ecosystem.
1717
The following environment variables are exposed to configure the Builder:
1818

1919
```bash
20-
# Builder Configs
21-
HOST_CHAIN_ID="17000" # Holesky Testnet
22-
RU_CHAIN_ID="17001"
23-
HOST_RPC_URL="http://host.url.here"
24-
# trailing slash is required
25-
TX_BROADCAST_URLS="http://tx.broadcast.url.here/,https://additional.url.here/"
26-
ZENITH_ADDRESS="ZENITH_ADDRESS_HERE"
27-
QUINCEY_URL="http://signer.url.here"
20+
# Builder Configs for Pecorino Test Net
21+
HOST_CHAIN_ID="3151908"
22+
RU_CHAIN_ID="14174"
23+
HOST_RPC_URL="https://host-rpc.pecorino.signet.sh"
24+
TX_BROADCAST_URLS="" # trailing slash is required - set to none for test net configuration
25+
ZENITH_ADDRESS="0xbe45611502116387211D28cE493D6Fb3d192bc4E"
26+
QUINCEY_URL="http://sequencer.pecorino.signet.sh/signBlock"
2827
BUILDER_PORT="8080"
29-
BUILDER_KEY="YOUR_BUILDER_KEY_HERE"
3028
INCOMING_TRANSACTIONS_BUFFER="10"
3129
BLOCK_CONFIRMATION_BUFFER="10"
3230
BUILDER_REWARDS_ADDRESS="BUILDER_REWARDS_ADDRESS_HERE"
3331
ROLLUP_BLOCK_GAS_LIMIT="30000000"
32+
CONCURRENCY_LIMIT=10 # Concurrency parameter for simulation
33+
# Pecorino Slot Timing Configuration
34+
SLOT_OFFSET="4"
35+
SLOT_DURATION="12"
36+
START_TIMESTAMP="1740681556"
3437
# Transaction Pool Configs
3538
TX_POOL_URL="http://pool.url.here/" # trailing slash is required
3639
TX_POOL_POLL_INTERVAL="5" # seconds
@@ -53,3 +56,21 @@ Sign request example payload:
5356
"contents": "0x0707070707070707070707070707070707070707070707070707070707070707"
5457
}
5558
```
59+
60+
## Transaction Sender
61+
62+
The builder includes a `transaction-sender` for sending miniscule transactions for the purpose of testing the rollup block construction process. The `transaction-sender` is located in `bin/submit-transaction.rs`.
63+
64+
It requires a key to sign the transactions and a funded wallet.
65+
66+
### Environment Variables
67+
68+
The `transaction-sender` also has a set of configurable environment variables listed below.
69+
70+
```
71+
RPC_URL="" # The URL of the RPC endpoint of the node you're sending the transaction to.
72+
RECIPIENT_ADDRESS="" # The address the submitter addresses the transaction to.
73+
SLEEP_TIME="" # The time to wait before sending another transaction, in seconds.
74+
SIGNER_CHAIN_ID=""
75+
SIGNER_KEY="" #
76+
```

bin/submit_transaction.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
use alloy::{
2-
network::{EthereumWallet, TransactionBuilder},
3-
primitives::{Address, U256},
4-
providers::{
5-
Provider as _, ProviderBuilder, WalletProvider,
6-
fillers::{BlobGasFiller, SimpleNonceManager},
7-
},
8-
rpc::types::eth::TransactionRequest,
2+
consensus::constants::GWEI_TO_WEI, network::{EthereumWallet, TransactionBuilder}, primitives::{Address, U256}, providers::{
3+
fillers::{BlobGasFiller, SimpleNonceManager}, Provider as _, ProviderBuilder, WalletProvider
4+
}, rpc::types::eth::TransactionRequest
95
};
106
use builder::config::HostProvider;
117
use init4_bin_base::{
@@ -77,6 +73,8 @@ async fn send_transaction(provider: &HostProvider, recipient_address: Address) {
7773
.with_from(provider.default_signer_address())
7874
.with_to(recipient_address)
7975
.with_value(U256::from(1))
76+
.with_max_priority_fee_per_gas(3 * GWEI_TO_WEI as u128)
77+
.with_nonce(nonce)
8078
.with_gas_limit(30_000);
8179

8280
// start timer to measure how long it takes to mine the transaction

0 commit comments

Comments
 (0)