Skip to content

Commit

Permalink
build(deps): Bump Polkadot SDK to stable2409-3 (#126)
Browse files Browse the repository at this point in the history
* build: Switch Polkadot SDK dependencies to crates.io versions

* chore: Fix clippy warnings

* test: Fix outdated tests

* test: Fix failed tests

* Revert "test: Fix failed tests"

This reverts commit 0dabb47.

* revert: Switch const-hex dependency back to hex

* revert: Undo changes to Cargo.toml for cosmwasm-std
  • Loading branch information
conr2d authored Jan 20, 2025
1 parent e25af14 commit e03d9af
Show file tree
Hide file tree
Showing 19 changed files with 192 additions and 162 deletions.
75 changes: 51 additions & 24 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,45 +71,66 @@ assert_matches = "1.5.0"
base64 = { version = "0.22", default-features = false }
bech32 = { version = "0.11", default-features = false }
bincode = { package = "solana-bincode", git = "https://github.com/noirhq/solana-sdk", branch = "v2.0", default-features = false }
bnum = { version = "0.11.0", default-features = false }
bs58 = { version = "0.5.1", default-features = false }
buidl = { version = "0.2", default-features = false, features = ["derive"] }
bytemuck = "1.16.1"
bytemuck_derive = "1.7.0"
byteorder = { version = "1.5.0", default-features = false }
chrono = { version = "0.4", default-features = false }
codec = { package = "parity-scale-codec", version = "3.6", default-features = false }
const-hex = { version = "1.13", default-features = false }
cosmos-sdk-proto = { version = "0.24", default-features = false }
cosmwasm-core = { version = "2.1.3", default-features = false }
cosmwasm-crypto = "2.1.3"
cosmwasm-derive = { version = "2.1.3", default-features = false }
cosmwasm-schema = "2.1.3"
crc32fast = "1.3.2"
curve25519-dalek = { version = "4.1.3", features = ["digest", "rand_core"] }
cw20-ics20 = "2.0"
derive_more = { version = "1.0", default-features = false }
derive-where = "1.2"
eager = "0.1.0"
either = { version = "1.8", default-features = false }
enum-iterator = "1.5.0"
env_logger = "0.9"
ethereum = { version = "0.15.0", default-features = false }
futures = "0.3"
getrandom = { version = "0.2", default-features = false }
hex = { version = "0.4.3", default-features = false }
hex-literal = "0.4"
ibc = { version = "0.54.0", default-features = false }
impl-trait-for-tuples = { version = "0.2.2" }
itertools = { version = "0.12.1", default-features = false }
jsonrpsee = { version = "0.24" }
k256 = { version = "0.13", default-features = false }
libflate = { version = "2.1.0", default-features = false }
libflate = { git = "https://github.com/nostd-rs/libflate", branch = "nostd", default-features = false }
libsecp256k1 = { version = "0.6.0", default-features = false }
light-poseidon = "0.2.0"
log = { version = "0.4", default-features = false }
memoffset = "0.9"
nostd = "0.1.2"
num = { version = "0.4.3", default-features = false }
num-derive = "0.4"
num-traits = { version = "0.2", default-features = false }
num_enum = { version = "0.7", default-features = false }
parity-scale-codec = { version = "3.6", default-features = false }
parity-wasm = { version = "0.45.0", default-features = false }
paste = "1.0"
percentage = "0.1.0"
rand = { version = "0.8.5", default-features = false }
ripemd = { version = "0.1", default-features = false }
rustc_version = "0.4"
scale-info = { version = "2.11", default-features = false }
schemars = { version = "1.0.0-alpha.5", default-features = false }
scopeguard = { version = "1.2.0", default-features = false }
serde = { version = "1.0.203", default-features = false }
serde_json = { version = "1.0.134", default-features = false }
serde-json-wasm = { version = "1.0", default-features = false }
serde_derive = { version = "1.0.203", default-features = false }
sha2 = { version = "0.10", default-features = false }
sha3 = { version = "0.10", default-features = false }
slices = "0.2"
smallvec = "1.13"
solana-frozen-abi = "=2.0.18"
solana-frozen-abi-macro = "=2.0.18"
Expand All @@ -120,33 +141,39 @@ solana_rbpf = { git = "https://github.com/noirhq/solana-sdk", branch = "v2.0", d
static_assertions = "1.1"
test-case = "3.3.1"
thiserror = { version = "2.0", default-features = false }
vec1 = { version = "*", default-features = false }
wasmi = { version = "0.30.0", default-features = false }
wasm-instrument = { version = "0.4.0", default-features = false }
wasmi-validation = { version = "0.5.0", default-features = false }
wat = "1.0"

# substrate
frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409", default-features = false }
frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409", default-features = false }
pallet-assets = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409", default-features = false }
pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409", default-features = false }
pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409", default-features = false }
pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409", default-features = false }
pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409", default-features = false }
sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409" }
sp-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409", default-features = false }
sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409" }
sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409", default-features = false }
sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409", default-features = false }
sp-keyring = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409", default-features = false }
frame-support = { version = "38.2.0", default-features = false }
frame-system = { version = "38.0.0", default-features = false }
pallet-assets = { version = "40.0.0", default-features = false }
pallet-balances = { version = "39.0.0", default-features = false }
pallet-sudo = { version = "38.0.0", default-features = false }
pallet-timestamp = { version = "37.0.0", default-features = false }
pallet-transaction-payment = { version = "38.0.2", default-features = false }
sc-transaction-pool-api = { version = "37.0.0" }
sp-api = { version = "34.0.0", default-features = false }
sp-arithmetic = { version = "26.0.0", default-features = false }
sp-blockchain = { version = "37.0.1" }
sp-core = { version = "34.0.0", default-features = false }
sp-io = { version = "38.0.0", default-features = false }
sp-keyring = { version = "39.0.0", default-features = false }
sp-runtime = { version = "39.0.5", default-features = false }

# frontier
fp-evm = { git = "https://github.com/noirhq/frontier", branch = "stable2409", default-features = false }
fp-self-contained = { git = "https://github.com/noirhq/frontier", branch = "stable2409", default-features = false }
pallet-ethereum = { git = "https://github.com/noirhq/frontier", branch = "stable2409", default-features = false }
pallet-evm = { git = "https://github.com/noirhq/frontier", branch = "stable2409", default-features = false }
pallet-evm-precompile-blake2 = { git = "https://github.com/noirhq/frontier", branch = "stable2409", default-features = false }
pallet-evm-precompile-bn128 = { git = "https://github.com/noirhq/frontier", branch = "stable2409", default-features = false }
pallet-evm-precompile-modexp = { git = "https://github.com/noirhq/frontier", branch = "stable2409", default-features = false }
pallet-evm-precompile-simple = { git = "https://github.com/noirhq/frontier", branch = "stable2409", default-features = false }
precompile-utils = { git = "https://github.com/noirhq/frontier", branch = "stable2409", default-features = false }
fp-evm = { git = "https://github.com/noirhq/frontier", branch = "crates.io/stable2409", default-features = false }
fp-self-contained = { git = "https://github.com/noirhq/frontier", branch = "crates.io/stable2409", default-features = false }
pallet-ethereum = { git = "https://github.com/noirhq/frontier", branch = "crates.io/stable2409", default-features = false }
pallet-evm = { git = "https://github.com/noirhq/frontier", branch = "crates.io/stable2409", default-features = false }
pallet-evm-precompile-blake2 = { git = "https://github.com/noirhq/frontier", branch = "crates.io/stable2409", default-features = false }
pallet-evm-precompile-bn128 = { git = "https://github.com/noirhq/frontier", branch = "crates.io/stable2409", default-features = false }
pallet-evm-precompile-modexp = { git = "https://github.com/noirhq/frontier", branch = "crates.io/stable2409", default-features = false }
pallet-evm-precompile-simple = { git = "https://github.com/noirhq/frontier", branch = "crates.io/stable2409", default-features = false }
precompile-utils = { git = "https://github.com/noirhq/frontier", branch = "crates.io/stable2409", default-features = false }

# noir
cosmos-rpc = { path = "frame/cosmos/rpc", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion frame/cosmos/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ use frame_support::{
pallet_prelude::*,
};
use frame_system::{pallet_prelude::*, CheckWeight};
use nostd::prelude::*;
use pallet_cosmos_types::{
address::acc_address_from_bech32,
context::traits::Context,
Expand Down Expand Up @@ -145,7 +146,6 @@ pub mod pallet {
Contains, Currency,
},
};
use nostd::{string::String, vec::Vec};
use np_cosmos::traits::ChainInfo;
use pallet_cosmos_types::{
context::traits::MinGasPrices, errors::CosmosError, events::CosmosEvent, gas::Gas,
Expand Down
1 change: 1 addition & 0 deletions frame/cosmos/types/src/tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
// limitations under the License.

use crate::{events::CosmosEvent, gas::Gas};
use nostd::prelude::*;
use parity_scale_codec::{Decode, Encode};
use scale_info::TypeInfo;
use serde::{Deserialize, Serialize};
Expand Down
8 changes: 4 additions & 4 deletions frame/solana/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ use solana_sdk::{

fn before_each() {
<AccountMeta<Test>>::insert(
&Keypair::alice().account_id(),
Keypair::alice().account_id(),
AccountMetadata { rent_epoch: u64::MAX, owner: system_program::id(), executable: false },
);
<AccountMeta<Test>>::insert(
&Keypair::bob().account_id(),
Keypair::bob().account_id(),
AccountMetadata { rent_epoch: u64::MAX, owner: system_program::id(), executable: false },
);

Expand Down Expand Up @@ -264,7 +264,7 @@ fn spl_token_program_should_work() {
assert!(process_transaction(&bank, tx).is_ok());

let state = spl_token::state::Account::unpack_from_slice(&<AccountData<Test>>::get(
&account.account_id(),
account.account_id(),
))
.expect("token account state");
assert_eq!(state.mint, mint.pubkey());
Expand Down Expand Up @@ -387,7 +387,7 @@ fn trace_executed_transaction_events() {

let token_account = account_keys
.into_iter()
.filter_map(|account_key| Pallet::<Test>::get_account_info(account_key))
.filter_map(Pallet::<Test>::get_account_info)
.filter(|account| account.owner == spl_token::id())
.filter_map(|account| spl_token::state::Account::unpack(&account.data).ok())
.next()
Expand Down
2 changes: 1 addition & 1 deletion primitives/runtime/src/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ mod tests {
fn late_init_should_work() {
let mut li = <LateInit<i32>>::new();
let err = std::panic::catch_unwind(|| {
let _ = li.clone();
let _ = *li;
});
assert!(err.is_err());
if let Err(e) = err {
Expand Down
12 changes: 5 additions & 7 deletions vendor/composable/composable-support/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@ version = "1.0.0"
targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
codec = { version = "3.6.0", package = "parity-scale-codec", default-features = false, features = [
"derive",
] }
num-traits = { version = "0.2.14", default-features = false }
codec = { workspace = true, features = ["derive"] }
num-traits = { workspace = true }

frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409", default-features = false }
sp-arithmetic = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409", default-features = false }
frame-support = { workspace = true }
sp-arithmetic = { workspace = true }
sp-runtime = { workspace = true }

[features]
default = ["std"]
Expand Down
51 changes: 22 additions & 29 deletions vendor/composable/cosmwasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,36 +9,30 @@ version = "1.0.0"
doctest = false

[dependencies]
codec = { package = "parity-scale-codec", version = "3.6", default-features = false }
scale-info = { default-features = false, version = "2.11", features = [
"derive",
] }
codec = { workspace = true }
scale-info = { workspace = true, features = ["derive"] }

hex = { version = "0.4.3", default-features = false, features = ["alloc"] }
hex-literal = "0.4.1"
ibc = { version = "0.54.0", default-features = false }
libsecp256k1 = { version = "0.7.0", default-features = false }
log = { version = "0.4.21", default-features = false }
parity-wasm = { version = "0.45.0", default-features = false }
serde = { version = "1.0.210", default-features = false, features = ["derive"] }
serde_json = { version = "1.0.127", default-features = false, features = [
"alloc",
] }
sha2 = { version = "0.10", default-features = false }
sha3 = { version = "0.10", default-features = false }
vec1 = { version = "*", default-features = false, features = ["smallvec-v1"] }
wasmi = { version = "0.30.0", default-features = false }
wasm-instrument = { version = "0.4.0", default-features = false }
wasmi-validation = { version = "0.5.0", default-features = false }
ibc = { workspace = true }
libsecp256k1 = { workspace = true }
log = { workspace = true }
parity-wasm = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true, features = ["alloc"] }
sha2 = { workspace = true }
sha3 = { workspace = true }
vec1 = { workspace = true, features = ["smallvec-v1"] }
wasmi = { workspace = true }
wasm-instrument = { workspace = true }
wasmi-validation = { workspace = true }

frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409", default-features = false }
frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409", default-features = false }
pallet-assets = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409", default-features = false }
pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409", default-features = false }
sp-arithmetic = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409", default-features = false }
sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409", default-features = false }
sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409", default-features = false }
frame-support = { workspace = true }
frame-system = { workspace = true }
pallet-assets = { workspace = true }
pallet-balances = { workspace = true }
sp-arithmetic = { workspace = true }
sp-core = { workspace = true }
sp-io = { workspace = true }
sp-runtime = { workspace = true }

composable-support = { workspace = true, default-features = false }
cosmwasm-std = { workspace = true, default-features = false, features = [
Expand All @@ -63,7 +57,6 @@ default = ["std"]
std = [
"codec/std",
"scale-info/std",
"hex/std",
"ibc/std",
"libsecp256k1/std",
"log/std",
Expand Down
30 changes: 13 additions & 17 deletions vendor/composable/vm-wasmi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@ stargate = ["cosmwasm-vm/stargate"]
std = ["cosmwasm-std/std"]

[dependencies]
serde = { version = "1.0.210", default-features = false, features = ["derive"] }
serde_json = { version = "1.0.127", default-features = false, features = [
"alloc",
] }
either = { version = "1.8", default-features = false }
log = { version = "0.4.21", default-features = false }
wasmi = { version = "0.30.0", default-features = false }
wasmi-validation = { version = "0.5.0", default-features = false }
wasm-instrument = { version = "0.4.0", default-features = false }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true, features = ["alloc"] }
either = { workspace = true }
log = { workspace = true }
wasmi = { workspace = true }
wasmi-validation = { workspace = true }
wasm-instrument = { workspace = true }
cosmwasm-std = { workspace = true, default-features = false, features = [
"iterator",
"stargate",
Expand All @@ -28,14 +26,12 @@ cosmwasm-vm = { workspace = true, default-features = false, features = [
"iterator",
"stargate",
] }
hex = { version = "0.4.3", default-features = false, features = ["alloc"] }
rand_core = { version = "0.6.4", default-features = false, features = ["alloc"] }
const-hex = { workspace = true, features = ["alloc"] }

[dev-dependencies]
wat = "1.0"
env_logger = "0.9"
cosmwasm-crypto = { version = "2.1.3" }
wat = { workspace = true }
env_logger = { workspace = true }
cosmwasm-crypto = { workspace = true }
rand = { workspace = true, default-features = true }

cw20-ics20 = { git = "https://github.com/CosmWasm/cw-plus", default-features = false, features = [
"library",
] }
cw20-ics20 = { version = "2.0", features = ["library"] }
2 changes: 1 addition & 1 deletion vendor/composable/vm-wasmi/src/code_gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ impl EntrypointCall for QueryFn {

impl QueryFn {
pub fn new() -> Result<Self, serde_json::Error> {
let encoded_result = hex::encode("{}");
let encoded_result = const_hex::encode("{}");
Ok(QueryFn(Self::plain(ContractResult::Ok(encoded_result))?))
}
}
Expand Down
2 changes: 1 addition & 1 deletion vendor/composable/vm-wasmi/src/semantic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ use cosmwasm_vm::{
transaction::Transactional,
vm::{VmErrorOf, VmGas, VmGasCheckpoint},
};
use rand_core::OsRng;
use rand::rngs::OsRng;
use wasm_instrument::gas_metering::{host_function, Rules};
use wasmi::core::HostError;

Expand Down
10 changes: 4 additions & 6 deletions vendor/composable/vm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ cosmwasm-std = { workspace = true, default-features = false, features = [
"stargate",
"cosmwasm_1_2",
] }
log = { version = "0.4.21", default-features = false }
num = { version = "0.4.3", default-features = false }
serde = { version = "1.0.210", default-features = false, features = ["derive"] }
serde_json = { version = "1.0.127", default-features = false, features = [
"alloc",
] }
log = { workspace = true }
num = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true, features = ["alloc"] }
Loading

0 comments on commit e03d9af

Please sign in to comment.