diff --git a/docs/consensus/consensus_chain.md b/docs/consensus/consensus_chain.md index 18e7914..ca8c610 100644 --- a/docs/consensus/consensus_chain.md +++ b/docs/consensus/consensus_chain.md @@ -1,6 +1,6 @@ --- title: Consensus Chain -sidebar_position: 1 +sidebar_position: 2 description: General sub-protocols of the consensus chain operation. keywords: - consensus @@ -9,7 +9,7 @@ keywords: - transaction - synchronization last_update: - date: 05/07/2024 + date: 06/07/2024 author: Saeid Yazdinejad --- diff --git a/docs/consensus/genesis_config.md b/docs/consensus/genesis_config.md new file mode 100644 index 0000000..9be660f --- /dev/null +++ b/docs/consensus/genesis_config.md @@ -0,0 +1,135 @@ +--- +title: Genesis Block +sidebar_position: 1 +description: Genesis Configuration +keywords: + - genesis + - initial configuration +last_update: + date: 06/08/2024 + author: Saeid Yazdinejad +--- + +import Collapsible from '@site/src/components/Collapsible/Collapsible'; + + + +This section details the genesis configuration process for the Subspace network, establishing the foundational state of the blockchain with critical operational and network-specific parameters. + +## Network Setup + +### WASM Setup + +Incorporates the compiled runtime logic into the genesis block, defining all operational rules and behaviors of the network. + +```rust +let wasm_binary = WASM_BINARY.ok_or_else(|| "Wasm binary must be built for Gemini".to_string())?; +``` + +### Chain Type +Specifies the type of network, highlighting its use in a development or mainnet environment. + + + + + + + + +## Genesis Params + +### initial_balance + +Sets up initial token distributions to facilitate early operations and ensure liquidity from the start. + +### enable_rewards_at +Controls the activation of network rewards, set manually in this configuration. + +```rust +enable_rewards_at: EnableRewardsAt::Manually, +``` + +### allow_authoring_by + +Allows any eligible participant to produce blocks, promoting a decentralized and inclusive network environment. + +```rust +allow_authoring_by: AllowAuthoringBy::Anyone, +``` + +### pot_slot_iterations + +This parameter sets the number of iterations for the Proof-of-Time (PoT) function required per time slot. It balances the computational difficulty with accessibility, ensuring that the proof workload remains feasible yet secure against rapid advances in hardware capabilities. + +```rust +pot_slot_iterations: NonZeroU32::new(100_000_000).expect("Not zero; qed"), +``` + +This line ensures that `pot_slot_iterations`, which controls the computational intensity required for each slot, is assigned a valid non-zero value. By using `NonZeroU32`, the code explicitly states that zero is not a permissible value, avoiding any logical errors where a zero could imply no computation. The `expect("Not zero; qed")` part acts as a safeguard, providing a clear runtime error message if zero is mistakenly used. + + +### enable_domains + +Activates domain-specific features within the network. + + +```rust +enable_domains: true, +``` + +### enable_dynamic_cost_of_storage + +Keeps the cost of storage static by setting this parameter to false. + +```rust +enable_dynamic_cost_of_storage: false, +``` + +### enable_balance_transfers and enable_non_root_calls + +Enables balance transfers between accounts and allows non-administrative actions within the network. + +```rust +enable_balance_transfers: true, +enable_non_root_calls: true, +``` + +### confirmation_depth_k + +This parameter specifies the minimal depth a block must reach in the blockchain before it is considered part of the recorded history. It sets a global constant for the network, distinguishing it from client-specific transaction confirmation depths. This ensures that once a block has been built upon by a certain number of subsequent blocks, it is accepted as irreversible. + +### rewards_config + +Details how network rewards are structured to incentivize participation and maintain network security. + +```rust +rewards_config: RewardsConfig { + remaining_issuance: + proposer_subsidy_points:, + voter_subsidy_points:, +}, +``` + + +## Genesis Domain Params + +Describes configurations specific to domains within the network, including runtime parameters and permissions. + +### genesis_domains +Configures specific domains with tailored runtime settings, permissions, and operational rules. + +```rust +struct GenesisDomainParams { + permissioned_action_allowed_by: PermissionedActionAllowedBy, + genesis_domains: Vec, +} +``` + + + + diff --git a/docs/consensus/proof_of_archival_storage.md b/docs/consensus/proof_of_archival_storage.md index ee121ec..258a4df 100644 --- a/docs/consensus/proof_of_archival_storage.md +++ b/docs/consensus/proof_of_archival_storage.md @@ -1,6 +1,6 @@ --- title: Proof-of-Archival-Storage -sidebar_position: 2 +sidebar_position: 3 description: Proof-of-Archival-Storage Dilithium Consensus keywords: - archiving @@ -8,7 +8,7 @@ keywords: - plotting - auditing last_update: - date: 05/07/2024 + date: 06/07/2024 author: Saeid Yazdinejad --- import Collapsible from '@site/src/components/Collapsible/Collapsible'; diff --git a/docs/consensus/proof_of_space.md b/docs/consensus/proof_of_space.md index 6a2721c..99ca1cf 100644 --- a/docs/consensus/proof_of_space.md +++ b/docs/consensus/proof_of_space.md @@ -1,14 +1,14 @@ --- title: Proof-of-Space -sidebar_position: 3 +sidebar_position: 4 description: Proof-of-Space Dilithium Consensus component keywords: - pos - tables - plotting last_update: - date: 05/27/2024 - author: Dariia Porechna + date: 06/07/2024 + author: Saeid Yazdinejad --- import Collapsible from '@site/src/components/Collapsible/Collapsible'; diff --git a/docs/consensus/proof_of_time.md b/docs/consensus/proof_of_time.md index 1e4c3fe..12df2c5 100644 --- a/docs/consensus/proof_of_time.md +++ b/docs/consensus/proof_of_time.md @@ -1,13 +1,13 @@ --- title: Proof-of-Time -sidebar_position: 4 +sidebar_position: 5 description: Proof-of-Time Dilithium Consensus component keywords: - pot - timekeeper - randomness last_update: - date: 03/12/2024 + date: 06/07/2024 author: Saeid Yazdinejad --- import Collapsible from '@site/src/components/Collapsible/Collapsible';