Skip to content

Commit 6d52f41

Browse files
authored
Merge pull request #3167 from autonomys/taurus-candidate
Taurus chainspec
2 parents a8d8ca3 + 9372c2c commit 6d52f41

File tree

3 files changed

+97
-14
lines changed

3 files changed

+97
-14
lines changed

crates/sc-subspace-chain-specs/res/chain-spec-raw-taurus.json

Lines changed: 82 additions & 0 deletions
Large diffs are not rendered by default.

crates/sc-subspace-chain-specs/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@
1818
1919
/// Devnet chain spec
2020
pub const DEVNET_CHAIN_SPEC: &str = include_str!("../res/chain-spec-raw-devnet.json");
21+
pub const TAURUS_CHAIN_SPEC: &str = include_str!("../res/chain-spec-raw-taurus.json");

crates/subspace-node/src/chain_spec.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,14 @@ use crate::domain::cli::{GenesisDomain, SpecId};
2222
use crate::domain::evm_chain_spec::{self};
2323
use sc_chain_spec::GenericChainSpec;
2424
use sc_service::ChainType;
25-
use sc_subspace_chain_specs::DEVNET_CHAIN_SPEC;
25+
use sc_subspace_chain_specs::{DEVNET_CHAIN_SPEC, TAURUS_CHAIN_SPEC};
2626
use sc_telemetry::TelemetryEndpoints;
2727
use sp_core::crypto::Ss58Codec;
2828
use sp_domains::PermissionedActionAllowedBy;
2929
use sp_runtime::{BoundedVec, Percent};
3030
use std::marker::PhantomData;
3131
use std::num::NonZeroU32;
3232
use subspace_core_primitives::pot::PotKey;
33-
use subspace_core_primitives::PublicKey;
3433
use subspace_runtime::{
3534
AllowAuthoringBy, BalancesConfig, CouncilConfig, DemocracyConfig, DomainsConfig,
3635
EnableRewardsAt, HistorySeedingConfig, RewardPoint, RewardsConfig, RuntimeConfigsConfig,
@@ -85,28 +84,30 @@ pub fn taurus_compiled() -> Result<GenericChainSpec, String> {
8584
let sudo_account =
8685
AccountId::from_ss58check("5F1XZHUSixAq58W8fstCUNtP1WDGoRpCEuLzGRDmJo32sbGc")
8786
.expect("Wrong root account address");
87+
let history_seeder =
88+
AccountId::from_ss58check("5EXKjeN6GXua85mHygsS95UwwrnNwTTEbzeAj9nqkXrgqQp6")
89+
.expect("Wrong history seeder account address");
8890

89-
let balances = vec![(sudo_account.clone(), 1_000 * SSC)];
91+
let balances = vec![
92+
(sudo_account.clone(), 1_000 * SSC),
93+
(history_seeder.clone(), SSC),
94+
];
9095
serde_json::to_value(subspace_genesis_config(
9196
sudo_account.clone(),
9297
balances,
9398
GenesisParams {
9499
enable_rewards_at: EnableRewardsAt::Manually,
95-
allow_authoring_by: AllowAuthoringBy::RootFarmer(PublicKey::from(
96-
hex_literal::hex!(
97-
"8aecbcf0b404590ddddc01ebacb205a562d12fdb5c2aa6a4035c1a20f23c9515"
98-
),
99-
)),
100+
allow_authoring_by: AllowAuthoringBy::FirstFarmer,
100101
// TODO: Adjust once we bench PoT on faster hardware
101-
// About 1s on 6.0 GHz Raptor Lake CPU (14900K)
102-
pot_slot_iterations: NonZeroU32::new(200_032_000).expect("Not zero; qed"),
102+
// About 1s on 6.2 GHz Raptor Lake CPU (14900KS)
103+
pot_slot_iterations: NonZeroU32::new(206_557_520).expect("Not zero; qed"),
103104
enable_domains: false,
104105
enable_dynamic_cost_of_storage: false,
105106
enable_balance_transfers: false,
106107
// TODO: Proper value here
107108
confirmation_depth_k: 100,
108109
rewards_config: RewardsConfig {
109-
remaining_issuance: 360_000_000 * SSC,
110+
remaining_issuance: 350_000_000 * SSC,
110111
proposer_subsidy_points: BoundedVec::try_from(vec![
111112
RewardPoint {
112113
block: 0,
@@ -213,16 +214,15 @@ pub fn taurus_compiled() -> Result<GenericChainSpec, String> {
213214
],
214215
},
215216
CouncilDemocracyConfigParams::<BlockNumber>::production_params(),
216-
// TODO: Proper value here
217-
sudo_account.clone(),
217+
history_seeder.clone(),
218218
)?)
219219
.map_err(|error| format!("Failed to serialize genesis config: {error}"))?
220220
})
221221
.build())
222222
}
223223

224224
pub fn taurus_config() -> Result<GenericChainSpec, String> {
225-
Err("Taurus is not supported".to_string())
225+
GenericChainSpec::from_json_bytes(TAURUS_CHAIN_SPEC.as_bytes())
226226
}
227227

228228
pub fn devnet_config() -> Result<GenericChainSpec, String> {

0 commit comments

Comments
 (0)