Skip to content

Commit

Permalink
fix: update from v0.9.27 to v0.9.36
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ivan-cholakov committed Mar 22, 2023
1 parent 8bec087 commit b2c4e47
Show file tree
Hide file tree
Showing 106 changed files with 3,866 additions and 3,060 deletions.
1,308 changes: 885 additions & 423 deletions Cargo.lock

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,21 @@ We welcome contributions but before you devote quite a bit of time to contributi
Read our contribution guide [HERE](./CONTRIBUTING.adoc).

Note: This repository is managed frequently so you do not need to email/contact us to notify us of your submission.

## Building and testing the pallets

To build and test a pallet, navigate to the directory of the pallet in your project by running the following command:
```sh
cd pallets/<pallet_name>/
```
Once you're in the pallet directory, use cargo to build and test the pallet by running the following commands:
```sh
# Build the pallet
cargo build

# Run the unit and integration tests
cargo test

# Test the benchmark tests
cargo test --features runtime-benchmarks
```
23 changes: 12 additions & 11 deletions pallets/avn-finality-tracker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,31 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features =
hex = { version = "0.4.3", default-features = false, features = ["alloc"] }
scale-info = { version = "2.0", default-features = false, features = ["derive"] }

sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
sp-application-crypto = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" }
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" }
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" }
sp-application-crypto = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" }
sp-avn-common = { version = "0.12.0", default-features = false, path = "../../primitives/avn-common" }
frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" }
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" }
pallet-avn = { version = "0.12.0", default-features = false, path = "../avn" }

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

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

[features]
migrate = []
default = ["std"]
std = [
"frame-benchmarking?/std",
"serde",
"codec/std",
"sp-std/std",
Expand All @@ -48,7 +49,7 @@ std = [
"pallet-avn/std"
]
runtime-benchmarks = [
"frame-benchmarking",
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
]
2 changes: 1 addition & 1 deletion pallets/avn-finality-tracker/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#![cfg(feature = "runtime-benchmarks")]

use super::*;
use crate::*;

use frame_benchmarking::{account, benchmarks, impl_benchmark_test_suite};
use frame_system::RawOrigin;
Expand Down
16 changes: 8 additions & 8 deletions pallets/avn-finality-tracker/src/default_weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: AvnFinalityTracker LastFinalisedBlockSubmission (r:0 w:1)
/// The range of component `v` is `[3, 10]`.
fn submit_latest_finalised_block_number(v: u32, ) -> Weight {
(19_069_000 as Weight)
(Weight::from_ref_time(19_069_000))
// Standard Error: 18_000
.saturating_add((118_000 as Weight).saturating_mul(v as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(118_000)).saturating_mul(v as u64)
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
}

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

0 comments on commit b2c4e47

Please sign in to comment.