# Calamari Runtime Constants > Because our shell chain is based on statemint, so most of these constants are derived from statemint. | N/A | Acala | Shiden | Khala | |:-------------- | ----- |:------ |:----- | | Decimal | 10^12 | 10^18 | 10^12 | | Total Issuance | 100M | 70M | | 1. frame_system ```rust /// We assume that ~5% of the block weight is consumed by `on_initialize` handlers. This is /// used to limit the maximal weight of a single extrinsic. pub const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(5); /// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can be used by /// Operational extrinsics. pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); /// We allow for 0.5 seconds of compute with a 6 second average block time. pub const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND / 2; // 5MB pub RuntimeBlockLength: BlockLength = BlockLength::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO); ``` Diff: - Acala: ```rust // TODO: somehow estimate this value. Start from a conservative value. pub const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10); /// The ratio that `Normal` extrinsics should occupy. Start from a conservative value. const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(70); ``` - Shiden ```rust const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10); ``` - Khala: Same with us. 2. pallet_balances ```rust parameter_types! { pub const NativeTokenExistentialDeposit: u128 = MA; pub const MaxLocks: u32 = 50; pub const MaxReserves: u32 = 50; } ``` Diff: - Acala: ```rust pub NativeTokenExistentialDeposit: Balance = 10 * cent(KAR); // 0.1 KAR pub const MaxReserves: u32 = ReserveIdentifier::Count as u32; // 6 ``` - Shiden ```rust pub const ExistentialDeposit: Balance = 1_000_000; // 1_000_000 / 10^18 ``` - Khala ```rust pub const ExistentialDeposit: Balance = EXISTENTIAL_DEPOSIT; // 0.01PHA ``` 3. pallet_transaction_payment ```rust parameter_types! { /// Relay Chain `TransactionByteFee` / 10 pub const TransactionByteFee: Balance = mMA; } ``` Diff - Acala ```rust pub TransactionByteFee: Balance = millicent(KAR); // 10^12 / 1000 ``` - Shiden ```rust pub const TransactionByteFee: Balance = MILLISDN / 100; // 10^15 / 100 ``` - Khala ```rust pub const TransactionByteFee: Balance = 10 * MILLICENTS; // 10^12 / 100 ``` 4. pallet_assets ```rust parameter_types! { pub const AssetDeposit: Balance = 100 * MA; // 100 DOLLARS deposit to create asset pub const ApprovalDeposit: Balance = NativeTokenExistentialDeposit::get(); pub const StringLimit: u32 = 50; /// Key = 32 bytes, Value = 36 bytes (32+1+1+1+1) // https://github.com/paritytech/substrate/blob/069917b/frame/assets/src/lib.rs#L257L271 pub const MetadataDepositBase: Balance = deposit(1, 68); pub const MetadataDepositPerByte: Balance = deposit(0, 1); pub const ExecutiveBody: BodyId = BodyId::Executive; } ``` Diff - Acala: N/A - Shiden: N/A - Khala: N/A 5. pallet_multisig ```rust parameter_types! { // One storage item; key size is 32; value is size 4+4+16+32 bytes = 56 bytes. pub const DepositBase: Balance = deposit(1, 88); // Additional storage item size of 32 bytes. pub const DepositFactor: Balance = deposit(0, 32); pub const MaxSignatories: u16 = 100; } ``` Diff - Acala: Same - Shiden: N/A - Khala: Same 6. cumulus_pallet_parachain_system ```rust parameter_types! { pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4; pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4; } ``` Diff - Acala: Same - Shiden: ```rust pub const ReservedXcmpWeight: Weight = (); pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 2; ``` - Khala: Same 7. XcmConfig ```rust parameter_types! { // One XCM operation is 1_000_000 weight - almost certainly a conservative estimate. pub UnitWeightCost: Weight = 1_000_000; } ``` Diff - Acala: ```rust pub const UnitWeightCost: Weight = 200_000_000; ``` - Shiden: Same - Khala: N/A 8. pallet_session ```rust parameter_types! { pub const DisabledValidatorsThreshold: Perbill = Perbill::from_percent(33); // Rotate collator's spot each 3 hours. pub const Period: u32 = 3 * HOURS; pub const Offset: u32 = 0; } ``` Diff - Acala: ```rust pub const Period: u32 = 6 * HOURS; ``` - Shiden: N/A - Khala: ```rust pub const Period: u32 = 6 * HOURS; ``` 9. pallet_collator_selection ```rust parameter_types! { // Pallet account for record rewards and give rewards to collator. pub const PotId: PalletId = PalletId(*b"PotStake"); // How many collator candidates is allowed. pub const MaxCandidates: u32 = 10; pub const MinCandidates: u32 = 3; // How many collators who cannot be slashed. pub const MaxInvulnerables: u32 = 10; } ``` Diff - Acala: ```rust pub const MinCandidates: u32 = 4; pub const MaxCandidates: u32 = 50; pub const MaxInvulnerables: u32 = 10; pub const KickPenaltySessionLength: u32 = 8; pub const CollatorKickThreshold: Permill = Permill::from_percent(30); ``` - Shiden: N/A - Khala ```rust pub const MaxCandidates: u32 = 1000; pub const MinCandidates: u32 = 5; pub const MaxInvulnerables: u32 = 100; ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up