Skip to content

Commit b2c4e47

Browse files
committed
fix: update from v0.9.27 to v0.9.36
v0.9.28 - changes v0.9.29 - changes v0.9.30 - changes v0.9.31 - changes v0.9.37 changes Add indices for calls of ethereum-transactions See: paritytech/substrate#12891 paritytech/substrate#11381 Fixes ethereum-events tests Add indices for calls of ethereum-transactions See: - paritytech/substrate#12891 - paritytech/substrate#11381 Fixes compilation errors of avn-proxy pallet - Cleanups WiP - Adds indices for calls Fixes compilation errors of nft-manager pallet - Cleanup - Adds indices for calls Fixes tests for nft-manager pallet Fixup nft-manager imports Fixes avn-proxy tests Fixes tests on Ethereum Events pallet SYS-3197 - token-manager pallet::call changed SYS-3197 - summary pallet and exact substrate version fix: tests Cleanup warnings and adds call indexes Fixes some of the test in token manager Reverts the interface changes to use Box<call>. Fixes mock, re-introduces some of the tests, and temporarily disables some. Re-enable the rest of token manager tests Fixup: Remove warning Fixes token-manager benchmarks compilation errors Updates and fixes Benchmarks cargo dependencies. Also fixes avn-proxy compilation errors. Adds instructions to run pallet benchmarks fix: updated benchmarks fix: added prod-like benchmarks for parachain-staking Fix staking tests fix: benchmark test for parachain staking fix: add max proof to weights init fix: linting
1 parent 8bec087 commit b2c4e47

106 files changed

Lines changed: 3866 additions & 3060 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Cargo.lock

Lines changed: 885 additions & 423 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,21 @@ We welcome contributions but before you devote quite a bit of time to contributi
1717
Read our contribution guide [HERE](./CONTRIBUTING.adoc).
1818

1919
Note: This repository is managed frequently so you do not need to email/contact us to notify us of your submission.
20+
21+
## Building and testing the pallets
22+
23+
To build and test a pallet, navigate to the directory of the pallet in your project by running the following command:
24+
```sh
25+
cd pallets/<pallet_name>/
26+
```
27+
Once you're in the pallet directory, use cargo to build and test the pallet by running the following commands:
28+
```sh
29+
# Build the pallet
30+
cargo build
31+
32+
# Run the unit and integration tests
33+
cargo test
34+
35+
# Test the benchmark tests
36+
cargo test --features runtime-benchmarks
37+
```

pallets/avn-finality-tracker/Cargo.toml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,31 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features =
1212
hex = { version = "0.4.3", default-features = false, features = ["alloc"] }
1313
scale-info = { version = "2.0", default-features = false, features = ["derive"] }
1414

15-
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
16-
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
17-
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
18-
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
19-
sp-application-crypto = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
15+
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" }
16+
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" }
17+
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" }
18+
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" }
19+
sp-application-crypto = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" }
2020
sp-avn-common = { version = "0.12.0", default-features = false, path = "../../primitives/avn-common" }
21-
frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
22-
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
21+
frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" }
22+
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" }
2323
pallet-avn = { version = "0.12.0", default-features = false, path = "../avn" }
2424

2525
# Optional imports
2626
serde = { version = "1.0.137", optional = true }
27-
frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", optional = true }
27+
frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36", optional = true }
2828

2929
[dev-dependencies]
3030
hex-literal = { version = "0.3.4", default-features = false }
3131
parking_lot = { version = "0.12.0" }
32-
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
33-
substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
32+
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" }
33+
substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" }
3434

3535
[features]
3636
migrate = []
3737
default = ["std"]
3838
std = [
39+
"frame-benchmarking?/std",
3940
"serde",
4041
"codec/std",
4142
"sp-std/std",
@@ -48,7 +49,7 @@ std = [
4849
"pallet-avn/std"
4950
]
5051
runtime-benchmarks = [
51-
"frame-benchmarking",
52+
"frame-benchmarking/runtime-benchmarks",
5253
"frame-support/runtime-benchmarks",
5354
"frame-system/runtime-benchmarks",
5455
]

pallets/avn-finality-tracker/src/benchmarking.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
#![cfg(feature = "runtime-benchmarks")]
77

8-
use super::*;
8+
use crate::*;
99

1010
use frame_benchmarking::{account, benchmarks, impl_benchmark_test_suite};
1111
use frame_system::RawOrigin;

pallets/avn-finality-tracker/src/default_weights.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
6464
// Storage: AvnFinalityTracker LastFinalisedBlockSubmission (r:0 w:1)
6565
/// The range of component `v` is `[3, 10]`.
6666
fn submit_latest_finalised_block_number(v: u32, ) -> Weight {
67-
(19_069_000 as Weight)
67+
(Weight::from_ref_time(19_069_000))
6868
// Standard Error: 18_000
69-
.saturating_add((118_000 as Weight).saturating_mul(v as Weight))
70-
.saturating_add(T::DbWeight::get().reads(3 as Weight))
71-
.saturating_add(T::DbWeight::get().writes(2 as Weight))
69+
.saturating_add(Weight::from_ref_time(118_000)).saturating_mul(v as u64)
70+
.saturating_add(T::DbWeight::get().reads(3))
71+
.saturating_add(T::DbWeight::get().writes(2))
7272
}
7373
}
7474

@@ -80,10 +80,10 @@ impl WeightInfo for () {
8080
// Storage: AvnFinalityTracker LastFinalisedBlockSubmission (r:0 w:1)
8181
/// The range of component `v` is `[3, 10]`.
8282
fn submit_latest_finalised_block_number(v: u32, ) -> Weight {
83-
(19_069_000 as Weight)
83+
(Weight::from_ref_time(19_069_000))
8484
// Standard Error: 18_000
85-
.saturating_add((118_000 as Weight).saturating_mul(v as Weight))
86-
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
87-
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
85+
.saturating_add(Weight::from_ref_time(118_000)).saturating_mul(v as u64)
86+
.saturating_add(RocksDbWeight::get().reads(3))
87+
.saturating_add(RocksDbWeight::get().writes(2))
8888
}
8989
}

0 commit comments

Comments
 (0)