mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 03:31:10 +00:00
Squashed commit of slava-bridge-runtime:
commit ae4139bbb3cd4681ff4ad3f335b57e17f49ee895 Author: Hernando Castano <castano.ha@gmail.com> Date: Wed Jan 29 22:18:42 2020 -0500 Move slava-bridge-runtime into modules/ethereum/ commit feb522fff241b36bd74638ab5de04ee1068efd0b Merge: 53a08fe 00fe0de Author: Hernando Castano <castano.ha@gmail.com> Date: Wed Jan 29 22:17:26 2020 -0500 Merge branch 'bridge_runtime' of slava-bridge-runtime commit 00fe0dee5f50dd648e7c0f4af7fcb07f422a30af Author: Hernando Castano <castano.ha@gmail.com> Date: Wed Jan 29 22:14:03 2020 -0500 Move all files into one folder commit 46d9bdcc35b022bd802e3f99d3f7477110813e2d Author: Hernando Castano <castano.ha@gmail.com> Date: Wed Jan 29 22:02:37 2020 -0500 Move files I'm keeping into folder commit 6d10776610283439764de7897f25e921d08e99dc Author: Hernando Castano <castano.ha@gmail.com> Date: Sun Jan 12 20:42:03 2020 -0500 Make the bridge-eth-poa module compile again commit 95283a8672d692ed34501e4e7c380a3038099bf8 Author: Hernando Castano <castano.ha@gmail.com> Date: Sun Jan 12 20:39:23 2020 -0500 Add `sp-api` dependency back commit 31c476ac25391fb8f896b718998e9e80976a4cfd Author: Hernando Castano <castano.ha@gmail.com> Date: Sun Jan 12 20:28:26 2020 -0500 Bump dependencies Uses new frame-* and pallet-* versioned dependencies but a few other packages came along for the bump ride commit e22f41d97758712cd4094b98dc3a884098059bb8 Author: Svyatoslav Nikolsky <svyatonik@gmail.com> Date: Tue Dec 10 14:52:04 2019 +0300 reward + penalize for Eth headers commit 34d35e7731c79b9e9ff21252063f939400ecfdb4 Author: Svyatoslav Nikolsky <svyatonik@gmail.com> Date: Mon Dec 9 12:56:31 2019 +0300 added couple of TODOs commit 1a80caf9b643be4b823c9559a132285606641811 Author: Svyatoslav Nikolsky <svyatonik@gmail.com> Date: Mon Dec 9 12:11:35 2019 +0300 removed debug print commit c590908bfb7e9d2075d1fd77556418eda7f330d3 Author: Svyatoslav Nikolsky <svyatonik@gmail.com> Date: Mon Dec 9 11:55:09 2019 +0300 fixed bridge tests commit ab164f87019037bbc5cd2a69364ee4623e44ebbc Author: Svyatoslav Nikolsky <svyatonik@gmail.com> Date: Mon Dec 9 11:15:46 2019 +0300 lost deps commit 649e90068040a12a1aa78788dd834394201753fa Author: Svyatoslav Nikolsky <svyatonik@gmail.com> Date: Mon Dec 9 09:57:09 2019 +0300 fix compilation again commit cece62c2c2ddf772f01151ce3bf6dec28f4d0cca Author: Svyatoslav Nikolsky <svyatonik@gmail.com> Date: Mon Dec 9 09:52:30 2019 +0300 fix receipts root calculation commit 92f4026896efbe3e315a909161af06dc1e2a1ff4 Author: Svyatoslav Nikolsky <svyatonik@gmail.com> Date: Thu Dec 5 16:09:23 2019 +0300 check transactions receipts root commit 2e6a5af5e1bcb843262c5ba475f950cf989eb39b Author: Svyatoslav Nikolsky <svyatonik@gmail.com> Date: Thu Dec 5 15:39:30 2019 +0300 provide keccak_256_ordered_root to runtime commit 2970aae4648beb8c531ec7c2ff706b65ea06ba63 Author: Svyatoslav Nikolsky <svyatonik@gmail.com> Date: Thu Dec 5 15:15:03 2019 +0300 use existing keccak builtin from bridge runtime commit 75c498b0fe600be32b35a3e0d0da3b52ec5fd3b6 Author: Svyatoslav Nikolsky <svyatonik@gmail.com> Date: Thu Dec 5 10:32:57 2019 +0300 submit multiple headers at once commit cdfdafc21efb4a667f2407c7139921d4b948fd7e Author: Svyatoslav Nikolsky <svyatonik@gmail.com> Date: Wed Dec 4 13:48:42 2019 +0300 expose && initialize bridge configuration commit 383b93be54981b13c564218652a85af78c88c4f7 Author: Svyatoslav Nikolsky <svyatonik@gmail.com> Date: Wed Dec 4 11:28:22 2019 +0300 export bridge Call commit dacc2939db51859a3e1b87250b289b269a80793b Author: Svyatoslav Nikolsky <svyatonik@gmail.com> Date: Wed Dec 4 11:13:56 2019 +0300 expose BridgeEthPoaCall commit a5281c9387e622e28cbc89a62d268b359cb2f724 Author: Svyatoslav Nikolsky <svyatonik@gmail.com> Date: Wed Dec 4 10:42:41 2019 +0300 EthereumHeadersApi::is_known_block commit c5658e1563be9b688355d03b20a62345418e3b78 Author: Svyatoslav Nikolsky <svyatonik@gmail.com> Date: Wed Dec 4 10:14:42 2019 +0300 pub use parity_bytes::Bytes; commit 94cd24e5535101e871436ca35dcfda27f7955590 Author: Svyatoslav Nikolsky <svyatonik@gmail.com> Date: Wed Dec 4 10:01:25 2019 +0300 exposed EthereumHeadersApi commit 607ec1760d146e8046122a1d2f868d70e15490e6 Author: Svyatoslav Nikolsky <svyatonik@gmail.com> Date: Tue Dec 3 14:51:40 2019 +0300 EthPoA bridge: runtime
This commit is contained in:
committed by
Bastian Köcher
parent
479c5bd99a
commit
c06777a42a
@@ -0,0 +1,32 @@
|
||||
[package]
|
||||
name = "node-testing"
|
||||
version = "2.0.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
description = "Test utilities for Substrate node."
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
pallet-balances = { version = "2.0.0", path = "../../../frame/balances" }
|
||||
sc-client = { version = "2.0.0", path = "../../../client/" }
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0" }
|
||||
pallet-contracts = { version = "2.0.0", path = "../../../frame/contracts" }
|
||||
pallet-grandpa = { version = "2.0.0", path = "../../../frame/grandpa" }
|
||||
pallet-indices = { version = "2.0.0", path = "../../../frame/indices" }
|
||||
sp-keyring = { version = "2.0.0", path = "../../../primitives/keyring" }
|
||||
node-executor = { version = "2.0.0", path = "../executor" }
|
||||
node-primitives = { version = "2.0.0", path = "../primitives" }
|
||||
node-runtime = { version = "2.0.0", path = "../runtime" }
|
||||
sp-core = { version = "2.0.0", path = "../../../primitives/core" }
|
||||
sp-io = { version = "2.0.0", path = "../../../primitives/io" }
|
||||
frame-support = { version = "2.0.0", path = "../../../frame/support" }
|
||||
pallet-session = { version = "2.0.0", path = "../../../frame/session" }
|
||||
sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" }
|
||||
pallet-staking = { version = "2.0.0", path = "../../../frame/staking" }
|
||||
sc-executor = { version = "2.0.0", path = "../../../client/executor" }
|
||||
frame-system = { version = "2.0.0", path = "../../../frame/system" }
|
||||
substrate-test-client = { version = "2.0.0", path = "../../../test-utils/client" }
|
||||
pallet-timestamp = { version = "2.0.0", path = "../../../frame/timestamp" }
|
||||
pallet-transaction-payment = { version = "2.0.0", path = "../../../frame/transaction-payment" }
|
||||
pallet-treasury = { version = "2.0.0", path = "../../../frame/treasury" }
|
||||
wabt = "0.9.2"
|
||||
sp-bridge-eth-poa = { package = "sp-bridge-eth-poa", path = "../../../primitives/bridge-eth-poa" }
|
||||
@@ -0,0 +1,144 @@
|
||||
// Copyright 2019-2020 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Substrate is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Substrate is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Genesis Configuration.
|
||||
|
||||
use crate::keyring::*;
|
||||
use sp_keyring::{Ed25519Keyring, Sr25519Keyring};
|
||||
use node_runtime::{
|
||||
GenesisConfig, BalancesConfig, SessionConfig, StakingConfig, SystemConfig,
|
||||
GrandpaConfig, IndicesConfig, ContractsConfig, WASM_BINARY, BridgeEthPoaConfig,
|
||||
};
|
||||
use node_runtime::constants::currency::*;
|
||||
use sp_core::ChangesTrieConfiguration;
|
||||
use sp_runtime::Perbill;
|
||||
|
||||
|
||||
/// Create genesis runtime configuration for tests.
|
||||
pub fn config(support_changes_trie: bool, code: Option<&[u8]>) -> GenesisConfig {
|
||||
GenesisConfig {
|
||||
frame_system: Some(SystemConfig {
|
||||
changes_trie_config: if support_changes_trie { Some(ChangesTrieConfiguration {
|
||||
digest_interval: 2,
|
||||
digest_levels: 2,
|
||||
}) } else { None },
|
||||
code: code.map(|x| x.to_vec()).unwrap_or_else(|| WASM_BINARY.to_vec()),
|
||||
}),
|
||||
pallet_indices: Some(IndicesConfig {
|
||||
ids: vec![alice(), bob(), charlie(), dave(), eve(), ferdie()],
|
||||
}),
|
||||
pallet_balances: Some(BalancesConfig {
|
||||
balances: vec![
|
||||
(alice(), 111 * DOLLARS),
|
||||
(bob(), 100 * DOLLARS),
|
||||
(charlie(), 100_000_000 * DOLLARS),
|
||||
(dave(), 111 * DOLLARS),
|
||||
(eve(), 101 * DOLLARS),
|
||||
(ferdie(), 100 * DOLLARS),
|
||||
],
|
||||
vesting: vec![],
|
||||
}),
|
||||
pallet_session: Some(SessionConfig {
|
||||
keys: vec![
|
||||
(alice(), to_session_keys(
|
||||
&Ed25519Keyring::Alice,
|
||||
&Sr25519Keyring::Alice,
|
||||
)),
|
||||
(bob(), to_session_keys(
|
||||
&Ed25519Keyring::Bob,
|
||||
&Sr25519Keyring::Bob,
|
||||
)),
|
||||
(charlie(), to_session_keys(
|
||||
&Ed25519Keyring::Charlie,
|
||||
&Sr25519Keyring::Charlie,
|
||||
)),
|
||||
]
|
||||
}),
|
||||
pallet_staking: Some(StakingConfig {
|
||||
current_era: 0,
|
||||
stakers: vec![
|
||||
(dave(), alice(), 111 * DOLLARS, pallet_staking::StakerStatus::Validator),
|
||||
(eve(), bob(), 100 * DOLLARS, pallet_staking::StakerStatus::Validator),
|
||||
(ferdie(), charlie(), 100 * DOLLARS, pallet_staking::StakerStatus::Validator)
|
||||
],
|
||||
validator_count: 3,
|
||||
minimum_validator_count: 0,
|
||||
slash_reward_fraction: Perbill::from_percent(10),
|
||||
invulnerables: vec![alice(), bob(), charlie()],
|
||||
.. Default::default()
|
||||
}),
|
||||
pallet_contracts: Some(ContractsConfig {
|
||||
current_schedule: Default::default(),
|
||||
gas_price: 1 * MILLICENTS,
|
||||
}),
|
||||
pallet_babe: Some(Default::default()),
|
||||
pallet_grandpa: Some(GrandpaConfig {
|
||||
authorities: vec![],
|
||||
}),
|
||||
pallet_im_online: Some(Default::default()),
|
||||
pallet_authority_discovery: Some(Default::default()),
|
||||
pallet_democracy: Some(Default::default()),
|
||||
pallet_collective_Instance1: Some(Default::default()),
|
||||
pallet_collective_Instance2: Some(Default::default()),
|
||||
pallet_membership_Instance1: Some(Default::default()),
|
||||
pallet_sudo: Some(Default::default()),
|
||||
pallet_treasury: Some(Default::default()),
|
||||
// here comes configuration for Kovan chain
|
||||
// TODO: Update Name
|
||||
bridge_eth_poa: 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