Sigil documentation
ReferenceRust referencesigil-core

sigil-core · genesis

Source declarations, signatures and documentation for genesis.

Source: sigil/node/sigil-core/src/genesis.rs. SHA-256: 9235fb95d731524071e18b46676772bd9693c7ffd163e7afbb07d9e021fae49b.

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.

genesis::GenesisConfig

Complete genesis configuration for a Sigil network.

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct GenesisConfig {
/// Chain identifier.

pub chain_id: ChainId,
/// Unix timestamp for genesis block.

pub genesis_time: u64,
/// Protocol version at genesis.

pub protocol_version: String,
/// Initial validator set with their stakes.

pub validators: Vec<GenesisValidator>,
/// Initial account balances (DID -> balance in micro-MINT).

#[serde(default)]
pub balances: HashMap<String, u64>,
/// Initial identity documents for launch/custody DIDs.

///

/// A DID with a genesis balance but no identity document is spend-locked

/// until a key-derived self-registration is possible. Mainnet launch

/// custody accounts should seed explicit identity documents here.

#[serde(default, skip_serializing_if = "HashMap::is_empty")]
pub identities: HashMap<String, serde_json::Value>,
/// Protocol parameters.

pub params: ProtocolParams,
/// Economic parameters.

pub economics: EconomicParams,
/// Tower consensus parameters (slot duration, epoch length, committee sizes).

/// Absent in old genesis files — defaults applied automatically.

#[serde(default, skip_serializing_if = "Option::is_none")]
pub tower_params: Option<TowerParams>,
/// On-chain governance parameters (deposits, voting period, quorum, timelock).

/// Absent in old genesis files — defaults applied automatically.

#[serde(default, skip_serializing_if = "Option::is_none")]
pub governance_params: Option<GovernanceParams>,
/// Smart-contract platform parameters.

/// Absent in old genesis files — defaults applied automatically.

#[serde(default, skip_serializing_if = "Option::is_none")]
pub contract_params: Option<ContractParams>,
/// CZAC protocol parameters.

/// Absent in old genesis files — defaults applied automatically.

#[serde(default, skip_serializing_if = "Option::is_none")]
pub czac_params: Option<CzacParams>,
/// Vigils event-driven autonomous contract parameters.

/// Absent in old genesis files — defaults applied automatically.

#[serde(default, skip_serializing_if = "Option::is_none")]
pub vigils_params: Option<VigilsParams>,
/// Nova metaverse launch configuration.

/// Absent in old genesis files — defaults to disabled/no genesis worlds.

#[serde(default, skip_serializing_if = "Option::is_none")]
pub nova_params: Option<crate::nova::NovaParams>,
/// Reference contracts deployed as part of genesis.

#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub reference_contracts: Vec<GenesisReferenceContract>,
/// Compute marketplace parameters.

#[cfg(feature = "compute")]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub compute_params: Option<ComputeParams>,
/// On-chain `@username` registry parameters (length-tier prices, multiplier,

/// reserved list, dispute multisig DIDs). Absent in old genesis files —

/// defaults applied via `effective_username_params`.

#[serde(default, skip_serializing_if = "Option::is_none")]
pub username_params: Option<crate::username::UsernameParams>
}

Source line: 22.

genesis::GenesisConfig::compute_state_root

Compute the genesis state root from the initial configuration.

Returns an error if the configuration cannot be serialized.

pub fn compute_state_root(&self) -> Result<SigilHash, crate::error::CoreError>;

Source line: 87.

genesis::GenesisConfig::validate

Validate the genesis configuration.

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

Source line: 103.

genesis::GenesisConfig::testnet_default

Create a minimal testnet genesis config.

pub fn testnet_default() -> Self;

Source line: 325.

genesis::GenesisConfig::effective_tower_params

Return the effective TowerParams, falling back to the default if the genesis file pre-dates this field.

pub fn effective_tower_params(&self) -> TowerParams;

Source line: 350.

genesis::GenesisConfig::effective_governance_params

Return the effective GovernanceParams, falling back to the default if the genesis file pre-dates this field.

pub fn effective_governance_params(&self) -> GovernanceParams;

Source line: 356.

genesis::GenesisConfig::effective_contract_params

Return the effective ContractParams, falling back to the default if the genesis file pre-dates this field.

pub fn effective_contract_params(&self) -> ContractParams;

Source line: 362.

genesis::GenesisConfig::effective_czac_params

Return the effective CzacParams, falling back to the default if the genesis file pre-dates this field.

pub fn effective_czac_params(&self) -> CzacParams;

Source line: 368.

genesis::GenesisConfig::effective_vigils_params

Return the effective VigilsParams, falling back to the default if the genesis file pre-dates this field.

pub fn effective_vigils_params(&self) -> VigilsParams;

Source line: 374.

genesis::GenesisConfig::effective_nova_params

Return the effective NovaParams, falling back to disabled/no worlds if the genesis file pre-dates this field.

pub fn effective_nova_params(&self) -> crate::nova::NovaParams;

Source line: 380.

genesis::GenesisReferenceContract

A WASM reference contract deployed into genesis state.

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct GenesisReferenceContract {
pub name: String,
pub version: String,
pub contract_did: String,
pub controller_did: String,
pub runtime: ContractRuntime,
pub code_hash: String,
/// Hex-encoded WASM bytecode. Embedded in genesis so validators deploy

/// identical content-addressed code without filesystem dependencies.

pub code_hex: String,
#[serde(default)]
pub init_args: serde_json::Value,
pub upgrade_policy: ControlPolicy,
pub call_policy: ControlPolicy,
#[serde(default)]
pub allowed_host_functions: Vec<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub zone_id: Option<String>,
pub contract_kind: ContractKind,
#[serde(default)]
pub accepts_vigil_callbacks: bool,
pub license_metadata: ContractLicenseMetadata
}

Source line: 387.

genesis::GenesisReferenceContract::code_bytes

pub fn code_bytes(&self) -> Result<Vec<u8>, String>;

Source line: 412.

genesis::GenesisReferenceContract::parsed_code_hash

pub fn parsed_code_hash(&self) -> Result<SigilHash, String>;

Source line: 416.

genesis::GenesisValidator

A validator entry in the genesis config.

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct GenesisValidator {
/// OAS DID of the validator entity.

pub did: String,
/// Human root DID in the lineage chain.

pub human_root_did: String,
/// Generation distance from human root.

pub generation: u32,
/// Initial stake in micro-MINT.

pub stake: u64,
/// Validator mode.

pub mode: ValidatorGenesisMode,
/// Ed25519 consensus public key (hex-encoded).

pub consensus_pubkey: String,
/// P2P networking public key (hex-encoded).

pub network_pubkey: String
}

Source line: 460.

genesis::validate_validator_did

pub fn validate_validator_did(did: &str) -> Result<(), GenesisValidationError>;

Source line: 484.

genesis::ValidatorGenesisMode

Validator mode for genesis.

#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
pub enum ValidatorGenesisMode {
    /// Block Producer: executes transactions and generates ZK proofs.
    BlockProducer,
    /// Block Validator: verifies ZK proofs without re-executing.
    BlockValidator,
}

Source line: 662.

genesis::ProtocolParams

Protocol parameters that can be changed via governance.

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ProtocolParams {
/// Backward-compatible target block time in whole seconds.

pub target_block_time_secs: u64,
/// Precise target block time in milliseconds. When present, this is the

/// canonical value; `target_block_time_secs` is retained for older config

/// files and coarse operator displays.

#[serde(default, skip_serializing_if = "Option::is_none")]
pub target_block_time_ms: Option<u64>,
/// Blocks per epoch.

pub blocks_per_epoch: u64,
/// Maximum transactions per block.

pub max_txs_per_block: u32,
/// Maximum block gas limit.

pub max_block_gas: u64,
/// Ed25519 transaction signature batch size for validator admission.

///

/// This is a node-performance knob, not consensus entropy: different

/// values still verify the same ordered transaction list deterministically.

#[serde(default, skip_serializing_if = "Option::is_none")]
pub signature_batch_size: Option<usize>,
/// Minimum stake for Block Producers (micro-MINT).

pub min_bp_stake: u64,
/// Minimum stake for Block Validators (micro-MINT).

pub min_bv_stake: u64,
/// Unbonding period in epochs.

pub unbonding_epochs: u32,
/// Maximum validators in the active set.

pub max_validators: u32
}

Source line: 671.

genesis::ProtocolParams::target_block_time_millis

Canonical target block time in milliseconds.

pub fn target_block_time_millis(&self) -> u64;

Source line: 720.

genesis::ProtocolParams::target_block_time_seconds

Canonical target block time in seconds, preserving sub-second precision.

pub fn target_block_time_seconds(&self) -> f64;

Source line: 727.

genesis::ProtocolParams::signature_batch_size

Configured signature batch size, falling back to the production default.

pub fn signature_batch_size(&self) -> usize;

Source line: 732.

genesis::EconomicParams

Economic parameters.

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct EconomicParams {
/// Base block reward in micro-MINT.

pub base_block_reward: u64,
/// Lineage generation decay factor (beta).

pub generation_decay_beta: f64,
/// Minimum human root share of rewards (as fraction, e.g., 0.51).

pub min_human_share: f64,
/// Treasury allocation fraction (e.g., 0.15).

pub treasury_fraction: f64,
/// Slashing lineage propagation factor (delta).

pub slashing_delta: f64,
/// Publisher bond slash distribution: reporter share.

pub bond_slash_reporter: f64,
/// Publisher bond slash distribution: harmed party share.

pub bond_slash_harmed: f64,
/// Publisher bond slash distribution: treasury share.

pub bond_slash_treasury: f64
}

Source line: 741.

genesis::ComputeParams

Compute marketplace parameters (feature-gated).

#[cfg(feature = "compute")]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ComputeParams {
/// Minimum stake for compute providers by tier (micro-MINT).

pub provider_stake_tiers: ProviderStakeTiers,
/// Challenge window in epochs.

pub challenge_window_epochs: u32,
/// Number of arbitrators for challenge resolution.

pub arbitration_committee_size: u32,
/// Challenge success split: challenger share.

pub challenge_success_challenger: f64,
/// Challenge success split: arbitrators share.

pub challenge_success_arbitrators: f64,
/// Challenge success split: treasury share.

pub challenge_success_treasury: f64,
/// Sentinel probe interval in seconds.

pub sentinel_probe_interval_secs: u64,
/// Allowlist of DIDs authorised to resolve compute challenges. The

/// executor MUST fail closed when the sender is not in this list. An

/// empty list disables challenge resolution entirely (intentional —

/// safer default than implicit prefix-matching authority).

#[serde(default)]
pub challenge_resolver_dids: Vec<String>,
/// When `true`, T3 (TEE) receipts may settle. When `false`, the

/// executor refuses T3 settlement (vendor-specific TEE crypto is not

/// yet wired). Default is `false`.

#[serde(default)]
pub tee_verifier_enabled: bool,
/// Provider exit cooldown in epochs.

#[serde(default = "default_unbonding_epochs")]
pub unbonding_epochs: u64,
/// Default challenger deposit (micro-MINT) when the tx omits one.

#[serde(default = "default_challenge_deposit")]
pub default_challenge_deposit: u64,
/// Phase 12 — DIDs authorised to submit `MacaProposeEpoch` /

/// `MacaFinalizeEpoch`. Empty disables MACA epoch proposal.

#[serde(default)]
pub proposer_dids: Vec<String>,
/// Phase 12 — DIDs authorised to submit `MacaPublishBeacon`.

#[serde(default)]
pub beacon_dids: Vec<String>,
/// Phase 12 — minimum agreeing validators for `MacaQuorumProof`

/// to be `Confirmed`.

#[serde(default = "default_validator_quorum_threshold")]
pub validator_quorum_threshold: u32,
/// Permit settlement of receipts with no stored compute job. This is a

/// named compatibility mode only; mainnet and canary default it off.

#[serde(default)]
pub allow_ad_hoc_receipts: bool,
/// Phase 14a — AMD SEV-SNP trust anchors. SEC1-uncompressed VCEK

/// pubkeys + SHA-384 measurement allowlist. `None` keeps the

/// SEV-SNP verifier in Phase 13 fail-closed mode.

#[serde(default, skip_serializing_if = "Option::is_none")]
pub sev_snp_trust_anchors: Option<SevSnpTrustAnchorsGenesis>,
/// Phase 14b — Intel SGX DCAP trust anchors. Pinned Intel SGX Root

/// CA fingerprint + MRENCLAVE / MRSIGNER allowlists + freshness +

/// minimum SVN. `None` keeps the SGX verifier in fail-closed mode.

#[serde(default, skip_serializing_if = "Option::is_none")]
pub sgx_dcap_trust_anchors: Option<SgxDcapTrustAnchorsGenesis>,
/// Phase 14c — Intel TDX trust anchors. Pinned Intel SGX Root CA

/// fingerprint + MRTD / MRSIGNER_SEAM / RTMR allowlists +

/// collateral. `None` keeps the TDX verifier in fail-closed mode.

#[serde(default, skip_serializing_if = "Option::is_none")]
pub tdx_trust_anchors: Option<TdxTrustAnchorsGenesis>,
/// Phase 14d — Arm CCA trust anchors. Pinned IAK pubkey(s) + RIM

/// allowlist + receipt-binding/freshness toggles. `None` keeps

/// the Arm CCA verifier in fail-closed mode.

#[serde(default, skip_serializing_if = "Option::is_none")]
pub arm_cca_trust_anchors: Option<ArmCcaTrustAnchorsGenesis>
}

Source line: 778.

genesis::SevSnpTrustAnchorsGenesis

Genesis-side mirror of compute_state::SevSnpTrustAnchors (sigil-core can't depend on sigil-node, so we duplicate the shape; the engine crate translates one to the other at startup).

Phase 14a-2 added optional production-hardening fields. All are None/false by default so existing genesis files remain valid; operators that want to tighten T3 SEV-SNP acceptance set them explicitly.

#[cfg(feature = "compute")]
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct SevSnpTrustAnchorsGenesis {
#[serde(default)]
pub acceptable_vcek_pubkeys: Vec<Vec<u8>>,
#[serde(
        default,
        serialize_with = "bytes_hex_vec_serde::serialize",
        deserialize_with = "bytes_hex_vec_serde::deserialize"
    )]
pub measurement_allowlist: Vec<Vec<u8>>,
/// SHA-256 of the AMD ARK certificate (DER form). When set, the

/// verifier validates the cert chain VCEK→ASK→ARK and extracts the

/// VCEK pubkey from it.

#[serde(default, skip_serializing_if = "Option::is_none")]
pub pinned_ark_fingerprint_sha256: Option<[u8; 32]>,
/// SHA-256 of the AMD ASK / product signing certificate (DER form).

/// When set, the chain accepts only SEV-SNP attestations carrying the

/// product ASK pinned here.

#[serde(default, skip_serializing_if = "Option::is_none")]
pub pinned_ask_fingerprint_sha256: Option<[u8; 32]>,
/// Optional exact VCEK allowlist by chip ID and reported TCB.

#[serde(default)]
pub vcek_allowlist: Vec<SevSnpVcekAllowlistEntryGenesis>,
/// Maximum attestation age in chain epochs.

#[serde(default, skip_serializing_if = "Option::is_none")]
pub max_attestation_age_epochs: Option<u64>,
/// Minimum SEV-SNP TCB version components.

#[serde(default, skip_serializing_if = "Option::is_none")]
pub min_tcb: Option<SevSnpTcbGenesis>,
/// Require REPORT_DATA receipt-binding on every report.

#[serde(default)]
pub require_receipt_binding: bool
}

Source line: 857.

genesis::bytes_hex_vec_serde::serialize

#[cfg(feature = "compute")]
pub fn serialize<S>(values: &[Vec<u8>], serializer: S) -> Result<S::Ok, S::Error>
    where
        S: Serializer,;

Source line: 894.

genesis::bytes_hex_vec_serde::deserialize

#[cfg(feature = "compute")]
pub fn deserialize<'de, D>(deserializer: D) -> Result<Vec<Vec<u8>>, D::Error>
    where
        D: Deserializer<'de>,;

Source line: 902.

genesis::SevSnpVcekAllowlistEntryGenesis

Genesis mirror of compute_state::SevSnpVcekAllowlistEntry.

#[cfg(feature = "compute")]
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct SevSnpVcekAllowlistEntryGenesis {
pub product: String,
pub chip_id: Vec<u8>,
pub tcb: SevSnpTcbGenesis,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub vcek_fingerprint_sha256: Option<[u8; 32]>
}

Source line: 948.

genesis::SevSnpTcbGenesis

Genesis mirror of compute_state::SevSnpTcb.

#[cfg(feature = "compute")]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, Default)]
pub struct SevSnpTcbGenesis {
pub bootloader: u8,
pub tee: u8,
pub snp: u8,
pub microcode: u8
}

Source line: 959.

genesis::SgxDcapTrustAnchorsGenesis

Genesis-side mirror of compute_state::SgxDcapTrustAnchors (Phases 14b + 14b-2).

#[cfg(feature = "compute")]
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)]
pub struct SgxDcapTrustAnchorsGenesis {
/// SHA-256 of Intel SGX Root CA DER.

#[serde(default, skip_serializing_if = "Option::is_none")]
pub pinned_intel_root_fingerprint_sha256: Option<[u8; 32]>,
/// 32-byte MRENCLAVE values the chain accepts.

#[serde(default)]
pub mrenclave_allowlist: Vec<Vec<u8>>,
/// 32-byte MRSIGNER values the chain accepts.

#[serde(default)]
pub mrsigner_allowlist: Vec<Vec<u8>>,
/// Freshness window in chain epochs.

#[serde(default, skip_serializing_if = "Option::is_none")]
pub max_attestation_age_epochs: Option<u64>,
/// Minimum ISV enclave SVN.

#[serde(default, skip_serializing_if = "Option::is_none")]
pub min_isv_svn: Option<u16>,
/// Minimum PCE SVN.

#[serde(default, skip_serializing_if = "Option::is_none")]
pub min_pce_svn: Option<u16>,
/// Require REPORT_DATA receipt-binding on every quote.

#[serde(default)]
pub require_receipt_binding: bool,
// ----- Phase 14b-2 collateral hardening -----
#[serde(default, skip_serializing_if = "Option::is_none")]
pub intel_tcb_signing_cert_der: Option<Vec<u8>>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub tcb_info_json: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub qe_identity_json: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub pck_crl_der: Option<Vec<u8>>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub root_ca_crl_der: Option<Vec<u8>>,
#[serde(default)]
pub allowed_tcb_statuses: Vec<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub collateral_max_age_epochs: Option<u64>
}

Source line: 970.

genesis::ArmCcaTrustAnchorsGenesis

Genesis-side mirror of compute_state::ArmCcaTrustAnchors (Phase 14d).

#[cfg(feature = "compute")]
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)]
pub struct ArmCcaTrustAnchorsGenesis {
#[serde(default)]
pub pinned_iak_pubkeys_sec1: Vec<Vec<u8>>,
#[serde(default)]
pub rim_allowlist: Vec<Vec<u8>>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub max_attestation_age_epochs: Option<u64>,
#[serde(default)]
pub require_receipt_binding: bool
}

Source line: 1055.

genesis::TdxTrustAnchorsGenesis

Genesis-side mirror of compute_state::TdxTrustAnchors (Phase 14c).

#[cfg(feature = "compute")]
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)]
pub struct TdxTrustAnchorsGenesis {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub pinned_intel_root_fingerprint_sha256: Option<[u8; 32]>,
#[serde(default)]
pub mrtd_allowlist: Vec<Vec<u8>>,
#[serde(default)]
pub mrsigner_seam_allowlist: Vec<Vec<u8>>,
#[serde(default)]
pub rtmr0_allowlist: Vec<Vec<u8>>,
#[serde(default)]
pub rtmr1_allowlist: Vec<Vec<u8>>,
#[serde(default)]
pub rtmr2_allowlist: Vec<Vec<u8>>,
#[serde(default)]
pub rtmr3_allowlist: Vec<Vec<u8>>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub max_attestation_age_epochs: Option<u64>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub min_pce_svn: Option<u16>,
#[serde(default)]
pub require_receipt_binding: bool,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub intel_tcb_signing_cert_der: Option<Vec<u8>>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub tcb_info_json: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub qe_identity_json: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub pck_crl_der: Option<Vec<u8>>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub root_ca_crl_der: Option<Vec<u8>>,
#[serde(default)]
pub allowed_tcb_statuses: Vec<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub collateral_max_age_epochs: Option<u64>
}

Source line: 1069.

genesis::ProviderStakeTiers

Provider stake tiers for compute marketplace.

#[cfg(feature = "compute")]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ProviderStakeTiers {
/// Consumer tier (micro-MINT).

pub consumer: u64,
/// Professional tier (micro-MINT).

pub professional: u64,
/// Enterprise tier (micro-MINT).

pub enterprise: u64,
/// Cluster tier (micro-MINT).

pub cluster: u64
}

Source line: 1109.

genesis::TowerParams

Tower consensus parameters for the genesis config.

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct TowerParams {
/// Slot duration in seconds.

pub slot_duration_secs: u64,
/// Number of slots per epoch.

pub slots_per_epoch: u64,
/// Minimum stake to become a Tower validator (micro-MINT).

pub min_tower_stake: u64,
/// Tower committee size (Block Producers per slot).

pub bp_committee_size: u32,
/// Tower committee size (Block Validators per slot).

pub bv_committee_size: u32
}

Source line: 1134.

genesis::GovernanceParams

Governance parameters for the genesis config.

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct GovernanceParams {
/// Minimum deposit for a parameter change proposal (micro-MINT).

pub proposal_deposit_parameter: u64,
/// Minimum deposit for a WASI module upgrade proposal (micro-MINT).

pub proposal_deposit_wasi: u64,
/// Minimum deposit for a treasury spend proposal (micro-MINT).

pub proposal_deposit_treasury: u64,
/// Minimum deposit for a validator slashing proposal (micro-MINT).

pub proposal_deposit_slashing: u64,
/// Minimum deposit for an emergency action proposal (micro-MINT).

pub proposal_deposit_emergency: u64,
/// Voting period in epochs (standard proposals).

pub voting_period_epochs: u64,
/// Voting period in epochs (emergency proposals).

pub emergency_voting_period_epochs: u64,
/// Timelock period in epochs (standard proposals).

pub timelock_epochs: u64,
/// Minimum quorum fraction (e.g. 0.40 = 40% of staked SIGIL must vote).

pub quorum_fraction: f64
}

Source line: 1161.

genesis::ContractParams

Smart-contract platform parameters.

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct ContractParams {
/// Maximum bytecode size for `RegisterContractCode`, in bytes.

pub max_code_size: u64,
/// Required base fee for code registration, in micro-MINT.

pub register_code_base_fee: u64,
/// Additional fee per started KiB of bytecode, in micro-MINT.

pub register_code_fee_per_kib: u64,
/// Height where privileged system contracts become the policy gate for

/// core chain features. Before this height, legacy native execution stays

/// active so a hard fork can be scheduled without changing old genesis

/// files. `u64::MAX` means not scheduled.

#[serde(default = "default_system_contracts_activation_height")]
pub system_contracts_activation_height: u64
}

Source line: 1200.

genesis::CzacParams

CZAC protocol launch controls.

#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
pub struct CzacParams {
/// Enables CZAC payment-channel transactions that take custody of user

/// funds. Must remain false on `sigil-mainnet-1` for v1.

pub payment_channels_enabled: bool
}

Source line: 1232.

genesis::CzacParams::canary_enabled

Canary posture after operators intentionally opt into payment-channel soak testing under real load.

pub fn canary_enabled() -> Self;

Source line: 1241.

genesis::VigilsParams

Vigils launch and source-gating parameters.

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct VigilsParams {
/// Master switch for all Vigils transactions.

pub active: bool,
/// Height before which Vigils transactions fail validation.

pub activation_height: u64,
/// Event source kinds currently accepted by semantic validation.

pub enabled_sources: Vec<crate::vigil::EventSourceKind>,
/// Maximum accepted EventDelivery transactions per block.

pub max_event_deliveries_per_block: u32,
/// Separate callback gas budget for the Vigils execution pass.

pub max_callback_gas_per_block: u64,
/// Maximum gas for one callback.

pub max_single_callback_gas: u64,
/// Maximum canonical event payload size.

pub max_event_payload_bytes: u64,
/// Maximum canonical proof size.

pub max_event_proof_bytes: u64
}

Source line: 1250.

genesis::GenesisConfig::to_json

Serialize this genesis configuration to a JSON string.

pub fn to_json(&self) -> Result<String, crate::error::CoreError>;

Source line: 1286.

genesis::GenesisConfig::from_json

Deserialize a genesis configuration from a JSON string.

pub fn from_json(json: &str) -> Result<Self, crate::error::CoreError>;

Source line: 1292.

genesis::GenesisConfig::write_to_file

Write this genesis configuration to a file.

pub fn write_to_file(&self, path: &std::path::Path) -> Result<(), crate::error::CoreError>;

Source line: 1298.

genesis::GenesisConfig::read_from_file

Read a genesis configuration from a file (does NOT validate).

pub fn read_from_file(path: &std::path::Path) -> Result<Self, crate::error::CoreError>;

Source line: 1306.

genesis::GenesisBuilder

Builder for constructing a GenesisConfig with fluent API.

#[derive(Debug)]
pub struct GenesisBuilder {

}

Source line: 1316.

genesis::GenesisBuilder::new_testnet

Start a new genesis builder with testnet defaults.

pub fn new_testnet() -> Self;

Source line: 1339.

genesis::GenesisBuilder::username_params

Set username registry parameters (length-tier prices, multiplier, reserved list, dispute multisig DIDs).

pub fn username_params(mut self, params: crate::username::UsernameParams) -> Self;

Source line: 1364.

genesis::GenesisBuilder::chain_id

Set the chain ID.

pub fn chain_id(mut self, id: ChainId) -> Self;

Source line: 1370.

genesis::GenesisBuilder::genesis_time

Set the genesis time as a Unix timestamp.

pub fn genesis_time(mut self, time: u64) -> Self;

Source line: 1376.

genesis::GenesisBuilder::add_validator

Add a validator to the genesis set.

pub fn add_validator(mut self, validator: GenesisValidator) -> Self;

Source line: 1382.

genesis::GenesisBuilder::add_balance

Add an initial account balance.

pub fn add_balance(mut self, did: String, balance: u64) -> Self;

Source line: 1388.

genesis::GenesisBuilder::add_identity

Add an initial identity document for a launch/custody DID.

pub fn add_identity(mut self, did: String, document: serde_json::Value) -> Self;

Source line: 1394.

genesis::GenesisBuilder::protocol_params

Set protocol parameters.

pub fn protocol_params(mut self, params: ProtocolParams) -> Self;

Source line: 1400.

genesis::GenesisBuilder::economics

Set economic parameters.

pub fn economics(mut self, economics: EconomicParams) -> Self;

Source line: 1406.

genesis::GenesisBuilder::tower_params

Set Tower consensus parameters.

pub fn tower_params(mut self, tower: TowerParams) -> Self;

Source line: 1412.

genesis::GenesisBuilder::governance_params

Set governance parameters.

pub fn governance_params(mut self, governance: GovernanceParams) -> Self;

Source line: 1418.

genesis::GenesisBuilder::contract_params

Set smart-contract platform parameters.

pub fn contract_params(mut self, contracts: ContractParams) -> Self;

Source line: 1424.

genesis::GenesisBuilder::czac_params

Set CZAC protocol parameters.

pub fn czac_params(mut self, czac: CzacParams) -> Self;

Source line: 1430.

genesis::GenesisBuilder::vigils_params

Set Vigils launch and source-gating parameters.

pub fn vigils_params(mut self, vigils: VigilsParams) -> Self;

Source line: 1436.

genesis::GenesisBuilder::nova_params

Set Nova metaverse launch parameters and genesis worlds.

pub fn nova_params(mut self, nova: crate::nova::NovaParams) -> Self;

Source line: 1442.

genesis::GenesisBuilder::reference_contract

Add a reference contract to be deployed at genesis.

pub fn reference_contract(mut self, contract: GenesisReferenceContract) -> Self;

Source line: 1448.

genesis::GenesisBuilder::build

Build the genesis config and validate it.

pub fn build(self) -> Result<GenesisConfig, GenesisValidationError>;

Source line: 1454.

genesis::ProtocolParams::testnet_default

Reduced-stake testnet defaults for easier testing.

pub fn testnet_default() -> Self;

Source line: 1482.

genesis::EconomicParams::testnet_default

Testnet economic defaults with higher block rewards for faucet sustainability.

pub fn testnet_default() -> Self;

Source line: 1500.

genesis::generate_testnet_genesis

Generate a complete testnet genesis configuration with the specified number of validators. Each validator gets deterministic keys derived from its index.

Returns a fully validated GenesisConfig ready to write to disk.

pub fn generate_testnet_genesis(
    num_validators: usize,
    genesis_time: u64,
) -> Result<GenesisConfig, GenesisValidationError>;

Source line: 1518.

genesis::GenesisValidationError

Errors during genesis validation.

#[derive(Debug, Clone, thiserror::Error)]
pub enum GenesisValidationError {
    #[error("genesis must have at least one validator")]
    NoValidators,

    #[error("invalid OAS DID for {did}: {reason}")]
    InvalidDid { did: String, reason: String },

    #[error("invalid {field} for {did}: {reason}")]
    InvalidPublicKey {
        did: String,
        field: &'static str,
        reason: String,
    },

    #[error("invalid genesis identity document for {did}: {reason}")]
    InvalidIdentityDocument { did: String, reason: String },

    #[error("validator {did} has insufficient stake: {stake} < {minimum}")]
    InsufficientStake {
        did: String,
        stake: u64,
        minimum: u64,
    },

    #[error("duplicate validator DID: {0}")]
    DuplicateValidator(String),

    #[error("duplicate validator {field}: {value}")]
    DuplicateValidatorPublicKey { field: &'static str, value: String },

    #[error("validator {0} missing human root DID")]
    MissingHumanRoot(String),

    #[error("invalid compute genesis params: {reason}")]
    InvalidComputeParams { reason: String },

    #[error("invalid CZAC genesis params: {reason}")]
    InvalidCzacParams { reason: String },

    #[error("invalid Nova genesis params: {reason}")]
    InvalidNovaParams { reason: String },

    #[error("invalid reference contract {contract_did}: {reason}")]
    InvalidReferenceContract {
        contract_did: String,
        reason: String,
    },
}

Source line: 1622.

On this page

genesis::GenesisConfiggenesis::GenesisConfig::compute_state_rootgenesis::GenesisConfig::validategenesis::GenesisConfig::testnet_defaultgenesis::GenesisConfig::effective_tower_paramsgenesis::GenesisConfig::effective_governance_paramsgenesis::GenesisConfig::effective_contract_paramsgenesis::GenesisConfig::effective_czac_paramsgenesis::GenesisConfig::effective_vigils_paramsgenesis::GenesisConfig::effective_nova_paramsgenesis::GenesisReferenceContractgenesis::GenesisReferenceContract::code_bytesgenesis::GenesisReferenceContract::parsed_code_hashgenesis::GenesisValidatorgenesis::validate_validator_didgenesis::ValidatorGenesisModegenesis::ProtocolParamsgenesis::ProtocolParams::target_block_time_millisgenesis::ProtocolParams::target_block_time_secondsgenesis::ProtocolParams::signature_batch_sizegenesis::EconomicParamsgenesis::ComputeParamsgenesis::SevSnpTrustAnchorsGenesisgenesis::bytes_hex_vec_serde::serializegenesis::bytes_hex_vec_serde::deserializegenesis::SevSnpVcekAllowlistEntryGenesisgenesis::SevSnpTcbGenesisgenesis::SgxDcapTrustAnchorsGenesisgenesis::ArmCcaTrustAnchorsGenesisgenesis::TdxTrustAnchorsGenesisgenesis::ProviderStakeTiersgenesis::TowerParamsgenesis::GovernanceParamsgenesis::ContractParamsgenesis::CzacParamsgenesis::CzacParams::canary_enabledgenesis::VigilsParamsgenesis::GenesisConfig::to_jsongenesis::GenesisConfig::from_jsongenesis::GenesisConfig::write_to_filegenesis::GenesisConfig::read_from_filegenesis::GenesisBuildergenesis::GenesisBuilder::new_testnetgenesis::GenesisBuilder::username_paramsgenesis::GenesisBuilder::chain_idgenesis::GenesisBuilder::genesis_timegenesis::GenesisBuilder::add_validatorgenesis::GenesisBuilder::add_balancegenesis::GenesisBuilder::add_identitygenesis::GenesisBuilder::protocol_paramsgenesis::GenesisBuilder::economicsgenesis::GenesisBuilder::tower_paramsgenesis::GenesisBuilder::governance_paramsgenesis::GenesisBuilder::contract_paramsgenesis::GenesisBuilder::czac_paramsgenesis::GenesisBuilder::vigils_paramsgenesis::GenesisBuilder::nova_paramsgenesis::GenesisBuilder::reference_contractgenesis::GenesisBuilder::buildgenesis::ProtocolParams::testnet_defaultgenesis::EconomicParams::testnet_defaultgenesis::generate_testnet_genesisgenesis::GenesisValidationError