Skip to content

Commit

Permalink
Bump substrate & deps (paritytech#637)
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot-preview[bot] authored and serban300 committed Apr 9, 2024
1 parent 0797946 commit bbce6f4
Show file tree
Hide file tree
Showing 22 changed files with 47 additions and 41 deletions.
8 changes: 4 additions & 4 deletions bridges/bin/millau/node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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());

Expand Down
3 changes: 3 additions & 0 deletions bridges/bin/millau/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions bridges/bin/rialto/node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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());

Expand Down
3 changes: 3 additions & 0 deletions bridges/bin/rialto/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions bridges/modules/call-dispatch/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ mod tests {
type BlockWeights = ();
type BlockLength = ();
type DbWeight = ();
type SS58Prefix = ();
}

impl Config for TestRuntime {
Expand Down
2 changes: 0 additions & 2 deletions bridges/modules/currency-exchange/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions bridges/modules/currency-exchange/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ mod tests {
type BlockWeights = ();
type BlockLength = ();
type DbWeight = ();
type SS58Prefix = ();
}

impl Config for TestRuntime {
Expand Down
2 changes: 1 addition & 1 deletion bridges/modules/ethereum-contract/builtin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 0 additions & 2 deletions bridges/modules/ethereum/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions bridges/modules/ethereum/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ impl frame_system::Config for TestRuntime {
type BlockWeights = ();
type BlockLength = ();
type DbWeight = ();
type SS58Prefix = ();
}

parameter_types! {
Expand Down
8 changes: 4 additions & 4 deletions bridges/modules/ethereum/src/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl HeaderBuilder {
Self {
header: AuraHeader {
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()
},
parent_header: Default::default(),
Expand Down Expand Up @@ -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()
})
}
Expand All @@ -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(&current_step), vec![]],
seal: vec![bp_eth_poa::rlp_encode(&current_step).to_vec(), vec![]],
difficulty: calculate_score(parent_step, current_step, 0),
..Default::default()
},
Expand All @@ -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();
Expand Down
10 changes: 5 additions & 5 deletions bridges/modules/ethereum/src/verification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -637,24 +637,24 @@ 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
let mut config = test_aura_config();
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));
}

Expand Down Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions bridges/modules/message-lane/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ pub trait Config<I: Instance>: crate::Config<I> {
}

benchmarks_instance! {
_ { }

//
// Benchmarks that are used directly by the runtime.
//
Expand Down
1 change: 1 addition & 0 deletions bridges/modules/message-lane/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ impl frame_system::Config for TestRuntime {
type BlockWeights = ();
type BlockLength = ();
type DbWeight = ();
type SS58Prefix = ();
}

parameter_types! {
Expand Down
1 change: 1 addition & 0 deletions bridges/modules/shift-session-manager/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ mod tests {
type BlockWeights = ();
type BlockLength = ();
type DbWeight = ();
type SS58Prefix = ();
}

parameter_types! {
Expand Down
1 change: 1 addition & 0 deletions bridges/modules/substrate/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ impl frame_system::Config for TestRuntime {
type DbWeight = ();
type BlockWeights = ();
type BlockLength = ();
type SS58Prefix = ();
}

impl Config for TestRuntime {
Expand Down
12 changes: 6 additions & 6 deletions bridges/primitives/ethereum-poa/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
8 changes: 4 additions & 4 deletions bridges/primitives/ethereum-poa/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ impl AuraHeader {
}
}

s.out()
s.out().to_vec()
}
}

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -392,7 +392,7 @@ impl Receipt {
s.append(&log.data);
}

s.out()
s.out().to_vec()
}
}

Expand All @@ -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()
}
}

Expand Down
4 changes: 2 additions & 2 deletions bridges/primitives/ethereum-poa/src/signatures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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()
}
}

Expand Down
4 changes: 2 additions & 2 deletions bridges/primitives/millau/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion bridges/relays/ethereum-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
4 changes: 2 additions & 2 deletions bridges/relays/ethereum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit bbce6f4

Please sign in to comment.