Bump substrate & deps (#637)

This commit is contained in:
dependabot-preview[bot]
2021-01-12 12:51:20 +00:00
committed by Bastian Köcher
parent 820407ee98
commit 58fbd8cb49
22 changed files with 47 additions and 41 deletions
+4 -4
View File
@@ -134,8 +134,8 @@ pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError>
config config
.network .network
.notifications_protocols .extra_sets
.push(sc_finality_grandpa::GRANDPA_PROTOCOL_NAME.into()); .push(sc_finality_grandpa::grandpa_peers_set_config());
let (network, network_status_sinks, system_rpc_tx, network_starter) = let (network, network_status_sinks, system_rpc_tx, network_starter) =
sc_service::build_network(sc_service::BuildNetworkParams { sc_service::build_network(sc_service::BuildNetworkParams {
@@ -336,8 +336,8 @@ pub fn new_light(mut config: Configuration) -> Result<TaskManager, ServiceError>
config config
.network .network
.notifications_protocols .extra_sets
.push(sc_finality_grandpa::GRANDPA_PROTOCOL_NAME.into()); .push(sc_finality_grandpa::grandpa_peers_set_config());
let select_chain = sc_consensus::LongestChain::new(backend.clone()); let select_chain = sc_consensus::LongestChain::new(backend.clone());
+3
View File
@@ -157,6 +157,7 @@ parameter_types! {
read: 60_000_000, // ~0.06 ms = ~60 µs read: 60_000_000, // ~0.06 ms = ~60 µs
write: 200_000_000, // ~0.2 ms = 200 µs write: 200_000_000, // ~0.2 ms = 200 µs
}; };
pub const SS58Prefix: u8 = 86;
} }
impl frame_system::Config for Runtime { impl frame_system::Config for Runtime {
@@ -203,6 +204,8 @@ impl frame_system::Config for Runtime {
type BlockLength = bp_millau::BlockLength; type BlockLength = bp_millau::BlockLength;
/// The weight of database operations that the runtime can invoke. /// The weight of database operations that the runtime can invoke.
type DbWeight = DbWeight; type DbWeight = DbWeight;
/// The designated SS58 prefix of this chain.
type SS58Prefix = SS58Prefix;
} }
impl pallet_aura::Config for Runtime { impl pallet_aura::Config for Runtime {
+4 -4
View File
@@ -134,8 +134,8 @@ pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError>
config config
.network .network
.notifications_protocols .extra_sets
.push(sc_finality_grandpa::GRANDPA_PROTOCOL_NAME.into()); .push(sc_finality_grandpa::grandpa_peers_set_config());
let (network, network_status_sinks, system_rpc_tx, network_starter) = let (network, network_status_sinks, system_rpc_tx, network_starter) =
sc_service::build_network(sc_service::BuildNetworkParams { sc_service::build_network(sc_service::BuildNetworkParams {
@@ -335,8 +335,8 @@ pub fn new_light(mut config: Configuration) -> Result<TaskManager, ServiceError>
config config
.network .network
.notifications_protocols .extra_sets
.push(sc_finality_grandpa::GRANDPA_PROTOCOL_NAME.into()); .push(sc_finality_grandpa::grandpa_peers_set_config());
let select_chain = sc_consensus::LongestChain::new(backend.clone()); let select_chain = sc_consensus::LongestChain::new(backend.clone());
+3
View File
@@ -165,6 +165,7 @@ parameter_types! {
read: 60_000_000, // ~0.06 ms = ~60 µs read: 60_000_000, // ~0.06 ms = ~60 µs
write: 200_000_000, // ~0.2 ms = 200 µs write: 200_000_000, // ~0.2 ms = 200 µs
}; };
pub const SS58Prefix: u8 = 84;
} }
impl frame_system::Config for Runtime { impl frame_system::Config for Runtime {
@@ -211,6 +212,8 @@ impl frame_system::Config for Runtime {
type BlockLength = bp_rialto::BlockLength; type BlockLength = bp_rialto::BlockLength;
/// The weight of database operations that the runtime can invoke. /// The weight of database operations that the runtime can invoke.
type DbWeight = DbWeight; type DbWeight = DbWeight;
/// The designated SS58 prefix of this chain.
type SS58Prefix = SS58Prefix;
} }
impl pallet_aura::Config for Runtime { impl pallet_aura::Config for Runtime {
+1
View File
@@ -424,6 +424,7 @@ mod tests {
type BlockWeights = (); type BlockWeights = ();
type BlockLength = (); type BlockLength = ();
type DbWeight = (); type DbWeight = ();
type SS58Prefix = ();
} }
impl Config for TestRuntime { impl Config for TestRuntime {
@@ -54,8 +54,6 @@ pub trait Config<I: Instance>: CurrencyExchangeConfig<I> {
} }
benchmarks_instance! { benchmarks_instance! {
_ { }
// Benchmark `import_peer_transaction` extrinsic with the best possible conditions: // Benchmark `import_peer_transaction` extrinsic with the best possible conditions:
// * Proof is the transaction itself. // * Proof is the transaction itself.
// * Transaction has minimal size. // * Transaction has minimal size.
@@ -347,6 +347,7 @@ mod tests {
type BlockWeights = (); type BlockWeights = ();
type BlockLength = (); type BlockLength = ();
type DbWeight = (); type DbWeight = ();
type SS58Prefix = ();
} }
impl Config for TestRuntime { impl Config for TestRuntime {
@@ -8,7 +8,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
[dependencies] [dependencies]
codec = { package = "parity-scale-codec", version = "1.3.4" } codec = { package = "parity-scale-codec", version = "1.3.4" }
ethereum-types = "0.9.2" ethereum-types = "0.10.0"
finality-grandpa = "0.12.3" finality-grandpa = "0.12.3"
hex = "0.4" hex = "0.4"
log = "0.4.11" log = "0.4.11"
@@ -26,8 +26,6 @@ use frame_benchmarking::benchmarks_instance;
use frame_system::RawOrigin; use frame_system::RawOrigin;
benchmarks_instance! { benchmarks_instance! {
_ { }
// Benchmark `import_unsigned_header` extrinsic with the best possible conditions: // Benchmark `import_unsigned_header` extrinsic with the best possible conditions:
// * Parent header is finalized. // * Parent header is finalized.
// * New header doesn't require receipts. // * New header doesn't require receipts.
+1
View File
@@ -66,6 +66,7 @@ impl frame_system::Config for TestRuntime {
type BlockWeights = (); type BlockWeights = ();
type BlockLength = (); type BlockLength = ();
type DbWeight = (); type DbWeight = ();
type SS58Prefix = ();
} }
parameter_types! { parameter_types! {
+4 -4
View File
@@ -53,7 +53,7 @@ impl HeaderBuilder {
Self { Self {
header: AuraHeader { header: AuraHeader {
gas_limit: GAS_LIMIT.into(), gas_limit: GAS_LIMIT.into(),
seal: vec![bp_eth_poa::rlp_encode(&current_step), vec![]], seal: vec![bp_eth_poa::rlp_encode(&current_step).to_vec(), vec![]],
..Default::default() ..Default::default()
}, },
parent_header: Default::default(), parent_header: Default::default(),
@@ -95,7 +95,7 @@ impl HeaderBuilder {
pub fn with_number(number: u64) -> Self { pub fn with_number(number: u64) -> Self {
Self::with_parent(&AuraHeader { Self::with_parent(&AuraHeader {
number: number - 1, number: number - 1,
seal: vec![bp_eth_poa::rlp_encode(&(number - 1)), vec![]], seal: vec![bp_eth_poa::rlp_encode(&(number - 1)).to_vec(), vec![]],
..Default::default() ..Default::default()
}) })
} }
@@ -109,7 +109,7 @@ impl HeaderBuilder {
parent_hash: parent_header.compute_hash(), parent_hash: parent_header.compute_hash(),
number: parent_header.number + 1, number: parent_header.number + 1,
gas_limit: GAS_LIMIT.into(), gas_limit: GAS_LIMIT.into(),
seal: vec![bp_eth_poa::rlp_encode(&current_step), vec![]], seal: vec![bp_eth_poa::rlp_encode(&current_step).to_vec(), vec![]],
difficulty: calculate_score(parent_step, current_step, 0), difficulty: calculate_score(parent_step, current_step, 0),
..Default::default() ..Default::default()
}, },
@@ -120,7 +120,7 @@ impl HeaderBuilder {
/// Update step of this header. /// Update step of this header.
pub fn step(mut self, step: u64) -> Self { pub fn step(mut self, step: u64) -> Self {
let parent_step = self.parent_header.step(); let parent_step = self.parent_header.step();
self.header.seal[0] = rlp_encode(&step); self.header.seal[0] = rlp_encode(&step).to_vec();
self.header.difficulty = parent_step self.header.difficulty = parent_step
.map(|parent_step| calculate_score(parent_step, step, 0)) .map(|parent_step| calculate_score(parent_step, step, 0))
.unwrap_or_default(); .unwrap_or_default();
+5 -5
View File
@@ -637,11 +637,11 @@ mod tests {
assert_eq!(default_verify(&header), Err(Error::MissingStep)); assert_eq!(default_verify(&header), Err(Error::MissingStep));
// when step is the same as for the parent block // when step is the same as for the parent block
header.seal[0] = rlp_encode(&42u64); header.seal[0] = rlp_encode(&42u64).to_vec();
assert_eq!(default_verify(&header), Err(Error::DoubleVote)); assert_eq!(default_verify(&header), Err(Error::DoubleVote));
// when step is OK // when step is OK
header.seal[0] = rlp_encode(&43u64); header.seal[0] = rlp_encode(&43u64).to_vec();
assert_ne!(default_verify(&header), Err(Error::DoubleVote)); assert_ne!(default_verify(&header), Err(Error::DoubleVote));
// now check with validate_step check enabled // now check with validate_step check enabled
@@ -649,12 +649,12 @@ mod tests {
config.validate_step_transition = 0; config.validate_step_transition = 0;
// when step is lesser that for the parent block // when step is lesser that for the parent block
header.seal[0] = rlp_encode(&40u64); header.seal[0] = rlp_encode(&40u64).to_vec();
header.seal = vec![vec![40], vec![]]; header.seal = vec![vec![40], vec![]];
assert_eq!(verify_with_config(&config, &header), Err(Error::DoubleVote)); assert_eq!(verify_with_config(&config, &header), Err(Error::DoubleVote));
// when step is OK // when step is OK
header.seal[0] = rlp_encode(&44u64); header.seal[0] = rlp_encode(&44u64).to_vec();
assert_ne!(verify_with_config(&config, &header), Err(Error::DoubleVote)); assert_ne!(verify_with_config(&config, &header), Err(Error::DoubleVote));
} }
@@ -720,7 +720,7 @@ mod tests {
// when header signature is invalid // when header signature is invalid
let mut header = good_header.clone(); let mut header = good_header.clone();
header.seal[1] = rlp_encode(&H520::default()); header.seal[1] = rlp_encode(&H520::default()).to_vec();
assert_eq!(default_verify(&header), Err(Error::NotValidator)); assert_eq!(default_verify(&header), Err(Error::NotValidator));
// when everything is OK // when everything is OK
@@ -89,8 +89,6 @@ pub trait Config<I: Instance>: crate::Config<I> {
} }
benchmarks_instance! { benchmarks_instance! {
_ { }
// //
// Benchmarks that are used directly by the runtime. // Benchmarks that are used directly by the runtime.
// //
+1
View File
@@ -93,6 +93,7 @@ impl frame_system::Config for TestRuntime {
type BlockWeights = (); type BlockWeights = ();
type BlockLength = (); type BlockLength = ();
type DbWeight = (); type DbWeight = ();
type SS58Prefix = ();
} }
parameter_types! { parameter_types! {
@@ -134,6 +134,7 @@ mod tests {
type BlockWeights = (); type BlockWeights = ();
type BlockLength = (); type BlockLength = ();
type DbWeight = (); type DbWeight = ();
type SS58Prefix = ();
} }
parameter_types! { parameter_types! {
+1
View File
@@ -67,6 +67,7 @@ impl frame_system::Config for TestRuntime {
type DbWeight = (); type DbWeight = ();
type BlockWeights = (); type BlockWeights = ();
type BlockLength = (); type BlockLength = ();
type SS58Prefix = ();
} }
impl Config for TestRuntime { impl Config for TestRuntime {
+6 -6
View File
@@ -8,16 +8,16 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
[dependencies] [dependencies]
codec = { package = "parity-scale-codec", version = "1.3.4", default-features = false } codec = { package = "parity-scale-codec", version = "1.3.4", default-features = false }
ethbloom = { version = "0.8", default-features = false } ethbloom = { version = "0.10.0", default-features = false, features = ["rlp"] }
fixed-hash = { version = "0.5", default-features = false } fixed-hash = { version = "0.7", default-features = false }
hash-db = { version = "0.15.2", default-features = false } hash-db = { version = "0.15.2", default-features = false }
impl-rlp = { version = "0.2", default-features = false } impl-rlp = { version = "0.3", default-features = false }
impl-serde = { version = "0.2.3", optional = true } impl-serde = { version = "0.3.1", optional = true }
libsecp256k1 = { version = "0.3.4", default-features = false, features = ["hmac"] } libsecp256k1 = { version = "0.3.4", default-features = false, features = ["hmac"] }
parity-bytes = { version = "0.1", default-features = false } parity-bytes = { version = "0.1", default-features = false }
plain_hasher = { version = "0.2.2", default-features = false } plain_hasher = { version = "0.2.2", default-features = false }
primitive-types = { version = "0.7", default-features = false, features = ["codec", "rlp"] } primitive-types = { version = "0.8", default-features = false, features = ["codec", "rlp"] }
rlp = { version = "0.4", default-features = false } rlp = { version = "0.5", default-features = false }
serde = { version = "1.0", optional = true } serde = { version = "1.0", optional = true }
serde-big-array = { version = "0.2", optional = true } serde-big-array = { version = "0.2", optional = true }
triehash = { version = "0.8.2", default-features = false } triehash = { version = "0.8.2", default-features = false }
+4 -4
View File
@@ -289,7 +289,7 @@ impl AuraHeader {
} }
} }
s.out() s.out().to_vec()
} }
} }
@@ -320,7 +320,7 @@ impl UnsignedTransaction {
pub fn rlp(&self, chain_id: Option<u64>) -> Bytes { pub fn rlp(&self, chain_id: Option<u64>) -> Bytes {
let mut stream = RlpStream::new_list(if chain_id.is_some() { 9 } else { 6 }); let mut stream = RlpStream::new_list(if chain_id.is_some() { 9 } else { 6 });
self.rlp_to(chain_id, &mut stream); self.rlp_to(chain_id, &mut stream);
stream.out() stream.out().to_vec()
} }
/// Encode to given rlp stream. /// Encode to given rlp stream.
@@ -392,7 +392,7 @@ impl Receipt {
s.append(&log.data); s.append(&log.data);
} }
s.out() s.out().to_vec()
} }
} }
@@ -412,7 +412,7 @@ impl SealedEmptyStep {
for empty_step in empty_steps { for empty_step in empty_steps {
s.begin_list(2).append(&empty_step.signature).append(&empty_step.step); s.begin_list(2).append(&empty_step.signature).append(&empty_step.step);
} }
s.out() s.out().to_vec()
} }
} }
@@ -49,7 +49,7 @@ impl SignHeader for AuraHeader {
let message = self.seal_hash(false).unwrap(); let message = self.seal_hash(false).unwrap();
let signature = sign(author, message); let signature = sign(author, message);
self.seal[1] = rlp_encode(&signature); self.seal[1] = rlp_encode(&signature).to_vec();
self self
} }
@@ -74,7 +74,7 @@ impl SignTransaction for UnsignedTransaction {
stream.append(&signature_v); stream.append(&signature_v);
stream.append(&signature_r); stream.append(&signature_r);
stream.append(&signature_s); stream.append(&signature_s);
stream.out() stream.out().to_vec()
} }
} }
+2 -2
View File
@@ -12,11 +12,11 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
bp-message-lane = { path = "../message-lane", default-features = false } bp-message-lane = { path = "../message-lane", default-features = false }
bp-runtime = { path = "../runtime", default-features = false } bp-runtime = { path = "../runtime", default-features = false }
fixed-hash = { version = "0.6.1", default-features = false } fixed-hash = { version = "0.7.0", default-features = false }
hash256-std-hasher = { version = "0.15.2", default-features = false } hash256-std-hasher = { version = "0.15.2", default-features = false }
impl-codec = { version = "0.4.2", default-features = false } impl-codec = { version = "0.4.2", default-features = false }
impl-serde = { version = "0.3.1", optional = true } impl-serde = { version = "0.3.1", optional = true }
parity-util-mem = { version = "0.7.0", default-features = false, features = ["primitive-types"] } parity-util-mem = { version = "0.8.0", default-features = false, features = ["primitive-types"] }
serde = { version = "1.0.101", optional = true, features = ["derive"] } serde = { version = "1.0.101", optional = true, features = ["derive"] }
# Substrate Based Dependencies # Substrate Based Dependencies
+1 -1
View File
@@ -14,4 +14,4 @@ jsonrpsee = { git = "https://github.com/svyatonik/jsonrpsee.git", branch = "shar
libsecp256k1 = { version = "0.3.4", default-features = false, features = ["hmac"] } libsecp256k1 = { version = "0.3.4", default-features = false, features = ["hmac"] }
log = "0.4.11" log = "0.4.11"
relay-utils = { path = "../utils" } relay-utils = { path = "../utils" }
web3 = { version = "0.14", default-features = false } web3 = { version = "0.15", default-features = false }
+2 -2
View File
@@ -12,9 +12,9 @@ async-trait = "0.1.42"
clap = { version = "2.33.3", features = ["yaml"] } clap = { version = "2.33.3", features = ["yaml"] }
codec = { package = "parity-scale-codec", version = "1.3.4" } codec = { package = "parity-scale-codec", version = "1.3.4" }
env_logger = "0.8.2" env_logger = "0.8.2"
ethabi = "12.0" ethabi = "13.0"
ethabi-contract = "11.0" ethabi-contract = "11.0"
ethabi-derive = "12.0" ethabi-derive = "13.0"
futures = "0.3.8" futures = "0.3.8"
hex = "0.4" hex = "0.4"
hex-literal = "0.3" hex-literal = "0.3"