Skip to content

Commit

Permalink
Merge branch 'master' into ankan/staking-migrate-currency-to-fungible-2
Browse files Browse the repository at this point in the history
  • Loading branch information
Ank4n committed Jan 16, 2025
2 parents 21691f3 + 77ad8ab commit e1a1bfa
Show file tree
Hide file tree
Showing 261 changed files with 11,812 additions and 3,578 deletions.
1 change: 1 addition & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ rustdocflags = [
CC_x86_64_unknown_linux_musl = { value = ".cargo/musl-gcc", force = true, relative = true }
CXX_x86_64_unknown_linux_musl = { value = ".cargo/musl-g++", force = true, relative = true }
CARGO_WORKSPACE_ROOT_DIR = { value = "", relative = true }
SQLX_OFFLINE = "true"

[net]
retry = 5
Expand Down
37 changes: 28 additions & 9 deletions .github/workflows/build-publish-eth-rpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ concurrency:
cancel-in-progress: true

env:
IMAGE_NAME: "docker.io/paritypr/eth-rpc"
ETH_RPC_IMAGE_NAME: "docker.io/paritypr/eth-rpc"
ETH_INDEXER_IMAGE_NAME: "docker.io/paritypr/eth-indexer"

jobs:
set-variables:
Expand All @@ -34,7 +35,7 @@ jobs:
echo "set VERSION=${VERSION}"
build_docker:
name: Build docker image
name: Build docker images
runs-on: parity-large
needs: [set-variables]
env:
Expand All @@ -43,17 +44,26 @@ jobs:
- name: Check out the repo
uses: actions/checkout@v4

- name: Build Docker image
- name: Build eth-rpc Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./substrate/frame/revive/rpc/Dockerfile
file: ./substrate/frame/revive/rpc/dockerfiles/eth-rpc/Dockerfile
push: false
tags: |
${{ env.IMAGE_NAME }}:${{ env.VERSION }}
${{ env.ETH_RPC_IMAGE_NAME }}:${{ env.VERSION }}
- name: Build eth-indexer Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./substrate/frame/revive/rpc/dockerfiles/eth-indexer/Dockerfile
push: false
tags: |
${{ env.ETH_INDEXER_IMAGE_NAME }}:${{ env.VERSION }}
build_push_docker:
name: Build and push docker image
name: Build and push docker images
runs-on: parity-large
if: github.ref == 'refs/heads/master'
needs: [set-variables]
Expand All @@ -69,11 +79,20 @@ jobs:
username: ${{ secrets.PARITYPR_DOCKERHUB_USERNAME }}
password: ${{ secrets.PARITYPR_DOCKERHUB_PASSWORD }}

- name: Build Docker image
- name: Build eth-rpc Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./substrate/frame/revive/rpc/dockerfiles/eth-rpc/Dockerfile
push: true
tags: |
${{ env.ETH_RPC_IMAGE_NAME }}:${{ env.VERSION }}
- name: Build eth-indexer Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./substrate/frame/revive/rpc/Dockerfile
file: ./substrate/frame/revive/rpc/dockerfiles/eth-indexer/Dockerfile
push: true
tags: |
${{ env.IMAGE_NAME }}:${{ env.VERSION }}
${{ env.ETH_INDEXER_IMAGE_NAME }}:${{ env.VERSION }}
47 changes: 24 additions & 23 deletions .github/workflows/build-publish-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: pack artifacts
run: |
mkdir -p ./artifacts
VERSION="${{ needs.preflight.outputs.SOURCE_REF_NAME }}" # will be tag or branch name
VERSION="${{ needs.preflight.outputs.SOURCE_REF_SLUG }}" # will be tag or branch name
mv ./target/testnet/polkadot ./artifacts/.
mv ./target/testnet/polkadot-prepare-worker ./artifacts/.
mv ./target/testnet/polkadot-execute-worker ./artifacts/.
Expand All @@ -62,7 +62,7 @@ jobs:
sha256sum polkadot | tee polkadot.sha256
shasum -c polkadot.sha256
cd ../
EXTRATAG="${{ needs.preflight.outputs.SOURCE_REF_NAME }}-${COMMIT_SHA}"
EXTRATAG="${{ needs.preflight.outputs.SOURCE_REF_SLUG }}-${COMMIT_SHA}"
echo "Polkadot version = ${VERSION} (EXTRATAG = ${EXTRATAG})"
echo -n ${VERSION} > ./artifacts/VERSION
echo -n ${EXTRATAG} > ./artifacts/EXTRATAG
Expand All @@ -77,7 +77,7 @@ jobs:
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}-${{ needs.preflight.outputs.SOURCE_REF_NAME }}
name: ${{ github.job }}-${{ needs.preflight.outputs.SOURCE_REF_SLUG }}
path: artifacts.tar
retention-days: 1

Expand All @@ -103,15 +103,15 @@ jobs:
mkdir -p ./artifacts
mv ./target/release/polkadot-parachain ./artifacts/.
echo "___The VERSION is either a tag name or the curent branch if triggered not by a tag___"
echo ${{ needs.preflight.outputs.SOURCE_REF_NAME }} | tee ./artifacts/VERSION
echo ${{ needs.preflight.outputs.SOURCE_REF_SLUG }} | tee ./artifacts/VERSION
- name: tar
run: tar -cvf artifacts.tar artifacts

- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}-${{ needs.preflight.outputs.SOURCE_REF_NAME }}
name: ${{ github.job }}-${{ needs.preflight.outputs.SOURCE_REF_SLUG }}
path: artifacts.tar
retention-days: 1

Expand Down Expand Up @@ -147,7 +147,7 @@ jobs:
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}-${{ needs.preflight.outputs.SOURCE_REF_NAME }}
name: ${{ github.job }}-${{ needs.preflight.outputs.SOURCE_REF_SLUG }}
path: artifacts.tar
retention-days: 1

Expand All @@ -172,8 +172,8 @@ jobs:
mkdir -p ./artifacts
mv ./target/testnet/adder-collator ./artifacts/.
mv ./target/testnet/undying-collator ./artifacts/.
echo -n "${{ needs.preflight.outputs.SOURCE_REF_NAME }}" > ./artifacts/VERSION
echo -n "${{ needs.preflight.outputs.SOURCE_REF_NAME }}-${COMMIT_SHA}" > ./artifacts/EXTRATAG
echo -n "${{ needs.preflight.outputs.SOURCE_REF_SLUG }}" > ./artifacts/VERSION
echo -n "${{ needs.preflight.outputs.SOURCE_REF_SLUG }}-${COMMIT_SHA}" > ./artifacts/EXTRATAG
echo "adder-collator version = $(cat ./artifacts/VERSION) (EXTRATAG = $(cat ./artifacts/EXTRATAG))"
echo "undying-collator version = $(cat ./artifacts/VERSION) (EXTRATAG = $(cat ./artifacts/EXTRATAG))"
cp -r ./docker/* ./artifacts
Expand All @@ -184,7 +184,7 @@ jobs:
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}-${{ needs.preflight.outputs.SOURCE_REF_NAME }}
name: ${{ github.job }}-${{ needs.preflight.outputs.SOURCE_REF_SLUG }}
path: artifacts.tar
retention-days: 1

Expand All @@ -209,8 +209,8 @@ jobs:
mv ./target/testnet/malus ./artifacts/.
mv ./target/testnet/polkadot-execute-worker ./artifacts/.
mv ./target/testnet/polkadot-prepare-worker ./artifacts/.
echo -n "${{ needs.preflight.outputs.SOURCE_REF_NAME }}" > ./artifacts/VERSION
echo -n "${{ needs.preflight.outputs.SOURCE_REF_NAME }}-${COMMIT_SHA}" > ./artifacts/EXTRATAG
echo -n "${{ needs.preflight.outputs.SOURCE_REF_SLUG }}" > ./artifacts/VERSION
echo -n "${{ needs.preflight.outputs.SOURCE_REF_SLUG }}-${COMMIT_SHA}" > ./artifacts/EXTRATAG
echo "polkadot-test-malus = $(cat ./artifacts/VERSION) (EXTRATAG = $(cat ./artifacts/EXTRATAG))"
cp -r ./docker/* ./artifacts
Expand All @@ -220,7 +220,7 @@ jobs:
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}-${{ needs.preflight.outputs.SOURCE_REF_NAME }}
name: ${{ github.job }}-${{ needs.preflight.outputs.SOURCE_REF_SLUG }}
path: artifacts.tar
retention-days: 1

Expand All @@ -246,6 +246,7 @@ jobs:
WASM_BUILD_NO_COLOR=1 forklift cargo build --locked --release -p staging-node-cli
ls -la target/release/
- name: pack artifacts
shell: bash
run: |
mv target/release/substrate-node ./artifacts/substrate/substrate
echo -n "Substrate version = "
Expand All @@ -264,7 +265,7 @@ jobs:
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}-${{ needs.preflight.outputs.SOURCE_REF_NAME }}
name: ${{ github.job }}-${{ needs.preflight.outputs.SOURCE_REF_SLUG }}
path: artifacts.tar
retention-days: 1

Expand Down Expand Up @@ -294,7 +295,7 @@ jobs:
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}-${{ needs.preflight.outputs.SOURCE_REF_NAME }}
name: ${{ github.job }}-${{ needs.preflight.outputs.SOURCE_REF_SLUG }}
path: artifacts.tar
retention-days: 1

Expand All @@ -313,7 +314,7 @@ jobs:

- uses: actions/[email protected]
with:
name: build-test-parachain-${{ needs.preflight.outputs.SOURCE_REF_NAME }}
name: build-test-parachain-${{ needs.preflight.outputs.SOURCE_REF_SLUG }}

- name: tar
run: tar -xvf artifacts.tar
Expand All @@ -337,7 +338,7 @@ jobs:

- uses: actions/[email protected]
with:
name: build-linux-stable-${{ needs.preflight.outputs.SOURCE_REF_NAME }}
name: build-linux-stable-${{ needs.preflight.outputs.SOURCE_REF_SLUG }}

- name: tar
run: tar -xvf artifacts.tar
Expand All @@ -361,7 +362,7 @@ jobs:

- uses: actions/[email protected]
with:
name: build-test-collators-${{ needs.preflight.outputs.SOURCE_REF_NAME }}
name: build-test-collators-${{ needs.preflight.outputs.SOURCE_REF_SLUG }}

- name: tar
run: tar -xvf artifacts.tar
Expand All @@ -385,7 +386,7 @@ jobs:

- uses: actions/[email protected]
with:
name: build-malus-${{ needs.preflight.outputs.SOURCE_REF_NAME }}
name: build-malus-${{ needs.preflight.outputs.SOURCE_REF_SLUG }}

- name: tar
run: tar -xvf artifacts.tar
Expand All @@ -409,7 +410,7 @@ jobs:

- uses: actions/[email protected]
with:
name: build-linux-substrate-${{ needs.preflight.outputs.SOURCE_REF_NAME }}
name: build-linux-substrate-${{ needs.preflight.outputs.SOURCE_REF_SLUG }}

- name: tar
run: tar -xvf artifacts.tar
Expand Down Expand Up @@ -441,23 +442,23 @@ jobs:

- uses: actions/[email protected]
with:
name: build-linux-stable-${{ needs.preflight.outputs.SOURCE_REF_NAME }}
name: build-linux-stable-${{ needs.preflight.outputs.SOURCE_REF_SLUG }}
- name: tar
run: |
tar -xvf artifacts.tar
rm artifacts.tar
- uses: actions/[email protected]
with:
name: build-linux-stable-cumulus-${{ needs.preflight.outputs.SOURCE_REF_NAME }}
name: build-linux-stable-cumulus-${{ needs.preflight.outputs.SOURCE_REF_SLUG }}
- name: tar
run: |
tar -xvf artifacts.tar
rm artifacts.tar
- uses: actions/[email protected]
with:
name: prepare-bridges-zombienet-artifacts-${{ needs.preflight.outputs.SOURCE_REF_NAME }}
name: prepare-bridges-zombienet-artifacts-${{ needs.preflight.outputs.SOURCE_REF_SLUG }}
- name: tar
run: |
tar -xvf artifacts.tar
Expand All @@ -482,7 +483,7 @@ jobs:

- uses: actions/[email protected]
with:
name: build-linux-stable-cumulus-${{ needs.preflight.outputs.SOURCE_REF_NAME }}
name: build-linux-stable-cumulus-${{ needs.preflight.outputs.SOURCE_REF_SLUG }}

- name: tar
run: tar -xvf artifacts.tar
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-semver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
- name: install parity-publish
if: ${{ !contains(github.event.pull_request.labels.*.name, 'R0-silent') }}
# Set the target dir to cache the build.
run: CARGO_TARGET_DIR=./target/ cargo install [email protected].3 --locked -q
run: CARGO_TARGET_DIR=./target/ cargo install [email protected].4 --locked -q

- name: check semver
if: ${{ !contains(github.event.pull_request.labels.*.name, 'R0-silent') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/checks-quick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:
# Fixes "detected dubious ownership" error in the ci
git config --global --add safe.directory '*'
python3 scripts/generate-umbrella.py --sdk . --version 0.1.0
cargo +nightly fmt --all
cargo +nightly fmt -p polkadot-sdk
if [ -n "$(git status --porcelain)" ]; then
cat <<EOF
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/publish-check-compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@ jobs:
- uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc # v4.1.7

- name: Rust Cache
uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7
with:
cache-on-failure: true

- name: install parity-publish
run: cargo install [email protected] --locked -q
run: |
rustup override set 1.82.0
cargo install [email protected] --locked -q
- name: parity-publish update plan
run: parity-publish --color always plan --skip-check --prdoc prdoc/
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-check-crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:
- uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc # v4.1.7

- name: Rust Cache
uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7
with:
cache-on-failure: true

- name: install parity-publish
run: cargo install [email protected].3 --locked -q
run: cargo install [email protected].4 --locked -q

- name: parity-publish check
run: parity-publish --color always check --allow-unpublished
4 changes: 2 additions & 2 deletions .github/workflows/publish-claim-crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
- uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc # v4.1.7

- name: Rust Cache
uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7
with:
cache-on-failure: true

- name: install parity-publish
run: cargo install [email protected].3 --locked -q
run: cargo install [email protected].4 --locked -q

- name: parity-publish claim
env:
Expand Down
Loading

0 comments on commit e1a1bfa

Please sign in to comment.