Expand description
This is the official timechain runtime.
§Timechain Runtime and Environments
New code is first tested on development (develop), then integrated with all other projects on integration.
Once ready for release, new features start long term testing on testnet (testnet). Once everybody is happy, including the community and external partners, features are brought to timechain (mainnet).
The staging can be optionally used to test any mainnet specific migrations, features or other oddities.
Name | Features | Profile |
---|---|---|
mainnet | default | mainnet |
staging | develop | testnet |
testnet | testnet | testnet |
develop | testnet,develop | testnet |
Until we can extract individual package config a bit better,
please check Runtime
and the individual pallets.
§Frame Configuration
Section | Pallet | Config Implementation |
---|---|---|
Core | System | Config |
Timestamp | Config | |
Consensus | Authorship | Config |
Session | Config | |
Historical | Config | |
Babe | Config | |
Grandpa | Config | |
ImOnline | Config | |
AuthorityDiscovery | Config | |
Tokenomics | Balances | Config |
TransactionPayment | Config | |
Vesting | Config | |
Utilities | Utility | Config |
Proxy | Config | |
Multisig | Config |
§Nominated Proof of Stake
§On-chain services
§On-chain governance
§Custom pallets
§Weights and Fees
§Governance
The main body of governance is responsible for maintaining the chain and keeping it operational.
§Technical Committee
The technical committee is managed using the [pallet_collective
], [pallet_membership
] and our own custom pallet_governance
.
While the first two pallets tally the votes and manage the membership of the committee, our custom pallet it used to elevate committee origin to more privileged level for selected calls.
Can be compiled with #[no_std]
, ready for Wasm.
Re-exports§
pub use apis::RuntimeApi;
pub use version::VERSION;
pub use configs::consensus::SessionKeys;
pub use configs::core::BlockHashCount;
pub use configs::core::RuntimeBlockLength;
pub use configs::core::RuntimeBlockWeights;
pub use configs::core::AVERAGE_ON_INITIALIZE_RATIO;
pub use configs::custom::PrevalidateFeeless;
pub use configs::governance::DefaultAdminOrigin;
pub use configs::tokenomics::ExistentialDeposit;
pub use configs::tokenomics::LengthToFee;
pub use configs::tokenomics::WeightToFee;
pub use variants::*;
Modules§
- Runtime API Implementation
- benches 🔒Runtime benchmark list Runtime Benchmarks List.
- The runtime configuration by sections
- Offchain signing implementation.
- Automatically generated nomination bag boundaries Autogenerated bag thresholds.
- Helpers to handle variant flags
- weights 🔒Benchmarked pallet weights Automatically generated runtime weight selected based on features flags
Macros§
- Calls
add_benchmark
with all configs fromdefine_benchmarks
and passes the first two parameters on. - Calls
list_benchmark
with all configs fromdefine_benchmarks
and passes the first two parameters on. - Macro to set value based on testnet feature flag
- Macro to set a value (e.g. when using the
parameter_types
macro) based on the current runtime variant being build. - Macro to set value based on develop feature flag
Structs§
- Time to execute an empty block. Calculated by multiplying the Average with
1.0
and adding0
. - The number of eras that a bonded stake must remain locked after the owner has requested to unbond. This value represents 21 days, assuming each era is 12 hours long. This delay is intended to increase network security by preventing stakers from immediately withdrawing funds after participating in staking.
- An epoch is a unit of time used for key operations in the consensus mechanism, such as validator rotations and randomness generation. Once set at genesis, this value cannot be changed without breaking block production.
- This defines the interval at which new blocks are produced in the blockchain. It impacts the speed of transaction processing and finality, as well as the load on the network and validators. The value is defined in milliseconds.
- Time to execute a NO-OP extrinsic, for example
System::remark
. Calculated by multiplying the Average with1.0
and adding0
. - Maximum numbers of authorities
- The maximum number of validators a nominator can nominate. This sets an upper limit on how many validators can be supported by a single nominator. A higher number allows more decentralization but increases the complexity of the staking system.
- Provides an implementation of
PalletInfo
to provide information about the pallet setup in the runtime. - The runtime origin type representing the origin of a call.
- The number of sessions that constitute an era. An era is the time period over which staking rewards are distributed, and validator set changes can occur. The era duration is a function of the number of sessions and the length of each session.
Enums§
- Contains a variant per dispatchable extrinsic that this pallet has.
- The aggregated runtime call type.
- A reason for placing a freeze on funds.
- A reason for placing a hold on funds.
- An identifier for each lock placed on funds.
- A reason for slashing funds.
- An aggregation of all
Task
enums across all pallets included in the current runtime. - Representation of the status of a staker.
- Contains a variant per dispatchable extrinsic that this pallet has.
- Contains a variant per dispatchable extrinsic that this pallet has.
- Contains a variant per dispatchable extrinsic that this pallet has.
Constants§
- One Analog Token in fixed point representation
- Shared default babe genesis config
- We allow for 2 seconds of compute with a 6 second average block time, with maximum proof size.
- Maximum block size
- One millionth of an Analog Token in fixed point representation
- One thousandth of an Analog Token in fixed point representation
- Average expected block time that we are targeting.
- TODO: 1 in 4 blocks (on average, not counting collisions) will be primary BABE blocks.
- Minimum duration at which blocks will be produced.
- Shared per-byte storage fee
Traits§
- Complex storage builder stuff.
Functions§
- Shared fee structure for items put in storage
Type Aliases§
- Some way of identifying an account on the chain. We intentionally make it equivalent to the public key of our transaction signing scheme.
- The address format for describing accounts.
- All pallets included in the runtime as a nested tuple of types.
- All pallets included in the runtime as a nested tuple of types. Excludes the System pallet.
- Validator peer-to-peer discovery. Current configuration can be found here here.
- Blind Assignment for Blockchain Extension block production. Current configuration can be found here here.
- Type used to represent balances
- Current configuration can be found here here.
- Block type as expected by this runtime.
- A hash to use to identify indivdual blocks.
- BlockId type as expected by this runtime.
- An index to a block.
- Extrinsic type that has already been checked.
- Executive: handles dispatch to the various modules.
- GHOST-based Recursive Ancestor Deriving Prefix Agreement finality gadget. Current configuration can be found here here.
- Block header type.
- Validator heartbeat protocol. Current configuration can be found here here.
- Type used for expressing timestamp.
- Current configuration can be found here here.
- Index of a transaction in the chain.
- Type shorthand for the balance type used to charge transaction fees
- Current configuration can be found here here.
- The SignedExtension to the basic transaction logic.
- Alias to 512-bit hash when used in the context of a transaction signature on the chain.
- A Block signed with a Justification
- Shared signing extensions
- The payload being signed in transactions.
- Base pallet mandatory for all frame runtimes. Current configuration can be found here here.
- Simple timestamp extension. Current configuration can be found here here.
- Current configuration can be found here here.
- Unchecked extrinsic type as expected by this runtime.
- Current configuration can be found here here.
- Current configuration can be found here here.