Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Fix statemint ed25519 (#867)
Browse files Browse the repository at this point in the history
* Use `ed25519` as key

* Fix build

* Fmt

Co-authored-by: Bastian Köcher <info@kchr.de>
  • Loading branch information
chevdor and bkchr committed Dec 18, 2021
1 parent 4292ce5 commit 3331a02
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion polkadot-parachains/parachains-common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ mod types {
pub type DigestItem = sp_runtime::generic::DigestItem<Hash>;

// Aura consensus authority.
pub type AuraId = sp_consensus_aura::sr25519::AuthorityId;
pub type AuraId = sp_consensus_aura::ed25519::AuthorityId;

// Id used for identifying assets.
pub type AssetId = u32;
Expand Down
10 changes: 7 additions & 3 deletions polkadot-parachains/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@

use cumulus_primitives_core::ParaId;
use hex_literal::hex;
use rococo_parachain_runtime::{AccountId, AuraId, Signature};
use parachains_common::AuraId;
use rococo_parachain_runtime::{AccountId, Signature};
use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup};
use sc_service::ChainType;
use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -75,7 +76,10 @@ pub fn get_chain_spec(id: ParaId) -> ChainSpec {
move || {
testnet_genesis(
get_account_id_from_seed::<sr25519::Public>("Alice"),
vec![get_from_seed::<AuraId>("Alice"), get_from_seed::<AuraId>("Bob")],
vec![
get_from_seed::<rococo_parachain_runtime::AuraId>("Alice"),
get_from_seed::<rococo_parachain_runtime::AuraId>("Bob"),
],
vec![
get_account_id_from_seed::<sr25519::Public>("Alice"),
get_account_id_from_seed::<sr25519::Public>("Bob"),
Expand Down Expand Up @@ -147,7 +151,7 @@ pub fn staging_test_net(id: ParaId) -> ChainSpec {

fn testnet_genesis(
root_key: AccountId,
initial_authorities: Vec<AuraId>,
initial_authorities: Vec<rococo_parachain_runtime::AuraId>,
endowed_accounts: Vec<AccountId>,
id: ParaId,
) -> rococo_parachain_runtime::GenesisConfig {
Expand Down
7 changes: 4 additions & 3 deletions polkadot-parachains/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ pub use parachains_common::{AccountId, Balance, Block, Hash, Header, Index as No

use cumulus_client_consensus_relay_chain::Verifier as RelayChainVerifier;
use futures::lock::Mutex;
use parachains_common::AuraId;
use sc_client_api::ExecutorProvider;
use sc_consensus::{
import_queue::{BasicQueue, Verifier as VerifierT},
Expand All @@ -45,7 +46,7 @@ use sc_service::{Configuration, PartialComponents, Role, TFullBackend, TFullClie
use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle};
use sp_api::{ApiExt, ConstructRuntimeApi};
use sp_consensus::{CacheKeyId, SlotData};
use sp_consensus_aura::{sr25519::AuthorityId as AuraId, AuraApi};
use sp_consensus_aura::AuraApi;
use sp_keystore::SyncCryptoStorePtr;
use sp_runtime::{
generic::BlockId,
Expand Down Expand Up @@ -996,7 +997,7 @@ where
let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client2).unwrap();

Box::new(cumulus_client_consensus_aura::build_verifier::<
sp_consensus_aura::sr25519::AuthorityPair,
sp_consensus_aura::ed25519::AuthorityPair,
_,
_,
_,
Expand Down Expand Up @@ -1109,7 +1110,7 @@ where
let relay_chain_client2 = relay_chain_client.clone();

build_aura_consensus::<
sp_consensus_aura::sr25519::AuthorityPair,
sp_consensus_aura::ed25519::AuthorityPair,
_,
_,
_,
Expand Down

0 comments on commit 3331a02

Please sign in to comment.