Sigil documentation
ReferenceRust referencesigil-node

sigil-node · rpc_sync

Source declarations, signatures and documentation for rpc_sync.

Source: sigil/node/sigil-node/src/rpc_sync.rs. SHA-256: 6af5449c2c1e49e760696ff72c02cec61cfbc0ecfa7df91dbbddc14615485eaa.

This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.

rpc_sync::SyncTaskConfig

Per-task configuration.

#[derive(Debug, Clone)]
pub struct SyncTaskConfig {
/// Full URLs of peer JSON-RPC endpoints to poll, e.g.

/// `["http://sigil-val-1:26657/rpc"]`. Order matters: peers are

/// tried in order until one responds successfully.

pub peer_urls: Vec<String>,
/// How often to poll for new blocks. Defaults to 2 s — well

/// inside the 6 s canary block time, so an RPC pod typically

/// observes a new block within 2–4 s of its finalization.

pub poll_interval: Duration,
/// HTTP request timeout for a single RPC call. Defaults to 5 s.

pub request_timeout: Duration,
/// Maximum number of blocks pulled in a single batch when

/// catching up. Larger batches reduce RPC overhead during

/// initial sync; smaller batches keep memory bounded.

pub max_batch_blocks: u64,
/// Trusted parent hash for height 1. Sigil stores genesis as an initial

/// state root, not as a height-0 block, so first-block continuity needs

/// this root explicitly.

pub initial_parent_hash: Option<SigilHash>
}

Source line: 51.

rpc_sync::SyncTaskConfig::from_peers_env

Construct from SIGIL_PEERS (comma-separated host:port list, matching the validator gossip env var) by appending /rpc.

pub fn from_peers_env() -> Self;

Source line: 87.

rpc_sync::SyncTaskConfig::with_initial_parent_hash

pub fn with_initial_parent_hash(mut self, hash: SigilHash) -> Self;

Source line: 168.

rpc_sync::StateReplayConfig

#[derive(Clone)]
pub struct StateReplayConfig {

}

Source line: 175.

rpc_sync::StateReplayConfig::new

pub fn new(
        state: Arc<dyn ExecutionState>,
        expected_chain_id: String,
        state_queries_safe: StateQueryGate,
    ) -> Self;

Source line: 182.

rpc_sync::spawn_sync_task

Spawn the sync task. Returns the JoinHandle so the caller can abort it on shutdown. If config.peer_urls is empty the task logs a warning and exits immediately.

pub fn spawn_sync_task(store: Arc<dyn BlockStore>, config: SyncTaskConfig) -> JoinHandle<()>;

Source line: 231.

rpc_sync::spawn_state_replay_sync_task

pub fn spawn_state_replay_sync_task(
    store: Arc<dyn BlockStore>,
    state: Arc<dyn ExecutionState>,
    expected_chain_id: String,
    state_queries_safe: StateQueryGate,
    config: SyncTaskConfig,
) -> JoinHandle<()>;

Source line: 245.

On this page