mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 22:37:57 +00:00
Get Ethereum Relay to Compile (#21)
* Update dependencies Upgrades Substrate based dependencies from v2.0.0 -> v2.0.0-alpha.1 and uses the `jsonrpsee`'s new feature flags. The actual code hasn't been updated though, so this won't compile. * Use `RawClient`s from `jsonrpsee` * Update to use jsonrpsee's new API * Hook up Ethereum Bridge Runtime, Relay, and Node Runtime * Bump `parity-crypto` from v0.4 to v0.6 Fixes error when trying to compile tests. This was caused by `parity-crypto` v0.4's use of `parity-secp256k1` over `secp256k1'. Using the Parity fork meant multiple version of the same underlying C library were being pulled in. `parity-crypto` v0.6 moved away from this, only relying on `secp256k1` thus fixing the issue.
This commit is contained in:
committed by
Bastian Köcher
parent
392582f3d5
commit
8232bdfe30
@@ -15,6 +15,7 @@ futures = "0.3.1"
|
||||
log = "0.4.8"
|
||||
structopt = "0.3.8"
|
||||
bridge-node-runtime = { version = "0.1.0", path = "../runtime" }
|
||||
sp-bridge-eth-poa = { version = "0.1.0", path = "../../../primitives/ethereum-poa" }
|
||||
|
||||
[dependencies.sc-cli]
|
||||
version = "0.8.0-alpha.2"
|
||||
|
||||
@@ -16,8 +16,9 @@
|
||||
|
||||
use sp_core::{Pair, Public, sr25519};
|
||||
use bridge_node_runtime::{
|
||||
AccountId, AuraConfig, BalancesConfig, GenesisConfig, GrandpaConfig,
|
||||
SudoConfig, SystemConfig, WASM_BINARY, Signature
|
||||
AccountId, AuraConfig, BalancesConfig, BridgeEthPoAConfig,
|
||||
GenesisConfig, GrandpaConfig, SudoConfig, SystemConfig,
|
||||
WASM_BINARY, Signature
|
||||
};
|
||||
use sp_consensus_aura::sr25519::{AuthorityId as AuraId};
|
||||
use grandpa_primitives::{AuthorityId as GrandpaId};
|
||||
@@ -112,6 +113,7 @@ fn testnet_genesis(initial_authorities: Vec<(AuraId, GrandpaId)>,
|
||||
pallet_aura: Some(AuraConfig {
|
||||
authorities: initial_authorities.iter().map(|x| (x.0.clone())).collect(),
|
||||
}),
|
||||
pallet_bridge_eth_poa: load_kovan_config(),
|
||||
pallet_grandpa: Some(GrandpaConfig {
|
||||
authorities: initial_authorities.iter().map(|x| (x.1.clone(), 1)).collect(),
|
||||
}),
|
||||
@@ -127,3 +129,48 @@ pub fn load_spec(id: &str) -> Result<Option<ChainSpec>, String> {
|
||||
None => None,
|
||||
})
|
||||
}
|
||||
|
||||
fn load_kovan_config() -> Option<BridgeEthPoAConfig> {
|
||||
Some(BridgeEthPoAConfig {
|
||||
initial_header: sp_bridge_eth_poa::Header {
|
||||
parent_hash: Default::default(),
|
||||
timestamp: 0,
|
||||
number: 0,
|
||||
author: Default::default(),
|
||||
transactions_root: "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421".parse().unwrap(),
|
||||
uncles_hash: "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347".parse().unwrap(),
|
||||
extra_data: vec![],
|
||||
state_root: "2480155b48a1cea17d67dbfdfaafe821c1d19cdd478c5358e8ec56dec24502b2".parse().unwrap(),
|
||||
receipts_root: "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421".parse().unwrap(),
|
||||
log_bloom: Default::default(),
|
||||
gas_used: Default::default(),
|
||||
gas_limit: 6000000.into(),
|
||||
difficulty: 131072.into(),
|
||||
seal: vec![
|
||||
vec![128].into(),
|
||||
vec![184, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0].into(),
|
||||
],
|
||||
},
|
||||
initial_difficulty: 0.into(),
|
||||
initial_validators: vec![
|
||||
[0x00, 0xD6, 0xCc, 0x1B, 0xA9, 0xcf, 0x89, 0xBD, 0x2e, 0x58,
|
||||
0x00, 0x97, 0x41, 0xf4, 0xF7, 0x32, 0x5B, 0xAd, 0xc0, 0xED].into(),
|
||||
[0x00, 0x42, 0x7f, 0xea, 0xe2, 0x41, 0x9c, 0x15, 0xb8, 0x9d,
|
||||
0x1c, 0x21, 0xaf, 0x10, 0xd1, 0xb6, 0x65, 0x0a, 0x4d, 0x3d].into(),
|
||||
[0x4E, 0xd9, 0xB0, 0x8e, 0x63, 0x54, 0xC7, 0x0f, 0xE6, 0xF8,
|
||||
0xCB, 0x04, 0x11, 0xb0, 0xd3, 0x24, 0x6b, 0x42, 0x4d, 0x6c].into(),
|
||||
[0x00, 0x20, 0xee, 0x4B, 0xe0, 0xe2, 0x02, 0x7d, 0x76, 0x60,
|
||||
0x3c, 0xB7, 0x51, 0xeE, 0x06, 0x95, 0x19, 0xbA, 0x81, 0xA1].into(),
|
||||
[0x00, 0x10, 0xf9, 0x4b, 0x29, 0x6a, 0x85, 0x2a, 0xaa, 0xc5,
|
||||
0x2e, 0xa6, 0xc5, 0xac, 0x72, 0xe0, 0x3a, 0xfd, 0x03, 0x2d].into(),
|
||||
[0x00, 0x77, 0x33, 0xa1, 0xFE, 0x69, 0xCF, 0x3f, 0x2C, 0xF9,
|
||||
0x89, 0xF8, 0x1C, 0x7b, 0x4c, 0xAc, 0x16, 0x93, 0x38, 0x7A].into(),
|
||||
[0x00, 0xE6, 0xd2, 0xb9, 0x31, 0xF5, 0x5a, 0x3f, 0x17, 0x01,
|
||||
0xc7, 0x38, 0x9d, 0x59, 0x2a, 0x77, 0x78, 0x89, 0x78, 0x79].into(),
|
||||
[0x00, 0xe4, 0xa1, 0x06, 0x50, 0xe5, 0xa6, 0xD6, 0x00, 0x1C,
|
||||
0x38, 0xff, 0x8E, 0x64, 0xF9, 0x70, 0x16, 0xa1, 0x64, 0x5c].into(),
|
||||
[0x00, 0xa0, 0xa2, 0x4b, 0x9f, 0x0e, 0x5e, 0xc7, 0xaa, 0x4c,
|
||||
0x73, 0x89, 0xb8, 0x30, 0x2f, 0xd0, 0x12, 0x31, 0x94, 0xde].into(),
|
||||
],
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user