Skip to content

Commit

Permalink
Polkadot0.9.42 (#748)
Browse files Browse the repository at this point in the history
* Update toolchain to stable
* Balance refactor
* Update changes in 0.9.42
* Runtime benchmarks
* Silence clippy warning
* Reserve test cases, honor existential deposit
* Update template for benchmarks
* Initial deposit in genesis block
* Burn dust
* CI action

---------

Co-authored-by: Alex Sedighi <[email protected]>
  • Loading branch information
simonsso and aliXsed authored Jun 21, 2023
1 parent 1c29ee3 commit 041e090
Show file tree
Hide file tree
Showing 48 changed files with 3,015 additions and 2,317 deletions.
23 changes: 9 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
pull_request:

env:
nightly: nightly-2023-03-08
toolchain: stable
target: wasm32-unknown-unknown
try-runtime-chain: dev
try-runtime-uri: wss://eden-rpc.dwellir.com:443
Expand All @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ env.nightly }}
toolchain: ${{ env.toolchain }}
components: rustfmt, clippy
target: ${{ env.target }}
- name: Rustfmt Check
Expand All @@ -31,7 +31,7 @@ jobs:
uses: actions-rs-plus/clippy-check@v2
with:
args: --all-features -- -A clippy::type_complexity -A clippy::identity_op -A clippy::boxed_local -D dead_code
toolchain: ${{ env.nightly }}
toolchain: ${{ env.toolchain }}

tests:
runs-on: ubuntu-latest-8-cores
Expand All @@ -40,7 +40,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ env.nightly }}
toolchain: ${{ env.toolchain }}
target: ${{ env.target }}
- name: Install protobuf-compiler
run: |
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ env.nightly }}
toolchain: ${{ env.toolchain }}
target: ${{ env.target }}
- name: Install protobuf-compiler
run: |
Expand Down Expand Up @@ -111,16 +111,16 @@ jobs:
"method": "system_version",
"params": [],
"id": 1
}' | jq '{"result"}[]' >> $GITHUB_OUTPUT
}' | jq '{"result"}[]'| sed 's/^"/"eden-/' >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
id: get_version
- name: Install protobuf-compiler
run: |
sudo apt-get install protobuf-compiler
- name: Install Rust nightly
- name: Install Rust stable
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ env.nightly }}
toolchain: ${{ env.toolchain }}
target: ${{ env.target }}
- name: Cache a dir
uses: actions/cache@v3
Expand All @@ -137,12 +137,7 @@ jobs:
install -d snapshots
date > snapshots/created_at
./target/release/nodle-parachain try-runtime --runtime existing -lruntime=debug --chain ${{ env.try-runtime-chain }} create-snapshot "snapshots/eden-snapshot-full" -u ${{ env.try-runtime-uri}}
- name: Run Migration on new snapshot
if: steps.cachedir.outputs.cache-hit != 'true'
run: |
./target/release/nodle-parachain try-runtime --runtime target/release/wbuild/runtime-eden/runtime_eden.wasm -lruntime=debug --chain ${{ env.try-runtime-chain }} on-runtime-upgrade --checks=all snap -s snapshots/eden-snapshot-full
- name: Try runtime reuse snap
if: steps.cachedir.outputs.cache-hit == 'true'
run: |
cat snapshots/created_at
./target/release/nodle-parachain try-runtime --runtime target/release/wbuild/runtime-eden/runtime_eden.wasm --chain ${{ env.try-runtime-chain }} on-runtime-upgrade --checks=all snap --snapshot-path="snapshots/eden-snapshot-full"
./target/release/nodle-parachain try-runtime --runtime target/release/wbuild/runtime-eden/runtime_eden.wasm -lruntime=debug --chain ${{ env.try-runtime-chain }} on-runtime-upgrade --checks=all snap -s snapshots/eden-snapshot-full
2 changes: 1 addition & 1 deletion .maintain/external_pallet_weights.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::{Weight}};
use sp_std::marker::PhantomData;
use core::marker::PhantomData;

/// Weight functions for `{{pallet}}`.
pub struct WeightInfo<T>(PhantomData<T>);
Expand Down
4 changes: 2 additions & 2 deletions .maintain/internal_pallet_weights.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::{constants::RocksDbWeight, Weight}};
use sp_std::marker::PhantomData;
use core::marker::PhantomData;

/// Weight functions needed for {{pallet}}.
pub trait WeightInfo {
Expand Down Expand Up @@ -112,4 +112,4 @@ impl WeightInfo for () {
{{/each}}
}
{{/each}}
}
}
4 changes: 2 additions & 2 deletions .maintain/xcm.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::Weight};
use sp_std::marker::PhantomData;
use core::marker::PhantomData;

/// Weights for `{{pallet}}`.
pub struct WeightInfo<T>(PhantomData<T>);
Expand Down Expand Up @@ -65,4 +65,4 @@ impl<T: frame_system::Config> WeightInfo<T> {
{{/each}}
}
{{/each}}
}
}
2 changes: 0 additions & 2 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,3 @@ edition = "2021"
reorder_imports = true
hard_tabs = true
max_width = 120
comment_width = 100
wrap_comments = true
Loading

0 comments on commit 041e090

Please sign in to comment.