Skip to content

Commit c49b0ba

Browse files
committed
Make fragment_size configurable
1 parent e2ce980 commit c49b0ba

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

committer/src/config.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ pub struct EigenDaConfig {
106106
/// URL to an EigenDA RPC endpoint.
107107
#[serde(deserialize_with = "parse_url")]
108108
pub rpc: Url,
109+
/// Blob fragment size.
110+
/// Defaults to 3.5MB, as 4+MB errors out on the server side when checking for inclusion.
111+
pub fragment_size: NonZeroU32,
109112
// Allocated throughput in MiB for the address corresponding to the key
110113
// pub throughput: f32,
111114
}

committer/src/setup.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::{num::NonZeroU32, time::Duration};
1+
use std::time::Duration;
22

33
use clock::SystemClock;
44
use eigenda::{EigenDAClient, Throughput};
@@ -221,10 +221,12 @@ pub fn eigen_block_bundler(
221221
config: &config::Config,
222222
registry: &Registry,
223223
) -> tokio::task::JoinHandle<()> {
224-
// blob_size: 3.5MB, 4+MB errors out on the server side when checking for inclusion
225224
let bundler_factory = services::EigenBundlerFactory::new(
226225
bundle::Encoder::new(config.app.bundle.compression_level),
227-
NonZeroU32::new(3_500_000).unwrap(), // TODO pass this via config
226+
match &config.da_layer {
227+
Some(DALayer::EigenDA(eigen_da)) => eigen_da.fragment_size,
228+
other => panic!("Wrong DA layer configuration for Eigen bundler: {other:?}"),
229+
},
228230
config.app.bundle.max_fragments_per_bundle,
229231
);
230232

0 commit comments

Comments
 (0)