Skip to main content

Parameters

This reference documents the configurable parameters for the Orbinum runtime.


Table of Contents


Block Production

ParameterValueDescription
MILLISECS_PER_BLOCK6000Block time in milliseconds
SLOT_DURATION6000Slot duration for consensus
EPOCH_DURATION_IN_BLOCKS600Blocks per epoch (~1 hour)
MINUTES10Blocks per minute
HOURS600Blocks per hour
DAYS14400Blocks per day
pub const MILLISECS_PER_BLOCK: u64 = 6000;
pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK;

pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber);
pub const HOURS: BlockNumber = MINUTES * 60;
pub const DAYS: BlockNumber = HOURS * 24;

Balances

Token Economics

ParameterValueDescription
UNITS1,000,000,000,000,000,00010^18 (18 decimals)
MILLIUNIT1,000,000,000,000,00010^15
MICROUNIT1,000,000,000,00010^12

Existential Deposit

ParameterValueDescription
ExistentialDeposit1 MILLIUNITMinimum account balance
parameter_types! {
pub const ExistentialDeposit: Balance = MILLIUNIT;
pub const MaxLocks: u32 = 50;
pub const MaxReserves: u32 = 50;
}

EVM

Gas Configuration

ParameterValueDescription
BlockGasLimit15,000,000Max gas per block
GasTarget7,500,000Target utilization (50%)
WeightPerGas20,000Substrate weight per gas unit

Fee Configuration

ParameterValueDescription
DefaultBaseFeePerGas1 GweiInitial base fee
MinBaseFeePerGas0.001 GweiMinimum base fee
MaxBaseFeePerGas100 GweiMaximum base fee
BaseFeeChangeRate12.5%Max change per block
parameter_types! {
pub BlockGasLimit: U256 = U256::from(15_000_000);
pub WeightPerGas: Weight = Weight::from_parts(20_000, 0);

pub DefaultBaseFeePerGas: U256 = U256::from(1_000_000_000);
pub MinBaseFeePerGas: U256 = U256::from(1_000_000);
pub MaxBaseFeePerGas: U256 = U256::from(100_000_000_000);
}

Precompile Costs

PrecompileAddressBase Gas
ECRecover0x013,000
SHA2560x0260 + 12/word
RIPEMD1600x03600 + 120/word
Identity0x0415 + 3/word
Modexp0x05Variable
BN254 Add0x06150
BN254 Mul0x076,000
BN254 Pairing0x0834,000 + 45,000/pair
Blake20x09Variable

Shielded Pool

Pool Configuration

ParameterValueDescription
MaxTreeDepth20Merkle tree depth
MaxLeaves1,048,576Max commitments (2²⁰)
HistoricRootsToKeep100Historic roots stored
MinShieldAmount1 UNITMinimum shield amount
parameter_types! {
pub const MaxTreeDepth: u32 = 20;
pub const MaxLeaves: u32 = 1_048_576;
pub const HistoricRootsToKeep: u32 = 100;
pub const MinShieldAmount: Balance = UNITS;
}

Operation Weights

OperationBase WeightPer-Input Weight
Shield50,000-
Transfer100,00050,000
Unshield75,000-

ZK Verifier

Proof Configuration

ParameterValueDescription
MaxProofSize256Max proof bytes
MaxPublicInputs16Max public inputs
MaxCircuits100Max registered circuits
parameter_types! {
pub const MaxProofSize: u32 = 256;
pub const MaxPublicInputs: u32 = 16;
pub const MaxCircuits: u32 = 100;
}

Verification Costs

CircuitVerification Weight
Shield~150,000
Transfer (2-in-2-out)~200,000
Unshield~175,000

System Limits

Transaction Limits

ParameterValueDescription
MaxBlockWeight2 sec equivMax block processing time
MaxBlockLength5 MBMax block size
MaxExtrinsicWeight75% blockMax single tx weight

Storage Limits

ParameterValueDescription
MaxReaders512Max concurrent reads
MaxActiveOutbound100Max outbound transfers

Governance Parameters

WIP

Governance parameters are not yet finalized.

ParameterProposed ValueDescription
VotingPeriod7 DAYSProposal voting duration
EnactmentPeriod1 DAYDelay before execution
MinimumDeposit100 UNITSProposal deposit
MaxProposals100Max active proposals

Modifying Parameters

Runtime Upgrade

Parameters can be changed through runtime upgrades:

// In runtime/src/lib.rs
parameter_types! {
pub const NewParameter: u32 = 200; // Changed from 100
}

Governance

Some parameters are governance-controlled:

#[pallet::call]
impl<T: Config> Pallet<T> {
#[pallet::call_index(0)]
pub fn set_parameter(
origin: OriginFor<T>,
new_value: u32,
) -> DispatchResult {
ensure_root(origin)?;
Parameter::<T>::put(new_value);
Ok(())
}
}