From 7da69fcff98739b19943cb116aabc70c31eb9111 Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Wed, 9 Dec 2020 13:53:49 +0800 Subject: [PATCH 01/23] add: ecdsa authorities --- runtime/crab/Cargo.toml | 6 ++-- runtime/crab/src/constants.rs | 2 +- runtime/crab/src/lib.rs | 46 +++++++++++++++++++++++++++++-- runtime/darwinia/Cargo.toml | 8 ++++-- runtime/darwinia/src/constants.rs | 2 +- runtime/darwinia/src/lib.rs | 44 +++++++++++++++++++++++++++-- 6 files changed, 97 insertions(+), 11 deletions(-) diff --git a/runtime/crab/Cargo.toml b/runtime/crab/Cargo.toml index 078a6c62a..63062bf45 100644 --- a/runtime/crab/Cargo.toml +++ b/runtime/crab/Cargo.toml @@ -12,8 +12,8 @@ version = "0.8.2" [dependencies] # crates codec = { package = "parity-scale-codec", version = "1.3.5", default-features = false, features = ["derive"] } -serde = { version = "1.0.117", optional = true } -smallvec = { version = "1.4.2" } +serde = { version = "1.0.118", optional = true } +smallvec = { version = "1.5.1" } static_assertions = { version = "1.1.0" } # darwinia frame darwinia-balances = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } @@ -26,6 +26,7 @@ darwinia-ethereum-backing = { default-features = false, git = "https:/ darwinia-ethereum-relay = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } darwinia-header-mmr = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } darwinia-header-mmr-rpc-runtime-api = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } +darwinia-relay-authorities = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } darwinia-relay-primitives = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } darwinia-relayer-game = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } darwinia-staking = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } @@ -100,6 +101,7 @@ std = [ "darwinia-ethereum-relay/std", "darwinia-header-mmr/std", "darwinia-header-mmr-rpc-runtime-api/std", + "darwinia-relay-authorities/std", "darwinia-relay-primitives/std", "darwinia-relayer-game/std", "darwinia-staking/std", diff --git a/runtime/crab/src/constants.rs b/runtime/crab/src/constants.rs index d3dbc156c..977a27d3b 100644 --- a/runtime/crab/src/constants.rs +++ b/runtime/crab/src/constants.rs @@ -98,7 +98,7 @@ pub mod relay { // --- darwinia --- use super::currency::*; use crate::*; - use darwinia_relay_primitives::*; + use darwinia_relay_primitives::relayer_game::*; use ethereum_primitives::EthereumBlockNumber; pub struct EthereumRelayerGameAdjustor; diff --git a/runtime/crab/src/lib.rs b/runtime/crab/src/lib.rs index 92cd8fbd6..6edbc95a7 100644 --- a/runtime/crab/src/lib.rs +++ b/runtime/crab/src/lib.rs @@ -869,16 +869,46 @@ impl pallet_sudo::Trait for Runtime { } parameter_types! { - pub const EthBackingModuleId: ModuleId = ModuleId(*b"da/ethbk"); + pub const EthereumBackingModuleId: ModuleId = ModuleId(*b"da/ethbk"); + pub const EthereumBackingFeeModuleId: ModuleId = ModuleId(*b"da/ethfe"); + // https://github.com/darwinia-network/darwinia-common/pull/377#issuecomment-730369387 + pub const AdvancedFee: Balance = 50 * COIN; } impl darwinia_ethereum_backing::Trait for Runtime { - type ModuleId = EthBackingModuleId; + type ModuleId = EthereumBackingModuleId; + type FeeModuleId = EthereumBackingFeeModuleId; type Event = Event; type RedeemAccountId = AccountId; type EthereumRelay = EthereumRelay; type OnDepositRedeem = Staking; type RingCurrency = Ring; type KtonCurrency = Kton; + type AdvancedFee = AdvancedFee; + type EcdsaAuthorities = EthereumRelayAuthorities; + type WeightInfo = (); +} + +type EthereumRelayAuthoritiesInstance = darwinia_relay_authorities::Instance0; +parameter_types! { + pub const EthereumRelayAuthoritiesLockId: LockIdentifier = *b"ethrauth"; + pub const EthereumRelayAuthoritiesTermDuration: BlockNumber = 30 * DAYS; + pub const MaxCandidates: usize = 7; + pub const SignThreshold: Perbill = Perbill::from_percent(60); + pub const SubmitDuration: BlockNumber = 100; +} +impl darwinia_relay_authorities::Trait for Runtime { + type Event = Event; + type RingCurrency = Ring; + type LockId = EthereumRelayAuthoritiesLockId; + type TermDuration = EthereumRelayAuthoritiesTermDuration; + type MaxCandidates = MaxCandidates; + type AddOrigin = ApproveOrigin; + type RemoveOrigin = ApproveOrigin; + type ResetOrigin = ApproveOrigin; + type DarwiniaMMR = HeaderMMR; + type Sign = EthereumBacking; + type SignThreshold = SignThreshold; + type SubmitDuration = SubmitDuration; type WeightInfo = (); } @@ -916,8 +946,15 @@ impl darwinia_ethereum_relay::Trait for Runtime { } type EthereumRelayerGameInstance = darwinia_relayer_game::Instance0; +parameter_types! { + // TODO: migration + // pub const EthereumRelayerGameLockId: LockIdentifier = *b"ethrgame"; + // Workaround + pub const EthereumRelayerGameLockId: LockIdentifier = *b"da/rgame"; +} impl darwinia_relayer_game::Trait for Runtime { type RingCurrency = Ring; + type LockId = EthereumRelayerGameLockId; type RingSlash = Treasury; type RelayerGameAdjustor = EthereumRelayerGameAdjustor; type RelayableChain = EthereumRelay; @@ -1015,9 +1052,14 @@ construct_runtime!( // Multisig module. Late addition. Multisig: pallet_multisig::{Module, Call, Storage, Event}, + // Crab bridge. CrabIssuing: darwinia_crab_issuing::{Module, Call, Storage, Config, Event}, + // Governance stuff; uncallable initially. Democracy: darwinia_democracy::{Module, Call, Storage, Config, Event}, + + // Ethereum bridge. + EthereumRelayAuthorities: darwinia_relay_authorities::::{Module, Call, Storage, Event}, } ); diff --git a/runtime/darwinia/Cargo.toml b/runtime/darwinia/Cargo.toml index 3011b4658..33db24acf 100644 --- a/runtime/darwinia/Cargo.toml +++ b/runtime/darwinia/Cargo.toml @@ -12,9 +12,9 @@ version = "0.8.2" [dependencies] # crates codec = { package = "parity-scale-codec", version = "1.3.5", default-features = false, features = ["derive"] } -serde = { version = "1.0.117", optional = true } -serde_json = { version = "1.0.59", optional = true } -smallvec = { version = "1.4.2" } +serde = { version = "1.0.118", optional = true } +serde_json = { version = "1.0.60", optional = true } +smallvec = { version = "1.5.1" } static_assertions = { version = "1.1.0" } # darwinia frame darwinia-balances = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } @@ -25,6 +25,7 @@ darwinia-ethereum-backing = { default-features = false, git = "https:/ darwinia-ethereum-relay = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } darwinia-header-mmr = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } darwinia-header-mmr-rpc-runtime-api = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } +darwinia-relay-authorities = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } darwinia-relay-primitives = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } darwinia-relayer-game = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } darwinia-staking = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } @@ -98,6 +99,7 @@ std = [ "darwinia-ethereum-relay/std", "darwinia-header-mmr/std", "darwinia-header-mmr-rpc-runtime-api/std", + "darwinia-relay-authorities/std", "darwinia-relay-primitives/std", "darwinia-relayer-game/std", "darwinia-staking/std", diff --git a/runtime/darwinia/src/constants.rs b/runtime/darwinia/src/constants.rs index e81705dfb..4d63fe983 100644 --- a/runtime/darwinia/src/constants.rs +++ b/runtime/darwinia/src/constants.rs @@ -98,7 +98,7 @@ pub mod relay { // --- darwinia --- use super::currency::*; use crate::*; - use darwinia_relay_primitives::*; + use darwinia_relay_primitives::relayer_game::*; use ethereum_primitives::EthereumBlockNumber; pub struct EthereumRelayerGameAdjustor; diff --git a/runtime/darwinia/src/lib.rs b/runtime/darwinia/src/lib.rs index 5afb049cd..6a22cb393 100644 --- a/runtime/darwinia/src/lib.rs +++ b/runtime/darwinia/src/lib.rs @@ -837,16 +837,46 @@ impl pallet_sudo::Trait for Runtime { } parameter_types! { - pub const EthBackingModuleId: ModuleId = ModuleId(*b"da/ethbk"); + pub const EthereumBackingModuleId: ModuleId = ModuleId(*b"da/ethbk"); + pub const EthereumBackingFeeModuleId: ModuleId = ModuleId(*b"da/ethfe"); + // https://github.com/darwinia-network/darwinia-common/pull/377#issuecomment-730369387 + pub const AdvancedFee: Balance = 50 * COIN; } impl darwinia_ethereum_backing::Trait for Runtime { - type ModuleId = EthBackingModuleId; + type ModuleId = EthereumBackingModuleId; + type FeeModuleId = EthereumBackingFeeModuleId; type Event = Event; type RedeemAccountId = AccountId; type EthereumRelay = EthereumRelay; type OnDepositRedeem = Staking; type RingCurrency = Ring; type KtonCurrency = Kton; + type AdvancedFee = AdvancedFee; + type EcdsaAuthorities = EthereumRelayAuthorities; + type WeightInfo = (); +} + +type EthereumRelayAuthoritiesInstance = darwinia_relay_authorities::Instance0; +parameter_types! { + pub const EthereumRelayAuthoritiesLockId: LockIdentifier = *b"ethrauth"; + pub const EthereumRelayAuthoritiesTermDuration: BlockNumber = 30 * DAYS; + pub const MaxCandidates: usize = 7; + pub const SignThreshold: Perbill = Perbill::from_percent(60); + pub const SubmitDuration: BlockNumber = 100; +} +impl darwinia_relay_authorities::Trait for Runtime { + type Event = Event; + type RingCurrency = Ring; + type LockId = EthereumRelayAuthoritiesLockId; + type TermDuration = EthereumRelayAuthoritiesTermDuration; + type MaxCandidates = MaxCandidates; + type AddOrigin = ApproveOrigin; + type RemoveOrigin = ApproveOrigin; + type ResetOrigin = ApproveOrigin; + type DarwiniaMMR = HeaderMMR; + type Sign = EthereumBacking; + type SignThreshold = SignThreshold; + type SubmitDuration = SubmitDuration; type WeightInfo = (); } @@ -884,8 +914,15 @@ impl darwinia_ethereum_relay::Trait for Runtime { } type EthereumRelayerGameInstance = darwinia_relayer_game::Instance0; +parameter_types! { + // TODO: migration + // pub const EthereumRelayerGameLockId: LockIdentifier = *b"ethrgame"; + // Workaround + pub const EthereumRelayerGameLockId: LockIdentifier = *b"da/rgame"; +} impl darwinia_relayer_game::Trait for Runtime { type RingCurrency = Ring; + type LockId = EthereumRelayerGameLockId; type RingSlash = Treasury; type RelayerGameAdjustor = EthereumRelayerGameAdjustor; type RelayableChain = EthereumRelay; @@ -989,6 +1026,9 @@ construct_runtime!( // Consensus support. HeaderMMR: darwinia_header_mmr::{Module, Call, Storage}, + + // Ethereum bridge. + EthereumRelayAuthorities: darwinia_relay_authorities::::{Module, Call, Storage, Event}, } ); From ea00c26d0ede079c228fb65aa5463a65ada0e012 Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Wed, 9 Dec 2020 13:54:00 +0800 Subject: [PATCH 02/23] bump: denpendencies --- Cargo.lock | 570 +++++++++++++++++++++++----------------- cli/Cargo.toml | 8 +- node/service/Cargo.toml | 4 +- 3 files changed, 328 insertions(+), 254 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1f134100e..a82dce1ea 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -140,9 +140,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.34" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf8dcb5b4bbaa28653b647d8c77bd4ed40183b48882e130c1f1ffb73de069fd7" +checksum = "2c0df63cb2955042487fad3aefd2c6e3ae7389ac5dc1beb28921de0b69f779d4" [[package]] name = "approx" @@ -162,7 +162,7 @@ checksum = "4d25d88fd6b8041580a654f9d0c581a047baee2b3efee13275f2fc392fc75034" [[package]] name = "array-bytes" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#e2f829acf9b9fe5a09bf60b7683f9dd99e271885" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" dependencies = [ "sp-std 2.0.0", ] @@ -209,9 +209,9 @@ dependencies = [ [[package]] name = "assert_cmd" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c88b9ca26f9c16ec830350d309397e74ee9abdfd8eb1f71cb6ecc71a3fc818da" +checksum = "3dc1679af9a1ab4bea16f228b05d18f8363f8327b1fa8db00d2760cfafc6b61e" dependencies = [ "doc-comment", "predicates", @@ -233,15 +233,15 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d373d78ded7d0b3fa8039375718cde0aace493f2e34fb60f51cbf567562ca801" +checksum = "eb877970c7b440ead138f6321a3b5395d6061183af779340b65e20c0fede9146" dependencies = [ "async-task", "concurrent-queue", "fastrand", "futures-lite", - "once_cell 1.4.1", + "once_cell 1.5.2", "vec-arena", ] @@ -255,14 +255,14 @@ dependencies = [ "async-io", "futures-lite", "num_cpus", - "once_cell 1.4.1", + "once_cell 1.5.2", ] [[package]] name = "async-io" -version = "1.2.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40a0b2bb8ae20fede194e779150fe283f65a4a08461b496de546ec366b174ad9" +checksum = "9315f8f07556761c3e48fec2e6b276004acf426e6dc068b2c2251854d65ee0fd" dependencies = [ "concurrent-queue", "fastrand", @@ -270,7 +270,7 @@ dependencies = [ "libc", "log", "nb-connect", - "once_cell 1.4.1", + "once_cell 1.5.2", "parking", "polling", "vec-arena", @@ -287,17 +287,35 @@ dependencies = [ "event-listener", ] +[[package]] +name = "async-process" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c8cea09c1fb10a317d1b5af8024eeba256d6554763e85ecd90ff8df31c7bbda" +dependencies = [ + "async-io", + "blocking", + "cfg-if 0.1.10", + "event-listener", + "futures-lite", + "once_cell 1.5.2", + "signal-hook", + "winapi 0.3.9", +] + [[package]] name = "async-std" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7e82538bc65a25dbdff70e4c5439d52f068048ab97cdea0acd73f131594caa1" +checksum = "8f9f84f1280a2b436a2c77c2582602732b6c2f4321d5494d6e799e6c367859a8" dependencies = [ + "async-channel", "async-global-executor", "async-io", "async-mutex", + "async-process", "blocking", - "crossbeam-utils 0.8.0", + "crossbeam-utils 0.8.1", "futures-channel", "futures-core", "futures-io", @@ -307,8 +325,8 @@ dependencies = [ "log", "memchr", "num_cpus", - "once_cell 1.4.1", - "pin-project-lite", + "once_cell 1.5.2", + "pin-project-lite 0.2.0", "pin-utils", "slab", "wasm-bindgen-futures", @@ -334,9 +352,9 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.41" +version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b246867b8b3b6ae56035f1eb1ed557c1d8eae97f0d53696138a50fa0e3a3b8c0" +checksum = "8d3a45e77e34375a7923b1e8febb049bb011f064714a8e17a1a616fef01da13d" dependencies = [ "proc-macro2", "quote", @@ -380,9 +398,9 @@ checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" [[package]] name = "backtrace" -version = "0.3.54" +version = "0.3.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2baad346b2d4e94a24347adeee9c7a93f412ee94b9cc26e5b59dea23848e9f28" +checksum = "ef5140344c85b01f9bbb4d4b7288a8aa4b3287ccef913a14bcc78a1063623598" dependencies = [ "addr2line", "cfg-if 1.0.0", @@ -410,6 +428,12 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" +[[package]] +name = "base64" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" + [[package]] name = "bincode" version = "1.3.1" @@ -581,7 +605,7 @@ dependencies = [ "atomic-waker", "fastrand", "futures-lite", - "once_cell 1.4.1", + "once_cell 1.5.2", ] [[package]] @@ -666,9 +690,9 @@ checksum = "631ae5198c9be5e753e5cc215e1bd73c2b466a3565173db433f52bb9d3e66dba" [[package]] name = "cc" -version = "1.0.62" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1770ced377336a88a67c473594ccc14eca6f4559217c34f64aac8f83d641b40" +checksum = "4c0496836a84f8d0495758516b8621a622beb77c0fed418570e50764093ced48" dependencies = [ "jobserver", ] @@ -775,15 +799,6 @@ dependencies = [ "bitflags", ] -[[package]] -name = "cloudabi" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4344512281c643ae7638bbabc3af17a11307803ec8f0fcad9fae512a8bf36467" -dependencies = [ - "bitflags", -] - [[package]] name = "concurrent-queue" version = "1.2.2" @@ -815,9 +830,9 @@ dependencies = [ [[package]] name = "const-random" -version = "0.1.11" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02dc82c12dc2ee6e1ded861cf7d582b46f66f796d1b6c93fa28b911ead95da02" +checksum = "f590d95d011aa80b063ffe3253422ed5aa462af4e9867d43ce8337562bac77c4" dependencies = [ "const-random-macro", "proc-macro-hack", @@ -825,12 +840,14 @@ dependencies = [ [[package]] name = "const-random-macro" -version = "0.1.11" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc757bbb9544aa296c2ae00c679e81f886b37e28e59097defe0cf524306f6685" +checksum = "615f6e27d000a2bffbc7f2f6a8669179378fa27ee4d0a509e985dfc0a7defb40" dependencies = [ "getrandom 0.2.0", + "lazy_static", "proc-macro-hack", + "tiny-keccak 2.0.2", ] [[package]] @@ -867,6 +884,12 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634" +[[package]] +name = "cpuid-bool" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcb25d077389e53838a8158c8e99174c5a9d902dee4904320db714f3c653ffba" + [[package]] name = "crab-runtime" version = "0.8.2" @@ -882,6 +905,7 @@ dependencies = [ "darwinia-header-mmr", "darwinia-header-mmr-rpc-runtime-api", "darwinia-primitives", + "darwinia-relay-authorities", "darwinia-relay-primitives", "darwinia-relayer-game", "darwinia-runtime-common", @@ -919,7 +943,7 @@ dependencies = [ "pallet-utility", "parity-scale-codec", "serde", - "smallvec 1.4.2", + "smallvec 1.5.1", "sp-api", "sp-authority-discovery", "sp-block-builder", @@ -961,7 +985,7 @@ dependencies = [ "log", "regalloc", "serde", - "smallvec 1.4.2", + "smallvec 1.5.1", "target-lexicon", "thiserror", ] @@ -999,7 +1023,7 @@ checksum = "2ef419efb4f94ecc02e5d9fbcc910d2bb7f0040e2de570e63a454f883bc891d6" dependencies = [ "cranelift-codegen", "log", - "smallvec 1.4.2", + "smallvec 1.5.1", "target-lexicon", ] @@ -1045,7 +1069,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775" dependencies = [ "cfg-if 1.0.0", - "crossbeam-utils 0.8.0", + "crossbeam-utils 0.8.1", ] [[package]] @@ -1066,8 +1090,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9" dependencies = [ "cfg-if 1.0.0", - "crossbeam-epoch 0.9.0", - "crossbeam-utils 0.8.0", + "crossbeam-epoch 0.9.1", + "crossbeam-utils 0.8.1", ] [[package]] @@ -1081,21 +1105,21 @@ dependencies = [ "crossbeam-utils 0.7.2", "lazy_static", "maybe-uninit", - "memoffset", + "memoffset 0.5.6", "scopeguard 1.1.0", ] [[package]] name = "crossbeam-epoch" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0f606a85340376eef0d6d8fec399e6d4a544d648386c6645eb6d0653b27d9f" +checksum = "a1aaa739f95311c2c7887a76863f500026092fb1dce0161dab577e559ef3569d" dependencies = [ "cfg-if 1.0.0", "const_fn", - "crossbeam-utils 0.8.0", + "crossbeam-utils 0.8.1", "lazy_static", - "memoffset", + "memoffset 0.6.1", "scopeguard 1.1.0", ] @@ -1123,13 +1147,12 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec91540d98355f690a86367e566ecad2e9e579f230230eb7c21398372be73ea5" +checksum = "02d96d1e189ef58269ebe5b97953da3274d83a93af647c2ddd6f9dab28cedb8d" dependencies = [ "autocfg 1.0.1", "cfg-if 1.0.0", - "const_fn", "lazy_static", ] @@ -1212,7 +1235,7 @@ dependencies = [ "darwinia-cli 0.8.2", "darwinia-service", "futures 0.3.8", - "nix 0.19.0", + "nix 0.19.1", "parity-util-mem", "tempfile", ] @@ -1220,7 +1243,7 @@ dependencies = [ [[package]] name = "darwinia-balances" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#e2f829acf9b9fe5a09bf60b7683f9dd99e271885" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" dependencies = [ "darwinia-balances-rpc-runtime-api", "darwinia-support", @@ -1235,7 +1258,7 @@ dependencies = [ [[package]] name = "darwinia-balances-rpc" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#e2f829acf9b9fe5a09bf60b7683f9dd99e271885" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" dependencies = [ "darwinia-balances-rpc-runtime-api", "jsonrpc-core", @@ -1250,7 +1273,7 @@ dependencies = [ [[package]] name = "darwinia-balances-rpc-runtime-api" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#e2f829acf9b9fe5a09bf60b7683f9dd99e271885" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" dependencies = [ "darwinia-support", "parity-scale-codec", @@ -1262,7 +1285,7 @@ dependencies = [ [[package]] name = "darwinia-claims" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#e2f829acf9b9fe5a09bf60b7683f9dd99e271885" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" dependencies = [ "array-bytes", "darwinia-support", @@ -1295,7 +1318,7 @@ dependencies = [ "structopt", "substrate-browser-utils", "substrate-build-script-utils", - "tokio 0.3.3", + "tokio 0.3.5", "toml", "wasm-bindgen", "wasm-bindgen-futures", @@ -1304,7 +1327,7 @@ dependencies = [ [[package]] name = "darwinia-cli" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#e2f829acf9b9fe5a09bf60b7683f9dd99e271885" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" dependencies = [ "sc-cli", "sc-client-api", @@ -1317,7 +1340,7 @@ dependencies = [ [[package]] name = "darwinia-crab-backing" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#e2f829acf9b9fe5a09bf60b7683f9dd99e271885" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" dependencies = [ "frame-support", "frame-system", @@ -1329,7 +1352,7 @@ dependencies = [ [[package]] name = "darwinia-crab-issuing" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#e2f829acf9b9fe5a09bf60b7683f9dd99e271885" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" dependencies = [ "frame-support", "frame-system", @@ -1341,7 +1364,7 @@ dependencies = [ [[package]] name = "darwinia-democracy" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#e2f829acf9b9fe5a09bf60b7683f9dd99e271885" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" dependencies = [ "darwinia-support", "frame-support", @@ -1356,7 +1379,7 @@ dependencies = [ [[package]] name = "darwinia-elections-phragmen" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#e2f829acf9b9fe5a09bf60b7683f9dd99e271885" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" dependencies = [ "darwinia-support", "frame-support", @@ -1371,9 +1394,10 @@ dependencies = [ [[package]] name = "darwinia-ethereum-backing" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#e2f829acf9b9fe5a09bf60b7683f9dd99e271885" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" dependencies = [ "array-bytes", + "darwinia-relay-primitives", "darwinia-support", "ethabi", "ethereum-primitives", @@ -1382,7 +1406,7 @@ dependencies = [ "parity-scale-codec", "serde", "serde_json", - "sp-core", + "sp-io", "sp-runtime", "sp-std 2.0.0", ] @@ -1390,7 +1414,7 @@ dependencies = [ [[package]] name = "darwinia-ethereum-relay" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#e2f829acf9b9fe5a09bf60b7683f9dd99e271885" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" dependencies = [ "array-bytes", "blake2-rfc", @@ -1414,10 +1438,11 @@ dependencies = [ [[package]] name = "darwinia-header-mmr" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#e2f829acf9b9fe5a09bf60b7683f9dd99e271885" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" dependencies = [ "ckb-merkle-mountain-range", "darwinia-header-mmr-rpc-runtime-api", + "darwinia-relay-primitives", "darwinia-support", "frame-support", "frame-system", @@ -1430,7 +1455,7 @@ dependencies = [ [[package]] name = "darwinia-header-mmr-rpc" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#e2f829acf9b9fe5a09bf60b7683f9dd99e271885" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" dependencies = [ "darwinia-header-mmr-rpc-runtime-api", "jsonrpc-core", @@ -1445,7 +1470,7 @@ dependencies = [ [[package]] name = "darwinia-header-mmr-rpc-runtime-api" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#e2f829acf9b9fe5a09bf60b7683f9dd99e271885" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" dependencies = [ "darwinia-support", "parity-scale-codec", @@ -1466,10 +1491,25 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "darwinia-relay-authorities" +version = "1.2.2" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" +dependencies = [ + "darwinia-relay-primitives", + "darwinia-support", + "frame-support", + "frame-system", + "parity-scale-codec", + "serde", + "sp-runtime", + "sp-std 2.0.0", +] + [[package]] name = "darwinia-relay-primitives" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#e2f829acf9b9fe5a09bf60b7683f9dd99e271885" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" dependencies = [ "frame-support", "parity-scale-codec", @@ -1480,7 +1520,7 @@ dependencies = [ [[package]] name = "darwinia-relayer-game" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#e2f829acf9b9fe5a09bf60b7683f9dd99e271885" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" dependencies = [ "darwinia-relay-primitives", "darwinia-support", @@ -1534,6 +1574,7 @@ dependencies = [ "darwinia-header-mmr", "darwinia-header-mmr-rpc-runtime-api", "darwinia-primitives", + "darwinia-relay-authorities", "darwinia-relay-primitives", "darwinia-relayer-game", "darwinia-runtime-common", @@ -1573,7 +1614,7 @@ dependencies = [ "parity-scale-codec", "serde", "serde_json", - "smallvec 1.4.2", + "smallvec 1.5.1", "sp-api", "sp-authority-discovery", "sp-block-builder", @@ -1662,7 +1703,7 @@ dependencies = [ [[package]] name = "darwinia-staking" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#e2f829acf9b9fe5a09bf60b7683f9dd99e271885" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" dependencies = [ "darwinia-staking-rpc-runtime-api", "darwinia-support", @@ -1686,7 +1727,7 @@ dependencies = [ [[package]] name = "darwinia-staking-rpc" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#e2f829acf9b9fe5a09bf60b7683f9dd99e271885" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" dependencies = [ "darwinia-staking-rpc-runtime-api", "jsonrpc-core", @@ -1701,7 +1742,7 @@ dependencies = [ [[package]] name = "darwinia-staking-rpc-runtime-api" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#e2f829acf9b9fe5a09bf60b7683f9dd99e271885" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" dependencies = [ "darwinia-support", "parity-scale-codec", @@ -1713,7 +1754,7 @@ dependencies = [ [[package]] name = "darwinia-support" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#e2f829acf9b9fe5a09bf60b7683f9dd99e271885" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" dependencies = [ "ethereum-primitives", "frame-support", @@ -1727,7 +1768,7 @@ dependencies = [ [[package]] name = "darwinia-treasury" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#e2f829acf9b9fe5a09bf60b7683f9dd99e271885" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" dependencies = [ "darwinia-support", "frame-support", @@ -1741,7 +1782,7 @@ dependencies = [ [[package]] name = "darwinia-tron-backing" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#e2f829acf9b9fe5a09bf60b7683f9dd99e271885" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" dependencies = [ "frame-support", "frame-system", @@ -1753,7 +1794,7 @@ dependencies = [ [[package]] name = "darwinia-vesting" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#e2f829acf9b9fe5a09bf60b7683f9dd99e271885" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" dependencies = [ "darwinia-support", "enumflags2", @@ -2010,7 +2051,7 @@ dependencies = [ [[package]] name = "ethereum-primitives" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#e2f829acf9b9fe5a09bf60b7683f9dd99e271885" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" dependencies = [ "array-bytes", "ethash", @@ -2258,11 +2299,11 @@ dependencies = [ "frame-support-procedural", "impl-trait-for-tuples 0.1.3", "log", - "once_cell 1.4.1", + "once_cell 1.5.2", "parity-scale-codec", "paste", "serde", - "smallvec 1.4.2", + "smallvec 1.5.1", "sp-arithmetic", "sp-core", "sp-inherents", @@ -2333,9 +2374,9 @@ dependencies = [ [[package]] name = "fs-swap" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "921d332c89b3b61a826de38c61ee5b6e02c56806cade1b0e5d81bd71f57a71bb" +checksum = "5839fda247e24ca4919c87c71dd5ca658f1f39e4f06829f80e3f15c3bafcfc2c" dependencies = [ "lazy_static", "libc", @@ -2478,7 +2519,7 @@ dependencies = [ "futures-io", "memchr", "parking", - "pin-project-lite", + "pin-project-lite 0.1.11", "waker-fn", ] @@ -2506,7 +2547,7 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c554eb5bf48b2426c4771ab68c6b14468b6e76cc90996f528c3338d761a4d0d" dependencies = [ - "once_cell 1.4.1", + "once_cell 1.5.2", ] [[package]] @@ -2539,7 +2580,7 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project 1.0.1", + "pin-project 1.0.2", "pin-utils", "proc-macro-hack", "proc-macro-nested", @@ -2743,7 +2784,7 @@ dependencies = [ "http 0.2.1", "indexmap", "slab", - "tokio 0.2.22", + "tokio 0.2.23", "tokio-util", "tracing", "tracing-futures", @@ -2971,9 +3012,9 @@ dependencies = [ "httparse", "httpdate", "itoa", - "pin-project 1.0.1", + "pin-project 1.0.2", "socket2", - "tokio 0.2.22", + "tokio 0.2.23", "tower-service", "tracing", "want 0.3.0", @@ -2992,7 +3033,7 @@ dependencies = [ "log", "rustls", "rustls-native-certs", - "tokio 0.2.22", + "tokio 0.2.23", "tokio-rustls", "webpki", ] @@ -3096,9 +3137,9 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb1fc4429a33e1f80d41dc9fea4d108a88bec1de8053878898ae448a0b52f613" +checksum = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec" dependencies = [ "cfg-if 1.0.0", ] @@ -3199,9 +3240,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.45" +version = "0.3.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca059e81d9486668f12d455a4ea6daa600bd408134cd17e3d3fb5a32d1f016f8" +checksum = "cf3d7383929f7c9c7c2d0fa596f325832df98c3704f2c60553080f7127a58175" dependencies = [ "wasm-bindgen", ] @@ -3369,7 +3410,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0315ef2f688e33844400b31f11c263f2b3dc21d8b9355c6891c5f185fae43f9a" dependencies = [ "parity-util-mem", - "smallvec 1.4.2", + "smallvec 1.5.1", ] [[package]] @@ -3398,7 +3439,7 @@ dependencies = [ "parking_lot 0.10.2", "regex", "rocksdb", - "smallvec 1.4.2", + "smallvec 1.5.1", ] [[package]] @@ -3438,9 +3479,9 @@ checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a" [[package]] name = "libc" -version = "0.2.80" +version = "0.2.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58d1b70b004888f764dfbf6a26a3b0342a1632d33968e4a179d8011c760614" +checksum = "1482821306169ec4d07f6aca392a4681f66c75c9918aa49641a2595db64053cb" [[package]] name = "libloading" @@ -3493,7 +3534,7 @@ dependencies = [ "parity-multiaddr", "parking_lot 0.10.2", "pin-project 0.4.27", - "smallvec 1.4.2", + "smallvec 1.5.1", "wasm-timer", ] @@ -3524,7 +3565,7 @@ dependencies = [ "ring", "rw-stream-sink", "sha2 0.8.2", - "smallvec 1.4.2", + "smallvec 1.5.1", "thiserror", "unsigned-varint 0.4.0", "void", @@ -3577,7 +3618,7 @@ dependencies = [ "prost", "prost-build", "rand 0.7.3", - "smallvec 1.4.2", + "smallvec 1.5.1", ] [[package]] @@ -3601,7 +3642,7 @@ dependencies = [ "prost-build", "rand 0.7.3", "sha2 0.8.2", - "smallvec 1.4.2", + "smallvec 1.5.1", "unsigned-varint 0.4.0", "wasm-timer", ] @@ -3618,7 +3659,7 @@ dependencies = [ "log", "prost", "prost-build", - "smallvec 1.4.2", + "smallvec 1.5.1", "wasm-timer", ] @@ -3642,7 +3683,7 @@ dependencies = [ "prost-build", "rand 0.7.3", "sha2 0.8.2", - "smallvec 1.4.2", + "smallvec 1.5.1", "uint 0.8.5", "unsigned-varint 0.4.0", "void", @@ -3666,7 +3707,7 @@ dependencies = [ "log", "net2", "rand 0.7.3", - "smallvec 1.4.2", + "smallvec 1.5.1", "void", "wasm-timer", ] @@ -3771,7 +3812,7 @@ dependencies = [ "lru 0.6.1", "minicbor", "rand 0.7.3", - "smallvec 1.4.2", + "smallvec 1.5.1", "unsigned-varint 0.5.1", "wasm-timer", ] @@ -3787,7 +3828,7 @@ dependencies = [ "libp2p-core", "log", "rand 0.7.3", - "smallvec 1.4.2", + "smallvec 1.5.1", "void", "wasm-timer", ] @@ -3862,7 +3903,7 @@ checksum = "781d9b9f043dcdabc40640807125368596b849fd4d96cdca2dcf052fdf6f33fd" dependencies = [ "futures 0.3.8", "libp2p-core", - "parking_lot 0.11.0", + "parking_lot 0.11.1", "thiserror", "yamux", ] @@ -3952,9 +3993,9 @@ dependencies = [ [[package]] name = "lock_api" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28247cc5a5be2f05fbcd76dd0cf2c7d3b5400cb978a28042abcd4fa0b3f8261c" +checksum = "dd96ffd135b2fd7b973ac026d28085defbe8983df057ced3eb4f2130b0831312" dependencies = [ "scopeguard 1.1.0", ] @@ -4031,9 +4072,9 @@ checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" [[package]] name = "matrixmultiply" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4f7ec66360130972f34830bfad9ef05c6610a43938a467bcc9ab9369ab3478f" +checksum = "916806ba0031cd542105d916a97c8572e1fa6dd79c9c51e7eb43a09ec2dd84c1" dependencies = [ "rawpointer", ] @@ -4069,6 +4110,15 @@ dependencies = [ "autocfg 1.0.1", ] +[[package]] +name = "memoffset" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87" +dependencies = [ + "autocfg 1.0.1", +] + [[package]] name = "memory-db" version = "0.24.1" @@ -4089,7 +4139,7 @@ checksum = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" [[package]] name = "merkle-patricia-trie" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#e2f829acf9b9fe5a09bf60b7683f9dd99e271885" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" dependencies = [ "hashbrown 0.9.1", "keccak-hash", @@ -4141,9 +4191,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.6.22" +version = "0.6.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430" +checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4" dependencies = [ "cfg-if 0.1.10", "fuchsia-zircon", @@ -4152,7 +4202,7 @@ dependencies = [ "kernel32-sys", "libc", "log", - "miow 0.2.1", + "miow 0.2.2", "net2", "slab", "winapi 0.2.8", @@ -4178,7 +4228,7 @@ checksum = "0840c1c50fd55e521b247f949c241c9997709f23bd7f023b9762cd561e935656" dependencies = [ "log", "mio", - "miow 0.3.5", + "miow 0.3.6", "winapi 0.3.9", ] @@ -4195,9 +4245,9 @@ dependencies = [ [[package]] name = "miow" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" +checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d" dependencies = [ "kernel32-sys", "net2", @@ -4207,9 +4257,9 @@ dependencies = [ [[package]] name = "miow" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07b88fb9795d4d36d62a012dfbf49a8f5cf12751f36d31a9dbe66d528e58979e" +checksum = "5a33c1b55807fbed163481b5ba66db4b2fa6cde694a5027be10fb724206c5897" dependencies = [ "socket2", "winapi 0.3.9", @@ -4251,8 +4301,8 @@ dependencies = [ "bytes 0.5.6", "futures 0.3.8", "log", - "pin-project 1.0.1", - "smallvec 1.4.2", + "pin-project 1.0.2", + "smallvec 1.5.1", "unsigned-varint 0.5.1", ] @@ -4294,9 +4344,9 @@ dependencies = [ [[package]] name = "net2" -version = "0.2.35" +version = "0.2.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ebc3ec692ed7c9a255596c67808dee269f64655d8baf7b4f0638e51ba1d6853" +checksum = "d7cf75f38f16cb05ea017784dc6dbfd354f76c223dba37701734c4f5a9337d02" dependencies = [ "cfg-if 0.1.10", "libc", @@ -4318,13 +4368,13 @@ dependencies = [ [[package]] name = "nix" -version = "0.19.0" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85db2feff6bf70ebc3a4793191517d5f0331100a2f10f9bf93b5e5214f32b7b7" +checksum = "b2ccba0cfe4fdf15982d1674c69b1fd80bad427d293849982668dfe454bd61f2" dependencies = [ "bitflags", "cc", - "cfg-if 0.1.10", + "cfg-if 1.0.0", "libc", ] @@ -4447,11 +4497,11 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.4.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "260e51e7efe62b592207e9e13a68e43692a7a279171d6ba57abd208bf23645ad" +checksum = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0" dependencies = [ - "parking_lot 0.11.0", + "parking_lot 0.11.1", ] [[package]] @@ -4830,7 +4880,7 @@ dependencies = [ "pallet-transaction-payment-rpc-runtime-api", "parity-scale-codec", "serde", - "smallvec 1.4.2", + "smallvec 1.5.1", "sp-core", "sp-io", "sp-runtime", @@ -4899,9 +4949,9 @@ dependencies = [ [[package]] name = "parity-multiaddr" -version = "0.9.4" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22fe99b938abd57507e37f8d4ef30cd74b33c71face2809b37b8beb71bab15ab" +checksum = "43244a26dc1ddd3097216bb12eaa6cf8a07b060c72718d9ebd60fd297d6401df" dependencies = [ "arrayref", "bs58 0.4.0", @@ -4957,7 +5007,7 @@ dependencies = [ "libc", "log", "mio-named-pipes", - "miow 0.3.5", + "miow 0.3.6", "rand 0.7.3", "tokio 0.1.22", "tokio-named-pipes", @@ -4977,8 +5027,8 @@ dependencies = [ "jemallocator", "parity-util-mem-derive", "parking_lot 0.10.2", - "primitive-types 0.7.2", - "smallvec 1.4.2", + "primitive-types 0.7.3", + "smallvec 1.5.1", "winapi 0.3.9", ] @@ -5056,13 +5106,13 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4893845fa2ca272e647da5d0e46660a314ead9c2fdd9a883aabc32e481a8733" +checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" dependencies = [ "instant", - "lock_api 0.4.1", - "parking_lot_core 0.8.0", + "lock_api 0.4.2", + "parking_lot_core 0.8.1", ] [[package]] @@ -5085,7 +5135,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" dependencies = [ "cfg-if 0.1.10", - "cloudabi 0.0.3", + "cloudabi", "libc", "redox_syscall", "rustc_version", @@ -5100,25 +5150,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" dependencies = [ "cfg-if 0.1.10", - "cloudabi 0.0.3", + "cloudabi", "libc", "redox_syscall", - "smallvec 1.4.2", + "smallvec 1.5.1", "winapi 0.3.9", ] [[package]] name = "parking_lot_core" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c361aa727dd08437f2f1447be8b59a33b0edd15e0fcee698f935613d9efbca9b" +checksum = "d7c6d9b8427445284a09c55be860a15855ab580a417ccad9da88f5a06787ced0" dependencies = [ - "cfg-if 0.1.10", - "cloudabi 0.1.0", + "cfg-if 1.0.0", "instant", "libc", "redox_syscall", - "smallvec 1.4.2", + "smallvec 1.5.1", "winapi 0.3.9", ] @@ -5197,11 +5246,11 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee41d838744f60d959d7074e3afb6b35c7456d0f61cad38a24e35e6553f73841" +checksum = "9ccc2237c2c489783abd8c4c80e5450fc0e98644555b1364da68cc29aa151ca7" dependencies = [ - "pin-project-internal 1.0.1", + "pin-project-internal 1.0.2", ] [[package]] @@ -5217,9 +5266,9 @@ dependencies = [ [[package]] name = "pin-project-internal" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81a4ffa594b66bff340084d4081df649a7dc049ac8d7fc458d8e628bfbbb2f86" +checksum = "f8e8d2bf0b23038a4424865103a4df472855692821aab4e4f5c3312d461d9e5f" dependencies = [ "proc-macro2", "quote", @@ -5232,6 +5281,12 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c917123afa01924fc84bb20c4c03f004d9c38e5127e3c039bbf7f4b9c76a2f6b" +[[package]] +name = "pin-project-lite" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b063f57ec186e6140e2b8b6921e5f1bd89c7356dda5b33acc5401203ca6131c" + [[package]] name = "pin-utils" version = "0.1.0" @@ -5274,11 +5329,11 @@ dependencies = [ [[package]] name = "polyval" -version = "0.4.1" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5884790f1ce3553ad55fec37b5aaac5882e0e845a2612df744d6c85c9bf046c" +checksum = "b4fd92d8e0c06d08525d2e2643cc2b5c80c69ae8eb12c18272d501cd7079ccc0" dependencies = [ - "cfg-if 0.1.10", + "cpuid-bool 0.2.0", "universal-hash", ] @@ -5328,9 +5383,9 @@ dependencies = [ [[package]] name = "primitive-types" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c55c21c64d0eaa4d7ed885d959ef2d62d9e488c27c0e02d9aa5ce6c877b7d5f8" +checksum = "7dd39dcacf71411ba488570da7bbc89b717225e46478b30ba99b92db6b149809" dependencies = [ "fixed-hash 0.6.1", "impl-codec 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5401,7 +5456,7 @@ dependencies = [ "cfg-if 0.1.10", "fnv", "lazy_static", - "parking_lot 0.11.0", + "parking_lot 0.11.1", "regex", "thiserror", ] @@ -5482,7 +5537,7 @@ checksum = "77de3c815e5a160b1539c6592796801df2043ae35e123b46d73380cfa57af858" dependencies = [ "futures-core", "futures-sink", - "pin-project-lite", + "pin-project-lite 0.1.11", ] [[package]] @@ -5529,7 +5584,7 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9" dependencies = [ - "cloudabi 0.0.3", + "cloudabi", "fuchsia-cprng", "libc", "rand_core 0.3.1", @@ -5657,7 +5712,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" dependencies = [ - "cloudabi 0.0.3", + "cloudabi", "fuchsia-cprng", "libc", "rand_core 0.4.2", @@ -5731,7 +5786,7 @@ checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a" dependencies = [ "crossbeam-channel", "crossbeam-deque 0.8.0", - "crossbeam-utils 0.8.0", + "crossbeam-utils 0.8.1", "lazy_static", "num_cpus", ] @@ -5790,7 +5845,7 @@ checksum = "b9ba8aaf5fe7cf307c6dbdaeed85478961d29e25e3bee5169e11b92fa9f027a8" dependencies = [ "log", "rustc-hash", - "smallvec 1.4.2", + "smallvec 1.5.1", ] [[package]] @@ -5850,13 +5905,13 @@ checksum = "e005d658ad26eacc2b6c506dfde519f4e277e328d0eb3379ca61647d70a8f531" [[package]] name = "ring" -version = "0.16.15" +version = "0.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "952cd6b98c85bbc30efa1ba5783b8abf12fec8b3287ffa52605b9432313e34e4" +checksum = "024a1e66fea74c66c66624ee5622a7ff0e4b73a13b4f5c326ddb50c708944226" dependencies = [ "cc", "libc", - "once_cell 1.4.1", + "once_cell 1.5.2", "spin", "untrusted", "web-sys", @@ -5912,14 +5967,14 @@ dependencies = [ [[package]] name = "rust-argon2" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dab61250775933275e84053ac235621dfb739556d5c54a2f2e9313b7cf43a19" +checksum = "4b18820d944b33caa75a71378964ac46f58517c92b6ae5f762636247c09e78fb" dependencies = [ - "base64 0.12.3", + "base64 0.13.0", "blake2b_simd", "constant_time_eq", - "crossbeam-utils 0.7.2", + "crossbeam-utils 0.8.1", ] [[package]] @@ -6149,7 +6204,7 @@ dependencies = [ "structopt", "substrate-prometheus-endpoint", "time", - "tokio 0.2.22", + "tokio 0.2.23", "tracing", "tracing-log", "tracing-subscriber", @@ -7034,18 +7089,18 @@ checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" [[package]] name = "serde" -version = "1.0.117" +version = "1.0.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b88fa983de7720629c9387e9f517353ed404164b1e482c970a90c1a4aaf7dc1a" +checksum = "06c64263859d87aa2eb554587e2d23183398d617427327cf2b3d0ed8c69e4800" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.117" +version = "1.0.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbd1ae72adb44aab48f325a02444a5fc079349a8d804c1fc922aed3f7454c74e" +checksum = "c84d3526699cd55261af4b941e4e725444df67aa4f9e6a3564f18030d12672df" dependencies = [ "proc-macro2", "quote", @@ -7054,9 +7109,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.59" +version = "1.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcac07dbffa1c65e7f816ab9eba78eb142c6d44410f4eeba1e26e4f5dfa56b95" +checksum = "1500e84d27fe482ed1dc791a56eddc2f230046a040fa908c08bda1d9fb615779" dependencies = [ "itoa", "ryu", @@ -7083,7 +7138,7 @@ checksum = "ce3cdf1b5e620a498ee6f2a171885ac7e22f0e12089ec4b3d22b84921792507c" dependencies = [ "block-buffer 0.9.0", "cfg-if 1.0.0", - "cpuid-bool", + "cpuid-bool 0.1.2", "digest 0.9.0", "opaque-debug 0.3.0", ] @@ -7108,7 +7163,7 @@ checksum = "6e7aab86fe2149bad8c507606bdb3f4ef5e7b2380eb92350f56122cca72a42a8" dependencies = [ "block-buffer 0.9.0", "cfg-if 1.0.0", - "cpuid-bool", + "cpuid-bool 0.1.2", "digest 0.9.0", "opaque-debug 0.3.0", ] @@ -7154,6 +7209,16 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" +[[package]] +name = "signal-hook" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "604508c1418b99dfe1925ca9224829bb2a8a9a04dda655cc01fcad46f4ab05ed" +dependencies = [ + "libc", + "signal-hook-registry", +] + [[package]] name = "signal-hook-registry" version = "1.2.2" @@ -7177,9 +7242,9 @@ checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" [[package]] name = "slog" -version = "2.5.2" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cc9c640a4adbfbcc11ffb95efe5aa7af7309e002adab54b185507dbf2377b99" +checksum = "8347046d4ebd943127157b94d63abb990fcf729dc4e9978927fdf4ac3c998d06" dependencies = [ "erased-serde", ] @@ -7230,9 +7295,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.4.2" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbee7696b84bbf3d89a1c2eccff0850e3047ed46bfcd2e92c29a2d074d57e252" +checksum = "ae524f056d7d770e174287294f562e95044c68e88dec909a00d2094805db9d75" [[package]] name = "snow" @@ -7254,11 +7319,11 @@ dependencies = [ [[package]] name = "socket2" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1fa70dc5c8104ec096f4fe7ede7a221d35ae13dcd19ba1ad9a81d2cab9a1c44" +checksum = "2c29947abdee2a218277abeca306f25789c938e500ea5a9d4b12a5a504466902" dependencies = [ - "cfg-if 0.1.10", + "cfg-if 1.0.0", "libc", "redox_syscall", "winapi 0.3.9", @@ -7495,7 +7560,7 @@ dependencies = [ "parity-scale-codec", "parity-util-mem", "parking_lot 0.10.2", - "primitive-types 0.7.2", + "primitive-types 0.7.3", "rand 0.7.3", "regex", "schnorrkel", @@ -7696,7 +7761,7 @@ version = "2.0.0" source = "git+https://github.com/darwinia-network/substrate.git?branch=common-library#7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" dependencies = [ "parity-scale-codec", - "primitive-types 0.7.2", + "primitive-types 0.7.3", "sp-externalities", "sp-runtime-interface-proc-macro", "sp-std 2.0.0", @@ -7761,7 +7826,7 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.10.2", "rand 0.7.3", - "smallvec 1.4.2", + "smallvec 1.5.1", "sp-core", "sp-externalities", "sp-panic-handler", @@ -7939,9 +8004,9 @@ checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" [[package]] name = "structopt" -version = "0.3.20" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "126d630294ec449fae0b16f964e35bf3c74f940da9dca17ee9b905f7b3112eb8" +checksum = "5277acd7ee46e63e5168a80734c9f6ee81b1367a7d8772a2d765df2a3705d28c" dependencies = [ "clap", "lazy_static", @@ -7950,9 +8015,9 @@ dependencies = [ [[package]] name = "structopt-derive" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65e51c492f9e23a220534971ff5afc14037289de430e3c83f9daf6a1b6ae91e8" +checksum = "5ba9cdfda491b814720b6b06e0cac513d922fc407582032e8706e9f137976f90" dependencies = [ "heck", "proc-macro-error", @@ -8072,7 +8137,7 @@ dependencies = [ "hyper 0.13.9", "log", "prometheus", - "tokio 0.2.22", + "tokio 0.2.23", ] [[package]] @@ -8094,9 +8159,9 @@ checksum = "343f3f510c2915908f155e94f17220b19ccfacf2a64a2a5d8004f2c3e311e7fd" [[package]] name = "syn" -version = "1.0.48" +version = "1.0.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc371affeffc477f42a221a1e4297aedcea33d47d19b61455588bd9d8f6b19ac" +checksum = "9a2af957a63d6bd42255c359c93d9bfdb97076bd3b820897ce55ffbfbf107f44" dependencies = [ "proc-macro2", "quote", @@ -8143,9 +8208,9 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.1.0" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f" +checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" dependencies = [ "winapi-util", ] @@ -8216,7 +8281,7 @@ checksum = "b0165e045cc2ae1660270ca65e1676dbaab60feb0f91b10f7d0665e9b47e31f2" dependencies = [ "failure", "hmac", - "once_cell 1.4.1", + "once_cell 1.5.2", "pbkdf2", "rand 0.7.3", "rustc-hash", @@ -8244,9 +8309,18 @@ dependencies = [ [[package]] name = "tinyvec" -version = "0.3.4" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf8dbc19eb42fba10e8feaaec282fb50e2c14b2726d6301dbfeed0f73306a6f" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "238ce071d267c5710f9d31451efec16c5ee22de34df17cc05e56cbc92e967117" +checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" @@ -8274,9 +8348,9 @@ dependencies = [ [[package]] name = "tokio" -version = "0.2.22" +version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d34ca54d84bf2b5b4d7d31e901a8464f7b60ac145a284fba25ceb801f2ddccd" +checksum = "a6d7ad61edd59bfcc7e80dababf0f4aed2e6d5e0ba1659356ae889752dfc12ff" dependencies = [ "bytes 0.5.6", "fnv", @@ -8288,7 +8362,7 @@ dependencies = [ "mio", "mio-uds", "num_cpus", - "pin-project-lite", + "pin-project-lite 0.1.11", "signal-hook-registry", "slab", "winapi 0.3.9", @@ -8296,13 +8370,13 @@ dependencies = [ [[package]] name = "tokio" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ca08accbcb46f11fd8d2d1c6158c348b7888009a1f39260bcad66f6a454250" +checksum = "a12a3eb39ee2c231be64487f1fcbe726c8f2514876a55480a5ab8559fc374252" dependencies = [ "autocfg 1.0.1", "num_cpus", - "pin-project-lite", + "pin-project-lite 0.2.0", "slab", ] @@ -8421,7 +8495,7 @@ checksum = "e12831b255bcfa39dc0436b01e19fea231a37db570686c06ee72c423479f889a" dependencies = [ "futures-core", "rustls", - "tokio 0.2.22", + "tokio 0.2.23", "webpki", ] @@ -8541,8 +8615,8 @@ dependencies = [ "futures-core", "futures-sink", "log", - "pin-project-lite", - "tokio 0.2.22", + "pin-project-lite 0.1.11", + "tokio 0.2.23", ] [[package]] @@ -8562,13 +8636,13 @@ checksum = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" [[package]] name = "tracing" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0987850db3733619253fe60e17cb59b82d37c7e6c0236bb81e4d6b87c879f27" +checksum = "9f47026cdc4080c07e49b37087de021820269d996f581aac150ef9e5583eefe3" dependencies = [ - "cfg-if 0.1.10", + "cfg-if 1.0.0", "log", - "pin-project-lite", + "pin-project-lite 0.2.0", "tracing-attributes", "tracing-core", ] @@ -8638,7 +8712,7 @@ dependencies = [ "serde", "serde_json", "sharded-slab", - "smallvec 1.4.2", + "smallvec 1.5.1", "thread_local", "tracing", "tracing-core", @@ -8662,7 +8736,7 @@ dependencies = [ "hashbrown 0.8.2", "log", "rustc-hex", - "smallvec 1.4.2", + "smallvec 1.5.1", ] [[package]] @@ -8740,18 +8814,18 @@ dependencies = [ [[package]] name = "unicode-normalization" -version = "0.1.13" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb19cf769fa8c6a80a162df694621ebeb4dafb606470b2b2fce0be40a98a977" +checksum = "a13e63ab62dbe32aeee58d1c5408d35c36c392bba5d9d3142287219721afe606" dependencies = [ "tinyvec", ] [[package]] name = "unicode-segmentation" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" +checksum = "bb0d2e7be6ae3a5fa87eed5fb451aff96f2573d2694942e40543ae0bbe19c796" [[package]] name = "unicode-width" @@ -8906,19 +8980,19 @@ checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" [[package]] name = "wasm-bindgen" -version = "0.2.68" +version = "0.2.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ac64ead5ea5f05873d7c12b545865ca2b8d28adfc50a49b84770a3a97265d42" +checksum = "3cd364751395ca0f68cafb17666eee36b63077fb5ecd972bbcd74c90c4bf736e" dependencies = [ - "cfg-if 0.1.10", + "cfg-if 1.0.0", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.68" +version = "0.2.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f22b422e2a757c35a73774860af8e112bff612ce6cb604224e8e47641a9e4f68" +checksum = "1114f89ab1f4106e5b55e688b828c0ab0ea593a1ea7c094b141b14cbaaec2d62" dependencies = [ "bumpalo", "lazy_static", @@ -8931,11 +9005,11 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.18" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7866cab0aa01de1edf8b5d7936938a7e397ee50ce24119aef3e1eaa3b6171da" +checksum = "1fe9756085a84584ee9457a002b7cdfe0bfff169f45d2591d8be1345a6780e35" dependencies = [ - "cfg-if 0.1.10", + "cfg-if 1.0.0", "js-sys", "wasm-bindgen", "web-sys", @@ -8943,9 +9017,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.68" +version = "0.2.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b13312a745c08c469f0b292dd2fcd6411dba5f7160f593da6ef69b64e407038" +checksum = "7a6ac8995ead1f084a8dea1e65f194d0973800c7f571f6edd70adf06ecf77084" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -8953,9 +9027,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.68" +version = "0.2.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f249f06ef7ee334cc3b8ff031bfc11ec99d00f34d86da7498396dc1e3b1498fe" +checksum = "b5a48c72f299d80557c7c62e37e7225369ecc0c963964059509fbafe917c7549" dependencies = [ "proc-macro2", "quote", @@ -8966,9 +9040,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.68" +version = "0.2.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d649a3145108d7d3fbcde896a468d1bd636791823c9921135218ad89be08307" +checksum = "7e7811dd7f9398f14cc76efd356f98f03aa30419dea46aa810d71e819fc97158" [[package]] name = "wasm-timer" @@ -8978,7 +9052,7 @@ checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" dependencies = [ "futures 0.3.8", "js-sys", - "parking_lot 0.11.0", + "parking_lot 0.11.1", "pin-utils", "wasm-bindgen", "wasm-bindgen-futures", @@ -9034,7 +9108,7 @@ dependencies = [ "log", "region", "rustc-demangle", - "smallvec 1.4.2", + "smallvec 1.5.1", "target-lexicon", "wasmparser 0.59.0", "wasmtime-environ", @@ -9167,7 +9241,7 @@ dependencies = [ "lazy_static", "libc", "log", - "memoffset", + "memoffset 0.5.6", "more-asserts", "region", "thiserror", @@ -9177,27 +9251,27 @@ dependencies = [ [[package]] name = "wast" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2c3ef5f6a72dffa44c24d5811123f704e18a1dbc83637d347b1852b41d3835c" +checksum = "9c0586061bfacc035034672c8d760802b428ab4c80a92e2a392425c516df9be1" dependencies = [ "leb128", ] [[package]] name = "wat" -version = "1.0.28" +version = "1.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835cf59c907f67e2bbc20f50157e08f35006fe2a8444d8ec9f5683e22f937045" +checksum = "c06d55b5ec4f9d9396fa99abaafa0688597395e57827dffd89731412ae90c9bf" dependencies = [ "wast", ] [[package]] name = "web-sys" -version = "0.3.45" +version = "0.3.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bf6ef87ad7ae8008e15a355ce696bed26012b7caa21605188cfd8214ab51e2d" +checksum = "222b1ef9334f92a21d3fb53dc3fd80f30836959a90f9274a626d7e06315ba3c3" dependencies = [ "js-sys", "wasm-bindgen", @@ -9205,9 +9279,9 @@ dependencies = [ [[package]] name = "webpki" -version = "0.21.3" +version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab146130f5f790d45f82aeeb09e55a256573373ec64409fc19a6fb82fb1032ae" +checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" dependencies = [ "ring", "untrusted", @@ -9333,7 +9407,7 @@ dependencies = [ "futures 0.3.8", "log", "nohash-hasher", - "parking_lot 0.11.0", + "parking_lot 0.11.1", "rand 0.7.3", "static_assertions", ] diff --git a/cli/Cargo.toml b/cli/Cargo.toml index f0d1639b4..2ca8fc4ea 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -20,12 +20,12 @@ crate-type = ["cdylib", "rlib"] [dependencies] # crates log = { version = "0.4.11" } -serde = { version = "1.0.117", optional = true } +serde = { version = "1.0.118", optional = true } structopt = { version = "0.3.20" } -tokio = { version = "0.3.3", optional = true, features = ["rt-multi-thread"] } +tokio = { version = "0.3.5", optional = true, features = ["rt-multi-thread"] } toml = { version = "0.5.7", optional = true } -wasm-bindgen = { version = "0.2.68", optional = true } -wasm-bindgen-futures = { version = "0.4.18", optional = true } +wasm-bindgen = { version = "0.2.69", optional = true } +wasm-bindgen-futures = { version = "0.4.19", optional = true } # darwinia client darwinia-cli = { optional = true, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } # darwinia service diff --git a/node/service/Cargo.toml b/node/service/Cargo.toml index 9a93a2ef6..c7e13aa77 100644 --- a/node/service/Cargo.toml +++ b/node/service/Cargo.toml @@ -13,8 +13,8 @@ version = "0.8.2" codec = { package = "parity-scale-codec", version = "1.3.5", features = ["derive"] } futures = { version = "0.3.8" } log = { version = "0.4.11" } -serde = { version = "1.0.117", features = ["derive"] } -serde_json = { version = "1.0.59" } +serde = { version = "1.0.118", features = ["derive"] } +serde_json = { version = "1.0.60" } # darwinia frame array-bytes = { git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } darwinia-balances-rpc-runtime-api = { git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } From 3b877d6283084ccb2f02929e07b73f2608051ea2 Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Wed, 9 Dec 2020 13:54:14 +0800 Subject: [PATCH 03/23] bump: denpendencies --- cli/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 2ca8fc4ea..c7b6a7f9e 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -21,7 +21,7 @@ crate-type = ["cdylib", "rlib"] # crates log = { version = "0.4.11" } serde = { version = "1.0.118", optional = true } -structopt = { version = "0.3.20" } +structopt = { version = "0.3.21" } tokio = { version = "0.3.5", optional = true, features = ["rt-multi-thread"] } toml = { version = "0.5.7", optional = true } wasm-bindgen = { version = "0.2.69", optional = true } From 13ea5b7bf94a60c2cf4e73eca88a5f7462ee0589 Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Wed, 9 Dec 2020 13:58:20 +0800 Subject: [PATCH 04/23] update: types --- runtime/crab/polkadot-compatible-types.json | 13 +++++++-- runtime/crab/types.json | 13 +++++++-- .../darwinia/polkadot-compatible-types.json | 13 +++++++-- runtime/darwinia/types.json | 28 ++++++++----------- 4 files changed, 44 insertions(+), 23 deletions(-) diff --git a/runtime/crab/polkadot-compatible-types.json b/runtime/crab/polkadot-compatible-types.json index 984f1cf5a..00402327e 100644 --- a/runtime/crab/polkadot-compatible-types.json +++ b/runtime/crab/polkadot-compatible-types.json @@ -176,12 +176,14 @@ }, "EthereumRelayHeaderParcel": { "header": "EthereumHeader", - "mmr_root": "H256" + "parent_mmr_root": "H256" }, "EthereumRelayProofs": { "ethash_proof": "Vec", "mmr_proof": "Vec" }, + "__[TODO.Generalize]__": "", + "Signer": "[u8; 20; EcdsaAddress]", "__[pallet.claims]__": {}, "OtherSignature": { "_enum": { @@ -200,7 +202,7 @@ "__[pallet.header-mmr]__": {}, "MerkleMountainRangeRootLog": { "prefix": "[u8; 4; Prefix]", - "mmr_root": "Hash" + "parent_mmr_root": "Hash" }, "__[pallet.relayer-game]__": {}, "RelayHeaderId": "EthereumBlockNumber", @@ -222,6 +224,13 @@ "ayes": "Vec", "nays": "Vec" }, + "RelayAuthorityT": { + "account_id": "AccountId", + "signer": "Signer", + "stake": "Balance", + "term": "BlockNumber" + }, + "MMRRoot": "Hash", "__[crab.runtime]__": {}, "ProxyType": { "_enum": { diff --git a/runtime/crab/types.json b/runtime/crab/types.json index e92d9bca0..f4343c39c 100644 --- a/runtime/crab/types.json +++ b/runtime/crab/types.json @@ -168,12 +168,14 @@ }, "EthereumRelayHeaderParcel": { "header": "EthereumHeader", - "mmr_root": "H256" + "parent_mmr_root": "H256" }, "EthereumRelayProofs": { "ethash_proof": "Vec", "mmr_proof": "Vec" }, + "__[TODO.Generalize]__": "", + "Signer": "[u8; 20; EcdsaAddress]", "__[pallet.claims]__": {}, "OtherSignature": { "_enum": { @@ -192,7 +194,7 @@ "__[pallet.header-mmr]__": {}, "MerkleMountainRangeRootLog": { "prefix": "[u8; 4; Prefix]", - "mmr_root": "Hash" + "parent_mmr_root": "Hash" }, "__[pallet.relayer-game]__": {}, "RelayHeaderId": "EthereumBlockNumber", @@ -214,6 +216,13 @@ "ayes": "Vec", "nays": "Vec" }, + "RelayAuthorityT": { + "account_id": "AccountId", + "signer": "Signer", + "stake": "Balance", + "term": "BlockNumber" + }, + "MMRRoot": "Hash", "__[crab.runtime]__": {}, "ProxyType": { "_enum": { diff --git a/runtime/darwinia/polkadot-compatible-types.json b/runtime/darwinia/polkadot-compatible-types.json index 993ef32b6..6307cfcb3 100644 --- a/runtime/darwinia/polkadot-compatible-types.json +++ b/runtime/darwinia/polkadot-compatible-types.json @@ -176,12 +176,14 @@ }, "EthereumRelayHeaderParcel": { "header": "EthereumHeader", - "mmr_root": "H256" + "parent_mmr_root": "H256" }, "EthereumRelayProofs": { "ethash_proof": "Vec", "mmr_proof": "Vec" }, + "__[TODO.Generalize]__": "", + "Signer": "[u8; 20; EcdsaAddress]", "__[pallet.claims]__": {}, "OtherSignature": { "_enum": { @@ -200,7 +202,7 @@ "__[pallet.header-mmr]__": {}, "MerkleMountainRangeRootLog": { "prefix": "[u8; 4; Prefix]", - "mmr_root": "Hash" + "parent_mmr_root": "Hash" }, "__[pallet.relayer-game]__": {}, "RelayHeaderId": "EthereumBlockNumber", @@ -222,6 +224,13 @@ "ayes": "Vec", "nays": "Vec" }, + "RelayAuthorityT": { + "account_id": "AccountId", + "signer": "Signer", + "stake": "Balance", + "term": "BlockNumber" + }, + "MMRRoot": "Hash", "__[darwinia.runtime]__": {}, "ProxyType": { "_enum": { diff --git a/runtime/darwinia/types.json b/runtime/darwinia/types.json index 408670ece..99f8f646a 100644 --- a/runtime/darwinia/types.json +++ b/runtime/darwinia/types.json @@ -168,31 +168,18 @@ }, "EthereumRelayHeaderParcel": { "header": "EthereumHeader", - "mmr_root": "H256" + "parent_mmr_root": "H256" }, "EthereumRelayProofs": { "ethash_proof": "Vec", "mmr_proof": "Vec" }, - "__[pallet.claims]__": {}, - "OtherSignature": { - "_enum": { - "Eth": "EcdsaSignature", - "Tron": "EcdsaSignature" - } - }, - "EcdsaSignature": "[u8; 65; EcdsaSignature]", - "OtherAddress": { - "_enum": { - "Eth": "[u8; 20; EthereumAddress]", - "Tron": "[u8; 20; TronAddress]" - } - }, - "AddressT": "[u8; 20; AddressT]", + "__[TODO.Generalize]__": "", + "Signer": "[u8; 20; EcdsaAddress]", "__[pallet.header-mmr]__": {}, "MerkleMountainRangeRootLog": { "prefix": "[u8; 4; Prefix]", - "mmr_root": "Hash" + "parent_mmr_root": "Hash" }, "__[pallet.relayer-game]__": {}, "RelayHeaderId": "EthereumBlockNumber", @@ -214,6 +201,13 @@ "ayes": "Vec", "nays": "Vec" }, + "RelayAuthorityT": { + "account_id": "AccountId", + "signer": "Signer", + "stake": "Balance", + "term": "BlockNumber" + }, + "MMRRoot": "Hash", "__[darwinia.runtime]__": {}, "ProxyType": { "_enum": { From 2c61e9c7ab8fa813490f59cef9ad2142808cac16 Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Wed, 9 Dec 2020 13:59:09 +0800 Subject: [PATCH 05/23] update: types --- runtime/darwinia/polkadot-compatible-types.json | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/runtime/darwinia/polkadot-compatible-types.json b/runtime/darwinia/polkadot-compatible-types.json index 6307cfcb3..a2fa6c253 100644 --- a/runtime/darwinia/polkadot-compatible-types.json +++ b/runtime/darwinia/polkadot-compatible-types.json @@ -184,21 +184,6 @@ }, "__[TODO.Generalize]__": "", "Signer": "[u8; 20; EcdsaAddress]", - "__[pallet.claims]__": {}, - "OtherSignature": { - "_enum": { - "Eth": "EcdsaSignature", - "Tron": "EcdsaSignature" - } - }, - "EcdsaSignature": "[u8; 65; EcdsaSignature]", - "OtherAddress": { - "_enum": { - "Eth": "[u8; 20; EthereumAddress]", - "Tron": "[u8; 20; TronAddress]" - } - }, - "AddressT": "[u8; 20; AddressT]", "__[pallet.header-mmr]__": {}, "MerkleMountainRangeRootLog": { "prefix": "[u8; 4; Prefix]", From e26e5bea07eaa044b99366f3315a372c8aac80f9 Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Wed, 9 Dec 2020 14:31:29 +0800 Subject: [PATCH 06/23] refactor: primitives --- node/service/src/chain_spec/mod.rs | 4 +-- node/service/src/lib.rs | 2 +- primitives/src/lib.rs | 49 +++++------------------------- rpc/src/lib.rs | 4 ++- runtime/crab/src/lib.rs | 4 +-- runtime/darwinia/src/lib.rs | 4 +-- 6 files changed, 17 insertions(+), 50 deletions(-) diff --git a/node/service/src/chain_spec/mod.rs b/node/service/src/chain_spec/mod.rs index 00bdd8bb5..83c31ce80 100644 --- a/node/service/src/chain_spec/mod.rs +++ b/node/service/src/chain_spec/mod.rs @@ -30,9 +30,9 @@ const DEFAULT_PROTOCOL_ID: &str = "dar"; #[serde(rename_all = "camelCase")] pub struct Extensions { /// Block numbers with known hashes. - pub fork_blocks: sc_client_api::ForkBlocks, + pub fork_blocks: sc_client_api::ForkBlocks, /// Known bad block hashes. - pub bad_blocks: sc_client_api::BadBlocks, + pub bad_blocks: sc_client_api::BadBlocks, } /// Generate a crypto pair from seed. diff --git a/node/service/src/lib.rs b/node/service/src/lib.rs index 47797fd16..461f9da66 100644 --- a/node/service/src/lib.rs +++ b/node/service/src/lib.rs @@ -15,7 +15,7 @@ pub use sc_service::{ pub use chain_spec::{CrabChainSpec, DarwiniaChainSpec}; pub use client::DarwiniaClient; pub use crab_runtime; -pub use darwinia_primitives::Block; +pub use darwinia_primitives::OpaqueBlock as Block; pub use darwinia_runtime; // --- std --- diff --git a/primitives/src/lib.rs b/primitives/src/lib.rs index ff33740d8..142e68deb 100644 --- a/primitives/src/lib.rs +++ b/primitives/src/lib.rs @@ -3,47 +3,13 @@ #![cfg_attr(not(feature = "std"), no_std)] #![warn(missing_docs)] -/// App-specific crypto used for reporting equivocation/misbehavior in BABE, -/// GRANDPA and Parachains, described in the white paper as the fisherman role. -/// Any rewards for misbehavior reporting will be paid out to this account. -pub mod fisherman { - // --- substrate --- - use sp_core::crypto::KeyTypeId; - // --- crates --- - use super::{Signature, Verify}; - - /// Key type for the reporting module. Used for reporting BABE, GRANDPA - /// and Parachain equivocations. - pub const KEY_TYPE: KeyTypeId = KeyTypeId(*b"fish"); - - mod app { - use sp_application_crypto::{app_crypto, sr25519}; - app_crypto!(sr25519, super::KEY_TYPE); - } - - /// Identity of the equivocation/misbehavior reporter. - pub type FishermanId = app::Public; - - /// An `AppCrypto` type to allow submitting signed transactions using the fisherman - /// application key as signer. - pub struct FishermanAppCrypto; - impl frame_system::offchain::AppCrypto<::Signer, Signature> - for FishermanAppCrypto - { - type RuntimeAppPublic = FishermanId; - type GenericPublic = sp_core::sr25519::Public; - type GenericSignature = sp_core::sr25519::Signature; - } -} - -// --- substrate --- -pub use sp_runtime::traits::{BlakeTwo256, Hash as HashT, IdentifyAccount, Verify}; -/// Opaque, encoded, unchecked extrinsic. -pub use sp_runtime::OpaqueExtrinsic as UncheckedExtrinsic; - // --- substrate --- use sp_core::H256; -use sp_runtime::{generic, MultiSignature}; +use sp_runtime::{ + generic, + traits::{BlakeTwo256, IdentifyAccount, Verify}, + MultiSignature, OpaqueExtrinsic, +}; /// An index to a block. /// 32-bits will allow for 136 years of blocks assuming 1 block per second. @@ -87,10 +53,9 @@ pub type Power = u32; /// Header type. pub type Header = generic::Header; + /// Block type. -pub type Block = generic::Block; -/// Block ID. -pub type BlockId = generic::BlockId; +pub type OpaqueBlock = generic::Block; #[ignore] #[test] diff --git a/rpc/src/lib.rs b/rpc/src/lib.rs index d8b9d8930..4603af417 100644 --- a/rpc/src/lib.rs +++ b/rpc/src/lib.rs @@ -10,7 +10,9 @@ use std::sync::Arc; // --- substrate --- use sp_api::ProvideRuntimeApi; // --- darwinia --- -use darwinia_primitives::{AccountId, Balance, Block, BlockNumber, Hash, Nonce, Power}; +use darwinia_primitives::{ + AccountId, Balance, BlockNumber, Hash, Nonce, OpaqueBlock as Block, Power, +}; /// A type representing all RPC extensions. pub type RpcExtension = jsonrpc_core::IoHandler; diff --git a/runtime/crab/src/lib.rs b/runtime/crab/src/lib.rs index 6edbc95a7..cef5c94e1 100644 --- a/runtime/crab/src/lib.rs +++ b/runtime/crab/src/lib.rs @@ -73,7 +73,7 @@ use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, traits::{ BlakeTwo256, Block as BlockT, Extrinsic as ExtrinsicT, IdentityLookup, NumberFor, - OpaqueKeys, SaturatedConversion, + OpaqueKeys, SaturatedConversion, Verify, }, transaction_validity::{TransactionPriority, TransactionSource, TransactionValidity}, ApplyExtrinsicResult, KeyTypeId, ModuleId, Perbill, Percent, Permill, RuntimeDebug, @@ -977,7 +977,7 @@ construct_runtime!( pub enum Runtime where Block = Block, - NodeBlock = darwinia_primitives::Block, + NodeBlock = OpaqueBlock, UncheckedExtrinsic = UncheckedExtrinsic { // Basic stuff; balances is uncallable initially. diff --git a/runtime/darwinia/src/lib.rs b/runtime/darwinia/src/lib.rs index 6a22cb393..00a676bd8 100644 --- a/runtime/darwinia/src/lib.rs +++ b/runtime/darwinia/src/lib.rs @@ -108,7 +108,7 @@ use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, traits::{ BlakeTwo256, Block as BlockT, ConvertInto, Extrinsic as ExtrinsicT, IdentityLookup, - NumberFor, OpaqueKeys, SaturatedConversion, + NumberFor, OpaqueKeys, SaturatedConversion, Verify }, transaction_validity::{TransactionPriority, TransactionSource, TransactionValidity}, ApplyExtrinsicResult, KeyTypeId, ModuleId, Perbill, Percent, Permill, RuntimeDebug, @@ -954,7 +954,7 @@ construct_runtime!( pub enum Runtime where Block = Block, - NodeBlock = darwinia_primitives::Block, + NodeBlock = OpaqueBlock, UncheckedExtrinsic = UncheckedExtrinsic { // Basic stuff; balances is uncallable initially. From 453866412ac63a5e80fb9b1b6d1819b5f725ad9c Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Wed, 9 Dec 2020 14:32:22 +0800 Subject: [PATCH 07/23] bump: spec --- runtime/crab/src/lib.rs | 2 +- runtime/darwinia/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/crab/src/lib.rs b/runtime/crab/src/lib.rs index cef5c94e1..e985d91b9 100644 --- a/runtime/crab/src/lib.rs +++ b/runtime/crab/src/lib.rs @@ -137,7 +137,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("Crab"), impl_name: create_runtime_str!("Darwinia Crab"), authoring_version: 0, - spec_version: 28, + spec_version: 29, impl_version: 0, #[cfg(not(feature = "disable-runtime-api"))] apis: RUNTIME_API_VERSIONS, diff --git a/runtime/darwinia/src/lib.rs b/runtime/darwinia/src/lib.rs index 00a676bd8..7c48ec06e 100644 --- a/runtime/darwinia/src/lib.rs +++ b/runtime/darwinia/src/lib.rs @@ -172,7 +172,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("Darwinia"), impl_name: create_runtime_str!("Darwinia"), authoring_version: 0, - spec_version: 9, + spec_version: 10, impl_version: 0, #[cfg(not(feature = "disable-runtime-api"))] apis: RUNTIME_API_VERSIONS, From 2564b98ca0b4736e15191b50f6abad51c772a638 Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Wed, 9 Dec 2020 14:52:37 +0800 Subject: [PATCH 08/23] bump: version --- Cargo.lock | 18 +++++++++--------- Cargo.toml | 2 +- cli/Cargo.toml | 2 +- node/service/Cargo.toml | 2 +- primitives/Cargo.toml | 2 +- rpc/Cargo.toml | 2 +- runtime/common/Cargo.toml | 2 +- runtime/crab/Cargo.toml | 2 +- runtime/darwinia/Cargo.toml | 2 +- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a82dce1ea..f14512b49 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -892,7 +892,7 @@ checksum = "dcb25d077389e53838a8158c8e99174c5a9d902dee4904320db714f3c653ffba" [[package]] name = "crab-runtime" -version = "0.8.2" +version = "0.8.3" dependencies = [ "darwinia-balances", "darwinia-balances-rpc-runtime-api", @@ -1229,10 +1229,10 @@ dependencies = [ [[package]] name = "darwinia" -version = "0.8.2" +version = "0.8.3" dependencies = [ "assert_cmd", - "darwinia-cli 0.8.2", + "darwinia-cli 0.8.3", "darwinia-service", "futures 0.3.8", "nix 0.19.1", @@ -1301,7 +1301,7 @@ dependencies = [ [[package]] name = "darwinia-cli" -version = "0.8.2" +version = "0.8.3" dependencies = [ "darwinia-cli 1.2.2", "darwinia-service", @@ -1482,7 +1482,7 @@ dependencies = [ [[package]] name = "darwinia-primitives" -version = "0.8.2" +version = "0.8.3" dependencies = [ "frame-system", "parity-scale-codec", @@ -1534,7 +1534,7 @@ dependencies = [ [[package]] name = "darwinia-rpc" -version = "0.8.2" +version = "0.8.3" dependencies = [ "darwinia-balances-rpc", "darwinia-header-mmr-rpc", @@ -1563,7 +1563,7 @@ dependencies = [ [[package]] name = "darwinia-runtime" -version = "0.8.2" +version = "0.8.3" dependencies = [ "darwinia-balances", "darwinia-balances-rpc-runtime-api", @@ -1634,7 +1634,7 @@ dependencies = [ [[package]] name = "darwinia-runtime-common" -version = "0.8.2" +version = "0.8.3" dependencies = [ "darwinia-balances", "darwinia-primitives", @@ -1652,7 +1652,7 @@ dependencies = [ [[package]] name = "darwinia-service" -version = "0.8.2" +version = "0.8.3" dependencies = [ "array-bytes", "crab-runtime", diff --git a/Cargo.toml b/Cargo.toml index b441af5d0..83da4539e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ homepage = "https://darwinia.network/" license = "GPL-3.0" name = "darwinia" repository = "https://github.com/darwinia-network/darwinia/" -version = "0.8.2" +version = "0.8.3" [[bin]] name = "darwinia" diff --git a/cli/Cargo.toml b/cli/Cargo.toml index c7b6a7f9e..bc5d4b774 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -7,7 +7,7 @@ homepage = "https://darwinia.network/" license = "GPL-3.0" name = "darwinia-cli" repository = "https://github.com/darwinia-network/darwinia/" -version = "0.8.2" +version = "0.8.3" [package.metadata.wasm-pack.profile.release] # `wasm-opt` has some problems on linux, see diff --git a/node/service/Cargo.toml b/node/service/Cargo.toml index c7e13aa77..911d326ab 100644 --- a/node/service/Cargo.toml +++ b/node/service/Cargo.toml @@ -6,7 +6,7 @@ homepage = "https://darwinia.network/" license = "GPL-3.0" name = "darwinia-service" repository = "https://github.com/darwinia-network/darwinia/" -version = "0.8.2" +version = "0.8.3" [dependencies] # crates diff --git a/primitives/Cargo.toml b/primitives/Cargo.toml index bffb7409a..07d4dfc76 100644 --- a/primitives/Cargo.toml +++ b/primitives/Cargo.toml @@ -6,7 +6,7 @@ homepage = "https://darwinia.network/" license = "GPL-3.0" name = "darwinia-primitives" repository = "https://github.com/darwinia-network/darwinia/" -version = "0.8.2" +version = "0.8.3" [dependencies] # crates diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index d040836ab..ee77ad121 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -6,7 +6,7 @@ homepage = "https://darwinia.network/" license = "GPL-3.0" name = "darwinia-rpc" repository = "https://github.com/darwinia-network/darwinia/" -version = "0.8.2" +version = "0.8.3" [dependencies] # crates diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index 9d3cb3d9d..a99def40c 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -6,7 +6,7 @@ homepage = "https://darwinia.network/" license = "GPL-3.0" name = "darwinia-runtime-common" repository = "https://github.com/darwinia-network/darwinia/" -version = "0.8.2" +version = "0.8.3" [dependencies] # crates diff --git a/runtime/crab/Cargo.toml b/runtime/crab/Cargo.toml index 63062bf45..b379fbb1b 100644 --- a/runtime/crab/Cargo.toml +++ b/runtime/crab/Cargo.toml @@ -7,7 +7,7 @@ homepage = "https://darwinia.network/" license = "GPL-3.0" name = "crab-runtime" repository = "https://github.com/darwinia-network/darwinia/" -version = "0.8.2" +version = "0.8.3" [dependencies] # crates diff --git a/runtime/darwinia/Cargo.toml b/runtime/darwinia/Cargo.toml index 33db24acf..f845e256f 100644 --- a/runtime/darwinia/Cargo.toml +++ b/runtime/darwinia/Cargo.toml @@ -7,7 +7,7 @@ homepage = "https://darwinia.network/" license = "GPL-3.0" name = "darwinia-runtime" repository = "https://github.com/darwinia-network/darwinia/" -version = "0.8.2" +version = "0.8.3" [dependencies] # crates From 0417433bf7b56ff8e9728704b5cbd8b835987f4c Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Fri, 11 Dec 2020 00:46:13 +0800 Subject: [PATCH 09/23] bump: drml --- Cargo.lock | 89 +++++++++++++++++++++++++++--------------------------- 1 file changed, 45 insertions(+), 44 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f14512b49..10d520d2c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -162,7 +162,7 @@ checksum = "4d25d88fd6b8041580a654f9d0c581a047baee2b3efee13275f2fc392fc75034" [[package]] name = "array-bytes" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" dependencies = [ "sp-std 2.0.0", ] @@ -852,9 +852,9 @@ dependencies = [ [[package]] name = "const_fn" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c478836e029dcef17fb47c89023448c64f781a046e0300e257ad8225ae59afab" +checksum = "cd51eab21ab4fd6a3bf889e2d0958c0a6e3a61ad04260325e919e652a2a62826" [[package]] name = "constant_time_eq" @@ -1243,7 +1243,7 @@ dependencies = [ [[package]] name = "darwinia-balances" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" dependencies = [ "darwinia-balances-rpc-runtime-api", "darwinia-support", @@ -1258,7 +1258,7 @@ dependencies = [ [[package]] name = "darwinia-balances-rpc" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" dependencies = [ "darwinia-balances-rpc-runtime-api", "jsonrpc-core", @@ -1273,7 +1273,7 @@ dependencies = [ [[package]] name = "darwinia-balances-rpc-runtime-api" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" dependencies = [ "darwinia-support", "parity-scale-codec", @@ -1285,7 +1285,7 @@ dependencies = [ [[package]] name = "darwinia-claims" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" dependencies = [ "array-bytes", "darwinia-support", @@ -1327,7 +1327,7 @@ dependencies = [ [[package]] name = "darwinia-cli" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" dependencies = [ "sc-cli", "sc-client-api", @@ -1340,7 +1340,7 @@ dependencies = [ [[package]] name = "darwinia-crab-backing" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" dependencies = [ "frame-support", "frame-system", @@ -1352,7 +1352,7 @@ dependencies = [ [[package]] name = "darwinia-crab-issuing" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" dependencies = [ "frame-support", "frame-system", @@ -1364,7 +1364,7 @@ dependencies = [ [[package]] name = "darwinia-democracy" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" dependencies = [ "darwinia-support", "frame-support", @@ -1379,7 +1379,7 @@ dependencies = [ [[package]] name = "darwinia-elections-phragmen" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" dependencies = [ "darwinia-support", "frame-support", @@ -1394,7 +1394,7 @@ dependencies = [ [[package]] name = "darwinia-ethereum-backing" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" dependencies = [ "array-bytes", "darwinia-relay-primitives", @@ -1414,7 +1414,7 @@ dependencies = [ [[package]] name = "darwinia-ethereum-relay" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" dependencies = [ "array-bytes", "blake2-rfc", @@ -1438,7 +1438,7 @@ dependencies = [ [[package]] name = "darwinia-header-mmr" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" dependencies = [ "ckb-merkle-mountain-range", "darwinia-header-mmr-rpc-runtime-api", @@ -1455,7 +1455,7 @@ dependencies = [ [[package]] name = "darwinia-header-mmr-rpc" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" dependencies = [ "darwinia-header-mmr-rpc-runtime-api", "jsonrpc-core", @@ -1470,7 +1470,7 @@ dependencies = [ [[package]] name = "darwinia-header-mmr-rpc-runtime-api" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" dependencies = [ "darwinia-support", "parity-scale-codec", @@ -1494,7 +1494,7 @@ dependencies = [ [[package]] name = "darwinia-relay-authorities" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" dependencies = [ "darwinia-relay-primitives", "darwinia-support", @@ -1509,7 +1509,7 @@ dependencies = [ [[package]] name = "darwinia-relay-primitives" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" dependencies = [ "frame-support", "parity-scale-codec", @@ -1520,7 +1520,7 @@ dependencies = [ [[package]] name = "darwinia-relayer-game" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" dependencies = [ "darwinia-relay-primitives", "darwinia-support", @@ -1703,7 +1703,7 @@ dependencies = [ [[package]] name = "darwinia-staking" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" dependencies = [ "darwinia-staking-rpc-runtime-api", "darwinia-support", @@ -1727,7 +1727,7 @@ dependencies = [ [[package]] name = "darwinia-staking-rpc" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" dependencies = [ "darwinia-staking-rpc-runtime-api", "jsonrpc-core", @@ -1742,7 +1742,7 @@ dependencies = [ [[package]] name = "darwinia-staking-rpc-runtime-api" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" dependencies = [ "darwinia-support", "parity-scale-codec", @@ -1754,7 +1754,7 @@ dependencies = [ [[package]] name = "darwinia-support" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" dependencies = [ "ethereum-primitives", "frame-support", @@ -1768,7 +1768,7 @@ dependencies = [ [[package]] name = "darwinia-treasury" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" dependencies = [ "darwinia-support", "frame-support", @@ -1782,7 +1782,7 @@ dependencies = [ [[package]] name = "darwinia-tron-backing" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" dependencies = [ "frame-support", "frame-system", @@ -1794,7 +1794,7 @@ dependencies = [ [[package]] name = "darwinia-vesting" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" dependencies = [ "darwinia-support", "enumflags2", @@ -2051,7 +2051,7 @@ dependencies = [ [[package]] name = "ethereum-primitives" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" dependencies = [ "array-bytes", "ethash", @@ -2784,7 +2784,7 @@ dependencies = [ "http 0.2.1", "indexmap", "slab", - "tokio 0.2.23", + "tokio 0.2.24", "tokio-util", "tracing", "tracing-futures", @@ -3014,7 +3014,7 @@ dependencies = [ "itoa", "pin-project 1.0.2", "socket2", - "tokio 0.2.23", + "tokio 0.2.24", "tower-service", "tracing", "want 0.3.0", @@ -3033,7 +3033,7 @@ dependencies = [ "log", "rustls", "rustls-native-certs", - "tokio 0.2.23", + "tokio 0.2.24", "tokio-rustls", "webpki", ] @@ -4139,7 +4139,7 @@ checksum = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" [[package]] name = "merkle-patricia-trie" version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#8f9f7c4ca326569379b88c621bb4693680a73f2d" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" dependencies = [ "hashbrown 0.9.1", "keccak-hash", @@ -4344,9 +4344,9 @@ dependencies = [ [[package]] name = "net2" -version = "0.2.36" +version = "0.2.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7cf75f38f16cb05ea017784dc6dbfd354f76c223dba37701734c4f5a9337d02" +checksum = "391630d12b68002ae1e25e8f974306474966550ad82dac6886fb8910c19568ae" dependencies = [ "cfg-if 0.1.10", "libc", @@ -5320,10 +5320,11 @@ dependencies = [ [[package]] name = "poly1305" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ce46de8e53ee414ca4d02bfefac75d8c12fba948b76622a40b4be34dfce980" +checksum = "4b7456bc1ad2d4cf82b3a016be4c2ac48daf11bf990c1603ebd447fe6f30fca8" dependencies = [ + "cpuid-bool 0.2.0", "universal-hash", ] @@ -6204,7 +6205,7 @@ dependencies = [ "structopt", "substrate-prometheus-endpoint", "time", - "tokio 0.2.23", + "tokio 0.2.24", "tracing", "tracing-log", "tracing-subscriber", @@ -8137,7 +8138,7 @@ dependencies = [ "hyper 0.13.9", "log", "prometheus", - "tokio 0.2.23", + "tokio 0.2.24", ] [[package]] @@ -8348,9 +8349,9 @@ dependencies = [ [[package]] name = "tokio" -version = "0.2.23" +version = "0.2.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6d7ad61edd59bfcc7e80dababf0f4aed2e6d5e0ba1659356ae889752dfc12ff" +checksum = "099837d3464c16a808060bb3f02263b412f6fafcb5d01c533d309985fbeebe48" dependencies = [ "bytes 0.5.6", "fnv", @@ -8495,7 +8496,7 @@ checksum = "e12831b255bcfa39dc0436b01e19fea231a37db570686c06ee72c423479f889a" dependencies = [ "futures-core", "rustls", - "tokio 0.2.23", + "tokio 0.2.24", "webpki", ] @@ -8616,7 +8617,7 @@ dependencies = [ "futures-sink", "log", "pin-project-lite 0.1.11", - "tokio 0.2.23", + "tokio 0.2.24", ] [[package]] @@ -9414,9 +9415,9 @@ dependencies = [ [[package]] name = "zeroize" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f33972566adbd2d3588b0491eb94b98b43695c4ef897903470ede4f3f5a28a" +checksum = "81a974bcdd357f0dca4d41677db03436324d45a4c9ed2d0b873a5a360ce41c36" dependencies = [ "zeroize_derive", ] From d1dc15125f51a751999b400f8d86aa673fb8a92a Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Fri, 11 Dec 2020 15:21:28 +0800 Subject: [PATCH 10/23] add: migration --- runtime/crab/src/lib.rs | 22 +++++++++++++++------- runtime/darwinia/src/lib.rs | 25 +++++++++++++++---------- 2 files changed, 30 insertions(+), 17 deletions(-) diff --git a/runtime/crab/src/lib.rs b/runtime/crab/src/lib.rs index e985d91b9..b3c93bc34 100644 --- a/runtime/crab/src/lib.rs +++ b/runtime/crab/src/lib.rs @@ -125,7 +125,7 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllModules, - // CustomOnRuntimeUpgrade, + CustomOnRuntimeUpgrade, >; /// The payload being signed in transactions. pub type SignedPayload = generic::SignedPayload; @@ -1312,9 +1312,17 @@ impl_runtime_apis! { } } -// pub struct CustomOnRuntimeUpgrade; -// impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade { -// fn on_runtime_upgrade() -> frame_support::weights::Weight { -// ::MaximumBlockWeight::get() -// } -// } +pub struct CustomOnRuntimeUpgrade; +impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade { + fn on_runtime_upgrade() -> frame_support::weights::Weight { + // --- substrate --- + use frame_support::{migration::*, traits::Currency}; + + Ring::make_free_balance_be( + &>::fee_account_id(), + Ring::minimum_balance(), + ); + + ::MaximumBlockWeight::get() + } +} diff --git a/runtime/darwinia/src/lib.rs b/runtime/darwinia/src/lib.rs index 7c48ec06e..de929d255 100644 --- a/runtime/darwinia/src/lib.rs +++ b/runtime/darwinia/src/lib.rs @@ -108,7 +108,7 @@ use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, traits::{ BlakeTwo256, Block as BlockT, ConvertInto, Extrinsic as ExtrinsicT, IdentityLookup, - NumberFor, OpaqueKeys, SaturatedConversion, Verify + NumberFor, OpaqueKeys, SaturatedConversion, Verify, }, transaction_validity::{TransactionPriority, TransactionSource, TransactionValidity}, ApplyExtrinsicResult, KeyTypeId, ModuleId, Perbill, Percent, Permill, RuntimeDebug, @@ -160,7 +160,7 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllModules, - // CustomOnRuntimeUpgrade, + CustomOnRuntimeUpgrade, >; /// The payload being signed in transactions. pub type SignedPayload = generic::SignedPayload; @@ -1281,12 +1281,17 @@ impl_runtime_apis! { } } -// pub struct CustomOnRuntimeUpgrade; -// impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade { -// fn on_runtime_upgrade() -> frame_support::weights::Weight { -// // --- substrate --- -// use frame_support::migration::*; +pub struct CustomOnRuntimeUpgrade; +impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade { + fn on_runtime_upgrade() -> frame_support::weights::Weight { + // --- substrate --- + use frame_support::{migration::*, traits::Currency}; -// ::MaximumBlockWeight::get() -// } -// } + Ring::make_free_balance_be( + &>::fee_account_id(), + Ring::minimum_balance(), + ); + + ::MaximumBlockWeight::get() + } +} From 8c0a2490d6afe2b9a4251f3377b43950366bb33d Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Mon, 14 Dec 2020 14:30:34 +0800 Subject: [PATCH 11/23] add: genesis authorities --- Cargo.lock | 139 ++++++++++++++++++------------------ runtime/crab/src/lib.rs | 32 +++++++++ runtime/darwinia/Cargo.toml | 2 + runtime/darwinia/src/lib.rs | 31 ++++++++ 4 files changed, 135 insertions(+), 69 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 10d520d2c..508eb86c8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -96,9 +96,9 @@ checksum = "e8fd72866655d1904d6b0997d0b07ba561047d070fbe29de039031c641b61217" [[package]] name = "ahash" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6789e291be47ace86a60303502173d84af8327e3627ecf334356ee0f87a164c" +checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e" [[package]] name = "aho-corasick" @@ -155,14 +155,14 @@ dependencies = [ [[package]] name = "arc-swap" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d25d88fd6b8041580a654f9d0c581a047baee2b3efee13275f2fc392fc75034" +checksum = "dabe5a181f83789739c194cbe5a897dde195078fac08568d09221fd6137a7ba8" [[package]] name = "array-bytes" -version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" +version = "1.2.3" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" dependencies = [ "sp-std 2.0.0", ] @@ -1242,8 +1242,8 @@ dependencies = [ [[package]] name = "darwinia-balances" -version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" +version = "1.2.3" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" dependencies = [ "darwinia-balances-rpc-runtime-api", "darwinia-support", @@ -1257,8 +1257,8 @@ dependencies = [ [[package]] name = "darwinia-balances-rpc" -version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" +version = "1.2.3" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" dependencies = [ "darwinia-balances-rpc-runtime-api", "jsonrpc-core", @@ -1272,8 +1272,8 @@ dependencies = [ [[package]] name = "darwinia-balances-rpc-runtime-api" -version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" +version = "1.2.3" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" dependencies = [ "darwinia-support", "parity-scale-codec", @@ -1284,8 +1284,8 @@ dependencies = [ [[package]] name = "darwinia-claims" -version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" +version = "1.2.3" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" dependencies = [ "array-bytes", "darwinia-support", @@ -1303,7 +1303,7 @@ dependencies = [ name = "darwinia-cli" version = "0.8.3" dependencies = [ - "darwinia-cli 1.2.2", + "darwinia-cli 1.2.3", "darwinia-service", "log", "sc-cli", @@ -1326,8 +1326,8 @@ dependencies = [ [[package]] name = "darwinia-cli" -version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" +version = "1.2.3" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" dependencies = [ "sc-cli", "sc-client-api", @@ -1339,8 +1339,8 @@ dependencies = [ [[package]] name = "darwinia-crab-backing" -version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" +version = "1.2.3" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" dependencies = [ "frame-support", "frame-system", @@ -1351,8 +1351,8 @@ dependencies = [ [[package]] name = "darwinia-crab-issuing" -version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" +version = "1.2.3" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" dependencies = [ "frame-support", "frame-system", @@ -1363,8 +1363,8 @@ dependencies = [ [[package]] name = "darwinia-democracy" -version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" +version = "1.2.3" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" dependencies = [ "darwinia-support", "frame-support", @@ -1378,8 +1378,8 @@ dependencies = [ [[package]] name = "darwinia-elections-phragmen" -version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" +version = "1.2.3" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" dependencies = [ "darwinia-support", "frame-support", @@ -1393,8 +1393,8 @@ dependencies = [ [[package]] name = "darwinia-ethereum-backing" -version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" +version = "1.2.3" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" dependencies = [ "array-bytes", "darwinia-relay-primitives", @@ -1413,8 +1413,8 @@ dependencies = [ [[package]] name = "darwinia-ethereum-relay" -version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" +version = "1.2.3" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" dependencies = [ "array-bytes", "blake2-rfc", @@ -1437,8 +1437,8 @@ dependencies = [ [[package]] name = "darwinia-header-mmr" -version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" +version = "1.2.3" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" dependencies = [ "ckb-merkle-mountain-range", "darwinia-header-mmr-rpc-runtime-api", @@ -1454,8 +1454,8 @@ dependencies = [ [[package]] name = "darwinia-header-mmr-rpc" -version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" +version = "1.2.3" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" dependencies = [ "darwinia-header-mmr-rpc-runtime-api", "jsonrpc-core", @@ -1469,8 +1469,8 @@ dependencies = [ [[package]] name = "darwinia-header-mmr-rpc-runtime-api" -version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" +version = "1.2.3" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" dependencies = [ "darwinia-support", "parity-scale-codec", @@ -1493,8 +1493,8 @@ dependencies = [ [[package]] name = "darwinia-relay-authorities" -version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" +version = "1.2.3" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" dependencies = [ "darwinia-relay-primitives", "darwinia-support", @@ -1508,8 +1508,8 @@ dependencies = [ [[package]] name = "darwinia-relay-primitives" -version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" +version = "1.2.3" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" dependencies = [ "frame-support", "parity-scale-codec", @@ -1519,8 +1519,8 @@ dependencies = [ [[package]] name = "darwinia-relayer-game" -version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" +version = "1.2.3" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" dependencies = [ "darwinia-relay-primitives", "darwinia-support", @@ -1565,6 +1565,7 @@ dependencies = [ name = "darwinia-runtime" version = "0.8.3" dependencies = [ + "array-bytes", "darwinia-balances", "darwinia-balances-rpc-runtime-api", "darwinia-crab-backing", @@ -1702,8 +1703,8 @@ dependencies = [ [[package]] name = "darwinia-staking" -version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" +version = "1.2.3" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" dependencies = [ "darwinia-staking-rpc-runtime-api", "darwinia-support", @@ -1726,8 +1727,8 @@ dependencies = [ [[package]] name = "darwinia-staking-rpc" -version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" +version = "1.2.3" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" dependencies = [ "darwinia-staking-rpc-runtime-api", "jsonrpc-core", @@ -1741,8 +1742,8 @@ dependencies = [ [[package]] name = "darwinia-staking-rpc-runtime-api" -version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" +version = "1.2.3" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" dependencies = [ "darwinia-support", "parity-scale-codec", @@ -1753,8 +1754,8 @@ dependencies = [ [[package]] name = "darwinia-support" -version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" +version = "1.2.3" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" dependencies = [ "ethereum-primitives", "frame-support", @@ -1767,8 +1768,8 @@ dependencies = [ [[package]] name = "darwinia-treasury" -version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" +version = "1.2.3" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" dependencies = [ "darwinia-support", "frame-support", @@ -1781,8 +1782,8 @@ dependencies = [ [[package]] name = "darwinia-tron-backing" -version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" +version = "1.2.3" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" dependencies = [ "frame-support", "frame-system", @@ -1793,8 +1794,8 @@ dependencies = [ [[package]] name = "darwinia-vesting" -version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" +version = "1.2.3" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" dependencies = [ "darwinia-support", "enumflags2", @@ -2050,8 +2051,8 @@ dependencies = [ [[package]] name = "ethereum-primitives" -version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" +version = "1.2.3" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" dependencies = [ "array-bytes", "ethash", @@ -2841,7 +2842,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" dependencies = [ - "ahash 0.4.6", + "ahash 0.4.7", ] [[package]] @@ -3809,7 +3810,7 @@ dependencies = [ "libp2p-core", "libp2p-swarm", "log", - "lru 0.6.1", + "lru 0.6.2", "minicbor", "rand 0.7.3", "smallvec 1.5.1", @@ -4033,9 +4034,9 @@ dependencies = [ [[package]] name = "lru" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be716eb6878ca2263eb5d00a781aa13264a794f519fe6af4fbb2668b2d5441c0" +checksum = "3abe07af102235a56ac9a6dd904aab1e05483e2e8afdfffec3598be55b1b7606" dependencies = [ "hashbrown 0.9.1", ] @@ -4138,8 +4139,8 @@ checksum = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" [[package]] name = "merkle-patricia-trie" -version = "1.2.2" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#612a37f1294fc0341b53a083207caa2779f99857" +version = "1.2.3" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" dependencies = [ "hashbrown 0.9.1", "keccak-hash", @@ -8903,9 +8904,9 @@ dependencies = [ [[package]] name = "vcpkg" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6454029bf181f092ad1b853286f23e2c507d8e8194d01d92da4a55c274a5508c" +checksum = "b00bca6106a5e23f3eee943593759b7fcddb00554332e856d990c893966879fb" [[package]] name = "vec-arena" @@ -9252,18 +9253,18 @@ dependencies = [ [[package]] name = "wast" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c0586061bfacc035034672c8d760802b428ab4c80a92e2a392425c516df9be1" +checksum = "dcf2268937131d63c3d833242bf5e075406f9ed868b4265f3280e15dac29ac18" dependencies = [ "leb128", ] [[package]] name = "wat" -version = "1.0.29" +version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d55b5ec4f9d9396fa99abaafa0688597395e57827dffd89731412ae90c9bf" +checksum = "0d11a88d953b298172d218d18f22853f4e6e12873b62755d05617b864d312c68" dependencies = [ "wast", ] diff --git a/runtime/crab/src/lib.rs b/runtime/crab/src/lib.rs index b3c93bc34..a6dccfbc3 100644 --- a/runtime/crab/src/lib.rs +++ b/runtime/crab/src/lib.rs @@ -1317,12 +1317,44 @@ impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade { fn on_runtime_upgrade() -> frame_support::weights::Weight { // --- substrate --- use frame_support::{migration::*, traits::Currency}; + // --- darwinia --- + use array_bytes::fixed_hex_bytes_unchecked; + use darwinia_support::balance::lock::{LockFor, LockableCurrency, WithdrawReasons}; Ring::make_free_balance_be( &>::fee_account_id(), Ring::minimum_balance(), ); + // @wuminzhe + let account_id = fixed_hex_bytes_unchecked!( + "0x129f002b1c0787ea72c31b2dc986e66911fe1b4d6dc16f83a1127f33e5a74c7d", + 32 + ) + .into(); + // @wuminzhe + let signer = fixed_hex_bytes_unchecked!("0x9a2976dB293C04Bc36acC39122aAd33CC00f62a8", 20); + let stake = 1; + + Ring::set_lock( + EthereumRelayAuthoritiesLockId::get(), + &account_id, + LockFor::Common { amount: stake }, + WithdrawReasons::all(), + ); + + put_storage_value( + b"Instance0DarwiniaRelayAuthorities", + b"Authorities", + &[], + vec![RelayAuthority { + account_id, + signer, + stake, + term: System::block_number() + EthereumRelayAuthoritiesTermDuration::get(), + }], + ); + ::MaximumBlockWeight::get() } } diff --git a/runtime/darwinia/Cargo.toml b/runtime/darwinia/Cargo.toml index f845e256f..4f075b584 100644 --- a/runtime/darwinia/Cargo.toml +++ b/runtime/darwinia/Cargo.toml @@ -35,6 +35,7 @@ darwinia-treasury = { default-features = false, git = "https:/ darwinia-tron-backing = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } darwinia-vesting = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } # darwinia primitives +array-bytes = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } darwinia-primitives = { default-features = false, path = "../../primitives" } ethereum-primitives = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } # darwinia runtime @@ -91,6 +92,7 @@ std = [ "codec/std", "serde", "serde_json", + "array-bytes/std", "darwinia-balances/std", "darwinia-balances-rpc-runtime-api/std", "darwinia-crab-backing/std", diff --git a/runtime/darwinia/src/lib.rs b/runtime/darwinia/src/lib.rs index de929d255..70ad68234 100644 --- a/runtime/darwinia/src/lib.rs +++ b/runtime/darwinia/src/lib.rs @@ -1286,12 +1286,43 @@ impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade { fn on_runtime_upgrade() -> frame_support::weights::Weight { // --- substrate --- use frame_support::{migration::*, traits::Currency}; + // --- darwinia --- + use array_bytes::fixed_hex_bytes_unchecked; + use darwinia_support::balance::lock::{LockFor, LockableCurrency, WithdrawReasons}; Ring::make_free_balance_be( &>::fee_account_id(), Ring::minimum_balance(), ); + // TODO: https://github.com/darwinia-network/darwinia/issues/589 + let account_id = fixed_hex_bytes_unchecked!( + "0x129f002b1c0787ea72c31b2dc986e66911fe1b4d6dc16f83a1127f33e5a74c7d", + 32 + ) + .into(); + let signer = fixed_hex_bytes_unchecked!("0x9a2976dB293C04Bc36acC39122aAd33CC00f62a8", 20); + let stake = 1; + + Ring::set_lock( + EthereumRelayAuthoritiesLockId::get(), + &account_id, + LockFor::Common { amount: stake }, + WithdrawReasons::all(), + ); + + put_storage_value( + b"Instance0DarwiniaRelayAuthorities", + b"Authorities", + &[], + vec![RelayAuthority { + account_id, + signer, + stake, + term: System::block_number() + EthereumRelayAuthoritiesTermDuration::get(), + }], + ); + ::MaximumBlockWeight::get() } } From 4ce5a312fb047ab6ecbbb8a7ce0d0e5f7f8ff150 Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Mon, 14 Dec 2020 14:30:50 +0800 Subject: [PATCH 12/23] add: proxy --- runtime/crab/src/lib.rs | 9 ++++++--- runtime/darwinia/src/lib.rs | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/runtime/crab/src/lib.rs b/runtime/crab/src/lib.rs index a6dccfbc3..f87b5206d 100644 --- a/runtime/crab/src/lib.rs +++ b/runtime/crab/src/lib.rs @@ -806,9 +806,12 @@ impl InstanceFilter for ProxyType { Call::Identity(pallet_identity::Call::provide_judgement(..)) | Call::Utility(pallet_utility::Call::batch(..)) ), - ProxyType::EthereumBridge => { - matches!(c, Call::EthereumBacking(..) | Call::EthereumRelay(..)) - } + ProxyType::EthereumBridge => matches!( + c, + Call::EthereumBacking(..) + | Call::EthereumRelay(..) + | Call::EthereumRelayAuthorities(..) + ), } } fn is_superset(&self, o: &Self) -> bool { diff --git a/runtime/darwinia/src/lib.rs b/runtime/darwinia/src/lib.rs index 70ad68234..4c1c0db1c 100644 --- a/runtime/darwinia/src/lib.rs +++ b/runtime/darwinia/src/lib.rs @@ -774,9 +774,12 @@ impl InstanceFilter for ProxyType { Call::Identity(pallet_identity::Call::provide_judgement(..)) | Call::Utility(pallet_utility::Call::batch(..)) ), - ProxyType::EthereumBridge => { - matches!(c, Call::EthereumBacking(..) | Call::EthereumRelay(..)) - } + ProxyType::EthereumBridge => matches!( + c, + Call::EthereumBacking(..) + | Call::EthereumRelay(..) + | Call::EthereumRelayAuthorities(..) + ), } } fn is_superset(&self, o: &Self) -> bool { From 7907efcc2246404c0e0e3b720d924ca02c370a90 Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Mon, 14 Dec 2020 14:33:43 +0800 Subject: [PATCH 13/23] fix: import --- runtime/crab/src/lib.rs | 1 + runtime/darwinia/src/lib.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/runtime/crab/src/lib.rs b/runtime/crab/src/lib.rs index f87b5206d..24f05f9a6 100644 --- a/runtime/crab/src/lib.rs +++ b/runtime/crab/src/lib.rs @@ -1322,6 +1322,7 @@ impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade { use frame_support::{migration::*, traits::Currency}; // --- darwinia --- use array_bytes::fixed_hex_bytes_unchecked; + use darwinia_relay_primitives::relay_authorities::RelayAuthority; use darwinia_support::balance::lock::{LockFor, LockableCurrency, WithdrawReasons}; Ring::make_free_balance_be( diff --git a/runtime/darwinia/src/lib.rs b/runtime/darwinia/src/lib.rs index 4c1c0db1c..5b35a7dad 100644 --- a/runtime/darwinia/src/lib.rs +++ b/runtime/darwinia/src/lib.rs @@ -1291,6 +1291,7 @@ impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade { use frame_support::{migration::*, traits::Currency}; // --- darwinia --- use array_bytes::fixed_hex_bytes_unchecked; + use darwinia_relay_primitives::relay_authorities::RelayAuthority; use darwinia_support::balance::lock::{LockFor, LockableCurrency, WithdrawReasons}; Ring::make_free_balance_be( From 9084605dcce4e12112692c7420b4f211a0e2e17f Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Mon, 14 Dec 2020 14:35:21 +0800 Subject: [PATCH 14/23] fix: denpendency --- Cargo.lock | 1 + runtime/crab/Cargo.toml | 2 ++ runtime/darwinia/Cargo.toml | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 508eb86c8..a5b06efea 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -894,6 +894,7 @@ checksum = "dcb25d077389e53838a8158c8e99174c5a9d902dee4904320db714f3c653ffba" name = "crab-runtime" version = "0.8.3" dependencies = [ + "array-bytes", "darwinia-balances", "darwinia-balances-rpc-runtime-api", "darwinia-claims", diff --git a/runtime/crab/Cargo.toml b/runtime/crab/Cargo.toml index b379fbb1b..6c7d24cb2 100644 --- a/runtime/crab/Cargo.toml +++ b/runtime/crab/Cargo.toml @@ -34,6 +34,7 @@ darwinia-staking-rpc-runtime-api = { default-features = false, git = "https:/ darwinia-support = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } darwinia-treasury = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } # darwinia primitives +array-bytes = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } darwinia-primitives = { default-features = false, path = "../../primitives" } ethereum-primitives = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } # darwinia runtime @@ -108,6 +109,7 @@ std = [ "darwinia-staking-rpc-runtime-api/std", "darwinia-support/std", "darwinia-treasury/std", + "array-bytes/std", "darwinia-primitives/std", "darwinia-runtime-common/std", "frame-executive/std", diff --git a/runtime/darwinia/Cargo.toml b/runtime/darwinia/Cargo.toml index 4f075b584..a51be8024 100644 --- a/runtime/darwinia/Cargo.toml +++ b/runtime/darwinia/Cargo.toml @@ -92,7 +92,6 @@ std = [ "codec/std", "serde", "serde_json", - "array-bytes/std", "darwinia-balances/std", "darwinia-balances-rpc-runtime-api/std", "darwinia-crab-backing/std", @@ -110,6 +109,7 @@ std = [ "darwinia-treasury/std", "darwinia-tron-backing/std", "darwinia-vesting/std", + "array-bytes/std", "darwinia-primitives/std", "darwinia-runtime-common/std", "frame-executive/std", From 402bcc71c7cceaa25467ad07274a0dc647523116 Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Mon, 14 Dec 2020 16:56:19 +0800 Subject: [PATCH 15/23] update: types --- runtime/crab/polkadot-compatible-types.json | 3 ++- runtime/crab/types.json | 3 ++- runtime/darwinia/polkadot-compatible-types.json | 3 ++- runtime/darwinia/types.json | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/runtime/crab/polkadot-compatible-types.json b/runtime/crab/polkadot-compatible-types.json index 00402327e..01d705588 100644 --- a/runtime/crab/polkadot-compatible-types.json +++ b/runtime/crab/polkadot-compatible-types.json @@ -139,6 +139,7 @@ "hash": "Option" }, "EthereumAddress": "H160", + "EcdsaAddress": "[u8; 20; EcdsaAddress]", "Bloom": "[u8; 256; Bloom]", "H128": "[u8; 16; H128]", "EthashProof": { @@ -183,7 +184,7 @@ "mmr_proof": "Vec" }, "__[TODO.Generalize]__": "", - "Signer": "[u8; 20; EcdsaAddress]", + "Signer": "EcdsaAddress", "__[pallet.claims]__": {}, "OtherSignature": { "_enum": { diff --git a/runtime/crab/types.json b/runtime/crab/types.json index f4343c39c..84e0906dd 100644 --- a/runtime/crab/types.json +++ b/runtime/crab/types.json @@ -131,6 +131,7 @@ "hash": "Option" }, "EthereumAddress": "H160", + "EcdsaAddress": "[u8; 20; EcdsaAddress]", "Bloom": "[u8; 256; Bloom]", "H128": "[u8; 16; H128]", "EthashProof": { @@ -175,7 +176,7 @@ "mmr_proof": "Vec" }, "__[TODO.Generalize]__": "", - "Signer": "[u8; 20; EcdsaAddress]", + "Signer": "EcdsaAddress", "__[pallet.claims]__": {}, "OtherSignature": { "_enum": { diff --git a/runtime/darwinia/polkadot-compatible-types.json b/runtime/darwinia/polkadot-compatible-types.json index a2fa6c253..6f719a87f 100644 --- a/runtime/darwinia/polkadot-compatible-types.json +++ b/runtime/darwinia/polkadot-compatible-types.json @@ -139,6 +139,7 @@ "hash": "Option" }, "EthereumAddress": "H160", + "EcdsaAddress": "[u8; 20; EcdsaAddress]", "Bloom": "[u8; 256; Bloom]", "H128": "[u8; 16; H128]", "EthashProof": { @@ -183,7 +184,7 @@ "mmr_proof": "Vec" }, "__[TODO.Generalize]__": "", - "Signer": "[u8; 20; EcdsaAddress]", + "Signer": "EcdsaAddress", "__[pallet.header-mmr]__": {}, "MerkleMountainRangeRootLog": { "prefix": "[u8; 4; Prefix]", diff --git a/runtime/darwinia/types.json b/runtime/darwinia/types.json index 99f8f646a..d2703a42b 100644 --- a/runtime/darwinia/types.json +++ b/runtime/darwinia/types.json @@ -131,6 +131,7 @@ "hash": "Option" }, "EthereumAddress": "H160", + "EcdsaAddress": "[u8; 20; EcdsaAddress]", "Bloom": "[u8; 256; Bloom]", "H128": "[u8; 16; H128]", "EthashProof": { @@ -175,7 +176,7 @@ "mmr_proof": "Vec" }, "__[TODO.Generalize]__": "", - "Signer": "[u8; 20; EcdsaAddress]", + "Signer": "EcdsaAddress", "__[pallet.header-mmr]__": {}, "MerkleMountainRangeRootLog": { "prefix": "[u8; 4; Prefix]", From 5adcd28f8d703ba77a3a0428e65139628ac938c4 Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Mon, 14 Dec 2020 16:58:53 +0800 Subject: [PATCH 16/23] update: doc --- runtime/crab/src/lib.rs | 1 + runtime/darwinia/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime/crab/src/lib.rs b/runtime/crab/src/lib.rs index 24f05f9a6..cca6cd8aa 100644 --- a/runtime/crab/src/lib.rs +++ b/runtime/crab/src/lib.rs @@ -792,6 +792,7 @@ impl InstanceFilter for ProxyType { // Specifically omitting the entire EthereumBacking pallet Call::EthereumRelay(..) | Call::HeaderMMR(..) // Specifically omitting the entire CrabIssuing pallet + // Specifically omitting the entire EthereumRelayAuthorities pallet ), ProxyType::Governance => matches!( c, diff --git a/runtime/darwinia/src/lib.rs b/runtime/darwinia/src/lib.rs index 5b35a7dad..57df4fe17 100644 --- a/runtime/darwinia/src/lib.rs +++ b/runtime/darwinia/src/lib.rs @@ -759,7 +759,7 @@ impl InstanceFilter for ProxyType { // Specifically omitting the entire EthereumBacking pallet Call::EthereumRelay(..) | // Specifically omitting the entire TronBacking pallet - Call::HeaderMMR(..) + Call::HeaderMMR(..) // Specifically omitting the entire EthereumRelayAuthorities pallet ), ProxyType::Governance => matches!( c, From 7ceb0583d5da3f64ba510f9371e5612c73eb0581 Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Wed, 30 Dec 2020 01:39:33 +0800 Subject: [PATCH 17/23] chore(types): update --- runtime/crab/polkadot-compatible-types.json | 6 ++++-- runtime/crab/types.json | 9 ++++++--- runtime/darwinia/polkadot-compatible-types.json | 9 ++++++--- runtime/darwinia/types.json | 6 ++++-- 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/runtime/crab/polkadot-compatible-types.json b/runtime/crab/polkadot-compatible-types.json index 01d705588..e73eb7a7d 100644 --- a/runtime/crab/polkadot-compatible-types.json +++ b/runtime/crab/polkadot-compatible-types.json @@ -139,7 +139,7 @@ "hash": "Option" }, "EthereumAddress": "H160", - "EcdsaAddress": "[u8; 20; EcdsaAddress]", + "EcdsaMessage": "[u8; 32; EcdsaMessage]", "Bloom": "[u8; 256; Bloom]", "H128": "[u8; 16; H128]", "EthashProof": { @@ -184,7 +184,9 @@ "mmr_proof": "Vec" }, "__[TODO.Generalize]__": "", - "Signer": "EcdsaAddress", + "RelayAuthoritySigner": "EcdsaAddress", + "RelayAuthorityMessage": "EcdsaMessage", + "RelayAuthoritySignature": "EcdsaSignature", "__[pallet.claims]__": {}, "OtherSignature": { "_enum": { diff --git a/runtime/crab/types.json b/runtime/crab/types.json index 84e0906dd..23859acdb 100644 --- a/runtime/crab/types.json +++ b/runtime/crab/types.json @@ -131,7 +131,7 @@ "hash": "Option" }, "EthereumAddress": "H160", - "EcdsaAddress": "[u8; 20; EcdsaAddress]", + "EcdsaMessage": "[u8; 32; EcdsaMessage]", "Bloom": "[u8; 256; Bloom]", "H128": "[u8; 16; H128]", "EthashProof": { @@ -176,7 +176,9 @@ "mmr_proof": "Vec" }, "__[TODO.Generalize]__": "", - "Signer": "EcdsaAddress", + "RelayAuthoritySigner": "EthereumAddress", + "RelayAuthorityMessage": "EcdsaMessage", + "RelayAuthoritySignature": "EcdsaSignature", "__[pallet.claims]__": {}, "OtherSignature": { "_enum": { @@ -197,7 +199,8 @@ "prefix": "[u8; 4; Prefix]", "parent_mmr_root": "Hash" }, - "__[pallet.relayer-game]__": {}, + "__[primitives.relay]__": {}, + "Term": "u32", "RelayHeaderId": "EthereumBlockNumber", "RelayHeaderParcel": "EthereumRelayHeaderParcel", "RelayProofs": "EthereumRelayProofs", diff --git a/runtime/darwinia/polkadot-compatible-types.json b/runtime/darwinia/polkadot-compatible-types.json index 6f719a87f..10f4542ff 100644 --- a/runtime/darwinia/polkadot-compatible-types.json +++ b/runtime/darwinia/polkadot-compatible-types.json @@ -139,7 +139,7 @@ "hash": "Option" }, "EthereumAddress": "H160", - "EcdsaAddress": "[u8; 20; EcdsaAddress]", + "EcdsaMessage": "[u8; 32; EcdsaMessage]", "Bloom": "[u8; 256; Bloom]", "H128": "[u8; 16; H128]", "EthashProof": { @@ -184,13 +184,16 @@ "mmr_proof": "Vec" }, "__[TODO.Generalize]__": "", - "Signer": "EcdsaAddress", + "RelayAuthoritySigner": "EthereumAddress", + "RelayAuthorityMessage": "EcdsaMessage", + "RelayAuthoritySignature": "EcdsaSignature", "__[pallet.header-mmr]__": {}, "MerkleMountainRangeRootLog": { "prefix": "[u8; 4; Prefix]", "parent_mmr_root": "Hash" }, - "__[pallet.relayer-game]__": {}, + "__[primitives.relay]__": {}, + "Term": "u32", "RelayHeaderId": "EthereumBlockNumber", "RelayHeaderParcel": "EthereumRelayHeaderParcel", "RelayProofs": "EthereumRelayProofs", diff --git a/runtime/darwinia/types.json b/runtime/darwinia/types.json index d2703a42b..1b1d06335 100644 --- a/runtime/darwinia/types.json +++ b/runtime/darwinia/types.json @@ -131,7 +131,7 @@ "hash": "Option" }, "EthereumAddress": "H160", - "EcdsaAddress": "[u8; 20; EcdsaAddress]", + "EcdsaMessage": "[u8; 32; EcdsaMessage]", "Bloom": "[u8; 256; Bloom]", "H128": "[u8; 16; H128]", "EthashProof": { @@ -176,7 +176,9 @@ "mmr_proof": "Vec" }, "__[TODO.Generalize]__": "", - "Signer": "EcdsaAddress", + "RelayAuthoritySigner": "EcdsaAddress", + "RelayAuthorityMessage": "EcdsaMessage", + "RelayAuthoritySignature": "EcdsaSignature", "__[pallet.header-mmr]__": {}, "MerkleMountainRangeRootLog": { "prefix": "[u8; 4; Prefix]", From 09ec5a824a5d6b4d37ff2c223084bdeb40cf8a1d Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Wed, 30 Dec 2020 01:51:38 +0800 Subject: [PATCH 18/23] feat(runtime migration): add --- runtime/crab/src/lib.rs | 6 ++++++ runtime/darwinia/src/lib.rs | 10 +++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/runtime/crab/src/lib.rs b/runtime/crab/src/lib.rs index cca6cd8aa..24eaad7cb 100644 --- a/runtime/crab/src/lib.rs +++ b/runtime/crab/src/lib.rs @@ -1359,6 +1359,12 @@ impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade { term: System::block_number() + EthereumRelayAuthoritiesTermDuration::get(), }], ); + put_storage_value( + b"DarwiniaEthereumBacking", + b"SetAuthoritiesAddress", + &[], + array_bytes::hex_str_array_unchecked!("0xE4A2892599Ad9527D76Ce6E26F93620FA7396D85", 20), + ); ::MaximumBlockWeight::get() } diff --git a/runtime/darwinia/src/lib.rs b/runtime/darwinia/src/lib.rs index 57df4fe17..cb8e3beee 100644 --- a/runtime/darwinia/src/lib.rs +++ b/runtime/darwinia/src/lib.rs @@ -1284,6 +1284,7 @@ impl_runtime_apis! { } } +// TODO: https://github.com/darwinia-network/darwinia/issues/592 pub struct CustomOnRuntimeUpgrade; impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade { fn on_runtime_upgrade() -> frame_support::weights::Weight { @@ -1299,12 +1300,13 @@ impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade { Ring::minimum_balance(), ); - // TODO: https://github.com/darwinia-network/darwinia/issues/589 + // @wuminzhe let account_id = fixed_hex_bytes_unchecked!( "0x129f002b1c0787ea72c31b2dc986e66911fe1b4d6dc16f83a1127f33e5a74c7d", 32 ) .into(); + // @wuminzhe let signer = fixed_hex_bytes_unchecked!("0x9a2976dB293C04Bc36acC39122aAd33CC00f62a8", 20); let stake = 1; @@ -1326,6 +1328,12 @@ impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade { term: System::block_number() + EthereumRelayAuthoritiesTermDuration::get(), }], ); + put_storage_value( + b"DarwiniaEthereumBacking", + b"SetAuthoritiesAddress", + &[], + array_bytes::hex_str_array_unchecked!("0xE4A2892599Ad9527D76Ce6E26F93620FA7396D85", 20), + ); ::MaximumBlockWeight::get() } From 30cb7c7a6e324fac9eb592329becb0a0e390f038 Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Wed, 30 Dec 2020 01:52:45 +0800 Subject: [PATCH 19/23] chore(cargo.lock): bump dependencies --- Cargo.lock | 221 +++++++++++++++++++++++++++-------------------------- 1 file changed, 111 insertions(+), 110 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a5b06efea..e10729c85 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -55,7 +55,7 @@ dependencies = [ "aes", "block-cipher", "ghash", - "subtle 2.3.0", + "subtle 2.4.0", ] [[package]] @@ -140,9 +140,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c0df63cb2955042487fad3aefd2c6e3ae7389ac5dc1beb28921de0b69f779d4" +checksum = "ee67c11feeac938fae061b232e38e0b6d94f97a9df10e6271319325ac4c56a86" [[package]] name = "approx" @@ -162,7 +162,7 @@ checksum = "dabe5a181f83789739c194cbe5a897dde195078fac08568d09221fd6137a7ba8" [[package]] name = "array-bytes" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" dependencies = [ "sp-std 2.0.0", ] @@ -1180,7 +1180,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ "generic-array 0.14.4", - "subtle 2.3.0", + "subtle 2.4.0", ] [[package]] @@ -1211,7 +1211,7 @@ dependencies = [ "byteorder 1.3.4", "digest 0.8.1", "rand_core 0.5.1", - "subtle 2.3.0", + "subtle 2.4.0", "zeroize", ] @@ -1224,7 +1224,7 @@ dependencies = [ "byteorder 1.3.4", "digest 0.9.0", "rand_core 0.5.1", - "subtle 2.3.0", + "subtle 2.4.0", "zeroize", ] @@ -1244,7 +1244,7 @@ dependencies = [ [[package]] name = "darwinia-balances" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" dependencies = [ "darwinia-balances-rpc-runtime-api", "darwinia-support", @@ -1259,7 +1259,7 @@ dependencies = [ [[package]] name = "darwinia-balances-rpc" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" dependencies = [ "darwinia-balances-rpc-runtime-api", "jsonrpc-core", @@ -1274,7 +1274,7 @@ dependencies = [ [[package]] name = "darwinia-balances-rpc-runtime-api" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" dependencies = [ "darwinia-support", "parity-scale-codec", @@ -1286,7 +1286,7 @@ dependencies = [ [[package]] name = "darwinia-claims" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" dependencies = [ "array-bytes", "darwinia-support", @@ -1319,7 +1319,7 @@ dependencies = [ "structopt", "substrate-browser-utils", "substrate-build-script-utils", - "tokio 0.3.5", + "tokio 0.3.6", "toml", "wasm-bindgen", "wasm-bindgen-futures", @@ -1328,7 +1328,7 @@ dependencies = [ [[package]] name = "darwinia-cli" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" dependencies = [ "sc-cli", "sc-client-api", @@ -1341,7 +1341,7 @@ dependencies = [ [[package]] name = "darwinia-crab-backing" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" dependencies = [ "frame-support", "frame-system", @@ -1353,7 +1353,7 @@ dependencies = [ [[package]] name = "darwinia-crab-issuing" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" dependencies = [ "frame-support", "frame-system", @@ -1365,7 +1365,7 @@ dependencies = [ [[package]] name = "darwinia-democracy" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" dependencies = [ "darwinia-support", "frame-support", @@ -1380,7 +1380,7 @@ dependencies = [ [[package]] name = "darwinia-elections-phragmen" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" dependencies = [ "darwinia-support", "frame-support", @@ -1395,7 +1395,7 @@ dependencies = [ [[package]] name = "darwinia-ethereum-backing" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" dependencies = [ "array-bytes", "darwinia-relay-primitives", @@ -1415,7 +1415,7 @@ dependencies = [ [[package]] name = "darwinia-ethereum-relay" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" dependencies = [ "array-bytes", "blake2-rfc", @@ -1439,7 +1439,7 @@ dependencies = [ [[package]] name = "darwinia-header-mmr" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" dependencies = [ "ckb-merkle-mountain-range", "darwinia-header-mmr-rpc-runtime-api", @@ -1456,7 +1456,7 @@ dependencies = [ [[package]] name = "darwinia-header-mmr-rpc" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" dependencies = [ "darwinia-header-mmr-rpc-runtime-api", "jsonrpc-core", @@ -1471,7 +1471,7 @@ dependencies = [ [[package]] name = "darwinia-header-mmr-rpc-runtime-api" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" dependencies = [ "darwinia-support", "parity-scale-codec", @@ -1495,7 +1495,7 @@ dependencies = [ [[package]] name = "darwinia-relay-authorities" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" dependencies = [ "darwinia-relay-primitives", "darwinia-support", @@ -1510,7 +1510,7 @@ dependencies = [ [[package]] name = "darwinia-relay-primitives" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" dependencies = [ "frame-support", "parity-scale-codec", @@ -1521,7 +1521,7 @@ dependencies = [ [[package]] name = "darwinia-relayer-game" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" dependencies = [ "darwinia-relay-primitives", "darwinia-support", @@ -1705,7 +1705,7 @@ dependencies = [ [[package]] name = "darwinia-staking" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" dependencies = [ "darwinia-staking-rpc-runtime-api", "darwinia-support", @@ -1729,7 +1729,7 @@ dependencies = [ [[package]] name = "darwinia-staking-rpc" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" dependencies = [ "darwinia-staking-rpc-runtime-api", "jsonrpc-core", @@ -1744,7 +1744,7 @@ dependencies = [ [[package]] name = "darwinia-staking-rpc-runtime-api" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" dependencies = [ "darwinia-support", "parity-scale-codec", @@ -1756,7 +1756,7 @@ dependencies = [ [[package]] name = "darwinia-support" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" dependencies = [ "ethereum-primitives", "frame-support", @@ -1770,7 +1770,7 @@ dependencies = [ [[package]] name = "darwinia-treasury" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" dependencies = [ "darwinia-support", "frame-support", @@ -1784,7 +1784,7 @@ dependencies = [ [[package]] name = "darwinia-tron-backing" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" dependencies = [ "frame-support", "frame-system", @@ -1796,7 +1796,7 @@ dependencies = [ [[package]] name = "darwinia-vesting" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" dependencies = [ "darwinia-support", "enumflags2", @@ -1983,9 +1983,9 @@ checksum = "6576a1755ddffd988788025e75bce9e74b018f7cc226198fe931d077911c6d7e" [[package]] name = "erased-serde" -version = "0.3.12" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ca8b296792113e1500fd935ae487be6e00ce318952a6880555554824d6ebf38" +checksum = "0465971a8cc1fa2455c8465aaa377131e1f1cf4983280f474a13e68793aa770c" dependencies = [ "serde", ] @@ -2053,7 +2053,7 @@ dependencies = [ [[package]] name = "ethereum-primitives" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" dependencies = [ "array-bytes", "ethash", @@ -2512,16 +2512,16 @@ checksum = "611834ce18aaa1bd13c4b374f5d653e1027cf99b6b502584ff8c9a64413b30bb" [[package]] name = "futures-lite" -version = "1.11.2" +version = "1.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6c079abfac3ab269e2927ec048dabc89d009ebfdda6b8ee86624f30c689658" +checksum = "b4481d0cd0de1d204a4fa55e7d45f07b1d958abcb06714b3446438e2eff695fb" dependencies = [ "fastrand", "futures-core", "futures-io", "memchr", "parking", - "pin-project-lite 0.1.11", + "pin-project-lite 0.2.0", "waker-fn", ] @@ -2698,10 +2698,11 @@ dependencies = [ [[package]] name = "ghash" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6e27f0689a6e15944bdce7e45425efb87eaa8ab0c6e87f11d0987a9133e2531" +checksum = "97304e4cd182c3846f7575ced3890c53012ce534ad9114046b0a9e00bb30a375" dependencies = [ + "opaque-debug 0.3.0", "polyval", ] @@ -2783,7 +2784,7 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http 0.2.1", + "http 0.2.2", "indexmap", "slab", "tokio 0.2.24", @@ -2848,9 +2849,9 @@ dependencies = [ [[package]] name = "heck" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" +checksum = "87cbf45460356b7deeb5e3415b5563308c0a9b057c85e12b06ad551f98d0a6ac" dependencies = [ "unicode-segmentation", ] @@ -2916,9 +2917,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9" +checksum = "84129d298a6d57d246960ff8eb831ca4af3f96d29e2e28848dae275408658e26" dependencies = [ "bytes 0.5.6", "fnv", @@ -2944,7 +2945,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" dependencies = [ "bytes 0.5.6", - "http 0.2.1", + "http 0.2.2", ] [[package]] @@ -3009,7 +3010,7 @@ dependencies = [ "futures-core", "futures-util", "h2 0.2.7", - "http 0.2.1", + "http 0.2.2", "http-body 0.3.1", "httparse", "httpdate", @@ -3128,9 +3129,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2" +checksum = "4fb1fa934250de4de8aef298d81c729a7d33d8c239daa3a7575e6b92bfc7313b" dependencies = [ "autocfg 1.0.1", "hashbrown 0.9.1", @@ -3206,9 +3207,9 @@ dependencies = [ [[package]] name = "itoa" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" +checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" [[package]] name = "jemalloc-sys" @@ -3811,7 +3812,7 @@ dependencies = [ "libp2p-core", "libp2p-swarm", "log", - "lru 0.6.2", + "lru 0.6.3", "minicbor", "rand 0.7.3", "smallvec 1.5.1", @@ -3934,7 +3935,7 @@ dependencies = [ "hmac-drbg", "rand 0.7.3", "sha2 0.8.2", - "subtle 2.3.0", + "subtle 2.4.0", "typenum", ] @@ -4035,9 +4036,9 @@ dependencies = [ [[package]] name = "lru" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3abe07af102235a56ac9a6dd904aab1e05483e2e8afdfffec3598be55b1b7606" +checksum = "3aae342b73d57ad0b8b364bd12584819f2c1fe9114285dfcf8b0722607671635" dependencies = [ "hashbrown 0.9.1", ] @@ -4141,7 +4142,7 @@ checksum = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" [[package]] name = "merkle-patricia-trie" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#292d2fa8313b996b425b6d60fb51788584fc4d77" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" dependencies = [ "hashbrown 0.9.1", "keccak-hash", @@ -5114,7 +5115,7 @@ checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" dependencies = [ "instant", "lock_api 0.4.2", - "parking_lot_core 0.8.1", + "parking_lot_core 0.8.2", ] [[package]] @@ -5161,9 +5162,9 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7c6d9b8427445284a09c55be860a15855ab580a417ccad9da88f5a06787ced0" +checksum = "9ccb628cad4f84851442432c60ad8e1f607e29752d0bf072cbd0baf28aa34272" dependencies = [ "cfg-if 1.0.0", "instant", @@ -5332,11 +5333,12 @@ dependencies = [ [[package]] name = "polyval" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4fd92d8e0c06d08525d2e2643cc2b5c80c69ae8eb12c18272d501cd7079ccc0" +checksum = "eebcc4aa140b9abd2bc40d9c3f7ccec842679cd79045ac3a7ac698c1a064b7cd" dependencies = [ "cpuid-bool 0.2.0", + "opaque-debug 0.3.0", "universal-hash", ] @@ -5348,9 +5350,9 @@ checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" [[package]] name = "predicates" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96bfead12e90dccead362d62bb2c90a5f6fc4584963645bc7f71a735e0b0735a" +checksum = "73dd9b7b200044694dfede9edf907c1ca19630908443e9447e624993700c6932" dependencies = [ "difference", "predicates-core", @@ -5358,15 +5360,15 @@ dependencies = [ [[package]] name = "predicates-core" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06075c3a3e92559ff8929e7a280684489ea27fe44805174c3ebd9328dcb37178" +checksum = "fb3dbeaaf793584e29c58c7e3a82bbb3c7c06b63cea68d13b0e3cddc124104dc" [[package]] name = "predicates-tree" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e63c4859013b38a76eca2414c64911fba30def9e3202ac461a2d22831220124" +checksum = "aee95d988ee893cb35c06b148c80ed2cd52c8eea927f50ba7a0be1a786aeab73" dependencies = [ "predicates-core", "treeline", @@ -5545,9 +5547,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" +checksum = "991431c3519a3f36861882da93630ce66b52918dcf1b8e2fd66b397fc96f28df" dependencies = [ "proc-macro2", ] @@ -5754,9 +5756,9 @@ dependencies = [ [[package]] name = "raw-cpuid" -version = "7.0.3" +version = "7.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4a349ca83373cfa5d6dbb66fd76e58b2cca08da71a5f6400de0a0a6a9bceeaf" +checksum = "beb71f708fe39b2c5e98076204c3cc094ee5a4c12c4cdb119a2b72dc34164f41" dependencies = [ "bitflags", "cc", @@ -5822,18 +5824,18 @@ dependencies = [ [[package]] name = "ref-cast" -version = "1.0.3" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e17626b2f4bcf35b84bf379072a66e28cfe5c3c6ae58b38e4914bb8891dabece" +checksum = "e84b8a3c77dd38893c11b59284a40f304a1346d4da020e603fab3671727df95d" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.3" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c523ccaed8ac4b0288948849a350b37d3035827413c458b6a40ddb614bb4f72" +checksum = "99d5173fc07aa6595363a38ca7d69d438cc32cca4216ccd1a3a8f2d4b10bbcd0" dependencies = [ "proc-macro2", "quote", @@ -6578,7 +6580,7 @@ dependencies = [ "serde_json", "sp-application-crypto", "sp-core", - "subtle 2.3.0", + "subtle 2.4.0", ] [[package]] @@ -6979,7 +6981,7 @@ dependencies = [ "rand 0.7.3", "rand_core 0.5.1", "sha2 0.8.2", - "subtle 2.3.0", + "subtle 2.4.0", "zeroize", ] @@ -7112,9 +7114,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.60" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1500e84d27fe482ed1dc791a56eddc2f230046a040fa908c08bda1d9fb615779" +checksum = "4fceb2595057b6891a4ee808f70054bd2d12f0e97f1cbb78689b59f676df325a" dependencies = [ "itoa", "ryu", @@ -7214,9 +7216,9 @@ checksum = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" [[package]] name = "signal-hook" -version = "0.1.16" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604508c1418b99dfe1925ca9224829bb2a8a9a04dda655cc01fcad46f4ab05ed" +checksum = "7e31d442c16f047a671b5a71e2161d6e68814012b7f5379d269ebd915fac2729" dependencies = [ "libc", "signal-hook-registry", @@ -7224,9 +7226,9 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.2.2" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce32ea0c6c56d5eacaeb814fbed9960547021d3edd010ded1425f180536b20ab" +checksum = "16f1d0fef1604ba8f7a073c7e701f213e056707210e9020af4528e0101ce11a6" dependencies = [ "libc", ] @@ -7316,19 +7318,18 @@ dependencies = [ "ring", "rustc_version", "sha2 0.9.2", - "subtle 2.3.0", + "subtle 2.4.0", "x25519-dalek 1.1.0", ] [[package]] name = "socket2" -version = "0.3.17" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c29947abdee2a218277abeca306f25789c938e500ea5a9d4b12a5a504466902" +checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall", "winapi 0.3.9", ] @@ -8156,15 +8157,15 @@ checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" [[package]] name = "subtle" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "343f3f510c2915908f155e94f17220b19ccfacf2a64a2a5d8004f2c3e311e7fd" +checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2" [[package]] name = "syn" -version = "1.0.54" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2af957a63d6bd42255c359c93d9bfdb97076bd3b820897ce55ffbfbf107f44" +checksum = "a9802ddde94170d186eeee5005b798d9c159fa970403f1be19976d0cfb939b72" dependencies = [ "proc-macro2", "quote", @@ -8229,18 +8230,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e9ae34b84616eedaaf1e9dd6026dbe00dcafa92aa0c8077cb69df1fcfe5e53e" +checksum = "76cc616c6abf8c8928e2fdcc0dbfab37175edd8fb49a4641066ad1364fdab146" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ba20f23e85b10754cd195504aebf6a27e2e6cbe28c17778a0c930724628dd56" +checksum = "9be73a2caec27583d0046ef3796c3794f868a5bc813db689eed00c7631275cd1" dependencies = [ "proc-macro2", "quote", @@ -8373,9 +8374,9 @@ dependencies = [ [[package]] name = "tokio" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12a3eb39ee2c231be64487f1fcbe726c8f2514876a55480a5ab8559fc374252" +checksum = "720ba21c25078711bf456d607987d95bce90f7c3bea5abe1db587862e7a1e87c" dependencies = [ "autocfg 1.0.1", "num_cpus", @@ -8624,9 +8625,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75cf45bb0bef80604d001caaec0d09da99611b3c0fd39d3080468875cdb65645" +checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" dependencies = [ "serde", ] @@ -8849,7 +8850,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8326b2c654932e3e4f9196e69d08fdf7cfd718e1dc6f66b347e6024a0c961402" dependencies = [ "generic-array 0.14.4", - "subtle 2.3.0", + "subtle 2.4.0", ] [[package]] @@ -9254,18 +9255,18 @@ dependencies = [ [[package]] name = "wast" -version = "29.0.0" +version = "30.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf2268937131d63c3d833242bf5e075406f9ed868b4265f3280e15dac29ac18" +checksum = "9b79907b22f740634810e882d8d1d9d0f9563095a8ab94e786e370242bff5cd2" dependencies = [ "leb128", ] [[package]] name = "wat" -version = "1.0.30" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d11a88d953b298172d218d18f22853f4e6e12873b62755d05617b864d312c68" +checksum = "a8279a02835bf12e61ed2b3c3cbc6ecf9918762fd97e036917c11a09ec20ca44" dependencies = [ "wast", ] @@ -9438,18 +9439,18 @@ dependencies = [ [[package]] name = "zstd" -version = "0.5.3+zstd.1.4.5" +version = "0.5.4+zstd.1.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01b32eaf771efa709e8308605bbf9319bf485dc1503179ec0469b611937c0cd8" +checksum = "69996ebdb1ba8b1517f61387a883857818a66c8a295f487b1ffd8fd9d2c82910" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "2.0.5+zstd.1.4.5" +version = "2.0.6+zstd.1.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cfb642e0d27f64729a639c52db457e0ae906e7bc6f5fe8f5c453230400f1055" +checksum = "98aa931fb69ecee256d44589d19754e61851ae4769bf963b385119b1cc37a49e" dependencies = [ "libc", "zstd-sys", @@ -9457,9 +9458,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "1.4.17+zstd.1.4.5" +version = "1.4.18+zstd.1.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b89249644df056b522696b1bb9e7c18c87e8ffa3e2f0dc3b0155875d6498f01b" +checksum = "a1e6e8778706838f43f771d80d37787cb2fe06dafe89dd3aebaf6721b9eaec81" dependencies = [ "cc", "glob", From 75cbaf27be954f11f0d595f73f474d8426e8aa95 Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Wed, 30 Dec 2020 02:11:51 +0800 Subject: [PATCH 20/23] feat: companion for #416 --- runtime/crab/Cargo.toml | 3 +-- runtime/crab/src/lib.rs | 8 +++++--- runtime/darwinia/Cargo.toml | 3 +-- runtime/darwinia/src/lib.rs | 8 +++++--- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/runtime/crab/Cargo.toml b/runtime/crab/Cargo.toml index 6c7d24cb2..2d63f0993 100644 --- a/runtime/crab/Cargo.toml +++ b/runtime/crab/Cargo.toml @@ -11,6 +11,7 @@ version = "0.8.3" [dependencies] # crates +array-bytes = { version = "0.3.0" } codec = { package = "parity-scale-codec", version = "1.3.5", default-features = false, features = ["derive"] } serde = { version = "1.0.118", optional = true } smallvec = { version = "1.5.1" } @@ -34,7 +35,6 @@ darwinia-staking-rpc-runtime-api = { default-features = false, git = "https:/ darwinia-support = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } darwinia-treasury = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } # darwinia primitives -array-bytes = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } darwinia-primitives = { default-features = false, path = "../../primitives" } ethereum-primitives = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } # darwinia runtime @@ -109,7 +109,6 @@ std = [ "darwinia-staking-rpc-runtime-api/std", "darwinia-support/std", "darwinia-treasury/std", - "array-bytes/std", "darwinia-primitives/std", "darwinia-runtime-common/std", "frame-executive/std", diff --git a/runtime/crab/src/lib.rs b/runtime/crab/src/lib.rs index 24eaad7cb..b6f16099c 100644 --- a/runtime/crab/src/lib.rs +++ b/runtime/crab/src/lib.rs @@ -877,6 +877,7 @@ parameter_types! { pub const EthereumBackingFeeModuleId: ModuleId = ModuleId(*b"da/ethfe"); // https://github.com/darwinia-network/darwinia-common/pull/377#issuecomment-730369387 pub const AdvancedFee: Balance = 50 * COIN; + pub const SyncReward: Balance = 1000 * COIN; } impl darwinia_ethereum_backing::Trait for Runtime { type ModuleId = EthereumBackingModuleId; @@ -888,6 +889,7 @@ impl darwinia_ethereum_backing::Trait for Runtime { type RingCurrency = Ring; type KtonCurrency = Kton; type AdvancedFee = AdvancedFee; + type SyncReward = SyncReward; type EcdsaAuthorities = EthereumRelayAuthorities; type WeightInfo = (); } @@ -1322,7 +1324,6 @@ impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade { // --- substrate --- use frame_support::{migration::*, traits::Currency}; // --- darwinia --- - use array_bytes::fixed_hex_bytes_unchecked; use darwinia_relay_primitives::relay_authorities::RelayAuthority; use darwinia_support::balance::lock::{LockFor, LockableCurrency, WithdrawReasons}; @@ -1332,13 +1333,14 @@ impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade { ); // @wuminzhe - let account_id = fixed_hex_bytes_unchecked!( + let account_id = array_bytes::hex_str_array_unchecked!( "0x129f002b1c0787ea72c31b2dc986e66911fe1b4d6dc16f83a1127f33e5a74c7d", 32 ) .into(); // @wuminzhe - let signer = fixed_hex_bytes_unchecked!("0x9a2976dB293C04Bc36acC39122aAd33CC00f62a8", 20); + let signer = + array_bytes::hex_str_array_unchecked!("0x9a2976dB293C04Bc36acC39122aAd33CC00f62a8", 20); let stake = 1; Ring::set_lock( diff --git a/runtime/darwinia/Cargo.toml b/runtime/darwinia/Cargo.toml index a51be8024..64a302d8d 100644 --- a/runtime/darwinia/Cargo.toml +++ b/runtime/darwinia/Cargo.toml @@ -11,6 +11,7 @@ version = "0.8.3" [dependencies] # crates +array-bytes = { version = "0.3.0" } codec = { package = "parity-scale-codec", version = "1.3.5", default-features = false, features = ["derive"] } serde = { version = "1.0.118", optional = true } serde_json = { version = "1.0.60", optional = true } @@ -35,7 +36,6 @@ darwinia-treasury = { default-features = false, git = "https:/ darwinia-tron-backing = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } darwinia-vesting = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } # darwinia primitives -array-bytes = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } darwinia-primitives = { default-features = false, path = "../../primitives" } ethereum-primitives = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } # darwinia runtime @@ -109,7 +109,6 @@ std = [ "darwinia-treasury/std", "darwinia-tron-backing/std", "darwinia-vesting/std", - "array-bytes/std", "darwinia-primitives/std", "darwinia-runtime-common/std", "frame-executive/std", diff --git a/runtime/darwinia/src/lib.rs b/runtime/darwinia/src/lib.rs index cb8e3beee..44790aecc 100644 --- a/runtime/darwinia/src/lib.rs +++ b/runtime/darwinia/src/lib.rs @@ -844,6 +844,7 @@ parameter_types! { pub const EthereumBackingFeeModuleId: ModuleId = ModuleId(*b"da/ethfe"); // https://github.com/darwinia-network/darwinia-common/pull/377#issuecomment-730369387 pub const AdvancedFee: Balance = 50 * COIN; + pub const SyncReward: Balance = 1000 * COIN; } impl darwinia_ethereum_backing::Trait for Runtime { type ModuleId = EthereumBackingModuleId; @@ -855,6 +856,7 @@ impl darwinia_ethereum_backing::Trait for Runtime { type RingCurrency = Ring; type KtonCurrency = Kton; type AdvancedFee = AdvancedFee; + type SyncReward = SyncReward; type EcdsaAuthorities = EthereumRelayAuthorities; type WeightInfo = (); } @@ -1291,7 +1293,6 @@ impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade { // --- substrate --- use frame_support::{migration::*, traits::Currency}; // --- darwinia --- - use array_bytes::fixed_hex_bytes_unchecked; use darwinia_relay_primitives::relay_authorities::RelayAuthority; use darwinia_support::balance::lock::{LockFor, LockableCurrency, WithdrawReasons}; @@ -1301,13 +1302,14 @@ impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade { ); // @wuminzhe - let account_id = fixed_hex_bytes_unchecked!( + let account_id = array_bytes::hex_str_array_unchecked!( "0x129f002b1c0787ea72c31b2dc986e66911fe1b4d6dc16f83a1127f33e5a74c7d", 32 ) .into(); // @wuminzhe - let signer = fixed_hex_bytes_unchecked!("0x9a2976dB293C04Bc36acC39122aAd33CC00f62a8", 20); + let signer = + array_bytes::hex_str_array_unchecked!("0x9a2976dB293C04Bc36acC39122aAd33CC00f62a8", 20); let stake = 1; Ring::set_lock( From 2583fdf9f65f46b30e78caef8f91100efc424290 Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Wed, 30 Dec 2020 02:14:00 +0800 Subject: [PATCH 21/23] chore(cargo.toml): bump denpendencies --- Cargo.lock | 21 ++++++----- cli/Cargo.toml | 2 -- node/service/Cargo.toml | 12 +++---- node/service/src/chain_spec/crab.rs | 31 ++++++++-------- node/service/src/chain_spec/darwinia.rs | 48 ++++++++++++------------- runtime/darwinia/Cargo.toml | 2 +- 6 files changed, 59 insertions(+), 57 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e10729c85..aff9a0772 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -159,6 +159,12 @@ version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dabe5a181f83789739c194cbe5a897dde195078fac08568d09221fd6137a7ba8" +[[package]] +name = "array-bytes" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43759f68cc29a37659a6b7a48a49674e03a888b6d41f36f4204c36d0d09a51de" + [[package]] name = "array-bytes" version = "1.2.3" @@ -894,7 +900,7 @@ checksum = "dcb25d077389e53838a8158c8e99174c5a9d902dee4904320db714f3c653ffba" name = "crab-runtime" version = "0.8.3" dependencies = [ - "array-bytes", + "array-bytes 0.3.0", "darwinia-balances", "darwinia-balances-rpc-runtime-api", "darwinia-claims", @@ -1288,7 +1294,7 @@ name = "darwinia-claims" version = "1.2.3" source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" dependencies = [ - "array-bytes", + "array-bytes 1.2.3", "darwinia-support", "frame-support", "frame-system", @@ -1320,7 +1326,6 @@ dependencies = [ "substrate-browser-utils", "substrate-build-script-utils", "tokio 0.3.6", - "toml", "wasm-bindgen", "wasm-bindgen-futures", ] @@ -1397,7 +1402,7 @@ name = "darwinia-ethereum-backing" version = "1.2.3" source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" dependencies = [ - "array-bytes", + "array-bytes 1.2.3", "darwinia-relay-primitives", "darwinia-support", "ethabi", @@ -1417,7 +1422,7 @@ name = "darwinia-ethereum-relay" version = "1.2.3" source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" dependencies = [ - "array-bytes", + "array-bytes 1.2.3", "blake2-rfc", "ckb-merkle-mountain-range", "darwinia-relay-primitives", @@ -1566,7 +1571,7 @@ dependencies = [ name = "darwinia-runtime" version = "0.8.3" dependencies = [ - "array-bytes", + "array-bytes 0.3.0", "darwinia-balances", "darwinia-balances-rpc-runtime-api", "darwinia-crab-backing", @@ -1656,7 +1661,7 @@ dependencies = [ name = "darwinia-service" version = "0.8.3" dependencies = [ - "array-bytes", + "array-bytes 0.3.0", "crab-runtime", "darwinia-balances-rpc-runtime-api", "darwinia-header-mmr-rpc-runtime-api", @@ -2055,7 +2060,7 @@ name = "ethereum-primitives" version = "1.2.3" source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" dependencies = [ - "array-bytes", + "array-bytes 1.2.3", "ethash", "ethbloom", "ethereum-types", diff --git a/cli/Cargo.toml b/cli/Cargo.toml index bc5d4b774..9ddeddb71 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -23,7 +23,6 @@ log = { version = "0.4.11" } serde = { version = "1.0.118", optional = true } structopt = { version = "0.3.21" } tokio = { version = "0.3.5", optional = true, features = ["rt-multi-thread"] } -toml = { version = "0.5.7", optional = true } wasm-bindgen = { version = "0.2.69", optional = true } wasm-bindgen-futures = { version = "0.4.19", optional = true } # darwinia client @@ -57,7 +56,6 @@ default = [ cli = [ "serde", "tokio", - "toml", "sc-cli", "sc-network", "sc-tracing", diff --git a/node/service/Cargo.toml b/node/service/Cargo.toml index 911d326ab..700da9b01 100644 --- a/node/service/Cargo.toml +++ b/node/service/Cargo.toml @@ -10,13 +10,13 @@ version = "0.8.3" [dependencies] # crates -codec = { package = "parity-scale-codec", version = "1.3.5", features = ["derive"] } -futures = { version = "0.3.8" } -log = { version = "0.4.11" } -serde = { version = "1.0.118", features = ["derive"] } -serde_json = { version = "1.0.60" } +array-bytes = { version = "0.3.0" } +codec = { package = "parity-scale-codec", version = "1.3.5", features = ["derive"] } +futures = { version = "0.3.8" } +log = { version = "0.4.11" } +serde = { version = "1.0.118", features = ["derive"] } +serde_json = { version = "1.0.61" } # darwinia frame -array-bytes = { git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } darwinia-balances-rpc-runtime-api = { git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } darwinia-header-mmr-rpc-runtime-api = { git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } darwinia-staking-rpc-runtime-api = { git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" } diff --git a/node/service/src/chain_spec/crab.rs b/node/service/src/chain_spec/crab.rs index 058568103..b63fd6a38 100644 --- a/node/service/src/chain_spec/crab.rs +++ b/node/service/src/chain_spec/crab.rs @@ -13,7 +13,6 @@ use super::{ get_account_id_from_seed, get_authority_keys_from_seed, testnet_accounts, Extensions, DEFAULT_PROTOCOL_ID, }; -use array_bytes::fixed_hex_bytes_unchecked; use crab_runtime::{constants::currency::COIN, *}; use darwinia_primitives::{AccountId, Balance}; @@ -71,8 +70,8 @@ pub fn crab_build_spec_genesis() -> GenesisConfig { const RING_TOKEN_ADDRESS: &'static str = "0xb52FBE2B925ab79a821b261C82c5Ba0814AAA5e0"; const KTON_TOKEN_ADDRESS: &'static str = "0x1994100c58753793D52c6f457f189aa3ce9cEe94"; - let root: AccountId = fixed_hex_bytes_unchecked!(ROOT, 32).into(); - let multi_sig: AccountId = fixed_hex_bytes_unchecked!(MULTI_SIG, 32).into(); + let root: AccountId = array_bytes::hex_str_array_unchecked!(ROOT, 32).into(); + let multi_sig: AccountId = array_bytes::hex_str_array_unchecked!(MULTI_SIG, 32).into(); let genesis_validator: ( AccountId, AccountId, @@ -81,10 +80,10 @@ pub fn crab_build_spec_genesis() -> GenesisConfig { ImOnlineId, AuthorityDiscoveryId, ) = { - let stash = fixed_hex_bytes_unchecked!(GENESIS_VALIDATOR_SR, 32); - let controller = fixed_hex_bytes_unchecked!(GENESIS_VALIDATOR_SR, 32); - let session = fixed_hex_bytes_unchecked!(GENESIS_VALIDATOR_SR, 32); - let grandpa = fixed_hex_bytes_unchecked!(GENESIS_VALIDATOR_ED, 32); + let stash = array_bytes::hex_str_array_unchecked!(GENESIS_VALIDATOR_SR, 32); + let controller = array_bytes::hex_str_array_unchecked!(GENESIS_VALIDATOR_SR, 32); + let session = array_bytes::hex_str_array_unchecked!(GENESIS_VALIDATOR_SR, 32); + let grandpa = array_bytes::hex_str_array_unchecked!(GENESIS_VALIDATOR_ED, 32); ( stash.into(), @@ -110,7 +109,7 @@ pub fn crab_build_spec_genesis() -> GenesisConfig { "0xc45f075b5b1aa0145c469f57bd741c02272c1c0c41e9518d5a32426030d98232", ] .iter() - .map(|s| fixed_hex_bytes_unchecked!(s, 32).into()) + .map(|s| array_bytes::hex_str_array_unchecked!(s, 32).into()) .collect::>(); GenesisConfig { @@ -186,10 +185,10 @@ pub fn crab_build_spec_genesis() -> GenesisConfig { }), pallet_sudo: Some(SudoConfig { key: root }), darwinia_ethereum_backing: Some(EthereumBackingConfig { - token_redeem_address: fixed_hex_bytes_unchecked!(TOKEN_REDEEM_ADDRESS, 20).into(), - deposit_redeem_address: fixed_hex_bytes_unchecked!(DEPOSIT_REDEEM_ADDRESS, 20).into(), - ring_token_address: fixed_hex_bytes_unchecked!(RING_TOKEN_ADDRESS, 20).into(), - kton_token_address: fixed_hex_bytes_unchecked!(KTON_TOKEN_ADDRESS, 20).into(), + token_redeem_address: array_bytes::hex_str_array_unchecked!(TOKEN_REDEEM_ADDRESS, 20).into(), + deposit_redeem_address: array_bytes::hex_str_array_unchecked!(DEPOSIT_REDEEM_ADDRESS, 20).into(), + ring_token_address: array_bytes::hex_str_array_unchecked!(RING_TOKEN_ADDRESS, 20).into(), + kton_token_address: array_bytes::hex_str_array_unchecked!(KTON_TOKEN_ADDRESS, 20).into(), ring_locked: 7_569_833 * COIN, kton_locked: 30_000 * COIN, ..Default::default() @@ -314,10 +313,10 @@ pub fn crab_testnet_genesis( }), pallet_sudo: Some(SudoConfig { key: root }), darwinia_ethereum_backing: Some(EthereumBackingConfig { - token_redeem_address: fixed_hex_bytes_unchecked!(TOKEN_REDEEM_ADDRESS, 20).into(), - deposit_redeem_address: fixed_hex_bytes_unchecked!(DEPOSIT_REDEEM_ADDRESS, 20).into(), - ring_token_address: fixed_hex_bytes_unchecked!(RING_TOKEN_ADDRESS, 20).into(), - kton_token_address: fixed_hex_bytes_unchecked!(KTON_TOKEN_ADDRESS, 20).into(), + token_redeem_address: array_bytes::hex_str_array_unchecked!(TOKEN_REDEEM_ADDRESS, 20).into(), + deposit_redeem_address: array_bytes::hex_str_array_unchecked!(DEPOSIT_REDEEM_ADDRESS, 20).into(), + ring_token_address: array_bytes::hex_str_array_unchecked!(RING_TOKEN_ADDRESS, 20).into(), + kton_token_address: array_bytes::hex_str_array_unchecked!(KTON_TOKEN_ADDRESS, 20).into(), ring_locked: 1 << 56, kton_locked: 1 << 56, ..Default::default() diff --git a/node/service/src/chain_spec/darwinia.rs b/node/service/src/chain_spec/darwinia.rs index 67d75db9e..91f4cbf73 100644 --- a/node/service/src/chain_spec/darwinia.rs +++ b/node/service/src/chain_spec/darwinia.rs @@ -15,7 +15,6 @@ use super::{ get_account_id_from_seed, get_authority_keys_from_seed, testnet_accounts, Extensions, DEFAULT_PROTOCOL_ID, }; -use array_bytes::fixed_hex_bytes_unchecked; use darwinia_primitives::{AccountId, BlockNumber}; use darwinia_runtime::{ constants::{currency::COIN, time::DAYS}, @@ -110,7 +109,7 @@ pub fn darwinia_build_spec_genesis() -> GenesisConfig { } rings - .entry(fixed_hex_bytes_unchecked!(address, 32).into()) + .entry(array_bytes::hex_str_array_unchecked!(address, 32).into()) .and_modify(|ring_| *ring_ += ring) .or_insert(ring); @@ -138,7 +137,7 @@ pub fn darwinia_build_spec_genesis() -> GenesisConfig { let ring = ring / COIN; rings - .entry(fixed_hex_bytes_unchecked!(address, 32).into()) + .entry(array_bytes::hex_str_array_unchecked!(address, 32).into()) .and_modify(|ring_| *ring_ += ring) .or_insert(ring); } @@ -158,7 +157,7 @@ pub fn darwinia_build_spec_genesis() -> GenesisConfig { let kton = kton / COIN; ktons - .entry(fixed_hex_bytes_unchecked!(address, 32).into()) + .entry(array_bytes::hex_str_array_unchecked!(address, 32).into()) .and_modify(|kton_| *kton_ += kton) .or_insert(kton); } @@ -169,15 +168,16 @@ pub fn darwinia_build_spec_genesis() -> GenesisConfig { assert!(genesis_validator_1_stash_endowed); assert!(genesis_validator_2_stash_endowed); - let root: AccountId = fixed_hex_bytes_unchecked!(ROOT, 32).into(); - let da_crabk: AccountId = fixed_hex_bytes_unchecked!(DA_CRABK, 32).into(); - let team_vesting: AccountId = fixed_hex_bytes_unchecked!(TEAM_VESTING, 32).into(); - let foundation_vesting: AccountId = fixed_hex_bytes_unchecked!(FOUNDATION_VESTING, 32).into(); + let root: AccountId = array_bytes::hex_str_array_unchecked!(ROOT, 32).into(); + let da_crabk: AccountId = array_bytes::hex_str_array_unchecked!(DA_CRABK, 32).into(); + let team_vesting: AccountId = array_bytes::hex_str_array_unchecked!(TEAM_VESTING, 32).into(); + let foundation_vesting: AccountId = + array_bytes::hex_str_array_unchecked!(FOUNDATION_VESTING, 32).into(); let genesis_validator_1: (AccountId, AccountId, SessionKeys) = { - let stash = fixed_hex_bytes_unchecked!(GENESIS_VALIDATOR_1_STASH, 32); - let controller = fixed_hex_bytes_unchecked!(GENESIS_VALIDATOR_1_CONTROLLER, 32); - let session = fixed_hex_bytes_unchecked!(GENESIS_VALIDATOR_1_SESSION, 32); - let grandpa = fixed_hex_bytes_unchecked!(GENESIS_VALIDATOR_1_GRANDPA, 32); + let stash = array_bytes::hex_str_array_unchecked!(GENESIS_VALIDATOR_1_STASH, 32); + let controller = array_bytes::hex_str_array_unchecked!(GENESIS_VALIDATOR_1_CONTROLLER, 32); + let session = array_bytes::hex_str_array_unchecked!(GENESIS_VALIDATOR_1_SESSION, 32); + let grandpa = array_bytes::hex_str_array_unchecked!(GENESIS_VALIDATOR_1_GRANDPA, 32); ( stash.into(), @@ -191,10 +191,10 @@ pub fn darwinia_build_spec_genesis() -> GenesisConfig { ) }; let genesis_validator_2: (AccountId, AccountId, SessionKeys) = { - let stash = fixed_hex_bytes_unchecked!(GENESIS_VALIDATOR_2_STASH, 32); - let controller = fixed_hex_bytes_unchecked!(GENESIS_VALIDATOR_2_CONTROLLER, 32); - let session = fixed_hex_bytes_unchecked!(GENESIS_VALIDATOR_2_SESSION, 32); - let grandpa = fixed_hex_bytes_unchecked!(GENESIS_VALIDATOR_2_GRANDPA, 32); + let stash = array_bytes::hex_str_array_unchecked!(GENESIS_VALIDATOR_2_STASH, 32); + let controller = array_bytes::hex_str_array_unchecked!(GENESIS_VALIDATOR_2_CONTROLLER, 32); + let session = array_bytes::hex_str_array_unchecked!(GENESIS_VALIDATOR_2_SESSION, 32); + let grandpa = array_bytes::hex_str_array_unchecked!(GENESIS_VALIDATOR_2_GRANDPA, 32); ( stash.into(), @@ -282,10 +282,10 @@ pub fn darwinia_build_spec_genesis() -> GenesisConfig { }), pallet_sudo: Some(SudoConfig { key: root }), darwinia_ethereum_backing: Some(EthereumBackingConfig { - token_redeem_address: fixed_hex_bytes_unchecked!(TOKEN_REDEEM_ADDRESS, 20).into(), - deposit_redeem_address: fixed_hex_bytes_unchecked!(DEPOSIT_REDEEM_ADDRESS, 20).into(), - ring_token_address: fixed_hex_bytes_unchecked!(RING_TOKEN_ADDRESS, 20).into(), - kton_token_address: fixed_hex_bytes_unchecked!(KTON_TOKEN_ADDRESS, 20).into(), + token_redeem_address: array_bytes::hex_str_array_unchecked!(TOKEN_REDEEM_ADDRESS, 20).into(), + deposit_redeem_address: array_bytes::hex_str_array_unchecked!(DEPOSIT_REDEEM_ADDRESS, 20).into(), + ring_token_address: array_bytes::hex_str_array_unchecked!(RING_TOKEN_ADDRESS, 20).into(), + kton_token_address: array_bytes::hex_str_array_unchecked!(KTON_TOKEN_ADDRESS, 20).into(), // Los Angeles: 9/24/2020, 7:42:52 PM // Berlin : 9/25/2020, 10:42:52 AM // Beijing: 9/25/2020, 9:42:52 AM @@ -410,10 +410,10 @@ pub fn darwinia_testnet_genesis( darwinia_vesting: Some(Default::default()), pallet_sudo: Some(SudoConfig { key: root }), darwinia_ethereum_backing: Some(EthereumBackingConfig { - token_redeem_address: fixed_hex_bytes_unchecked!(TOKEN_REDEEM_ADDRESS, 20).into(), - deposit_redeem_address: fixed_hex_bytes_unchecked!(DEPOSIT_REDEEM_ADDRESS, 20).into(), - ring_token_address: fixed_hex_bytes_unchecked!(RING_TOKEN_ADDRESS, 20).into(), - kton_token_address: fixed_hex_bytes_unchecked!(KTON_TOKEN_ADDRESS, 20).into(), + token_redeem_address: array_bytes::hex_str_array_unchecked!(TOKEN_REDEEM_ADDRESS, 20).into(), + deposit_redeem_address: array_bytes::hex_str_array_unchecked!(DEPOSIT_REDEEM_ADDRESS, 20).into(), + ring_token_address: array_bytes::hex_str_array_unchecked!(RING_TOKEN_ADDRESS, 20).into(), + kton_token_address: array_bytes::hex_str_array_unchecked!(KTON_TOKEN_ADDRESS, 20).into(), ring_locked: 1 << 56, kton_locked: 1 << 56, ..Default::default() diff --git a/runtime/darwinia/Cargo.toml b/runtime/darwinia/Cargo.toml index 64a302d8d..3e4090272 100644 --- a/runtime/darwinia/Cargo.toml +++ b/runtime/darwinia/Cargo.toml @@ -14,7 +14,7 @@ version = "0.8.3" array-bytes = { version = "0.3.0" } codec = { package = "parity-scale-codec", version = "1.3.5", default-features = false, features = ["derive"] } serde = { version = "1.0.118", optional = true } -serde_json = { version = "1.0.60", optional = true } +serde_json = { version = "1.0.61", optional = true } smallvec = { version = "1.5.1" } static_assertions = { version = "1.1.0" } # darwinia frame From 80d27b5df1ab4888745d1b415cf86cfc95f57fd2 Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Wed, 30 Dec 2020 16:56:51 +0800 Subject: [PATCH 22/23] docs(runtime): remove todo --- runtime/crab/src/lib.rs | 3 --- runtime/darwinia/src/lib.rs | 3 --- 2 files changed, 6 deletions(-) diff --git a/runtime/crab/src/lib.rs b/runtime/crab/src/lib.rs index b6f16099c..e1e7bb3a8 100644 --- a/runtime/crab/src/lib.rs +++ b/runtime/crab/src/lib.rs @@ -953,9 +953,6 @@ impl darwinia_ethereum_relay::Trait for Runtime { type EthereumRelayerGameInstance = darwinia_relayer_game::Instance0; parameter_types! { - // TODO: migration - // pub const EthereumRelayerGameLockId: LockIdentifier = *b"ethrgame"; - // Workaround pub const EthereumRelayerGameLockId: LockIdentifier = *b"da/rgame"; } impl darwinia_relayer_game::Trait for Runtime { diff --git a/runtime/darwinia/src/lib.rs b/runtime/darwinia/src/lib.rs index 44790aecc..00b91806a 100644 --- a/runtime/darwinia/src/lib.rs +++ b/runtime/darwinia/src/lib.rs @@ -920,9 +920,6 @@ impl darwinia_ethereum_relay::Trait for Runtime { type EthereumRelayerGameInstance = darwinia_relayer_game::Instance0; parameter_types! { - // TODO: migration - // pub const EthereumRelayerGameLockId: LockIdentifier = *b"ethrgame"; - // Workaround pub const EthereumRelayerGameLockId: LockIdentifier = *b"da/rgame"; } impl darwinia_relayer_game::Trait for Runtime { From 01ec2be2adca74f40c401432e055780e08064c6d Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Thu, 31 Dec 2020 13:04:56 +0800 Subject: [PATCH 23/23] chore(cargo.lock): bump dependencies --- Cargo.lock | 66 +++++++++++++++++++++++++++--------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index aff9a0772..9ef27d1b9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -168,7 +168,7 @@ checksum = "43759f68cc29a37659a6b7a48a49674e03a888b6d41f36f4204c36d0d09a51de" [[package]] name = "array-bytes" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#7858b0292ce833baf5d283af6471d9e048bf99c0" dependencies = [ "sp-std 2.0.0", ] @@ -1250,7 +1250,7 @@ dependencies = [ [[package]] name = "darwinia-balances" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#7858b0292ce833baf5d283af6471d9e048bf99c0" dependencies = [ "darwinia-balances-rpc-runtime-api", "darwinia-support", @@ -1265,7 +1265,7 @@ dependencies = [ [[package]] name = "darwinia-balances-rpc" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#7858b0292ce833baf5d283af6471d9e048bf99c0" dependencies = [ "darwinia-balances-rpc-runtime-api", "jsonrpc-core", @@ -1280,7 +1280,7 @@ dependencies = [ [[package]] name = "darwinia-balances-rpc-runtime-api" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#7858b0292ce833baf5d283af6471d9e048bf99c0" dependencies = [ "darwinia-support", "parity-scale-codec", @@ -1292,7 +1292,7 @@ dependencies = [ [[package]] name = "darwinia-claims" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#7858b0292ce833baf5d283af6471d9e048bf99c0" dependencies = [ "array-bytes 1.2.3", "darwinia-support", @@ -1333,7 +1333,7 @@ dependencies = [ [[package]] name = "darwinia-cli" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#7858b0292ce833baf5d283af6471d9e048bf99c0" dependencies = [ "sc-cli", "sc-client-api", @@ -1346,7 +1346,7 @@ dependencies = [ [[package]] name = "darwinia-crab-backing" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#7858b0292ce833baf5d283af6471d9e048bf99c0" dependencies = [ "frame-support", "frame-system", @@ -1358,7 +1358,7 @@ dependencies = [ [[package]] name = "darwinia-crab-issuing" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#7858b0292ce833baf5d283af6471d9e048bf99c0" dependencies = [ "frame-support", "frame-system", @@ -1370,7 +1370,7 @@ dependencies = [ [[package]] name = "darwinia-democracy" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#7858b0292ce833baf5d283af6471d9e048bf99c0" dependencies = [ "darwinia-support", "frame-support", @@ -1385,7 +1385,7 @@ dependencies = [ [[package]] name = "darwinia-elections-phragmen" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#7858b0292ce833baf5d283af6471d9e048bf99c0" dependencies = [ "darwinia-support", "frame-support", @@ -1400,7 +1400,7 @@ dependencies = [ [[package]] name = "darwinia-ethereum-backing" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#7858b0292ce833baf5d283af6471d9e048bf99c0" dependencies = [ "array-bytes 1.2.3", "darwinia-relay-primitives", @@ -1420,7 +1420,7 @@ dependencies = [ [[package]] name = "darwinia-ethereum-relay" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#7858b0292ce833baf5d283af6471d9e048bf99c0" dependencies = [ "array-bytes 1.2.3", "blake2-rfc", @@ -1444,7 +1444,7 @@ dependencies = [ [[package]] name = "darwinia-header-mmr" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#7858b0292ce833baf5d283af6471d9e048bf99c0" dependencies = [ "ckb-merkle-mountain-range", "darwinia-header-mmr-rpc-runtime-api", @@ -1461,7 +1461,7 @@ dependencies = [ [[package]] name = "darwinia-header-mmr-rpc" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#7858b0292ce833baf5d283af6471d9e048bf99c0" dependencies = [ "darwinia-header-mmr-rpc-runtime-api", "jsonrpc-core", @@ -1476,7 +1476,7 @@ dependencies = [ [[package]] name = "darwinia-header-mmr-rpc-runtime-api" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#7858b0292ce833baf5d283af6471d9e048bf99c0" dependencies = [ "darwinia-support", "parity-scale-codec", @@ -1500,7 +1500,7 @@ dependencies = [ [[package]] name = "darwinia-relay-authorities" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#7858b0292ce833baf5d283af6471d9e048bf99c0" dependencies = [ "darwinia-relay-primitives", "darwinia-support", @@ -1515,7 +1515,7 @@ dependencies = [ [[package]] name = "darwinia-relay-primitives" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#7858b0292ce833baf5d283af6471d9e048bf99c0" dependencies = [ "frame-support", "parity-scale-codec", @@ -1526,7 +1526,7 @@ dependencies = [ [[package]] name = "darwinia-relayer-game" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#7858b0292ce833baf5d283af6471d9e048bf99c0" dependencies = [ "darwinia-relay-primitives", "darwinia-support", @@ -1710,7 +1710,7 @@ dependencies = [ [[package]] name = "darwinia-staking" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#7858b0292ce833baf5d283af6471d9e048bf99c0" dependencies = [ "darwinia-staking-rpc-runtime-api", "darwinia-support", @@ -1734,7 +1734,7 @@ dependencies = [ [[package]] name = "darwinia-staking-rpc" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#7858b0292ce833baf5d283af6471d9e048bf99c0" dependencies = [ "darwinia-staking-rpc-runtime-api", "jsonrpc-core", @@ -1749,7 +1749,7 @@ dependencies = [ [[package]] name = "darwinia-staking-rpc-runtime-api" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#7858b0292ce833baf5d283af6471d9e048bf99c0" dependencies = [ "darwinia-support", "parity-scale-codec", @@ -1761,7 +1761,7 @@ dependencies = [ [[package]] name = "darwinia-support" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#7858b0292ce833baf5d283af6471d9e048bf99c0" dependencies = [ "ethereum-primitives", "frame-support", @@ -1775,7 +1775,7 @@ dependencies = [ [[package]] name = "darwinia-treasury" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#7858b0292ce833baf5d283af6471d9e048bf99c0" dependencies = [ "darwinia-support", "frame-support", @@ -1789,7 +1789,7 @@ dependencies = [ [[package]] name = "darwinia-tron-backing" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#7858b0292ce833baf5d283af6471d9e048bf99c0" dependencies = [ "frame-support", "frame-system", @@ -1801,7 +1801,7 @@ dependencies = [ [[package]] name = "darwinia-vesting" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#7858b0292ce833baf5d283af6471d9e048bf99c0" dependencies = [ "darwinia-support", "enumflags2", @@ -1914,9 +1914,9 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d55796afa1b20c2945ca8eabfc421839f2b766619209f1ede813cf2484f31804" +checksum = "ee2626afccd7561a06cf1367e2950c4718ea04565e20fb5029b6c7d8ad09abcf" [[package]] name = "ed25519" @@ -2058,7 +2058,7 @@ dependencies = [ [[package]] name = "ethereum-primitives" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#7858b0292ce833baf5d283af6471d9e048bf99c0" dependencies = [ "array-bytes 1.2.3", "ethash", @@ -4147,7 +4147,7 @@ checksum = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" [[package]] name = "merkle-patricia-trie" version = "1.2.3" -source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#dd026e1ac5498c617651e14245a681632c186512" +source = "git+https://github.com/darwinia-network/darwinia-common.git?branch=master#7858b0292ce833baf5d283af6471d9e048bf99c0" dependencies = [ "hashbrown 0.9.1", "keccak-hash", @@ -5829,18 +5829,18 @@ dependencies = [ [[package]] name = "ref-cast" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e84b8a3c77dd38893c11b59284a40f304a1346d4da020e603fab3671727df95d" +checksum = "300f2a835d808734ee295d45007adacb9ebb29dd3ae2424acfa17930cae541da" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d5173fc07aa6595363a38ca7d69d438cc32cca4216ccd1a3a8f2d4b10bbcd0" +checksum = "4c38e3aecd2b21cb3959637b883bb3714bc7e43f0268b9a29d3743ee3e55cdd2" dependencies = [ "proc-macro2", "quote",