Sigil documentation
ReferenceRust referencesigil-network

sigil-network · ingress

Source declarations, signatures and documentation for ingress.

Source: sigil/node/sigil-network/src/ingress.rs. SHA-256: 1ebca49b39bbb7b401e4f17fae75bab73a61dc8c3ff04533f256cdabca204d56.

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.

ingress::DEFAULT_STAKE_QUOTA_UNIT

Default stake unit for one additional ingress quota step.

pub const DEFAULT_STAKE_QUOTA_UNIT: u64;

Source line: 10.

ingress::DEFAULT_STAKE_QUOTA_PER_UNIT

Default additional transactions per window per stake unit.

pub const DEFAULT_STAKE_QUOTA_PER_UNIT: u32;

Source line: 12.

ingress::DEFAULT_MAX_SENDER_QUOTA_PER_WINDOW

Default hard cap for one sender in a single ingress window.

pub const DEFAULT_MAX_SENDER_QUOTA_PER_WINDOW: u32;

Source line: 14.

ingress::StakeWeightedIngressConfig

Deterministic stake-weighted ingress parameters.

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct StakeWeightedIngressConfig {
/// Enable stake-weighted sender quotas.

pub enabled: bool,
/// micro-MINT stake needed for one quota increment.

pub stake_quota_unit: u64,
/// Extra accepted txs per window per quota unit.

pub quota_per_unit: u32,
/// Hard cap for one sender in a single window.

pub max_sender_quota_per_window: u32
}

Source line: 18.

ingress::StakeWeightedIngressConfig::validate

Validate arithmetic and quota bounds.

pub fn validate(&self) -> Result<(), IngressConfigError>;

Source line: 42.

ingress::StakeWeightedIngressConfig::quota_for_stake

Compute the sender quota for the current admission window.

base_unstaked_quota is supplied by the caller because the node scales it with target block time. Stake adds priority without ever reducing the legacy unstaked floor.

pub fn quota_for_stake(&self, base_unstaked_quota: u32, stake_micro_mint: u64) -> u32;

Source line: 57.

ingress::IngressConfigError

Error returned by ingress policy validation.

#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
pub enum IngressConfigError {
    #[error("stake_quota_unit must be > 0 when stake-weighted ingress is enabled")]
    InvalidStakeUnit,
    #[error("max_sender_quota_per_window must be > 0 when stake-weighted ingress is enabled")]
    InvalidMaxQuota,
}

Source line: 73.

On this page