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

Upgrade to polkadot-sdk v1.11.0 #3190

Merged
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
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
8 changes: 0 additions & 8 deletions .github/workflows/benchmark-runtime-weights.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ on:
description: litentry
required: true
default: true
rococo:
type: boolean
description: rococo
required: true
default: true
paseo:
type: boolean
description: paseo
Expand Down Expand Up @@ -86,9 +81,6 @@ jobs:
if [ "${{ github.event.inputs.litentry }}" = "true" ]; then
chain="$chain litentry"
fi
if [ "${{ github.event.inputs.rococo }}" = "true" ]; then
chain="$chain rococo"
fi
if [ "${{ github.event.inputs.paseo }}" = "true" ]; then
chain="$chain paseo"
fi
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
description: The chain whose runtime-wasm is built
options:
- litentry
- rococo
- paseo
ref:
description: The commit SHA or tag for checking out code
Expand Down
47 changes: 44 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,6 @@ jobs:
matrix:
chain:
- litentry
- rococo
- paseo
name: ${{ matrix.chain }}
steps:
Expand Down Expand Up @@ -783,8 +782,8 @@ jobs:
- name: Run runtime tests
working-directory: ./parachain
run: |
echo "::group::rococo runtime test"
cargo test --locked -p rococo-parachain-runtime --lib
echo "::group::paseo runtime test"
cargo test --locked -p paseo-parachain-runtime --lib
echo "::endgroup::"
echo "::group::litentry runtime test"
cargo test --locked -p litentry-parachain-runtime --lib
Expand Down Expand Up @@ -847,6 +846,20 @@ jobs:
run: |
docker compose -f docker-compose.yml -f ${{ matrix.test_name }}.yml stop

- name: Upload zombienet logs if test fails
continue-on-error: true
uses: actions/upload-artifact@v4
if: failure()
with:
name: ${{ matrix.test_name }}-zombienet-logs
path: |
/tmp/parachain_dev
!/tmp/parachain_dev/polkadot*
!/tmp/parachain_dev/zombienet*
!/tmp/parachain_dev/litentry-collator
if-no-files-found: ignore
retention-days: 3

- name: Collect docker logs if test fails
continue-on-error: true
uses: jwalton/gh-docker-logs@v2
Expand Down Expand Up @@ -918,6 +931,20 @@ jobs:
run: |
docker compose -f multiworker-docker-compose.yml -f ${{ matrix.test_name }}.yml stop

- name: Upload zombienet logs if test fails
continue-on-error: true
uses: actions/upload-artifact@v4
if: failure()
with:
name: ${{ matrix.test_name }}-zombienet-logs
path: |
/tmp/parachain_dev
!/tmp/parachain_dev/polkadot*
!/tmp/parachain_dev/zombienet*
!/tmp/parachain_dev/litentry-collator
if-no-files-found: ignore
retention-days: 3

- name: Collect docker logs if test fails
continue-on-error: true
uses: jwalton/gh-docker-logs@v2
Expand Down Expand Up @@ -984,6 +1011,20 @@ jobs:
run: |
docker compose -f multiworker-docker-compose.yml -f ${{ matrix.test_name }}.yml stop

- name: Upload zombienet logs if test fails
continue-on-error: true
uses: actions/upload-artifact@v4
if: failure()
with:
name: ${{ matrix.test_name }}-zombienet-logs
path: |
/tmp/parachain_dev
!/tmp/parachain_dev/polkadot*
!/tmp/parachain_dev/zombienet*
!/tmp/parachain_dev/litentry-collator
if-no-files-found: ignore
retention-days: 3

- name: Collect docker logs if test fails
continue-on-error: true
uses: jwalton/gh-docker-logs@v2
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/create-release-draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ on:
description: If any of the genesis artefacts should be released alongside
options:
- none
- rococo
- paseo
- litentry

Expand Down Expand Up @@ -76,7 +75,6 @@ jobs:
strategy:
matrix:
chain:
- rococo
- paseo
- litentry
name: ${{ matrix.chain }}
Expand Down
18 changes: 3 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ build-node:
build-runtime-litentry:
cd parachain && cargo build --locked -p litentry-parachain-runtime --release

.PHONY: build-runtime-rococo ## Build rococo release runtime
build-runtime-rococo:
cd parachain && cargo build --locked -p rococo-parachain-runtime --release

.PHONY: build-runtime-paseo ## Build paseo release runtime
build-runtime-paseo:
cd parachain && cargo build --locked -p paseo-parachain-runtime --release
Expand All @@ -64,10 +60,6 @@ build-node-tryruntime:
launch-standalone:
@cd parachain && ./scripts/launch-standalone.sh

.PHONY: launch-network-rococo ## Launch a local rococo network with relaychain network
launch-network-rococo:
@cd parachain && ./scripts/launch-network.sh rococo

.PHONY: launch-network-litentry ## Launch a local litentry network with relaychain network
launch-network-litentry:
@cd parachain && ./scripts/launch-network.sh litentry
Expand All @@ -90,10 +82,6 @@ test-cargo-all-benchmarks:
test-ts-litentry: launch-network-litentry
@cd parachain && ./scripts/run-ts-test.sh litentry

.PHONY: test-ts-rococo ## Run rococo ts tests without clean-up
test-ts-rococo: launch-network-rococo
@cd parachain && ./scripts/run-ts-test.sh rococo

.PHONY: test-ts-paseo ## Run paseo ts tests without clean-up
test-ts-paseo: launch-network-paseo
@cd parachain && ./scripts/run-ts-test.sh paseo
Expand Down Expand Up @@ -136,12 +124,12 @@ githooks:
# clippy
.PHONY: clippy ## cargo clippy
clippy:
cd parachain && SKIP_WASM_BUILD=1 cargo clippy --workspace --all-targets --all-features -- -D warnings
cd parachain && SKIP_WASM_BUILD=1 cargo clippy --locked --workspace --all -- -D warnings

.PHONY: clippyfix ## cargo clippy --fix
clippyfix:
cd parachain && SKIP_WASM_BUILD=1 cargo clippy --allow-dirty --allow-staged --fix --workspace --all-targets --all-features -- -D warnings
cd parachain && SKIP_WASM_BUILD=1 cargo clippy --locked --allow-dirty --allow-staged --fix --workspace --all -- -D warnings

.PHONY: cargofix ## cargo fix
cargofix:
cd parachain && cargo fix --allow-dirty --allow-staged --workspace --all-targets --all-features
cd parachain && cargo fix --locked --allow-dirty --allow-staged --workspace --all
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ make build-runtime-litentry

The wasms should be located under `target/release/wbuild/litentry-parachain-runtime/`

Similarly, use `make build-runtime-rococo` to build the rococo-parachain-runtime.
Similarly, use `make build-runtime-paseo` to build the paseo-parachain-runtime.

## Launch parachain
### Launch a parachain network with relaychains
Expand Down
14 changes: 8 additions & 6 deletions common/primitives/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ strum_macros = { version = "0.26", default-features = false }
webpki = { version = "=0.102.0-alpha.3", git = "https://github.com/rustls/webpki", rev = "da923ed", package = "rustls-webpki", default-features = false, features = ["alloc", "ring"] }
x509-cert = { version = "0.1.0", default-features = false, features = ["alloc"] }

frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
pallet-evm = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.1.0", default-features = false }
frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false }
pallet-evm = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.11.0", default-features = false }
scale-info = { version = "2.11", default-features = false, features = ["derive"] }
sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false }
sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false }
sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false }
sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false }

litentry-hex-utils = { path = "../../utils/hex", default-features = false }
litentry-macros = { path = "macros" }
Expand All @@ -51,6 +52,7 @@ std = [
"sp-runtime/std",
"sp-io/std",
"sp-std/std",
"sp-consensus-aura/std",
"pallet-evm/std",
"litentry-hex-utils/std",
]
Expand Down
1 change: 1 addition & 0 deletions common/primitives/core/macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ edition = "2021"

[features]
development = []
std = []
6 changes: 4 additions & 2 deletions common/primitives/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,17 @@ mod types {

// Weight Type for XCM
pub type Weight = frame_support::weights::Weight;

// Aura consensus authority.
pub type AuraId = sp_consensus_aura::sr25519::AuthorityId;
}

/// Common constants of parachains.
mod constants {
use super::types::BlockNumber;

pub const LITENTRY_PARA_ID: u32 = 2013;
pub const ROCOCO_PARA_ID: u32 = 2106; // will be replaced by paseo
pub const PASEO_PARA_ID: u32 = 2106; // will be replaced by paseo
pub const PASEO_PARA_ID: u32 = 2106;

/// This determines the average expected block time that we are targeting.
/// Blocks will be produced at a minimum duration defined by `SLOT_DURATION`.
Expand Down
2 changes: 1 addition & 1 deletion local-setup/start_parachain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ done

ROOTDIR=$(git rev-parse --show-toplevel)
cd "$ROOTDIR/parachain"
make launch-docker-rococo
make launch-docker-paseo
Loading
Loading