Parameters
This reference documents the configurable parameters for the Orbinum runtime.
Table of Contents
Block Production
| Parameter | Value | Description |
|---|---|---|
MILLISECS_PER_BLOCK | 6000 | Block time in milliseconds |
SLOT_DURATION | 6000 | Slot duration for consensus |
EPOCH_DURATION_IN_BLOCKS | 600 | Blocks per epoch (~1 hour) |
MINUTES | 10 | Blocks per minute |
HOURS | 600 | Blocks per hour |
DAYS | 14400 | Blocks 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
| Parameter | Value | Description |
|---|---|---|
UNITS | 1,000,000,000,000,000,000 | 10^18 (18 decimals) |
MILLIUNIT | 1,000,000,000,000,000 | 10^15 |
MICROUNIT | 1,000,000,000,000 | 10^12 |
Existential Deposit
| Parameter | Value | Description |
|---|---|---|
ExistentialDeposit | 1 MILLIUNIT | Minimum account balance |
parameter_types! {
pub const ExistentialDeposit: Balance = MILLIUNIT;
pub const MaxLocks: u32 = 50;
pub const MaxReserves: u32 = 50;
}
EVM
Gas Configuration
| Parameter | Value | Description |
|---|---|---|
BlockGasLimit | 15,000,000 | Max gas per block |
GasTarget | 7,500,000 | Target utilization (50%) |
WeightPerGas | 20,000 | Substrate weight per gas unit |
Fee Configuration
| Parameter | Value | Description |
|---|---|---|
DefaultBaseFeePerGas | 1 Gwei | Initial base fee |
MinBaseFeePerGas | 0.001 Gwei | Minimum base fee |
MaxBaseFeePerGas | 100 Gwei | Maximum base fee |
BaseFeeChangeRate | 12.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
| Precompile | Address | Base Gas |
|---|---|---|
| ECRecover | 0x01 | 3,000 |
| SHA256 | 0x02 | 60 + 12/word |
| RIPEMD160 | 0x03 | 600 + 120/word |
| Identity | 0x04 | 15 + 3/word |
| Modexp | 0x05 | Variable |
| BN254 Add | 0x06 | 150 |
| BN254 Mul | 0x07 | 6,000 |
| BN254 Pairing | 0x08 | 34,000 + 45,000/pair |
| Blake2 | 0x09 | Variable |
Shielded Pool
Pool Configuration
| Parameter | Value | Description |
|---|---|---|
MaxTreeDepth | 20 | Merkle tree depth |
MaxLeaves | 1,048,576 | Max commitments (2²⁰) |
HistoricRootsToKeep | 100 | Historic roots stored |
MinShieldAmount | 1 UNIT | Minimum 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
| Operation | Base Weight | Per-Input Weight |
|---|---|---|
| Shield | 50,000 | - |
| Transfer | 100,000 | 50,000 |
| Unshield | 75,000 | - |
ZK Verifier
Proof Configuration
| Parameter | Value | Description |
|---|---|---|
MaxProofSize | 256 | Max proof bytes |
MaxPublicInputs | 16 | Max public inputs |
MaxCircuits | 100 | Max registered circuits |
parameter_types! {
pub const MaxProofSize: u32 = 256;
pub const MaxPublicInputs: u32 = 16;
pub const MaxCircuits: u32 = 100;
}
Verification Costs
| Circuit | Verification Weight |
|---|---|
| Shield | ~150,000 |
| Transfer (2-in-2-out) | ~200,000 |
| Unshield | ~175,000 |
System Limits
Transaction Limits
| Parameter | Value | Description |
|---|---|---|
MaxBlockWeight | 2 sec equiv | Max block processing time |
MaxBlockLength | 5 MB | Max block size |
MaxExtrinsicWeight | 75% block | Max single tx weight |
Storage Limits
| Parameter | Value | Description |
|---|---|---|
MaxReaders | 512 | Max concurrent reads |
MaxActiveOutbound | 100 | Max outbound transfers |
Governance Parameters
WIP
Governance parameters are not yet finalized.
| Parameter | Proposed Value | Description |
|---|---|---|
VotingPeriod | 7 DAYS | Proposal voting duration |
EnactmentPeriod | 1 DAY | Delay before execution |
MinimumDeposit | 100 UNITS | Proposal deposit |
MaxProposals | 100 | Max 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(())
}
}
Related Documentation
- Pallets - Pallet reference
- System Overview - Architecture