From 645721b3ff642bedc4e70019549b2efbae602404 Mon Sep 17 00:00:00 2001 From: Anna Carroll Date: Tue, 10 Dec 2024 18:33:06 -0600 Subject: [PATCH 1/9] feat: filter confirmed transactions from the block --- bin/builder.rs | 9 +++---- src/config.rs | 26 ++++++++++++++++---- src/tasks/block.rs | 48 +++++++++++++++++++++++++++++++------ src/tasks/oauth.rs | 3 ++- src/tasks/submit.rs | 20 ++++++++-------- tests/bundle_poller_test.rs | 3 ++- tests/tx_poller_test.rs | 3 ++- 7 files changed, 84 insertions(+), 28 deletions(-) diff --git a/bin/builder.rs b/bin/builder.rs index 8a419ac5..dbf1ae1e 100644 --- a/bin/builder.rs +++ b/bin/builder.rs @@ -14,18 +14,19 @@ async fn main() -> eyre::Result<()> { let span = tracing::info_span!("zenith-builder"); let config = BuilderConfig::load_from_env()?.clone(); - let provider = config.connect_provider().await?; + let host_provider = config.connect_host_provider().await?; + let ru_provider = config.connect_ru_provider().await?; let authenticator = Authenticator::new(&config); tracing::debug!(rpc_url = config.host_rpc_url.as_ref(), "instantiated provider"); let sequencer_signer = config.connect_sequencer_signer().await?; - let zenith = config.connect_zenith(provider.clone()); + let zenith = config.connect_zenith(host_provider.clone()); - let builder = BlockBuilder::new(&config, authenticator.clone()); + let builder = BlockBuilder::new(&config, authenticator.clone(), ru_provider); let submit = SubmitTask { authenticator: authenticator.clone(), - provider, + host_provider, zenith, client: reqwest::Client::new(), sequencer_signer, diff --git a/src/config.rs b/src/config.rs index c90d9958..24c2ceb3 100644 --- a/src/config.rs +++ b/src/config.rs @@ -14,6 +14,7 @@ use zenith_types::Zenith; const HOST_CHAIN_ID: &str = "HOST_CHAIN_ID"; const RU_CHAIN_ID: &str = "RU_CHAIN_ID"; const HOST_RPC_URL: &str = "HOST_RPC_URL"; +const ROLLUP_RPC_URL: &str = "ROLLUP_RPC_URL"; const TX_BROADCAST_URLS: &str = "TX_BROADCAST_URLS"; const ZENITH_ADDRESS: &str = "ZENITH_ADDRESS"; const QUINCEY_URL: &str = "QUINCEY_URL"; @@ -44,6 +45,8 @@ pub struct BuilderConfig { pub ru_chain_id: u64, /// URL for Host RPC node. pub host_rpc_url: Cow<'static, str>, + /// URL for the Rollup RPC node. + pub ru_rpc_url: Cow<'static, str>, /// Additional RPC URLs to which to broadcast transactions. pub tx_broadcast_urls: Vec>, /// address of the Zenith contract on Host. @@ -139,6 +142,7 @@ impl BuilderConfig { host_chain_id: load_u64(HOST_CHAIN_ID)?, ru_chain_id: load_u64(RU_CHAIN_ID)?, host_rpc_url: load_url(HOST_RPC_URL)?, + ru_rpc_url: load_url(ROLLUP_RPC_URL)?, tx_broadcast_urls: env::var(TX_BROADCAST_URLS) .unwrap_or_default() .split(',') @@ -180,13 +184,27 @@ impl BuilderConfig { } } - /// Connect to the provider using the configuration. - pub async fn connect_provider(&self) -> Result { + /// Connect to host rpc provider. + pub async fn connect_host_provider(&self) -> Result { let builder_signer = self.connect_builder_signer().await?; + BuilderConfig::connect_provider(builder_signer, self.host_rpc_url.clone()).await + } + + /// Connect to rollup rpc provider. + pub async fn connect_ru_provider(&self) -> Result { + let builder_signer = self.connect_builder_signer().await?; + BuilderConfig::connect_provider(builder_signer, self.ru_rpc_url.clone()).await + } + + /// Connect to an rpc provider. + async fn connect_provider( + signer: LocalOrAws, + rpc_url: Cow<'static, str>, + ) -> Result { ProviderBuilder::new() .with_recommended_fillers() - .wallet(EthereumWallet::from(builder_signer)) - .on_builtin(&self.host_rpc_url) + .wallet(EthereumWallet::from(signer)) + .on_builtin(&rpc_url) .await .map_err(Into::into) } diff --git a/src/tasks/block.rs b/src/tasks/block.rs index c4aadfc5..b9ad1810 100644 --- a/src/tasks/block.rs +++ b/src/tasks/block.rs @@ -1,3 +1,8 @@ +use super::bundler::{Bundle, BundlePoller}; +use super::oauth::Authenticator; +use super::tx_poller::TxPoller; +use crate::config::BuilderConfig; +use alloy::providers::Provider; use alloy::{ consensus::{SidecarBuilder, SidecarCoder, TxEnvelope}, eips::eip2718::Decodable2718, @@ -10,11 +15,6 @@ use tokio::{sync::mpsc, task::JoinHandle}; use tracing::Instrument; use zenith_types::{encode_txns, Alloy2718Coder}; -use super::bundler::{Bundle, BundlePoller}; -use super::oauth::Authenticator; -use super::tx_poller::TxPoller; -use crate::config::BuilderConfig; - /// Ethereum's slot time in seconds. pub const ETHEREUM_SLOT_TIME: u64 = 12; @@ -22,7 +22,6 @@ pub const ETHEREUM_SLOT_TIME: u64 = 12; /// A block in progress. pub struct InProgressBlock { transactions: Vec, - raw_encoding: OnceLock, hash: OnceLock, } @@ -62,6 +61,13 @@ impl InProgressBlock { self.transactions.push(tx.clone()); } + /// Remove a transaction from the in-progress block. + pub fn remove_tx(&mut self, tx: &TxEnvelope) { + tracing::info!(hash = %tx.tx_hash(), "removing tx"); + self.unseal(); + self.transactions.retain(|t| t.tx_hash() != tx.tx_hash()); + } + /// Ingest a bundle into the in-progress block. /// Ignores Signed Orders for now. pub fn ingest_bundle(&mut self, bundle: Bundle) { @@ -113,15 +119,21 @@ impl InProgressBlock { /// BlockBuilder is a task that periodically builds a block then sends it for signing and submission. pub struct BlockBuilder { pub config: BuilderConfig, + pub ru_provider: crate::config::Provider, pub tx_poller: TxPoller, pub bundle_poller: BundlePoller, } impl BlockBuilder { // create a new block builder with the given config. - pub fn new(config: &BuilderConfig, authenticator: Authenticator) -> Self { + pub fn new( + config: &BuilderConfig, + authenticator: Authenticator, + ru_provider: crate::config::Provider, + ) -> Self { Self { config: config.clone(), + ru_provider, tx_poller: TxPoller::new(config), bundle_poller: BundlePoller::new(config, authenticator), } @@ -161,6 +173,25 @@ impl BlockBuilder { self.bundle_poller.evict(); } + async fn filter_transactions(&mut self, in_progress: &mut InProgressBlock) { + // query the rollup node to see which transaction(s) have been included + let mut confirmed_transactions = Vec::new(); + for transaction in in_progress.transactions.iter() { + let tx = self + .ru_provider + .get_transaction_by_hash(*transaction.tx_hash()) + .await + .expect("failed to get receipt"); + if tx.is_some() { + confirmed_transactions.push(transaction.clone()); + } + } + // remove already-confirmed transactions + for transaction in confirmed_transactions { + in_progress.remove_tx(&transaction); + } + } + // calculate the duration in seconds until the beginning of the next block slot. fn secs_to_next_slot(&mut self) -> u64 { let curr_timestamp: u64 = SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs(); @@ -190,6 +221,9 @@ impl BlockBuilder { // TODO: Implement bundle ingestion #later // self.get_bundles(&mut in_progress).await; + // Filter confirmed transactions from the block + self.filter_transactions(&mut in_progress).await; + // submit the block if it has transactions if !in_progress.is_empty() { tracing::info!(txns = in_progress.len(), "sending block to submit task"); diff --git a/src/tasks/oauth.rs b/src/tasks/oauth.rs index 3f7963fe..71159578 100644 --- a/src/tasks/oauth.rs +++ b/src/tasks/oauth.rs @@ -148,7 +148,8 @@ mod tests { let config = BuilderConfig { host_chain_id: 17000, ru_chain_id: 17001, - host_rpc_url: "http://rpc.holesky.signet.sh".into(), + host_rpc_url: "https://ethereum-holesky-rpc.publicnode.com".into(), + ru_rpc_url: "http://rpc.holesky.signet.sh".into(), zenith_address: Address::default(), quincey_url: "http://localhost:8080".into(), builder_port: 8080, diff --git a/src/tasks/submit.rs b/src/tasks/submit.rs index 9b5e5ac0..264f09f5 100644 --- a/src/tasks/submit.rs +++ b/src/tasks/submit.rs @@ -50,7 +50,7 @@ pub enum ControlFlow { /// Submits sidecars in ethereum txns to mainnet ethereum pub struct SubmitTask { /// Ethereum Provider - pub provider: Provider, + pub host_provider: Provider, /// Zenith pub zenith: ZenithInstance, /// Reqwest @@ -125,7 +125,7 @@ impl SubmitTask { } async fn next_host_block_height(&self) -> eyre::Result { - let result = self.provider.get_block_number().await?; + let result = self.host_provider.get_block_number().await?; let next = result.checked_add(1).ok_or_else(|| eyre!("next host block height overflow"))?; Ok(next) } @@ -150,12 +150,12 @@ impl SubmitTask { let tx = self .build_blob_tx(header, v, r, s, in_progress)? - .with_from(self.provider.default_signer_address()) + .with_from(self.host_provider.default_signer_address()) .with_to(self.config.zenith_address) .with_gas_limit(1_000_000); if let Err(TransportError::ErrorResp(e)) = - self.provider.call(&tx).block(BlockNumberOrTag::Pending.into()).await + self.host_provider.call(&tx).block(BlockNumberOrTag::Pending.into()).await { error!( code = e.code, @@ -185,16 +185,16 @@ impl SubmitTask { "sending transaction to network" ); - let SendableTx::Envelope(tx) = self.provider.fill(tx).await? else { + let SendableTx::Envelope(tx) = self.host_provider.fill(tx).await? else { bail!("failed to fill transaction") }; - // Send the tx via the primary provider - let fut = spawn_provider_send!(&self.provider, &tx); + // Send the tx via the primary host_provider + let fut = spawn_provider_send!(&self.host_provider, &tx); - // Spawn send_tx futures for all additional broadcast providers - for provider in self.config.connect_additional_broadcast().await? { - spawn_provider_send!(&provider, &tx); + // Spawn send_tx futures for all additional broadcast host_providers + for host_provider in self.config.connect_additional_broadcast().await? { + spawn_provider_send!(&host_provider, &tx); } // question mark unwraps join error, which would be an internal panic diff --git a/tests/bundle_poller_test.rs b/tests/bundle_poller_test.rs index 47a99062..ac3d1b24 100644 --- a/tests/bundle_poller_test.rs +++ b/tests/bundle_poller_test.rs @@ -20,7 +20,8 @@ mod tests { let config = BuilderConfig { host_chain_id: 17000, ru_chain_id: 17001, - host_rpc_url: "http://rpc.holesky.signet.sh".into(), + host_rpc_url: "https://ethereum-holesky-rpc.publicnode.com".into(), + ru_rpc_url: "http://rpc.holesky.signet.sh".into(), zenith_address: Address::default(), quincey_url: "http://localhost:8080".into(), builder_port: 8080, diff --git a/tests/tx_poller_test.rs b/tests/tx_poller_test.rs index 98d018d6..4d990422 100644 --- a/tests/tx_poller_test.rs +++ b/tests/tx_poller_test.rs @@ -67,7 +67,8 @@ mod tests { let config = BuilderConfig { host_chain_id: 17000, ru_chain_id: 17001, - host_rpc_url: "http://rpc.holesky.signet.sh".into(), + host_rpc_url: "https://ethereum-holesky-rpc.publicnode.com".into(), + ru_rpc_url: "http://rpc.holesky.signet.sh".into(), tx_broadcast_urls: vec!["http://localhost:9000".into()], zenith_address: Address::default(), quincey_url: "http://localhost:8080".into(), From 8eaadc0073db9e94b2e905c20c04cac88efb49ab Mon Sep 17 00:00:00 2001 From: Anna Carroll Date: Tue, 10 Dec 2024 18:36:08 -0600 Subject: [PATCH 2/9] add tracing --- src/tasks/block.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tasks/block.rs b/src/tasks/block.rs index b9ad1810..e50566bf 100644 --- a/src/tasks/block.rs +++ b/src/tasks/block.rs @@ -186,6 +186,8 @@ impl BlockBuilder { confirmed_transactions.push(transaction.clone()); } } + tracing::info!(confirmed = confirmed_transactions.len(), "found confirmed transactions"); + // remove already-confirmed transactions for transaction in confirmed_transactions { in_progress.remove_tx(&transaction); From 349c96e4767781d50c0c7ca48ac26b28b06311bf Mon Sep 17 00:00:00 2001 From: Anna Carroll Date: Wed, 11 Dec 2024 12:18:07 -0600 Subject: [PATCH 3/9] rm mut self --- src/tasks/block.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tasks/block.rs b/src/tasks/block.rs index e50566bf..ec3cc584 100644 --- a/src/tasks/block.rs +++ b/src/tasks/block.rs @@ -173,7 +173,7 @@ impl BlockBuilder { self.bundle_poller.evict(); } - async fn filter_transactions(&mut self, in_progress: &mut InProgressBlock) { + async fn filter_transactions(&self, in_progress: &mut InProgressBlock) { // query the rollup node to see which transaction(s) have been included let mut confirmed_transactions = Vec::new(); for transaction in in_progress.transactions.iter() { @@ -195,14 +195,14 @@ impl BlockBuilder { } // calculate the duration in seconds until the beginning of the next block slot. - fn secs_to_next_slot(&mut self) -> u64 { + fn secs_to_next_slot(&self) -> u64 { let curr_timestamp: u64 = SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs(); let current_slot_time = (curr_timestamp - self.config.chain_offset) % ETHEREUM_SLOT_TIME; (ETHEREUM_SLOT_TIME - current_slot_time) % ETHEREUM_SLOT_TIME } // add a buffer to the beginning of the block slot. - fn secs_to_next_target(&mut self) -> u64 { + fn secs_to_next_target(&self) -> u64 { self.secs_to_next_slot() + self.config.target_slot_time } From 7371efa93700c4855e1505bf6f7c976ebf627baf Mon Sep 17 00:00:00 2001 From: Anna Carroll Date: Thu, 12 Dec 2024 12:00:47 -0600 Subject: [PATCH 4/9] fix: imports --- src/tasks/block.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tasks/block.rs b/src/tasks/block.rs index ec3cc584..06ba02be 100644 --- a/src/tasks/block.rs +++ b/src/tasks/block.rs @@ -1,8 +1,8 @@ use super::bundler::{Bundle, BundlePoller}; use super::oauth::Authenticator; use super::tx_poller::TxPoller; -use crate::config::BuilderConfig; -use alloy::providers::Provider; +use crate::config::{BuilderConfig, Provider}; +use alloy::providers::Provider as _; use alloy::{ consensus::{SidecarBuilder, SidecarCoder, TxEnvelope}, eips::eip2718::Decodable2718, @@ -119,7 +119,7 @@ impl InProgressBlock { /// BlockBuilder is a task that periodically builds a block then sends it for signing and submission. pub struct BlockBuilder { pub config: BuilderConfig, - pub ru_provider: crate::config::Provider, + pub ru_provider: Provider, pub tx_poller: TxPoller, pub bundle_poller: BundlePoller, } @@ -129,7 +129,7 @@ impl BlockBuilder { pub fn new( config: &BuilderConfig, authenticator: Authenticator, - ru_provider: crate::config::Provider, + ru_provider: Provider, ) -> Self { Self { config: config.clone(), From b3d3d982707a5b87ec163b7e3a8e3d9c6dc0baf9 Mon Sep 17 00:00:00 2001 From: Anna Carroll Date: Thu, 12 Dec 2024 12:35:03 -0600 Subject: [PATCH 5/9] update log levels --- src/tasks/block.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/tasks/block.rs b/src/tasks/block.rs index 06ba02be..4afbca2e 100644 --- a/src/tasks/block.rs +++ b/src/tasks/block.rs @@ -56,14 +56,14 @@ impl InProgressBlock { /// Ingest a transaction into the in-progress block. Fails pub fn ingest_tx(&mut self, tx: &TxEnvelope) { - tracing::info!(hash = %tx.tx_hash(), "ingesting tx"); + tracing::trace!(hash = %tx.tx_hash(), "ingesting tx"); self.unseal(); self.transactions.push(tx.clone()); } /// Remove a transaction from the in-progress block. pub fn remove_tx(&mut self, tx: &TxEnvelope) { - tracing::info!(hash = %tx.tx_hash(), "removing tx"); + tracing::trace!(hash = %tx.tx_hash(), "removing tx"); self.unseal(); self.transactions.retain(|t| t.tx_hash() != tx.tx_hash()); } @@ -71,7 +71,7 @@ impl InProgressBlock { /// Ingest a bundle into the in-progress block. /// Ignores Signed Orders for now. pub fn ingest_bundle(&mut self, bundle: Bundle) { - tracing::info!(bundle = %bundle.id, "ingesting bundle"); + tracing::trace!(bundle = %bundle.id, "ingesting bundle"); let txs = bundle .bundle @@ -140,11 +140,11 @@ impl BlockBuilder { } async fn get_transactions(&mut self, in_progress: &mut InProgressBlock) { - tracing::info!("query transactions from cache"); + tracing::trace!("query transactions from cache"); let txns = self.tx_poller.check_tx_cache().await; match txns { Ok(txns) => { - tracing::info!("got transactions response"); + tracing::trace!("got transactions response"); for txn in txns.into_iter() { in_progress.ingest_tx(&txn); } @@ -157,11 +157,11 @@ impl BlockBuilder { } async fn _get_bundles(&mut self, in_progress: &mut InProgressBlock) { - tracing::info!("query bundles from cache"); + tracing::trace!("query bundles from cache"); let bundles = self.bundle_poller.check_bundle_cache().await; match bundles { Ok(bundles) => { - tracing::info!("got bundles response"); + tracing::trace!("got bundles response"); for bundle in bundles { in_progress.ingest_bundle(bundle); } @@ -186,7 +186,7 @@ impl BlockBuilder { confirmed_transactions.push(transaction.clone()); } } - tracing::info!(confirmed = confirmed_transactions.len(), "found confirmed transactions"); + tracing::trace!(confirmed = confirmed_transactions.len(), "found confirmed transactions"); // remove already-confirmed transactions for transaction in confirmed_transactions { @@ -228,14 +228,14 @@ impl BlockBuilder { // submit the block if it has transactions if !in_progress.is_empty() { - tracing::info!(txns = in_progress.len(), "sending block to submit task"); + tracing::debug!(txns = in_progress.len(), "sending block to submit task"); let in_progress_block = std::mem::take(&mut in_progress); if outbound.send(in_progress_block).is_err() { - tracing::debug!("downstream task gone"); + tracing::error!("downstream task gone"); break; } } else { - tracing::info!("no transactions, skipping block submission"); + tracing::debug!("no transactions, skipping block submission"); } } } From daeb424e03d11440fe0c7b3985554b61fcc2da04 Mon Sep 17 00:00:00 2001 From: Anna Carroll Date: Thu, 12 Dec 2024 12:40:43 -0600 Subject: [PATCH 6/9] update: don't connect signer to rollup provider --- src/config.rs | 38 ++++++++++++++++++++++---------------- src/tasks/block.rs | 8 ++++---- 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/src/config.rs b/src/config.rs index 24c2ceb3..0e913e60 100644 --- a/src/config.rs +++ b/src/config.rs @@ -119,7 +119,7 @@ impl ConfigError { } } -/// Provider type used by this transaction +/// Provider type used to read & write. pub type Provider = FillProvider< JoinFill< JoinFill< @@ -133,6 +133,17 @@ pub type Provider = FillProvider< Ethereum, >; +/// Provider type used to read-only. +pub type WalletlessProvider = FillProvider< + JoinFill< + Identity, + JoinFill>>, + >, + RootProvider, + BoxTransport, + Ethereum, +>; + pub type ZenithInstance = Zenith::ZenithInstance; impl BuilderConfig { @@ -184,27 +195,22 @@ impl BuilderConfig { } } - /// Connect to host rpc provider. - pub async fn connect_host_provider(&self) -> Result { - let builder_signer = self.connect_builder_signer().await?; - BuilderConfig::connect_provider(builder_signer, self.host_rpc_url.clone()).await - } - /// Connect to rollup rpc provider. - pub async fn connect_ru_provider(&self) -> Result { - let builder_signer = self.connect_builder_signer().await?; - BuilderConfig::connect_provider(builder_signer, self.ru_rpc_url.clone()).await + pub async fn connect_ru_provider(&self) -> Result { + ProviderBuilder::new() + .with_recommended_fillers() + .on_builtin(&self.ru_rpc_url.clone()) + .await + .map_err(Into::into) } /// Connect to an rpc provider. - async fn connect_provider( - signer: LocalOrAws, - rpc_url: Cow<'static, str>, - ) -> Result { + pub async fn connect_host_provider(&self) -> Result { + let builder_signer = self.connect_builder_signer().await?; ProviderBuilder::new() .with_recommended_fillers() - .wallet(EthereumWallet::from(signer)) - .on_builtin(&rpc_url) + .wallet(EthereumWallet::from(builder_signer)) + .on_builtin(&self.host_rpc_url.clone()) .await .map_err(Into::into) } diff --git a/src/tasks/block.rs b/src/tasks/block.rs index 4afbca2e..e0b8591b 100644 --- a/src/tasks/block.rs +++ b/src/tasks/block.rs @@ -1,8 +1,8 @@ use super::bundler::{Bundle, BundlePoller}; use super::oauth::Authenticator; use super::tx_poller::TxPoller; -use crate::config::{BuilderConfig, Provider}; -use alloy::providers::Provider as _; +use crate::config::{BuilderConfig, WalletlessProvider}; +use alloy::providers::Provider; use alloy::{ consensus::{SidecarBuilder, SidecarCoder, TxEnvelope}, eips::eip2718::Decodable2718, @@ -119,7 +119,7 @@ impl InProgressBlock { /// BlockBuilder is a task that periodically builds a block then sends it for signing and submission. pub struct BlockBuilder { pub config: BuilderConfig, - pub ru_provider: Provider, + pub ru_provider: WalletlessProvider, pub tx_poller: TxPoller, pub bundle_poller: BundlePoller, } @@ -129,7 +129,7 @@ impl BlockBuilder { pub fn new( config: &BuilderConfig, authenticator: Authenticator, - ru_provider: Provider, + ru_provider: WalletlessProvider, ) -> Self { Self { config: config.clone(), From b217741dc5545ddf2ac6dad96251fdfe249132b1 Mon Sep 17 00:00:00 2001 From: Anna Carroll Date: Thu, 12 Dec 2024 12:42:38 -0600 Subject: [PATCH 7/9] fix: no need to clone --- src/config.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config.rs b/src/config.rs index 0e913e60..69374acf 100644 --- a/src/config.rs +++ b/src/config.rs @@ -199,7 +199,7 @@ impl BuilderConfig { pub async fn connect_ru_provider(&self) -> Result { ProviderBuilder::new() .with_recommended_fillers() - .on_builtin(&self.ru_rpc_url.clone()) + .on_builtin(&self.ru_rpc_url) .await .map_err(Into::into) } @@ -210,7 +210,7 @@ impl BuilderConfig { ProviderBuilder::new() .with_recommended_fillers() .wallet(EthereumWallet::from(builder_signer)) - .on_builtin(&self.host_rpc_url.clone()) + .on_builtin(&self.host_rpc_url) .await .map_err(Into::into) } From 026f0db61a5c4b74386c5733f9fddfeb316a1f97 Mon Sep 17 00:00:00 2001 From: Anna Carroll Date: Thu, 12 Dec 2024 12:43:07 -0600 Subject: [PATCH 8/9] comments --- src/config.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config.rs b/src/config.rs index 69374acf..debf9629 100644 --- a/src/config.rs +++ b/src/config.rs @@ -195,7 +195,7 @@ impl BuilderConfig { } } - /// Connect to rollup rpc provider. + /// Connect to the Rollup rpc provider. pub async fn connect_ru_provider(&self) -> Result { ProviderBuilder::new() .with_recommended_fillers() @@ -204,7 +204,7 @@ impl BuilderConfig { .map_err(Into::into) } - /// Connect to an rpc provider. + /// Connect to the Host rpc provider. pub async fn connect_host_provider(&self) -> Result { let builder_signer = self.connect_builder_signer().await?; ProviderBuilder::new() From b887bd435aa7de17eca234908d92d013d40c2e68 Mon Sep 17 00:00:00 2001 From: Anna Carroll Date: Thu, 12 Dec 2024 12:48:58 -0600 Subject: [PATCH 9/9] fix: use dummy rpcs --- src/tasks/oauth.rs | 4 ++-- tests/bundle_poller_test.rs | 4 ++-- tests/tx_poller_test.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/tasks/oauth.rs b/src/tasks/oauth.rs index 71159578..58e89da9 100644 --- a/src/tasks/oauth.rs +++ b/src/tasks/oauth.rs @@ -148,8 +148,8 @@ mod tests { let config = BuilderConfig { host_chain_id: 17000, ru_chain_id: 17001, - host_rpc_url: "https://ethereum-holesky-rpc.publicnode.com".into(), - ru_rpc_url: "http://rpc.holesky.signet.sh".into(), + host_rpc_url: "host-rpc.example.com".into(), + ru_rpc_url: "ru-rpc.example.com".into(), zenith_address: Address::default(), quincey_url: "http://localhost:8080".into(), builder_port: 8080, diff --git a/tests/bundle_poller_test.rs b/tests/bundle_poller_test.rs index ac3d1b24..4d13e466 100644 --- a/tests/bundle_poller_test.rs +++ b/tests/bundle_poller_test.rs @@ -20,8 +20,8 @@ mod tests { let config = BuilderConfig { host_chain_id: 17000, ru_chain_id: 17001, - host_rpc_url: "https://ethereum-holesky-rpc.publicnode.com".into(), - ru_rpc_url: "http://rpc.holesky.signet.sh".into(), + host_rpc_url: "host-rpc.example.com".into(), + ru_rpc_url: "ru-rpc.example.com".into(), zenith_address: Address::default(), quincey_url: "http://localhost:8080".into(), builder_port: 8080, diff --git a/tests/tx_poller_test.rs b/tests/tx_poller_test.rs index 4d990422..75c69f76 100644 --- a/tests/tx_poller_test.rs +++ b/tests/tx_poller_test.rs @@ -67,8 +67,8 @@ mod tests { let config = BuilderConfig { host_chain_id: 17000, ru_chain_id: 17001, - host_rpc_url: "https://ethereum-holesky-rpc.publicnode.com".into(), - ru_rpc_url: "http://rpc.holesky.signet.sh".into(), + host_rpc_url: "host-rpc.example.com".into(), + ru_rpc_url: "ru-rpc.example.com".into(), tx_broadcast_urls: vec!["http://localhost:9000".into()], zenith_address: Address::default(), quincey_url: "http://localhost:8080".into(),