sigil-node · validator_agent
Source declarations, signatures and documentation for validator_agent.
Source: sigil/node/sigil-node/src/validator_agent.rs. SHA-256: 2dc94cb294981f784f917b3bde3045fedcfd8b1fe088727c6aab89cf9692c1e7.
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.
validator_agent::ValidatorAgent
A single validator agent with an OAS identity and Ed25519 keypair.
Follows the Forge ForgeAgentIdentity pattern: each agent has an OAS DID,
a signing key, and a lineage reference back to a human root.
pub struct ValidatorAgent {
}Source line: 52.
validator_agent::ValidatorAgent::did
The agent's OAS DID (e.g., "did:oas:sigil:agent:testnet-validator-0").
pub fn did(&self) -> &str;Source line: 118.
validator_agent::ValidatorAgent::human_root_did
The human root DID that anchors this agent's lineage chain.
pub fn human_root_did(&self) -> &str;Source line: 123.
validator_agent::ValidatorAgent::generation
Lineage generation depth (1 = direct child of human root).
pub fn generation(&self) -> u32;Source line: 128.
validator_agent::ValidatorAgent::is_producer
Whether this agent is a block producer (Coordinator role).
pub fn is_producer(&self) -> bool;Source line: 133.
validator_agent::ValidatorAgent::mode
The agent's validator mode.
pub fn mode(&self) -> ValidatorGenesisMode;Source line: 138.
validator_agent::ValidatorAgent::stake
The agent's stake in micro-MINT.
pub fn stake(&self) -> u64;Source line: 143.
validator_agent::ValidatorAgent::sign
Sign a message with the agent's Ed25519 key.
pub fn sign(&self, message: &[u8]) -> Option<Signature>;Source line: 148.
validator_agent::ValidatorAgent::verifying_key_bytes
The agent's verifying (public) key as 32 bytes.
pub fn verifying_key_bytes(&self) -> [u8; 32];Source line: 153.
validator_agent::ValidatorAgent::short_id
Short display identifier for logging (DID truncated).
pub fn short_id(&self) -> String;Source line: 158.
validator_agent::BootstrapTeam
The bootstrap agent team that runs the testnet from genesis.
Manages the initial set of validator agents created from genesis config. Handles proposer rotation and provides agent identities for block production. External validators can register to join the team later.
Follows the Forge collaboration model:
- Block Producers → Coordinator role (propose blocks)
- Block Validators → Worker role (validate and vote)
pub struct BootstrapTeam {
}Source line: 189.
validator_agent::BootstrapTeam::from_genesis
Assemble the bootstrap team from genesis validators.
Each genesis validator gets an Ed25519 public identity from its genesis consensus key. Block Producers form the proposer rotation.
pub fn from_genesis(genesis: &GenesisConfig) -> Result<Self, NodeError>;Source line: 205.
validator_agent::BootstrapTeam::current_proposer
Get the current block proposer's DID (round-robin rotation).
pub fn current_proposer(&self) -> &str;Source line: 262.
validator_agent::BootstrapTeam::advance_proposer
Advance to the next proposer in the rotation. Returns the new proposer DID.
pub fn advance_proposer(&self) -> &str;Source line: 269.
validator_agent::BootstrapTeam::proposer_agent
Get the agent for the current proposer.
pub fn proposer_agent(&self) -> Option<&ValidatorAgent>;Source line: 276.
validator_agent::BootstrapTeam::proposer_sign
Sign data with the current proposer's key.
pub fn proposer_sign(&self, data: &[u8]) -> Option<Signature>;Source line: 282.
validator_agent::BootstrapTeam::agent_count
Number of agents in the team.
pub fn agent_count(&self) -> usize;Source line: 287.
validator_agent::BootstrapTeam::producer_count
Number of block producers in the rotation.
pub fn producer_count(&self) -> usize;Source line: 292.
validator_agent::BootstrapTeam::total_stake
Total staked amount across all agents.
pub fn total_stake(&self) -> u64;Source line: 297.
validator_agent::BootstrapTeam::agent_dids
All agent DIDs.
pub fn agent_dids(&self) -> Vec<&str>;Source line: 302.
validator_agent::BootstrapTeam::agent_by_did
Look up an agent by DID.
pub fn agent_by_did(&self, did: &str) -> Option<&ValidatorAgent>;Source line: 307.
validator_agent::BootstrapTeam::validator_agents
Get all block validator agents (non-producers).
pub fn validator_agents(&self) -> Vec<&ValidatorAgent>;Source line: 312.
validator_agent::BootstrapTeam::rotation_order
The proposer rotation order (DIDs of block producers).
pub fn rotation_order(&self) -> &[String];Source line: 317.