Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump some dependencies #5886

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
228 changes: 165 additions & 63 deletions Cargo.lock

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -742,8 +742,8 @@ env_logger = { version = "0.11.2" }
environmental = { version = "1.1.4", default-features = false }
equivocation-detector = { path = "bridges/relays/equivocation" }
ethabi = { version = "1.0.0", default-features = false, package = "ethabi-decode" }
ethbloom = { version = "0.13.0", default-features = false }
ethereum-types = { version = "0.14.1", default-features = false }
ethbloom = { version = "0.14.1", default-features = false }
ethereum-types = { version = "0.15.1", default-features = false }
exit-future = { version = "0.2.0" }
expander = { version = "2.0.0" }
fatality = { version = "0.1.1" }
Expand Down Expand Up @@ -1080,7 +1080,7 @@ polkavm-derive = "0.9.1"
polkavm-linker = "0.9.2"
portpicker = { version = "0.1.1" }
pretty_assertions = { version = "1.3.0" }
primitive-types = { version = "0.12.1", default-features = false }
primitive-types = { version = "0.13.1", default-features = false, features = ["num-traits"] }
proc-macro-crate = { version = "3.0.0" }
proc-macro-warning = { version = "1.0.0", default-features = false }
proc-macro2 = { version = "1.0.86" }
Expand Down Expand Up @@ -1108,7 +1108,7 @@ relay-substrate-client = { path = "bridges/relays/client-substrate" }
relay-utils = { path = "bridges/relays/utils" }
remote-externalities = { path = "substrate/utils/frame/remote-externalities", default-features = false, package = "frame-remote-externalities" }
reqwest = { version = "0.11", default-features = false }
rlp = { version = "0.5.2", default-features = false }
rlp = { version = "0.6.1", default-features = false }
rococo-emulated-chain = { path = "cumulus/parachains/integration-tests/emulated/chains/relays/rococo" }
rococo-parachain-runtime = { path = "cumulus/parachains/runtimes/testing/rococo-parachain" }
rococo-runtime = { path = "polkadot/runtime/rococo" }
Expand Down
16 changes: 16 additions & 0 deletions prdoc/pr_5886.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
title: Bump some dependencies
doc:
- audience: Runtime Dev
description: |-
This bumps `ethbloom`, `ethereum-types`, `primitive-types` and `rlp` to their latest version.

Fixes: https://github.com/paritytech/polkadot-sdk/issues/5870
crates:
- name: sc-consensus-babe
bump: patch
- name: pallet-babe
bump: patch
- name: pallet-revive
bump: patch
- name: sp-runtime
bump: patch
3 changes: 2 additions & 1 deletion substrate/client/consensus/babe/src/authorship.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ pub(super) fn secondary_slot_author(
return None
}

let rand = U256::from((randomness, slot).using_encoded(sp_crypto_hashing::blake2_256));
let rand =
U256::from_little_endian(&(randomness, slot).using_encoded(sp_crypto_hashing::blake2_256));

let authorities_len = U256::from(authorities.len());
let idx = rand % authorities_len;
Expand Down
2 changes: 1 addition & 1 deletion substrate/frame/babe/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ pub fn new_test_ext_with_pairs(
authorities_len: usize,
) -> (Vec<AuthorityPair>, sp_io::TestExternalities) {
let pairs = (0..authorities_len)
.map(|i| AuthorityPair::from_seed(&U256::from(i).into()))
.map(|i| AuthorityPair::from_seed(&U256::from(i).to_little_endian()))
.collect::<Vec<_>>();

let public = pairs.iter().map(|p| p.public()).collect();
Expand Down
4 changes: 1 addition & 3 deletions substrate/frame/revive/src/wasm/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ const MAX_DECODE_NESTING: u32 = 256;

/// Encode a `U256` into a 32 byte buffer.
fn as_bytes(u: U256) -> [u8; 32] {
let mut bytes = [0u8; 32];
u.to_little_endian(&mut bytes);
bytes
u.to_little_endian()
}

#[derive(Clone, Copy)]
Expand Down
2 changes: 1 addition & 1 deletion substrate/frame/sassafras/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ pub fn new_test_ext_with_pairs(
with_ring_context: bool,
) -> (Vec<AuthorityPair>, sp_io::TestExternalities) {
let pairs = (0..authorities_len)
.map(|i| AuthorityPair::from_seed(&U256::from(i).into()))
.map(|i| AuthorityPair::from_seed(&U256::from(i).to_little_endian()))
.collect::<Vec<_>>();

let authorities: Vec<_> = pairs.iter().map(|p| p.public()).collect();
Expand Down
8 changes: 3 additions & 5 deletions substrate/primitives/runtime/src/testing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@ use crate::{
ApplyExtrinsicResultWithInfo, KeyTypeId,
};
use serde::{de::Error as DeError, Deserialize, Deserializer, Serialize, Serializer};
use sp_core::{
crypto::{key_types, ByteArray, CryptoType, Dummy},
U256,
};
use sp_core::crypto::{key_types, ByteArray, CryptoType, Dummy};
pub use sp_core::{sr25519, H256};
use std::{
cell::RefCell,
Expand Down Expand Up @@ -79,7 +76,8 @@ impl From<UintAuthorityId> for u64 {
impl UintAuthorityId {
/// Convert this authority ID into a public key.
pub fn to_public_key<T: ByteArray>(&self) -> T {
let bytes: [u8; 32] = U256::from(self.0).into();
let mut bytes = [0u8; 32];
bytes[0..8].copy_from_slice(&self.0.to_le_bytes());
T::from_slice(&bytes).unwrap()
}
}
Expand Down
Loading