Skip to content

Commit

Permalink
[MGX-632] 3rdparty rewards #593 (#643)
Browse files Browse the repository at this point in the history
This PR introduces 3rdparty rewards feature.

Deprecated RPC calls:

    rpc XYK::claim_rewards_all -> ProofOfStake::claim_native_rewards

Deprecated Extirnsics:

ProofOfStake::activate_liquidity ->
ProofOfStake::activate_liquidity_for_native_rewards
ProofOfStake::deactivate_liquidity ->
ProofOfStake::deactivate_liquidity_for_native_rewards
ProofOfStake::claim_rewards_all -> ProofOfStake::claim_native_rewards
  • Loading branch information
mateuszaaa authored Nov 27, 2023
2 parents b32c21d + 0684045 commit 3bb1d90
Show file tree
Hide file tree
Showing 71 changed files with 12,489 additions and 6,020 deletions.
43 changes: 22 additions & 21 deletions .github/workflows/reusable-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@ jobs:
container:
image: ${{ inputs.builder_image }}
env:
DOCKER_HOST: 'unix:///run/docker/docker.sock'
DOCKER_HOST: "unix:///run/docker/docker.sock"
volumes:
- /run/docker:/run/docker
steps:
- uses: actions/checkout@v3
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v1
with:
workload_identity_provider: '${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}'
service_account: '${{ secrets.GCP_SERVICE_ACCOUNT }}'
workload_identity_provider: "${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}"
service_account: "${{ secrets.GCP_SERVICE_ACCOUNT }}"

- name: Cache the Cargo dependencies
uses: mansagroup/[email protected]
Expand Down Expand Up @@ -130,8 +130,8 @@ jobs:
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v1
with:
workload_identity_provider: '${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}'
service_account: '${{ secrets.GCP_SERVICE_ACCOUNT }}'
workload_identity_provider: "${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}"
service_account: "${{ secrets.GCP_SERVICE_ACCOUNT }}"
- name: Cache the Cargo dependencies
uses: mansagroup/[email protected]
with:
Expand All @@ -154,8 +154,8 @@ jobs:
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v1
with:
workload_identity_provider: '${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}'
service_account: '${{ secrets.GCP_SERVICE_ACCOUNT }}'
workload_identity_provider: "${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}"
service_account: "${{ secrets.GCP_SERVICE_ACCOUNT }}"
- name: Cache the Cargo dependencies
uses: mansagroup/[email protected]
with:
Expand All @@ -179,8 +179,8 @@ jobs:
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v1
with:
workload_identity_provider: '${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}'
service_account: '${{ secrets.GCP_SERVICE_ACCOUNT }}'
workload_identity_provider: "${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}"
service_account: "${{ secrets.GCP_SERVICE_ACCOUNT }}"
- name: Cache the Cargo dependencies
uses: mansagroup/[email protected]
with:
Expand Down Expand Up @@ -210,8 +210,8 @@ jobs:
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v1
with:
workload_identity_provider: '${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}'
service_account: '${{ secrets.GCP_SERVICE_ACCOUNT }}'
workload_identity_provider: "${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}"
service_account: "${{ secrets.GCP_SERVICE_ACCOUNT }}"
- name: Cache the Cargo dependencies
uses: mansagroup/[email protected]
with:
Expand All @@ -222,9 +222,12 @@ jobs:
/usr/local/cargo/registry
key: cargo-benchmark-cache-${{ inputs.cache_version }}-${{ hashFiles('Cargo.lock') }}
- name: Run benchmarks tests
run: cargo test --release -j8 --features=runtime-benchmarks -p pallet-xyk -p pallet-issuance -p pallet-multipurpose-liquidity -p pallet-fee-lock -p pallet-proof-of-stake -p pallet-proof-of-stake
run: cargo test --release -j8 --features=runtime-benchmarks -p pallet-xyk -p pallet-issuance -p pallet-multipurpose-liquidity -p pallet-fee-lock
- name: Run benchmarks tests
run: cargo test --release -j8 --features=runtime-benchmarks -p pallet-bootstrap
# NOTE: MGX-742
- name: Run benchmarks tests
run: cargo test --release -j8 --features=runtime-benchmarks -p pallet-proof-of-stake

build-and-run-try-runtime:
name: Run try-runtime checks
Expand All @@ -236,8 +239,8 @@ jobs:
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v1
with:
workload_identity_provider: '${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}'
service_account: '${{ secrets.GCP_SERVICE_ACCOUNT }}'
workload_identity_provider: "${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}"
service_account: "${{ secrets.GCP_SERVICE_ACCOUNT }}"
- name: Cache the Cargo dependencies
uses: mansagroup/[email protected]
with:
Expand Down Expand Up @@ -272,8 +275,8 @@ jobs:
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v1
with:
workload_identity_provider: '${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}'
service_account: '${{ secrets.GCP_SERVICE_ACCOUNT }}'
workload_identity_provider: "${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}"
service_account: "${{ secrets.GCP_SERVICE_ACCOUNT }}"

- name: Cache the Cargo dependencies
uses: mansagroup/[email protected]
Expand All @@ -298,7 +301,7 @@ jobs:
- name: Run pallet benchmarks
run: |
mkdir ./benchmarks && target/release/mangata-node benchmark pallet \
-l=info,xyk=error,collective-mangata=warn,bootstrap=warn \
-l=info,runtime::collective=warn,xyk=warn \
--chain mangata-kusama \
--execution wasm \
--wasm-execution compiled \
Expand All @@ -321,7 +324,6 @@ jobs:
name: benchmarks
path: ./benchmarks


build-wasms:
name: Export wasm artifacts
runs-on: [compile-gke]
Expand All @@ -335,8 +337,8 @@ jobs:
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v1
with:
workload_identity_provider: '${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}'
service_account: '${{ secrets.GCP_SERVICE_ACCOUNT }}'
workload_identity_provider: "${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}"
service_account: "${{ secrets.GCP_SERVICE_ACCOUNT }}"

- name: Cache the Cargo dependencies
uses: mansagroup/[email protected]
Expand All @@ -362,4 +364,3 @@ jobs:
/bin/bash -c 'target/release/mangata-node export-genesis-wasm --chain=mangata-rococo -l=info,xyk=error > /dev/null'
/bin/bash -c 'target/release/mangata-node export-genesis-state --chain=mangata-rococo-local -l=info,xyk=error > /dev/null'
/bin/bash -c 'target/release/mangata-node export-genesis-wasm --chain=mangata-rococo-local -l=info,xyk=error > /dev/null'
Loading

0 comments on commit 3bb1d90

Please sign in to comment.