Skip to content

Commit 27b4072

Browse files
authored
refactor: pull submit logic into builder_helper module (#142)
# refactor: pull submit logic into `builder_helper` module This PR pulls the current Builder submit logic into its own module `builder_helper` to prepare for addition of a Flashbots crate and transaction submitter.
1 parent 38e29f7 commit 27b4072

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

bin/builder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use builder::{
33
service::serve_builder,
44
tasks::{
55
block::sim::Simulator, cache::CacheTasks, env::EnvTask, metrics::MetricsTask,
6-
submit::SubmitTask,
6+
submit::BuilderHelperTask,
77
},
88
};
99
use init4_bin_base::{
@@ -51,7 +51,7 @@ async fn main() -> eyre::Result<()> {
5151
let (tx_channel, metrics_jh) = metrics.spawn();
5252

5353
// Make a Tx submission task
54-
let submit = SubmitTask {
54+
let submit = BuilderHelperTask {
5555
zenith,
5656
quincey,
5757
config: config.clone(),
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
mod submit;
2+
pub use submit::{BuilderHelperTask, ControlFlow};

src/tasks/submit/task.rs renamed to src/tasks/submit/builder_helper/submit.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,10 @@ pub enum ControlFlow {
6565
Done,
6666
}
6767

68-
/// Submits sidecars in ethereum txns to mainnet ethereum
68+
/// Submits rollup blocks as blob sidecars in ethereum txns to
69+
/// mainnet ethereum by crafting a `BuilderHelper` contract call.
6970
#[derive(Debug)]
70-
pub struct SubmitTask {
71+
pub struct BuilderHelperTask {
7172
/// Zenith
7273
pub zenith: ZenithInstance,
7374
/// Quincey
@@ -80,7 +81,7 @@ pub struct SubmitTask {
8081
pub outbound_tx_channel: mpsc::UnboundedSender<TxHash>,
8182
}
8283

83-
impl SubmitTask {
84+
impl BuilderHelperTask {
8485
/// Get the provider from the zenith instance
8586
const fn provider(&self) -> &HostProvider {
8687
self.zenith.provider()

src/tasks/submit/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ pub use prep::{Bumpable, SubmitPrep};
44
mod sim_err;
55
pub use sim_err::{SimErrorResp, SimRevertKind};
66

7-
mod task;
8-
pub use task::{ControlFlow, SubmitTask};
7+
mod builder_helper;
8+
pub use builder_helper::{BuilderHelperTask, ControlFlow};

0 commit comments

Comments
 (0)