1- use crate :: {
2- quincey:: Quincey ,
3- tasks:: {
4- block:: { cfg:: SignetCfgEnv , sim:: SimResult } ,
5- submit:: FlashbotsTask ,
6- } ,
7- } ;
1+ use crate :: { quincey:: Quincey , tasks:: block:: cfg:: SignetCfgEnv } ;
82use alloy:: {
93 network:: { Ethereum , EthereumWallet } ,
10- primitives:: { Address , TxHash } ,
4+ primitives:: Address ,
115 providers:: {
126 self , Identity , ProviderBuilder , RootProvider ,
137 fillers:: {
@@ -29,8 +23,7 @@ use init4_bin_base::{
2923use signet_constants:: SignetSystemConstants ;
3024use signet_zenith:: Zenith ;
3125use std:: borrow:: Cow ;
32- use tokio:: { join, sync:: mpsc:: UnboundedSender , task:: JoinHandle } ;
33- use tracing:: info;
26+ use tokio:: join;
3427
3528/// Type alias for the provider used to simulate against rollup state.
3629pub type RuProvider = RootProvider < Ethereum > ;
@@ -99,25 +92,12 @@ pub struct BuilderConfig {
9992 #[ from_env( var = "TX_POOL_URL" , desc = "URL of the tx pool to poll for incoming transactions" ) ]
10093 pub tx_pool_url : url:: Url ,
10194
102- /// Additional RPC URLs to which the builder should broadcast transactions.
103- /// * Should not include the `HOST_RPC_URL` value, as that is already sent to by default.
104- /// * Setting this can incur `already known` errors.
105- #[ from_env(
106- var = "TX_BROADCAST_URLS" ,
107- desc = "Additional RPC URLs to which the builder broadcasts transactions" ,
108- optional
109- ) ]
110- pub tx_broadcast_urls : Vec < Cow < ' static , str > > ,
111-
112- /// Configuration for the Flashbots provider.
113- /// * If set, the builder will submit blocks as MEV bundles to Flashbots instead of
114- /// submitting them directly to the Host chain.
115- /// * If not set, the builder defaults to submitting blocks directly to the Host chain
116- /// using the Builder Helper contract.
95+ /// Configuration for the Flashbots provider to submit
96+ /// SignetBundles and Rollup blocks to the Host chain
97+ /// as private MEV bundles via Flashbots.
11798 #[ from_env(
11899 var = "FLASHBOTS_ENDPOINT" ,
119- desc = "Flashbots endpoint for privately submitting rollup blocks" ,
120- optional
100+ desc = "Flashbots endpoint for privately submitting Signet bundles"
121101 ) ]
122102 pub flashbots_endpoint : Option < url:: Url > ,
123103
@@ -258,17 +238,6 @@ impl BuilderConfig {
258238 Ok ( flashbots)
259239 }
260240
261- /// Connect additional broadcast providers.
262- pub fn connect_additional_broadcast ( & self ) -> Vec < RootProvider > {
263- self . tx_broadcast_urls
264- . iter ( )
265- . map ( |url| {
266- let url = url. parse :: < url:: Url > ( ) . expect ( "Invalid URL in tx_broadcast_urls" ) ;
267- RootProvider :: new_http ( url)
268- } )
269- . collect :: < Vec < _ > > ( )
270- }
271-
272241 /// Connect to the Zenith instance, using the specified provider.
273242 pub const fn connect_zenith ( & self , provider : HostProvider ) -> ZenithInstance {
274243 Zenith :: new ( self . zenith_address , provider)
@@ -323,17 +292,4 @@ impl BuilderConfig {
323292 . unwrap_or ( DEFAULT_CONCURRENCY_LIMIT )
324293 } )
325294 }
326-
327- /// Spawn a submit task, either Flashbots or BuilderHelper depending on
328- /// configuration.
329- pub async fn spawn_submit_task (
330- & self ,
331- tx_channel : UnboundedSender < TxHash > ,
332- ) -> eyre:: Result < ( UnboundedSender < SimResult > , JoinHandle < ( ) > ) > {
333- let url = self . flashbots_endpoint . as_ref ( ) . expect ( "flashbots endpoint must be configured" ) ;
334- info ! ( url = url. as_str( ) , "spawning flashbots submit task" ) ;
335- let submit = FlashbotsTask :: new ( self . clone ( ) , tx_channel) . await ?;
336- let ( submit_channel, submit_jh) = submit. spawn ( ) ;
337- Ok ( ( submit_channel, submit_jh) )
338- }
339295}
0 commit comments