sigil-validator-agent · runtime
Source declarations, signatures and documentation for runtime.
Source: sigil/node/sigil-validator-agent/src/runtime.rs. SHA-256: 29fb095ee09e7ed5e5c8308dbe083830753e9dd63ec7fd3eda240263bca63fca.
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.
runtime::ValidatorAgent
The validator-agent runtime. Holds all the pieces; the consumer
drives evaluation by calling [ValidatorAgent::process_event] in a
loop.
pub struct ValidatorAgent {
}Source line: 29.
runtime::ValidatorAgentHandle
Handle returned from processing a single chain event. Consumer inspects to decide whether to surface metrics, submit governance proposals, etc.
#[derive(Debug, Default)]
pub struct ValidatorAgentHandle {
pub flags: Vec<Flag>,
pub l3_dispatched: u32,
pub l3_skipped_budget: u32,
pub l3_skipped_rate: u32,
pub l3_outcomes: Vec<L3Outcome>,
pub governance_proposals_queued: Vec<L3Outcome>,
pub governance_proposals_blocked: Vec<L3Outcome>
}Source line: 41.
runtime::ValidatorAgent::new
pub fn new(
config: Config,
rule_set: RuleSet,
starting_epoch: u64,
dispatcher: Arc<dyn L3Dispatcher>,
) -> Self;Source line: 52.
runtime::ValidatorAgent::config
pub fn config(&self) -> &Config;Source line: 72.
runtime::ValidatorAgent::cycle_budget
pub fn cycle_budget(&self) -> &CycleBudget;Source line: 76.
runtime::ValidatorAgent::process_event
Process a single chain event. Returns a handle describing what happened: flags emitted, L3 dispatches issued, governance proposals queued or blocked.
pub async fn process_event(
&self,
event: &ChainEvent,
view: &SnapshotView,
) -> Result<ValidatorAgentHandle>;Source line: 83.
runtime::run_with_stream
Drive the runtime against an event stream until it yields
EventStreamClosed or another error. Each event is processed
against a freshly-supplied SnapshotView (built externally).
pub async fn run_with_stream<S, F>(
agent: &ValidatorAgent,
stream: &S,
mut snapshot_for: F,
) -> Result<()>
where
S: EventStream,
F: FnMut(&ChainEvent) -> SnapshotView,;Source line: 212.