@@ -15,7 +15,6 @@ use sp_domains::storage::RawGenesis;
1515use sp_domains:: { DomainRuntimeConfig , OperatorAllowList , OperatorPublicKey , RuntimeType } ;
1616use sp_runtime:: BuildStorage ;
1717use sp_runtime:: traits:: Convert ;
18- use std:: collections:: BTreeSet ;
1918use subspace_runtime_primitives:: { AI3 , Balance } ;
2019
2120/// Development keys that will be injected automatically on polkadotjs apps
@@ -46,21 +45,21 @@ pub fn development_config(
4645 . build ( ) )
4746}
4847
49- pub fn taurus_config (
48+ pub fn chronos_config (
5049 runtime_genesis_config : RuntimeGenesisConfig ,
5150) -> Result < GenericChainSpec , String > {
5251 Ok ( GenericChainSpec :: builder (
5352 WASM_BINARY . ok_or_else ( || "WASM binary was not build, please build it!" . to_string ( ) ) ?,
5453 None ,
5554 )
56- . with_name ( "Autonomys Taurus AutoId Domain" )
57- . with_id ( "autonomys_taurus_auto_id_domain " )
55+ . with_name ( "Autonomys Chronos AutoId Domain" )
56+ . with_id ( "autonomys_chronos_auto_id_domain " )
5857 . with_chain_type ( ChainType :: Live )
5958 . with_genesis_config (
6059 serde_json:: to_value ( runtime_genesis_config)
6160 . map_err ( |error| format ! ( "Failed to serialize genesis config: {error}" ) ) ?,
6261 )
63- . with_protocol_id ( "autonomys-taurus -auto-id-domain" )
62+ . with_protocol_id ( "autonomys-chronos -auto-id-domain" )
6463 . with_properties ( chain_spec_properties ( ) )
6564 . build ( ) )
6665}
@@ -105,7 +104,7 @@ pub fn devnet_config(
105104
106105pub fn load_chain_spec ( spec_id : & str ) -> Result < Box < dyn sc_cli:: ChainSpec > , String > {
107106 let chain_spec = match spec_id {
108- "taurus " => taurus_config ( get_testnet_genesis_by_spec_id ( SpecId :: Taurus ) ) ?,
107+ "chronos " => chronos_config ( get_testnet_genesis_by_spec_id ( SpecId :: Chronos ) ) ?,
109108 "devnet" => devnet_config ( get_testnet_genesis_by_spec_id ( SpecId :: DevNet ) ) ?,
110109 "dev" => development_config ( get_testnet_genesis_by_spec_id ( SpecId :: Dev ) ) ?,
111110 "mainnet" => mainnet_config ( get_testnet_genesis_by_spec_id ( SpecId :: Mainnet ) ) ?,
@@ -129,7 +128,7 @@ pub fn get_testnet_endowed_accounts_by_spec_id(spec_id: SpecId) -> Vec<(MultiAcc
129128 let alice_account = accounts[ 0 ] . clone ( ) ;
130129 vec ! [ ( AccountIdConverter :: convert( alice_account) , 1_000_000 * AI3 ) ]
131130 }
132- SpecId :: Taurus | SpecId :: Mainnet => vec ! [ ] ,
131+ SpecId :: Chronos | SpecId :: Mainnet => vec ! [ ] ,
133132 }
134133}
135134
@@ -141,55 +140,41 @@ fn empty_genesis() -> RuntimeGenesisConfig {
141140 }
142141}
143142
144- fn get_operator_params (
145- spec_id : SpecId ,
146- sudo_account : subspace_runtime_primitives:: AccountId ,
147- ) -> GenesisOperatorParams {
143+ fn get_operator_params ( spec_id : SpecId ) -> GenesisOperatorParams {
148144 match spec_id {
149145 SpecId :: Dev => GenesisOperatorParams {
150146 operator_allow_list : OperatorAllowList :: Anyone ,
151147 operator_signing_key : get_public_key_from_seed :: < OperatorPublicKey > ( "Alice" ) ,
152148 } ,
153- SpecId :: Taurus => GenesisOperatorParams {
154- operator_allow_list : OperatorAllowList :: Operators ( BTreeSet :: from_iter ( vec ! [
155- sudo_account. clone( ) ,
156- ] ) ) ,
157- operator_signing_key : OperatorPublicKey :: unchecked_from ( hex ! (
158- "3458e79cd1f106a4a7eaed78b46fe97dffcf0f619d1278a4dd4e4c9e862fc348"
159- ) ) ,
160- } ,
161149 SpecId :: DevNet => GenesisOperatorParams {
162150 operator_allow_list : OperatorAllowList :: Anyone ,
163151 operator_signing_key : OperatorPublicKey :: unchecked_from ( hex ! (
164152 "18df97b9335e11f239f8f3f8041819d42f27b60845cf209416fdba8de15f4b7c"
165153 ) ) ,
166154 } ,
167- // mainnet should never be called for genesis domain instantiation since
168- // actual consensus mainnet has no genesis domains.
169- SpecId :: Mainnet => {
170- panic ! ( "mainnet domains does not have any operator parameters" )
155+ // mainnet/chronos should never be called for genesis domain instantiation since
156+ // actual consensus mainnet/chronos testnet has no genesis domains.
157+ SpecId :: Mainnet | SpecId :: Chronos => {
158+ panic ! ( "mainnet/chronos domains does not have any operator parameters" )
171159 }
172160 }
173161}
174162
175163/// Returns AutoId genesis domain.
176164/// Note: Currently unused since dev or devnet uses EVM domain and not AutoId
177165#[ expect( dead_code) ]
178- pub fn get_genesis_domain (
179- spec_id : SpecId ,
180- sudo_account : subspace_runtime_primitives:: AccountId ,
181- ) -> Result < GenesisDomain , String > {
166+ pub fn get_genesis_domain ( spec_id : SpecId ) -> Result < GenesisDomain , String > {
182167 let chain_spec = match spec_id {
183168 SpecId :: Dev => development_config ( get_testnet_genesis_by_spec_id ( spec_id) ) ?,
184- SpecId :: Taurus => taurus_config ( get_testnet_genesis_by_spec_id ( spec_id) ) ?,
169+ SpecId :: Chronos => chronos_config ( get_testnet_genesis_by_spec_id ( spec_id) ) ?,
185170 SpecId :: DevNet => devnet_config ( get_testnet_genesis_by_spec_id ( spec_id) ) ?,
186171 SpecId :: Mainnet => return Err ( "No genesis domain available for mainnet spec." . to_string ( ) ) ,
187172 } ;
188173
189174 let GenesisOperatorParams {
190175 operator_allow_list,
191176 operator_signing_key,
192- } = get_operator_params ( spec_id, sudo_account ) ;
177+ } = get_operator_params ( spec_id) ;
193178
194179 let storage = chain_spec
195180 . build_storage ( )
0 commit comments