Sigil documentation
ReferenceRust referencearise-verify

arise-verify · redundant

Source declarations, signatures and documentation for redundant.

Source: sigil/node/../arise-bridge/arise-verify/src/redundant.rs. SHA-256: e994850e47e1b69c7e4bfe2292d8fcbc89e301a6c28df4b492e55b06a7626c73.

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.

redundant::DEFAULT_REQUIRED_PROVIDERS

Default number of providers for redundant verification.

pub const DEFAULT_REQUIRED_PROVIDERS: usize;

Source line: 13.

redundant::DEFAULT_REQUIRED_MAJORITY

Default majority threshold.

pub const DEFAULT_REQUIRED_MAJORITY: usize;

Source line: 16.

redundant::ProviderResult

A single provider's result for a redundant verification job.

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ProviderResult {
/// DID of the provider that executed this replica.

pub provider_did: String,
/// Human root DID backing this provider.

pub human_root_did: String,
/// BLAKE3 hash of the output produced.

pub output_hash: [u8; 32],
/// Whether the provider has completed execution.

pub completed: bool
}

Source line: 20.

redundant::RedundantVerification

T2: Redundant verification across multiple providers.

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct RedundantVerification {
/// The job being verified.

pub job_id: String,
/// Results collected from providers.

pub provider_results: Vec<ProviderResult>,
/// Number of providers required (default 3).

pub required_providers: usize,
/// Number of agreeing providers needed for consensus (default 2).

pub required_majority: usize
}

Source line: 33.

redundant::RedundantVerification::new

Creates a new redundant verification for the given job.

pub fn new(job_id: String, n: usize) -> Self;

Source line: 46.

redundant::RedundantVerification::add_result

Adds a provider result, enforcing uniqueness of provider DIDs and human root DIDs.

pub fn add_result(&mut self, result: ProviderResult) -> Result<(), VerifyError>;

Source line: 58.

redundant::RedundantVerification::has_consensus

Returns true if a majority of completed providers agree on the output hash.

pub fn has_consensus(&self) -> bool;

Source line: 95.

redundant::RedundantVerification::consensus_hash

Returns the majority output hash if consensus exists.

pub fn consensus_hash(&self) -> Option<[u8; 32]>;

Source line: 118.

redundant::RedundantVerification::outliers

Returns references to results that disagree with the consensus hash.

pub fn outliers(&self) -> Vec<&ProviderResult>;

Source line: 138.

redundant::RedundantVerification::verify_different_roots

Returns true if all providers have different human root DIDs.

pub fn verify_different_roots(&self) -> bool;

Source line: 151.

redundant::RedundantVerification::is_complete

Returns true if enough provider results have been collected and all are completed.

pub fn is_complete(&self) -> bool;

Source line: 162.

On this page