pub struct BackfillConfig {
pub from_block: u64,
pub to_block: u64,
pub concurrency: usize,
pub segment_size: u64,
pub batch_size: u64,
pub retry_attempts: u32,
pub retry_delay: Duration,
}Expand description
Configuration for the parallel backfill engine.
Fields§
§from_block: u64First block to index (inclusive).
to_block: u64Last block to index (inclusive).
concurrency: usizeMaximum number of segments processed in parallel.
segment_size: u64Number of blocks in each parallel work unit (segment).
batch_size: u64Number of blocks fetched in a single RPC call within a segment.
retry_attempts: u32How many times to retry a failed segment before giving up.
retry_delay: DurationBase delay between retries; doubles on each attempt (exponential back-off).
Implementations§
Source§impl BackfillConfig
impl BackfillConfig
Sourcepub fn validate(&self) -> Result<(), IndexerError>
pub fn validate(&self) -> Result<(), IndexerError>
Validate that the config is internally consistent.
Sourcepub fn segments(&self) -> Vec<BackfillSegment>
pub fn segments(&self) -> Vec<BackfillSegment>
Divide the configured block range into ordered BackfillSegments.
Trait Implementations§
Source§impl Clone for BackfillConfig
impl Clone for BackfillConfig
Source§fn clone(&self) -> BackfillConfig
fn clone(&self) -> BackfillConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BackfillConfig
impl Debug for BackfillConfig
Source§impl Default for BackfillConfig
impl Default for BackfillConfig
Source§impl<'de> Deserialize<'de> for BackfillConfig
impl<'de> Deserialize<'de> for BackfillConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for BackfillConfig
impl RefUnwindSafe for BackfillConfig
impl Send for BackfillConfig
impl Sync for BackfillConfig
impl Unpin for BackfillConfig
impl UnsafeUnpin for BackfillConfig
impl UnwindSafe for BackfillConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more