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