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

chore: upgrade to polkadot-v1.1.0 #645

Merged
merged 63 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
508bf0d
initial changes
Roznovjak Oct 20, 2023
1745610
additional changes
Roznovjak Oct 31, 2023
a9d1dec
update tinkernet dependency
Roznovjak Nov 1, 2023
ef35687
remove unused dependencies
Roznovjak Nov 1, 2023
f08a93b
fix benchmarks
Roznovjak Nov 1, 2023
2fb21c9
use xyk and lbp from hydra
Roznovjak Nov 2, 2023
8ab8905
formatting
Roznovjak Nov 2, 2023
a36f7d1
do not run integration tests when benchmarking feature is enabled
Roznovjak Nov 3, 2023
d3edf0c
add storage migrations
Roznovjak Nov 6, 2023
bb20d38
formatting
Roznovjak Nov 6, 2023
d2476a0
bump crate versions
Roznovjak Nov 6, 2023
137fe0c
cargo update
Roznovjak Nov 6, 2023
f10c3df
satisfy clippy
Roznovjak Nov 6, 2023
a5d9d08
cargo update
Roznovjak Nov 7, 2023
feca184
bump storage version of marketplace pallet
Roznovjak Nov 16, 2023
3c0dc52
add missing lbp weight fn
Roznovjak Nov 16, 2023
92dc624
update README
Roznovjak Nov 16, 2023
e78f3b7
update Makefile
Roznovjak Nov 16, 2023
adf37a3
remove commented out lines
Roznovjak Dec 4, 2023
ff6ebf4
add zombienet config
Roznovjak Dec 4, 2023
bd8fe20
remove redundant weight trader
mrq1911 Dec 4, 2023
4671dcd
update clippy makefile command
Roznovjak Dec 5, 2023
3ff007c
satisfy clippy
Roznovjak Dec 5, 2023
59d451f
update xcmp deps
apopiak Dec 5, 2023
3f9cf87
adjust code to updated xcmp queue
apopiak Dec 5, 2023
b62b896
update hydradx dependencies
Roznovjak Dec 6, 2023
f408f49
fixes
Roznovjak Dec 6, 2023
9a3ce3f
update weight templates
Roznovjak Dec 6, 2023
121fae0
partial rebenchmark
Roznovjak Dec 6, 2023
584feec
partial rebenchmark
Roznovjak Dec 6, 2023
c6abed4
partial rebenchmark
Roznovjak Dec 6, 2023
fa46c26
partial rebenchmark + update router benchmarks
Roznovjak Dec 6, 2023
ad4ef12
revert wrong benchmarking weights
Roznovjak Dec 6, 2023
8f65d2d
fix frame system benchmarks
Roznovjak Dec 6, 2023
e390213
fix tips benchmarking
Roznovjak Dec 6, 2023
661fd08
rebenchmarking
Roznovjak Dec 6, 2023
d58f479
add multiplication constants to nft weights
Roznovjak Dec 6, 2023
ff82bc1
fix router benchmarking and failing integration test
Roznovjak Dec 6, 2023
2047f1a
rebenchmark router pallet
Roznovjak Dec 7, 2023
9185195
cargo update
Roznovjak Dec 7, 2023
870645a
update router weight function
Roznovjak Dec 7, 2023
50adb6e
update router benchmarking
Roznovjak Dec 7, 2023
f551771
rebenchmark router pallet
Roznovjak Dec 7, 2023
45cdda7
fix nft integration tests
Roznovjak Dec 7, 2023
726839a
formatting
Roznovjak Dec 7, 2023
270bc5e
cargo update
Roznovjak Dec 7, 2023
23db927
add integration test to verify if exchange asset works with onchain r…
dmoka Dec 8, 2023
a4ea1c1
cargo update
Roznovjak Dec 8, 2023
1ed497c
update makefile
Roznovjak Dec 8, 2023
e0b9544
configure defer duration
apopiak Dec 8, 2023
0ce368d
use commit hashes for dependencies
Roznovjak Dec 8, 2023
422f5f7
bump crate versions
apopiak Dec 8, 2023
7653ecc
pin orml dependencies
Roznovjak Dec 8, 2023
e8bb419
Merge pull request #649 from galacticcouncil/apopiak/defer-duration-c…
mrq1911 Dec 8, 2023
1facf34
add storage migrations
Roznovjak Dec 12, 2023
b93ac0c
formatting
Roznovjak Dec 12, 2023
2a34fa7
removed legacy tests
mrq1911 Dec 14, 2023
c47cd17
Merge branch 'master' into polkadot-v1.1.0
Roznovjak Dec 26, 2023
45d21b4
version check perms adjusted
mrq1911 Jan 12, 2024
ac6b54d
removed coverage, added benchmark tests
mrq1911 Jan 12, 2024
1c25ecb
split benchmark test into separate job
mrq1911 Jan 12, 2024
1095bb3
clippy all fixed
mrq1911 Jan 12, 2024
10ff31e
testing benchmarks again
mrq1911 Jan 12, 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
64 changes: 11 additions & 53 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,17 @@ jobs:
- run: git describe --tags --abbrev=0 --always
- name: Setup cmake
uses: jwlawson/[email protected]
- name: Install misc dependencies
run: sudo rm /var/lib/dpkg/lock-frontend && sudo rm /var/lib/dpkg/lock && sudo apt-get install -y protobuf-compiler m4
- name: Install Rust
uses: codota/toolchain@00a8bf2bdcfe93aefd70422d3dec07337959d3a4
with:
profile: minimal
- name: Install clippy
run: rustup component add clippy
- name: Run clippy
run: make clippy
continue-on-error: false
- name: Install tarpaulin
run: cargo install cargo-tarpaulin
- name: Test && Generate code coverage
run: make coverage
- name: Upload to codecov.io
uses: codecov/codecov-action@v1
with:
fail_ci_if_error: false
- name: Test
run: make test-release
- name: Build runtime
run: cargo build --release --locked
working-directory: runtime/basilisk
- name: Build node
run: cargo build --release --locked
- name: Release
run: make release
- name: Version info
run: ./target/release/basilisk --version
- name: Upload release binary
Expand All @@ -57,45 +44,16 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: basilisk_runtime.compact.compressed.wasm
path: target/release/wbuild/basilisk-runtime/basilisk_runtime.compact.compressed.wasm

test-inclusion:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/download-artifact@v2
name: Download basilisk binary
with:
name: basilisk
path: target/release
- uses: robinraju/release-downloader@v1
name: Download relay chain binary
with:
repository: paritytech/polkadot
tag: ${{ env.RELAY_CHAIN_VERSION }}
fileName: polkadot
out-file-path: ../polkadot/target/release
- run: chmod +x ./basilisk && ./basilisk --version
name: Basilisk version
working-directory: target/release
- run: chmod +x ./polkadot && ./polkadot --version
name: Polkadot version
working-directory: ../polkadot/target/release
- uses: actions/setup-node@v2
name: Setup node.js
with:
node-version: '14'
check-latest: true
- run: npm install && npm start
name: Launch rococo local & wait for inclusion
working-directory: scripts/wait-for-inclusion
path: target/release/basilisk_runtime.compact.compressed.wasm
- name: Clippy
run: make clippy-all
- name: Test benchmarks
run: make test-benchmarks

version-check:
runs-on: ubuntu-latest
permissions:
pull-requests: write
outputs:
runtime-upgraded: ${{ steps.check-runtime.outputs.upgraded }}
steps:
Expand Down
102 changes: 61 additions & 41 deletions .maintain/pallet-weight-template-no-back.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -15,62 +15,82 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//! Autogenerated weights for {{pallet}}
{{header}}
//! Autogenerated weights for `{{pallet}}`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION {{version}}
//! DATE: {{date}}, STEPS: {{cmd.steps}}, REPEAT: {{cmd.repeat}}, LOW RANGE: {{cmd.lowest_range_values}}, HIGH RANGE: {{cmd.highest_range_values}}
//! EXECUTION: {{cmd.execution}}, WASM-EXECUTION: {{cmd.wasm_execution}}, CHAIN: {{cmd.chain}}, DB CACHE: {{cmd.db_cache}}
//! DATE: {{date}}, STEPS: `{{cmd.steps}}`, REPEAT: `{{cmd.repeat}}`, LOW RANGE: `{{cmd.lowest_range_values}}`, HIGH RANGE: `{{cmd.highest_range_values}}`
//! WORST CASE MAP SIZE: `{{cmd.worst_case_map_values}}`
//! HOSTNAME: `{{hostname}}`, CPU: `{{cpuname}}`
//! WASM-EXECUTION: `{{cmd.wasm_execution}}`, CHAIN: `{{cmd.chain}}`, DB CACHE: `{{cmd.db_cache}}`

// Executed Command:
{{#each args as |arg|~}}
{{#each args as |arg|}}
// {{arg}}
{{/each}}

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(clippy::unnecessary_cast)]
#![allow(missing_docs)]

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

use {{pallet}}::weights::WeightInfo;
/// 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 Basilisk node and recommended hardware.
pub struct BasiliskWeight<T>(PhantomData<T>);

{{#if (eq pallet "frame_system")}}
impl<T: crate::Config> WeightInfo for BasiliskWeight<T> {
{{else}}
impl<T: frame_system::Config> WeightInfo for BasiliskWeight<T> {
{{#each benchmarks as |benchmark|}}
{{#each benchmark.comments as |comment|}}
// {{comment}}
{{/if}}
{{#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 {
// Minimum execution time: {{underscore benchmark.min_execution_time}} nanoseconds.
Weight::from_ref_time({{underscore benchmark.base_weight}} as u64)
{{~#each benchmark.component_weight as |cw|}}
// Standard Error: {{underscore cw.error}}
.saturating_add(Weight::from_ref_time({{underscore cw.slope}} as u64).saturating_mul({{cw.name}} as u64))
{{/each}}
{{#if (ne benchmark.base_reads "0")}}
.saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}} as u64))
{{/if}}
{{#each benchmark.component_reads as |cr|}}
.saturating_add(T::DbWeight::get().reads(({{cr.slope}} as u64).saturating_mul({{cr.name}} as u64)))
{{/each}}
{{#if (ne benchmark.base_writes "0")}}
.saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}} as u64))
{{/if}}
{{~#each benchmark.component_writes as |cw|}}
.saturating_add(T::DbWeight::get().writes(({{cw.slope}} as u64).saturating_mul({{cw.name}} as u64)))
{{/each}}
}
{{/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(T::DbWeight::get().reads({{benchmark.base_reads}}_u64))
{{/if}}
{{#each benchmark.component_reads as |cr|}}
.saturating_add(T::DbWeight::get().reads(({{cr.slope}}_u64).saturating_mul({{cr.name}}.into())))
{{/each}}
{{#if (ne benchmark.base_writes "0")}}
.saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}}_u64))
{{/if}}
{{#each benchmark.component_writes as |cw|}}
.saturating_add(T::DbWeight::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}}
}
Loading
Loading