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 18 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
7,061 changes: 4,104 additions & 2,957 deletions Cargo.lock

Large diffs are not rendered by default.

588 changes: 392 additions & 196 deletions Cargo.toml

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.PHONY: build
build:
cargo build --release
ln -f $(CURDIR)/target/release/basilisk $(CURDIR)/target/release/testing-basilisk

.PHONY: check
check:
Expand Down Expand Up @@ -33,7 +32,7 @@ format:

.PHONY: try-runtime
try-runtime:
cargo run --release --features=try-runtime --bin basilisk try-runtime --runtime ./target/release/wbuild/basilisk-runtime/basilisk_runtime.wasm on-runtime-upgrade --checks live --uri wss://rpc.basilisk.cloud:443
try-runtime --runtime ./target/release/wbuild/basilisk-runtime/basilisk_runtime.wasm on-runtime-upgrade --checks all live --uri wss://rpc.basilisk.cloud:443

.PHONY: build-docs
build-docs:
Expand Down
33 changes: 5 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,28 +52,6 @@ Observe Basilisk logs
multitail 99*.log
```

#### Use Testing Runtime

There is also an option to run the testing runtime with less restrictive settings to facilitate testing of new features.
The following command starts a dev node collator, and the testing runtime is used as a runtime for our node.
```bash
./target/release/basilisk --dev --runtime=testing
```
The testing runtime currently supports only two chain specifications: _dev_ and _local_ testnet.
Both runtimes store blockchain data in the same directories( e.g. the _dev_ directory is shared for both runtimes
started with the `--dev` parameter. That's why it is important to purge chain data when switching to different runtime( note: `--runtime` parameter can't be used when purging chain data)

In the case of starting a testnet using the `polkadot-launch` tool,
we don't have an option to communicate to its internal commands that we would like to use the testing runtime.
To overcome this limitation, rename the binary so it starts with the `testing` prefix, e.g. `testing-basilisk`.
Such a binary always uses the testing runtime, even if the `--runtime testing` option is not specified.

Start local testnet with testing runtime
```
cd ../rococo-local
polkadot-launch testing-config.json
```

### Interaction with the node

Go to the Polkadot apps at https://dotapps.io
Expand All @@ -88,14 +66,13 @@ Connect to the local testnet at `ws://localhost:9988` or live `wss://basilisk.hy
### Testing of storage migrations and runtime upgrades

The `try-runtime` tool can be used to test storage migrations and runtime upgrades against state from a real chain.
Run the following command to test against the state on Basilisk on Kusama
Run the following command to test against the state on Basilisk on Kusama.
Don't forget to use a runtime built with `try-runtime` feature.
```
cargo run --features=try-runtime try-runtime on-runtime-upgrade live --uri wss://rpc.basilisk.cloud:443
```
or against the Basilisk testnet on Rococo
```
cargo run --release --features=try-runtime try-runtime on-runtime-upgrade live --uri wss://rococo-basilisk-rpc.hydration.dev:443
try-runtime --runtime ./target/release/wbuild/basilisk-runtime/basilisk_runtime.wasm on-runtime-upgrade --checks all live --uri wss://rpc.basilisk.cloud:443
```
or against the Basilisk testnet on Rococo using `--uri wss://rococo-basilisk-rpc.hydration.dev:443`


### Chopsticks simulations
`Chopsticks` can be used to dry-run any transaction in parallel reality of any Substrate network.
Expand Down
155 changes: 85 additions & 70 deletions integration-tests/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "runtime-integration-tests"
version = "0.9.15"
version = "1.0.0"
description = "Integration tests"
authors = ["GalacticCouncil"]
edition = "2021"
Expand All @@ -9,7 +9,7 @@ license = "Apache 2.0"
repository = "https://github.com/galacticcouncil/Basilisk-node"

[dependencies]
# Warehouse dependencies
# HydraDX dependencies
pallet-transaction-multi-payment = { workspace = true }
pallet-nft = { workspace = true }
pallet-currencies = { workspace = true }
Expand All @@ -18,99 +18,104 @@ pallet-asset-registry = { workspace = true }
pallet-ema-oracle = { workspace = true }
hydradx-traits = { workspace = true }
pallet-duster = { workspace = true }
pallet-xyk = { workspace = true }
pallet-lbp = { workspace = true }

pallet-xyk = { path = "../pallets/xyk",default-features = false}
pallet-lbp = { path = "../pallets/lbp", default-features = false }
pallet-marketplace = { path = '../pallets/marketplace', default-features = false }

primitives = { default-features = false, path = "../primitives" }

pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false }
pallet-democracy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false }
pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false }
pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false }
pallet-tips = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false }
pallet-treasury = { workspace = true }
pallet-democracy = { workspace = true }
pallet-scheduler = { workspace = true }
pallet-elections-phragmen = { workspace = true }
pallet-tips = { workspace = true }

# collator support
pallet-collator-selection = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38", default-features = false }
pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false }
pallet-collator-selection = { workspace = true }
pallet-authorship = { workspace = true }

# ORML dependencies
orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.38", default-features = false }
orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.38", default-features = false }
orml-vesting = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.38", default-features = false }
orml-xcm = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.38", default-features = false }
orml-tokens = { workspace = true }
orml-traits = { workspace = true }
orml-vesting = { workspace = true }
orml-xcm = { workspace = true }

# orml XCM support
orml-xtokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.38", default-features = false }
orml-xcm-support = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.38", default-features = false }
orml-unknown-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.38", default-features = false }
orml-xtokens = { workspace = true }
orml-xcm-support = { workspace = true }
orml-unknown-tokens = { workspace = true }

# Cumulus dependencies
cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38", default-features = false }
cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38", default-features = false }
cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38", default-features = false }
cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38", default-features = false }
cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38", default-features = false }
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38", default-features = false }
cumulus-primitives-utility = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38", default-features = false }
cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38", default-features = false }
cumulus-primitives-timestamp = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38", default-features = false }
parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38", default-features = false }
cumulus-pallet-aura-ext = { workspace = true }
cumulus-pallet-parachain-system = { workspace = true }
cumulus-pallet-xcm = { workspace = true }
cumulus-pallet-xcmp-queue = { workspace = true }
cumulus-pallet-dmp-queue = { workspace = true }
cumulus-primitives-core = { workspace = true }
cumulus-primitives-utility = { workspace = true }
cumulus-primitives-parachain-inherent = { workspace = true }
cumulus-primitives-timestamp = { workspace = true }
parachain-info = { workspace = true }

# Polkadot dependencies
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.38", default-features = false, features = ["wasm-api"] }
xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.38", default-features = false }
pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.38", default-features = false }
xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.38", default-features = false }
polkadot-xcm = { package = "xcm", git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.38", default-features = false }
polkadot-parachain = { workspace = true }
polkadot-service = { workspace = true, features = ["full-node"] }
xcm-builder = { workspace = true }
pallet-xcm = { workspace = true }
xcm-executor = { workspace = true }
polkadot-xcm = { workspace = true }

# Substrate dependencies
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false, optional = true }
frame-executive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false }
frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false, optional = true }
frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false }
pallet-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false }
pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false }
pallet-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false }
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false }
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false }
pallet-utility = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false }
pallet-uniques = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false }
sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false }
sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false }
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false }
sp-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false }
sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false }
sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false }
sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false }
sp-version = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false }
sp-staking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false }
sp-trie = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false }
frame-benchmarking = { workspace = true, optional = true }
frame-executive = { workspace = true }
frame-support = { workspace = true }
frame-system = { workspace = true }
frame-system-benchmarking = { workspace = true, optional = true }
frame-system-rpc-runtime-api = { workspace = true }
pallet-aura = { workspace = true }
pallet-balances = { workspace = true }
pallet-collective = { workspace = true }
pallet-session = { workspace = true }
pallet-timestamp = { workspace = true }
pallet-transaction-payment = { workspace = true }
pallet-transaction-payment-rpc-runtime-api = { workspace = true }
pallet-utility = { workspace = true }
pallet-uniques = { workspace = true }
pallet-im-online = { workspace = true }
sp-api = { workspace = true }
sp-block-builder = { workspace = true }
sp-consensus-aura = { workspace = true }
sp-consensus-babe = { workspace = true }
sp-consensus-beefy = { workspace = true }
sp-authority-discovery = { workspace = true }
sp-core = { workspace = true }
sp-inherents = { workspace = true }
sp-externalities = { workspace = true }
sp-offchain = { workspace = true }
sp-runtime = { workspace = true }
sp-session = { workspace = true }
sp-std = { workspace = true }
sp-transaction-pool = { workspace = true }
sp-version = { workspace = true }
sp-staking = { workspace = true }
sp-trie = { workspace = true }
sp-io = { workspace = true }
sc-consensus-grandpa = { workspace = true }

polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.38" }
polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.38" }
polkadot-primitives = { workspace = true }
polkadot-runtime-parachains = { workspace = true }

basilisk-runtime = { path = "../runtime/basilisk", default-features = false}
kusama-runtime = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.38" }
cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38" }
parachain-runtime-mock = { path = "parachain-runtime-mock", default-features = false}
kusama-runtime = { workspace = true, features = ["try-runtime"] }
cumulus-test-relay-sproof-builder = { workspace = true }

[dev-dependencies]
xcm-emulator = { git = "https://github.com/shaunxw/xcm-simulator", rev = "754f3b90ecc65af735a6c9a2e1792c5253926ff6" }
xcm-emulator = { workspace = true }
hex-literal = "0.4.1"
pallet-relaychain-info = { workspace = true }
pretty_assertions = "1.2.1"
sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" }
sp-arithmetic = { workspace = true }
test-case = "3.1.0"

[features]
Expand Down Expand Up @@ -153,9 +158,13 @@ std = [
"pallet-transaction-payment-rpc-runtime-api/std",
"pallet-lbp/std",
"pallet-utility/std",
"pallet-im-online/std",
"sp-api/std",
"sp-block-builder/std",
"sp-consensus-aura/std",
"sp-consensus-babe/std",
"sp-consensus-beefy/std",
"sp-authority-discovery/std",
"sp-core/std",
"sp-io/std",
"sp-inherents/std",
Expand All @@ -174,6 +183,12 @@ std = [
"pallet-tips/std",
"pallet-collator-selection/std",
"pallet-authorship/std",
"kusama-runtime/std",
"basilisk-runtime/std",
"hydradx-traits/std",
]

runtime-benchmarks = [
"basilisk-runtime/runtime-benchmarks",
"kusama-runtime/runtime-benchmarks",
]
Loading
Loading