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

Polkadot v1.1.0 #489

Merged
merged 64 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from 61 commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
aa391c9
replacing dependencies
gianfra-t Jul 30, 2024
b883bc6
dependencies upgrades
gianfra-t Jul 30, 2024
1b22e66
restructure imports for update, relevant modifications of chain exten…
gianfra-t Jul 31, 2024
7a7a37d
reorder dependencies and types for pallets staking, tokens and allowance
gianfra-t Jul 31, 2024
2ab8195
update fixes for asset registry, runtime common
gianfra-t Jul 31, 2024
5187366
amplitude 1.1.0 changes
gianfra-t Jul 31, 2024
f7083ed
updating foucoco, pendulum runtimes
gianfra-t Aug 1, 2024
2a877c2
benchmark fixes for common
gianfra-t Aug 1, 2024
ce6a0af
fixes for runtimes with runtime benchmarks
gianfra-t Aug 5, 2024
fa9124c
node modifications for upgrade
gianfra-t Aug 5, 2024
afa2445
WIP fixing integration tests
gianfra-t Aug 6, 2024
bed37c5
fixed missing default features
gianfra-t Aug 7, 2024
fda5880
WIP fixing std issue
gianfra-t Aug 7, 2024
5ec2769
modification toml pendulum, orml-currencies, amplitude
gianfra-t Aug 7, 2024
34937d3
use serde, log with default features = false
gianfra-t Aug 8, 2024
b394ea5
remove std conditionals on pallets
gianfra-t Aug 8, 2024
c2411a1
fix foucoco default features declaration
gianfra-t Aug 8, 2024
3a1f47a
add trait to sibling currency id
gianfra-t Aug 8, 2024
af01ba6
remove unnecessary trait ConvertMultilocation
gianfra-t Aug 8, 2024
4bbd6b6
remove unnecessary trait ConvertMultilocation in integration tests si…
gianfra-t Aug 8, 2024
8613e59
use start_relay_chain_tasks in node
gianfra-t Aug 8, 2024
9639e19
modifications .toml integration tests
gianfra-t Aug 8, 2024
ad33520
WIP testing comprehensive patch
gianfra-t Aug 12, 2024
f844e6b
fix for integration tests dependencies
gianfra-t Aug 16, 2024
ef2b22f
remove deps of polkadot fellows runtime, solve integration test parac…
gianfra-t Aug 16, 2024
9c0a4bc
adding pallets to sibling chain
gianfra-t Aug 19, 2024
9514f40
compile sibling tests with emulator macros, fixing tests
gianfra-t Aug 19, 2024
b25abc0
fix all pen tests
gianfra-t Aug 19, 2024
b6f121f
fixing amplitude test
gianfra-t Aug 19, 2024
ab11b6f
integration tests stable
gianfra-t Aug 20, 2024
1bd8047
cleanup, solving features issue with pallet parachain system
gianfra-t Aug 20, 2024
00b5a9f
remove .txt files
gianfra-t Aug 21, 2024
4be1e9a
define storage version bump for bounties, staking
gianfra-t Aug 22, 2024
cc7d374
fix pallets mock runtimes
gianfra-t Aug 22, 2024
487b765
add patch to solve missing vrfs dependency and compile with newer nig…
gianfra-t Aug 22, 2024
1f266db
temporary remove flag
gianfra-t Aug 22, 2024
a342d92
allow deprecated flag
gianfra-t Aug 23, 2024
1606c9f
warnings and comment requests
gianfra-t Aug 26, 2024
9a0526a
more unused imports removal
gianfra-t Aug 26, 2024
5be0728
clippy fixes
gianfra-t Aug 26, 2024
2ce46a8
set inherent data provider closure to default
gianfra-t Aug 26, 2024
ccdcca9
add missing flag for eventual try-runtime command
gianfra-t Aug 26, 2024
e03041e
format nightly for latest changes
gianfra-t Aug 27, 2024
6a3f685
Revert "format nightly for latest changes"
gianfra-t Aug 27, 2024
44bbd06
generate weights for dia-oracle pallet
gianfra-t Aug 28, 2024
27dc016
use temporary spacewalk version with dia-oracle fix
gianfra-t Aug 29, 2024
2248cb3
re-introduce non local definition flag for clippy
gianfra-t Aug 29, 2024
57af166
use previous spacewalk revision
gianfra-t Aug 29, 2024
0dfa214
remove temporary dia-oracle fix branch
gianfra-t Aug 29, 2024
a8712ab
remove temp stellar sdk patch
gianfra-t Aug 29, 2024
f51fa62
Readme modification, nightly version used
gianfra-t Sep 3, 2024
422f4c2
clean comments and address review improvements
gianfra-t Sep 3, 2024
07db076
remove unused dependencies and imports
gianfra-t Sep 3, 2024
7f7d823
run fmt nightly
gianfra-t Sep 3, 2024
7f9d96d
move const outside macro definition
gianfra-t Sep 3, 2024
e37f5b2
fix bandersnatch parch url
gianfra-t Sep 10, 2024
79012a1
add benchmarkings (those not failed), modify config to use default we…
gianfra-t Sep 11, 2024
82ec7d3
Revert "add benchmarkings (those not failed), modify config to use de…
gianfra-t Sep 11, 2024
1d49c52
fix benchmark for orml-tokens-management, add benchmark helper script…
gianfra-t Sep 11, 2024
d186500
fix definition of weights in runtimes
gianfra-t Sep 11, 2024
96ba3db
run redeem benchmark after fix for ED
gianfra-t Sep 16, 2024
4e6924c
replace spacewalk rev latest
gianfra-t Sep 17, 2024
a6aecdf
use default values for pallet contracts
gianfra-t Sep 18, 2024
17aef86
Update pallets/vesting-manager/Cargo.toml
gianfra-t Sep 18, 2024
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
12 changes: 6 additions & 6 deletions .github/workflows/test-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ jobs:
- name: Setup nightly Rust toolchain
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly-2024-04-18
toolchain: nightly-2024-05-30
gianfra-t marked this conversation as resolved.
Show resolved Hide resolved
components: rustfmt, clippy
target: wasm32-unknown-unknown

- name: Setup nightly Rust as default
run: rustup default nightly-2024-04-18
run: rustup default nightly-2024-05-30

- name: Install Protoc
uses: arduino/setup-protoc@v1
Expand All @@ -42,28 +42,28 @@ jobs:
- name: Test
uses: actions-rs/cargo@v1
with:
toolchain: nightly-2024-04-18
toolchain: nightly-2024-05-30
command: test

- name: Clippy -- Main
uses: actions-rs/cargo@v1
with:
toolchain: nightly-2024-04-18
toolchain: nightly-2024-05-30
command: clippy
args: --all-features -- -W clippy::all -A clippy::style -A forgetting_copy_types -A forgetting_references

- name: Clippy -- All Targets (except integration)
uses: actions-rs/cargo@v1
with:
toolchain: nightly-2024-04-18
toolchain: nightly-2024-05-30
command: clippy
# We are a bit more forgiving when it comes to the code in tests and only check for correctness
args: --workspace --all-features --all-targets --exclude runtime-integration-tests -- -A clippy::all -W clippy::correctness -A forgetting_copy_types -A forgetting_references

- name: Clippy -- Integration
uses: actions-rs/cargo@v1
with:
toolchain: nightly-2024-04-18
toolchain: nightly-2024-05-30
command: clippy
# We are a bit more forgiving when it comes to the code in tests and only check for correctness
args: --package runtime-integration-tests --all-features --all-targets -- -A clippy::all -W clippy::correctness -A forgetting_copy_types -A forgetting_references
Expand Down
55 changes: 1 addition & 54 deletions .maintain/frame-weight-template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,12 @@
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use core::marker::PhantomData;

/// Weight functions needed for {{pallet}}.
pub trait WeightInfo {
{{#each benchmarks as |benchmark|}}
fn {{benchmark.name~}}
(
{{~#each benchmark.components as |c| ~}}
{{c.name}}: u32, {{/each~}}
) -> Weight;
{{/each}}
}

/// Weights for {{pallet}} using the Substrate node and recommended hardware.
pub struct SubstrateWeight<T>(PhantomData<T>);
{{#if (eq pallet "frame_system")}}
impl<T: crate::Config> WeightInfo for SubstrateWeight<T> {
{{else}}
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
impl<T: frame_system::Config> {{pallet}}::WeightInfo for SubstrateWeight<T> {
{{/if}}
{{#each benchmarks as |benchmark|}}
{{#each benchmark.comments as |comment|}}
Expand Down Expand Up @@ -76,46 +65,4 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
{{/each}}
}
{{/each}}
}

// For backwards compatibility and tests
impl WeightInfo for () {
{{#each benchmarks as |benchmark|}}
{{#each benchmark.comments as |comment|}}
/// {{comment}}
{{/each}}
{{#each benchmark.component_ranges as |range|}}
/// The range of component `{{range.name}}` is `[{{range.min}}, {{range.max}}]`.
{{/each}}
fn {{benchmark.name~}}
(
{{~#each benchmark.components as |c| ~}}
{{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}}
) -> Weight {
// Proof Size summary in bytes:
// Measured: `{{benchmark.base_recorded_proof_size}}{{#each benchmark.component_recorded_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}`
// Estimated: `{{benchmark.base_calculated_proof_size}}{{#each benchmark.component_calculated_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}`
// Minimum execution time: {{underscore benchmark.min_execution_time}}_000 picoseconds.
Weight::from_parts({{underscore benchmark.base_weight}}, {{benchmark.base_calculated_proof_size}})
{{#each benchmark.component_weight as |cw|}}
// Standard Error: {{underscore cw.error}}
.saturating_add(Weight::from_parts({{underscore cw.slope}}, 0).saturating_mul({{cw.name}}.into()))
{{/each}}
{{#if (ne benchmark.base_reads "0")}}
.saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}}_u64))
{{/if}}
{{#each benchmark.component_reads as |cr|}}
.saturating_add(RocksDbWeight::get().reads(({{cr.slope}}_u64).saturating_mul({{cr.name}}.into())))
{{/each}}
{{#if (ne benchmark.base_writes "0")}}
.saturating_add(RocksDbWeight::get().writes({{benchmark.base_writes}}_u64))
{{/if}}
{{#each benchmark.component_writes as |cw|}}
.saturating_add(RocksDbWeight::get().writes(({{cw.slope}}_u64).saturating_mul({{cw.name}}.into())))
{{/each}}
{{#each benchmark.component_calculated_proof_size as |cp|}}
.saturating_add(Weight::from_parts(0, {{cp.slope}}).saturating_mul({{cp.name}}.into()))
{{/each}}
}
{{/each}}
}
52 changes: 52 additions & 0 deletions .maintain/run_all_benchmarks.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#!/bin/bash

script_dir=$(dirname "$(realpath "$0")")


runtimes=("pendulum" "amplitude" "foucoco")


for runtime_name in "${runtimes[@]}"; do
cd $script_dir
cd ../runtime/$runtime_name/src/weights
weight_dir=`pwd`

cd $script_dir

if [ ! -d "$weight_dir" ]; then
echo "Directory $weight_dir does not exist for runtime $runtime_name!"
echo "Weights directory should exist and contain previously calculated weights"
continue
fi

echo "Processing runtime: $runtime_name"

for file in "$weight_dir"/*; do

filename=$(basename -- "$file")
filename_without_ext="${filename%.*}"


if [[ "$filename_without_ext" == "parachain_staking" ]]; then
echo "Skipping file: $filename_without_ext"
continue
fi

echo "Running benchmark for pallet: $filename_without_ext in runtime $runtime_name"

# Run the benchmark command for each file, ignore errors from files
# not corresponding to any pallets.
# Failed benchmarks will not be detected.
../target/production/pendulum-node benchmark pallet \
--chain $runtime_name \
--wasm-execution=compiled \
--pallet "$filename_without_ext" \
--extrinsic "*" \
--steps 50 \
--repeat 20 \
--output "../runtime/$runtime_name/src/weights/$filename" \
--template "frame-weight-template.hbs" \
|| true

done
done
Loading
Loading