@@ -9,6 +9,7 @@ use alloy::{
99use core:: str:: FromStr ;
1010use eyre:: Result ;
1111use init4_bin_base:: {
12+ ConfigAndGuard ,
1213 deps:: tracing_subscriber:: {
1314 EnvFilter , Layer , fmt, layer:: SubscriberExt , registry, util:: SubscriberInitExt ,
1415 } ,
@@ -24,47 +25,50 @@ use trevm::revm::{context::BlockEnv, context_interface::block::BlobExcessGasAndP
2425
2526/// Set up a block builder with test values
2627pub fn setup_test_config ( ) -> & ' static BuilderConfig {
27- crate :: CONFIG . get_or_init ( || {
28- BuilderConfig {
29- host_rpc : "ws://host-rpc.pecorino.signet.sh"
30- . parse :: < BuiltInConnectionString > ( )
31- . map ( ProviderConfig :: new)
32- . unwrap ( ) ,
33- ru_rpc : "ws://rpc.pecorino.signet.sh"
34- . parse :: < BuiltInConnectionString > ( )
35- . unwrap ( )
36- . try_into ( )
37- . unwrap ( ) ,
38- flashbots_endpoint : "https://relay-sepolia.flashbots.net:443" . parse ( ) . unwrap ( ) ,
39- quincey_url : "http://localhost:8080" . into ( ) ,
40- sequencer_key : None ,
41- builder_key : env:: var ( "SEPOLIA_ETH_PRIV_KEY" )
42- . unwrap_or_else ( |_| B256 :: repeat_byte ( 0x42 ) . to_string ( ) ) ,
43- builder_port : 8080 ,
44- builder_rewards_address : Address :: default ( ) ,
45- rollup_block_gas_limit : 3_000_000_000 ,
46- tx_pool_url : "http://localhost:9000/" . parse ( ) . unwrap ( ) ,
47- oauth : OAuthConfig {
48- oauth_client_id : "some_client_id" . into ( ) ,
49- oauth_client_secret : "some_client_secret" . into ( ) ,
50- oauth_authenticate_url : "http://localhost:8080" . parse ( ) . unwrap ( ) ,
51- oauth_token_url : "http://localhost:8080" . parse ( ) . unwrap ( ) ,
52- oauth_token_refresh_interval : 300 , // 5 minutes
53- } ,
54- concurrency_limit : None , // NB: Defaults to available parallelism
55- slot_calculator : SlotCalculator :: new (
56- 1740681556 , // pecorino start timestamp as sane default
57- 0 , 1 ,
58- ) ,
59- block_query_cutoff_buffer : Default :: default ( ) ,
60- submit_deadline_buffer : Default :: default ( ) ,
61- max_host_gas_coefficient : Default :: default ( ) ,
62- constants : SignetSystemConstants :: parmigiana ( ) ,
63- pylon_url : "http://localhost:8081" . parse ( ) . unwrap ( ) ,
64- tracing : TracingConfig :: default ( ) ,
65- metrics : MetricsConfig :: default ( ) ,
66- }
67- } )
28+ & crate :: CONFIG_AND_GUARD
29+ . get_or_init ( || {
30+ let config = BuilderConfig {
31+ host_rpc : "ws://host-rpc.pecorino.signet.sh"
32+ . parse :: < BuiltInConnectionString > ( )
33+ . map ( ProviderConfig :: new)
34+ . unwrap ( ) ,
35+ ru_rpc : "ws://rpc.pecorino.signet.sh"
36+ . parse :: < BuiltInConnectionString > ( )
37+ . unwrap ( )
38+ . try_into ( )
39+ . unwrap ( ) ,
40+ flashbots_endpoint : "https://relay-sepolia.flashbots.net:443" . parse ( ) . unwrap ( ) ,
41+ quincey_url : "http://localhost:8080" . into ( ) ,
42+ sequencer_key : None ,
43+ builder_key : env:: var ( "SEPOLIA_ETH_PRIV_KEY" )
44+ . unwrap_or_else ( |_| B256 :: repeat_byte ( 0x42 ) . to_string ( ) ) ,
45+ builder_port : 8080 ,
46+ builder_rewards_address : Address :: default ( ) ,
47+ rollup_block_gas_limit : 3_000_000_000 ,
48+ tx_pool_url : "http://localhost:9000/" . parse ( ) . unwrap ( ) ,
49+ oauth : OAuthConfig {
50+ oauth_client_id : "some_client_id" . into ( ) ,
51+ oauth_client_secret : "some_client_secret" . into ( ) ,
52+ oauth_authenticate_url : "http://localhost:8080" . parse ( ) . unwrap ( ) ,
53+ oauth_token_url : "http://localhost:8080" . parse ( ) . unwrap ( ) ,
54+ oauth_token_refresh_interval : 300 , // 5 minutes
55+ } ,
56+ concurrency_limit : None , // NB: Defaults to available parallelism
57+ slot_calculator : SlotCalculator :: new (
58+ 1740681556 , // pecorino start timestamp as sane default
59+ 0 , 1 ,
60+ ) ,
61+ block_query_cutoff_buffer : Default :: default ( ) ,
62+ submit_deadline_buffer : Default :: default ( ) ,
63+ max_host_gas_coefficient : Default :: default ( ) ,
64+ constants : SignetSystemConstants :: parmigiana ( ) ,
65+ pylon_url : "http://localhost:8081" . parse ( ) . unwrap ( ) ,
66+ tracing : TracingConfig :: default ( ) ,
67+ metrics : MetricsConfig :: default ( ) ,
68+ } ;
69+ ConfigAndGuard { config, guard : None }
70+ } )
71+ . config
6872}
6973
7074/// Returns a new signed test transaction with the provided nonce, value, and mpfpg.
0 commit comments