Sigil documentation
ReferenceRust referencesigil-velocity-bench

sigil-velocity-bench · crate

Source declarations, signatures and documentation for crate.

Source: sigil/node/sigil-velocity-bench/src/lib.rs. SHA-256: 70221ff62231a51e88ee35c4add66cdd75fc7de14d2aaacc5336b25685a5b072.

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.

::VelocityBenchError

#[derive(Debug, Error)]
pub enum VelocityBenchError {
    #[error("core: {0}")]
    Core(#[from] CoreError),
    #[error("io: {0}")]
    Io(#[from] std::io::Error),
    #[error("json: {0}")]
    Json(#[from] serde_json::Error),
    #[error("invalid config: {0}")]
    InvalidConfig(String),
    #[error("artifact verification: {0}")]
    ArtifactVerification(String),
}

Source line: 30.

::VelocityBenchmarkConfig

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct VelocityBenchmarkConfig {
pub chain_id: String,
pub lane_count: u32,
pub slots: u64,
pub txs_per_lane_slot: u64,
pub slot_duration_ns: u64,
pub genesis_time_ns: u64,
pub starting_balance_per_sender: u128
}

Source line: 44.

::VelocityBenchmarkReport

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct VelocityBenchmarkReport {
pub config: VelocityBenchmarkConfig,
pub raw_tx_count: u64,
pub accepted_tx_count: u64,
pub committed_tx_count: u64,
pub invalid_tx_count: u64,
pub dropped_tx_count: u64,
pub slot_latency_p50_ns: u64,
pub slot_latency_p95_ns: u64,
pub lane_blocks: Vec<VelocityLaneBlock>,
pub root_commitments: Vec<VelocityRootCommitment>,
pub claim_status: String
}

Source line: 89.

::VelocityBenchmarkReport::verify

pub fn verify(&self) -> Result<bool, VelocityBenchError>;

Source line: 104.

::VelocityCompactArtifactReport

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct VelocityCompactArtifactReport {
pub config: VelocityBenchmarkConfig,
pub raw_tx_count: u64,
pub accepted_tx_count: u64,
pub committed_tx_count: u64,
pub invalid_tx_count: u64,
pub dropped_tx_count: u64,
pub slot_latency_p50_ns: u64,
pub slot_latency_p95_ns: u64,
pub lane_block_count: usize,
pub root_commitment_count: usize,
pub witness_count: usize,
pub manifest_hash: String,
pub claim_status: String
}

Source line: 166.

::run_velocity_benchmark

pub fn run_velocity_benchmark(
    config: VelocityBenchmarkConfig,
) -> Result<VelocityBenchmarkReport, VelocityBenchError>;

Source line: 239.

::write_velocity_artifacts

pub fn write_velocity_artifacts(
    output_dir: &Path,
    report: &VelocityBenchmarkReport,
) -> Result<(), VelocityBenchError>;

Source line: 357.

::write_velocity_compact_artifacts

pub fn write_velocity_compact_artifacts(
    output_dir: &Path,
    config: VelocityBenchmarkConfig,
) -> Result<VelocityCompactArtifactReport, VelocityBenchError>;

Source line: 415.

::verify_velocity_compact_artifacts

pub fn verify_velocity_compact_artifacts(
    output_dir: &Path,
) -> Result<VelocityCompactArtifactReport, VelocityBenchError>;

Source line: 476.

::verify_velocity_artifacts

pub fn verify_velocity_artifacts(
    output_dir: &Path,
) -> Result<VelocityBenchmarkReport, VelocityBenchError>;

Source line: 735.

::summarize_by_slot

pub fn summarize_by_slot(report: &VelocityBenchmarkReport) -> BTreeMap<u64, (u64, u64, u64, u64)>;

Source line: 858.

::velocity_json_rpc_result

pub fn velocity_json_rpc_result(
    method: &str,
    params: Option<&serde_json::Value>,
    status: &VelocityLiveStatus,
) -> Result<serde_json::Value, VelocityBenchError>;

Source line: 870.

::aggregate_velocity_status

pub fn aggregate_velocity_status(
    chain_id: impl Into<String>,
    worker_statuses: &[VelocityLiveStatus],
    elapsed_ns: u64,
) -> Result<VelocityLiveStatus, VelocityBenchError>;

Source line: 1091.

::VelocityRootValidatorProfile

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum VelocityRootValidatorProfile {
    Single,
    Testnet,
    Mainnet,
}

Source line: 1289.

::VelocityRootValidatorProfile::parse

pub fn parse(value: &str) -> Result<Self, VelocityBenchError>;

Source line: 1296.

::VelocityRootQuorumConfig

#[derive(Debug, Clone, PartialEq, Eq)]
pub struct VelocityRootQuorumConfig {
pub profile: VelocityRootValidatorProfile,
pub validator_count: u32,
pub required_validators: Option<u32>,
pub stake_per_validator: u128
}

Source line: 1309.

::VelocityRootValidatorStatus

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct VelocityRootValidatorStatus {
pub did: String,
pub mode: String,
pub status: String,
pub stake: String,
pub consensus_public_key: String,
pub signed_latest_root: bool
}

Source line: 1328.

::VelocityRootAttestationStatus

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct VelocityRootAttestationStatus {
pub validator_did: String,
pub root_height: u64,
pub root_hash: String,
pub signature: String,
pub verified: bool
}

Source line: 1338.

::VelocityRootQuorumStatus

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct VelocityRootQuorumStatus {
pub active_validators: u32,
pub required_validators: u32,
pub total_stake: String,
pub quorum_stake: String,
pub signed_validators: u32,
pub signed_stake: String,
pub threshold_met: bool,
pub root_commit_latency_ns: u64,
pub latest_commitment_hash: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub covered_lane_committee_assignment_root: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub covered_slashing_demotion_decision_root: Option<String>,
pub attestations: Vec<VelocityRootAttestationStatus>
}

Source line: 1347.

::apply_velocity_root_quorum

pub fn apply_velocity_root_quorum(
    status: &mut VelocityLiveStatus,
    config: &VelocityRootQuorumConfig,
) -> Result<(), VelocityBenchError>;

Source line: 1389.

::apply_velocity_lane_committee_rotation

pub fn apply_velocity_lane_committee_rotation(
    status: &mut VelocityLiveStatus,
    rotation_interval_slots: u64,
    committee_size: usize,
    sampled_lane_limit: usize,
) -> Result<(), VelocityBenchError>;

Source line: 1476.

::apply_velocity_full_lane_committee_rotation

pub fn apply_velocity_full_lane_committee_rotation(
    status: &mut VelocityLiveStatus,
    rotation_interval_slots: u64,
    committee_size: usize,
) -> Result<(), VelocityBenchError>;

Source line: 1561.

::apply_velocity_slashing_demotion_status

pub fn apply_velocity_slashing_demotion_status(
    status: &mut VelocityLiveStatus,
    worker_statuses: &[VelocityLiveStatus],
) -> Result<(), VelocityBenchError>;

Source line: 1575.

::VelocityLiveConfig

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct VelocityLiveConfig {
pub chain_id: String,
pub lane_count: u32,
pub lane_id_base: u32,
pub global_lane_count: u32,
pub txs_per_lane_slot: u64,
pub slot_duration_ns: u64,
pub genesis_time_ns: u64,
pub starting_balance_per_sender: u128,
pub agent_accounts_per_lane: u32,
pub transfer_amount: u128,
pub allocation_manifest_sha256: Option<String>,
pub genesis_hash: Option<String>
}

Source line: 1820.

::VelocityLiveStatus

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct VelocityLiveStatus {
pub chain_id: String,
pub live: bool,
pub latest_slot: u64,
pub root_height: u64,
pub lane_count: u32,
pub lane_id_base: u32,
pub global_lane_count: u32,
pub agent_accounts_per_lane: u32,
#[serde(default)]
pub txs_per_lane_slot: u64,
pub raw_tx_count: u64,
pub accepted_tx_count: u64,
pub committed_tx_count: u64,
pub invalid_tx_count: u64,
pub dropped_tx_count: u64,
pub lane_block_count: u64,
pub root_commitment_count: u64,
pub worker_machine_count: u32,
pub lane_execution_workers: u32,
pub slot_duration_ns: u64,
pub slot_latency_p50_ns: u64,
pub slot_latency_p95_ns: u64,
pub wall_clock_elapsed_ns: u64,
pub wall_clock_committed_tps: f64,
pub target_committed_tps: f64,
pub latest_lane_commitment_root: String,
pub lagging: bool,
pub claim_status: String,
#[serde(default)]
pub allocation_manifest_sha256: Option<String>,
#[serde(default)]
pub genesis_hash: Option<String>,
#[serde(default)]
pub worker_allocation_manifest_sha256s: Vec<String>,
#[serde(default)]
pub worker_allocation_manifest_mismatch_count: u32,
#[serde(default)]
pub worker_genesis_hashes: Vec<String>,
#[serde(default)]
pub worker_genesis_hash_mismatch_count: u32,
#[serde(default)]
pub recent_transactions: Vec<VelocityLiveTransactionStatus>,
pub lanes: Vec<VelocityLiveLaneStatus>,
#[serde(default)]
pub root_validators: Vec<VelocityRootValidatorStatus>,
#[serde(default)]
pub root_quorum: VelocityRootQuorumStatus,
#[serde(default)]
pub lane_committee_rotation: VelocityLaneCommitteeRotationStatus,
#[serde(default)]
pub slashing_demotion: VelocitySlashingDemotionStatus,
#[serde(default)]
pub worker_chain_ids: Vec<String>,
#[serde(default)]
pub worker_chain_id_mismatch_count: u32
}

Source line: 1909.

::VelocityLiveEngineSnapshot

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct VelocityLiveEngineSnapshot {
pub schema: String,
pub config: VelocityLiveConfig,
pub latest_slot: u64,
pub raw_tx_count: u64,
pub accepted_tx_count: u64,
pub invalid_tx_count: u64,
pub dropped_tx_count: u64,
pub lane_block_count: u64,
pub root_commitment_count: u64,
pub last_execution_elapsed_ns: u64,
pub parent_hashes: Vec<String>,
pub lane_states: Vec<VelocityAccountState>,
pub lane_committed_tx_counts: Vec<u64>,
pub lane_statuses: Vec<VelocityLiveLaneStatus>,
pub recent_transactions: Vec<VelocityLiveTransactionStatus>,
pub slot_latencies: Vec<u64>,
pub latest_root_commitment: Option<VelocityRootCommitment>
}

Source line: 1968.

::VelocityLiveStatus::bind_allocation_commitments

pub fn bind_allocation_commitments(
        &mut self,
        allocation_manifest_sha256: Option<String>,
        genesis_hash: Option<String>,
    );

Source line: 1989.

::VelocityLaneCommitteeRotationStatus

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct VelocityLaneCommitteeRotationStatus {
pub enabled: bool,
pub core_primitives: bool,
pub policy_url: String,
pub artifact_url: Option<String>,
pub enforcement: String,
pub rotation_interval_slots: Option<u64>,
pub committee_size: u32,
pub rotation_epoch: u64,
pub randomness_seed: String,
pub assignment_root: String,
pub sampled_assignment_count: u32,
pub sampled_assignments: Vec<VelocityLaneCommitteeAssignmentStatus>
}

Source line: 2039.

::VelocityLaneCommitteeAssignmentStatus

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct VelocityLaneCommitteeAssignmentStatus {
pub lane_id: u32,
pub rotation_epoch: u64,
pub member_validator_dids: Vec<String>,
pub assignment_hash: String
}

Source line: 2074.

::VelocitySlashingDemotionStatus

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct VelocitySlashingDemotionStatus {
pub enabled: bool,
pub core_primitives: bool,
pub policy_url: String,
pub artifact_url: Option<String>,
pub enforcement: String,
pub max_p95_latency_ns: u64,
pub max_missed_slots: u64,
pub max_invalid_roots: u64,
pub max_missing_artifacts: u64,
pub demoted_lane_groups: u32,
pub slashable_faults: u32,
pub decision_root: String,
pub sampled_decisions: Vec<VelocityLaneDemotionDecisionStatus>
}

Source line: 2082.

::VelocityLaneDemotionDecisionStatus

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct VelocityLaneDemotionDecisionStatus {
pub lane_id_base: u32,
pub lane_count: u32,
pub slot_id: u64,
pub p95_latency_ns: u64,
pub demote: bool,
pub slash: bool,
pub reasons: Vec<String>
}

Source line: 2119.

::VelocityLiveLaneStatus

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct VelocityLiveLaneStatus {
pub lane_id: u32,
pub latest_slot: u64,
pub latest_block_hash: String,
pub tx_root: String,
pub receipt_root: String,
pub state_delta_root: String,
pub post_state_root: String,
pub committed_tx_count: u64
}

Source line: 2130.

::VelocityLiveTransactionStatus

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct VelocityLiveTransactionStatus {
pub hash: String,
#[serde(rename = "type")]
pub tx_type: String,
pub from: String,
pub to: String,
pub value: String,
pub gas: u64,
#[serde(rename = "gasPrice")]
pub gas_price: u64,
pub nonce: u64,
#[serde(rename = "blockHeight")]
pub block_height: u64,
pub timestamp: u64,
pub status: String,
pub lane_id: u32,
pub slot_id: u64,
pub payload: serde_json::Value
}

Source line: 2142.

::VelocityLiveEngine

#[derive(Debug)]
pub struct VelocityLiveEngine {

}

Source line: 2163.

::VelocityLiveEngine::new

pub fn new(config: VelocityLiveConfig) -> Result<Self, VelocityBenchError>;

Source line: 2265.

::VelocityLiveEngine::from_snapshot

pub fn from_snapshot(snapshot: VelocityLiveEngineSnapshot) -> Result<Self, VelocityBenchError>;

Source line: 2326.

::VelocityLiveEngine::snapshot

pub fn snapshot(&self) -> VelocityLiveEngineSnapshot;

Source line: 2382.

::VelocityLiveEngine::config

pub fn config(&self) -> &VelocityLiveConfig;

Source line: 2404.

::VelocityLiveEngine::advance_slot

pub fn advance_slot(&mut self) -> Result<VelocityRootCommitment, VelocityBenchError>;

Source line: 2408.

::VelocityLiveEngine::status

pub fn status(&self) -> VelocityLiveStatus;

Source line: 2516.

::VelocityLiveEngine::status_with_elapsed_ns

pub fn status_with_elapsed_ns(&self, elapsed_ns: u64) -> VelocityLiveStatus;

Source line: 2522.

On this page