Skip to content

Commit

Permalink
Upgrade to Polkadot v1.1.0 (#879)
Browse files Browse the repository at this point in the history
## Describe your changes

1. Upgrade deps to polkadot-v1.1.0
2. Fixes false positive error messages from off-chain workers
3. Implement the client side and runtime changes for Polkapool
4. Implement Asset Txn Payment to enable fee payment in other tokens
than PDEX
5. Fixes issues with gossip broadcast and networking

## Issue ticket number and link

## Checklist before requesting a review
- [x] I have performed a self-review of my code.
- [x] If it is a core feature, I have added thorough tests.
- [x] I removed all Clippy and Formatting Warnings. 
- [x] I added required Copyrights.
  • Loading branch information
Gauthamastro committed Nov 1, 2023
2 parents f03860c + 5f0a92f commit 192cfdf
Show file tree
Hide file tree
Showing 97 changed files with 15,243 additions and 5,139 deletions.
53 changes: 37 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
with:
mode: start
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN_REPO }}
ec2-image-id: ami-06de69a4185c962ed
ec2-image-id: ami-0ced994bdc615e5db # Ubuntu 22 with 500 GB volume
ec2-instance-type: ${{ env.RUNNER_INSTANCE_TYPE }}
subnet-id: subnet-a4d326e8
security-group-id: sg-078363c0f7b5f0b41
Expand Down Expand Up @@ -79,38 +79,48 @@ jobs:
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Check versions info
run: |
rustup -V
cargo fmt -- --version
cargo clippy -V
- name: Lint .toml files
run: |
taplo lint
taplo fmt --check
- name: Build Project with try-runtime
run: cargo build --features try-runtime
- name: Runtime build
run: cargo build -p node-polkadex-runtime
- name: Build Project with runtime benchmarks
run: cargo build --features runtime-benchmarks
- name: Test weights generation
- name: Build project with "try-runtime" feature
run: RUSTFLAGS="-D warnings" cargo build --features try-runtime

- name: Build mainnet node runtime
run: RUSTFLAGS="-D warnings" cargo build -p node-polkadex-runtime
- name: Build mainnet node with "runtime-benchmarks" feature
run: RUSTFLAGS="-D warnings" cargo build -p polkadex-node --features runtime-benchmarks
- name: Test mainnet node pallets weights generation
run: ./target/debug/polkadex-node benchmark pallet --pallet "*" --extrinsic "*" --steps 2 --repeat 1
- name: Normal Build in release mode

- name: Build parachain node runtime
run: RUSTFLAGS="-D warnings" cargo build -p parachain-polkadex-runtime
- name: Build parachain node with "runtime-benchmarks" feature
run: RUSTFLAGS="-D warnings" cargo build -p parachain-polkadex-node --features runtime-benchmarks
- name: Test parachain node pallets weights generation
run: ./target/debug/parachain-polkadex-node benchmark pallet --pallet "*" --extrinsic "*" --steps 2 --repeat 1

- name: Build in release mode
if: contains(github.ref, 'Develop')
run: RUSTFLAGS="-D warnings" cargo build --release
- name: Normal Build
- name: Build in dev mode
if: "!(contains(github.ref, 'Develop'))"
run: RUSTFLAGS="-D warnings" cargo build

- name: Check Formatting
run: cargo fmt --check
run: cargo fmt --all -- --check
- name: Check Clippy
run: cargo clippy -- -D warnings
- name: Test Project
run: cargo test --workspace
run: RUSTFLAGS="-D warnings" cargo test --workspace
- name: Run Cargo Tarpaulin
uses: actions-rs/tarpaulin@v0.1
with:
version: '0.22.0'
args: '--avoid-cfg-tarpaulin --exclude polkadex-node node-polkadex-runtime --workspace --timeout 180'
args: '--avoid-cfg-tarpaulin --exclude polkadex-node node-polkadex-runtime parachain-polkadex-node parachain-polkadex-runtime --workspace --timeout 180'
- name: Upload to codecov.io
uses: codecov/codecov-action@v3
with:
Expand All @@ -122,17 +132,28 @@ jobs:
with:
name: code-coverage-report
path: cobertura.xml
- name: Zip compiled binaries
- name: Zip compiled mainnet node binary
if: contains(github.ref, 'Develop')
# Zipping is required since billing is based on the raw uploaded size.
run: zip -r -j polkadex-node.zip ./target/release/polkadex-node
- name: Upload zipped binaries as an artifact
- name: Upload zipped mainnet binary as an artifact
if: contains(github.ref, 'Develop')
uses: actions/upload-artifact@v3
with:
name: polkadex-node
path: ./polkadex-node.zip
if-no-files-found: error
- name: Zip compiled parachain node binary
if: contains(github.ref, 'Develop')
# Zipping is required since billing is based on the raw uploaded size.
run: zip -r -j parachain-polkadex-node.zip ./target/release/parachain-polkadex-node
- name: Upload zipped parachain binary as an artifact
if: contains(github.ref, 'Develop')
uses: actions/upload-artifact@v3
with:
name: parachain-polkadex-node
path: ./parachain-polkadex-node.zip
if-no-files-found: error
stop-runner:
name: Stop self-hosted EC2 runner
needs:
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,33 @@ jobs:
- name: Prepare artifact
run: |
zip PolkadexNodeUbuntu.zip --junk-paths target/release/polkadex-node extras/customSpecRaw.json extras/polkadex.service
zip PolkadexParachainNode.zip --junk-paths target/release/parachain-polkadex-node
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
PolkadexNodeUbuntu.zip
customSpecRaw.json
PolkadexParachainNode.zip
name: Release ${{ github.ref_name }}
prerelease: false
draft: false

- name: Upload artifact
- name: Upload mainnet node artifact
uses: actions/upload-artifact@v3
with:
name: PolkadexNodeUbuntu
path: ./PolkadexNodeUbuntu.zip
if-no-files-found: error

- name: Upload parachain node artifact
uses: actions/upload-artifact@v3
with:
name: PolkadexParachainNode
path: ./PolkadexParachainNode.zip
if-no-files-found: error

push-to-docker-registry:
name: Push Docker Image To Docker Hub
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .maintain/local-docker-test-network/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#
# 1. Build `target/release/substrate` binary: `cargo build --release`
# 2. Start networks and containers:
# `sudo docker-compose -f .maintain/sentry-node/docker-compose.yml up`
# `sudo docker-compose -f .maintain/docker-compose.yml up`
# 3. Connect to nodes:
# - validator-a: localhost:9944
# - validator-b: localhost:9945
Expand Down

0 comments on commit 192cfdf

Please sign in to comment.