Skip to content

Commit 3048636

Browse files
Merge branch 'main' into A0-1614-hide-subxt-types
2 parents ae01f0d + b87299f commit 3048636

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+2268
-1311
lines changed

.github/actions/run-e2e-test/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ runs:
9191
9292
RESERVED_SEATS="${{ inputs.reserved-seats }}"
9393
NON_RESERVED_SEATS="${{ inputs.non-reserved-seats }}"
94-
94+
9595
if [[ -n "${RANDOMIZED}" ]]; then
9696
ARGS+=(-r "${RANDOMIZED}")
9797
fi

.github/scripts/run_consensus.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
set -euo pipefail
44

55
# default node count
6-
# change when increasing the number of node containers
76
NODE_COUNT=5
7+
# max node count that will not crash current GH machines
8+
MAX_NODE_COUNT=6
9+
# default minimum validator count
810
MIN_VALIDATOR_COUNT=4
911
DOCKER_COMPOSE=${DOCKER_COMPOSE:-"docker/docker-compose.yml"}
1012
OVERRIDE_DOCKER_COMPOSE=${OVERRIDE_DOCKER_COMPOSE:-""}
@@ -51,6 +53,11 @@ done
5153

5254
export NODE_COUNT
5355

56+
if [[ ${NODE_COUNT} -gt ${MAX_NODE_COUNT} ]]; then
57+
echo "Tried to run ${NODE_COUNT} nodes. Max node count allowed: ${MAX_NODE_COUNT}."
58+
exit 1
59+
fi
60+
5461
function generate_authorities {
5562
local authorities_count="$1"
5663

.github/workflows/deploy-testnet.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -79,22 +79,13 @@ jobs:
7979
docker push ${{ env.DOCKERHUB_TESTNET_IMAGE }}
8080
docker push ${{ env.DOCKERHUB_TESTNET_LATEST_IMAGE }}
8181
82-
- name: S3 CI | Configure AWS credentials
83-
uses: aws-actions/configure-aws-credentials@v1
84-
env:
85-
AWS_REGION: us-east-1
86-
with:
87-
aws-access-key-id: ${{ secrets.AWS_DEVNET_ACCESS_KEY_ID }}
88-
aws-secret-access-key: ${{ secrets.AWS_DEVNET_SECRET_ACCESS_KEY }}
89-
aws-region: ${{ env.AWS_REGION }}
90-
9182
- name: S3 CI | Download release runtime from S3 bucket
9283
shell: bash
9384
env:
9485
S3BUCKET_URL: s3://${{ secrets.CI_MAINNET_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.outputs.sha_short }}/aleph-runtime
9586
S3BUCKET_FILE: aleph-runtime-${{ steps.get_branch.outputs.sha_short }}.tar.gz
9687
run: |
97-
aws s3 cp ${{ env.S3BUCKET_URL }}/${{ S3BUCKET_FILE }} ${{ env.S3BUCKET_FILE }}
88+
aws s3 cp ${{ env.S3BUCKET_URL }}/${{ env.S3BUCKET_FILE }} ${{ env.S3BUCKET_FILE }}
9889
9990
- name: RELEASE ASSET | Add runtime to the release
10091
uses: softprops/action-gh-release@v1

.github/workflows/deploy-to-devnet.yml

Lines changed: 28 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
name: Deploy to Devnet
22

3+
# This workflow performs automatic deployment of aleph-node to the Devnet environment
4+
# It does it from the scratch, ie it
5+
# 1) syncs the validators keys from S3,
6+
# 2) generates raw chainspec from the deployed aleph-node binary,
7+
# 3) restart nodes with cleaned db
8+
39
on:
410
workflow_dispatch:
511

@@ -22,8 +28,7 @@ jobs:
2228
id: vars
2329
shell: bash
2430
run: |
25-
echo "##[set-output name=branch;]$(echo ${GITHUB_REF##*/})"
26-
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
31+
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
2732
2833
- name: Configure AWS credentials
2934
uses: aws-actions/configure-aws-credentials@v1
@@ -49,58 +54,50 @@ jobs:
4954
with:
5055
version: 'v1.23.6'
5156

52-
- name: Run fork-off update
53-
env:
54-
RELEASE_TAG: ${{ steps.vars.outputs.sha_short }}
55-
57+
- name: Sync all validator's keystores from S3
5658
run: |
5759
#!/bin/bash
58-
59-
COMMIT_ID=$(curl -s -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "system_version"}' https://rpc.test.azero.dev | jq -r '.result' | cut -d "-" -f 2 | head -c 7)
60-
echo $COMMIT_ID
61-
62-
# sync all validator's keystores from S3
6360
aws s3 cp s3://alephzero-devnet-eu-central-1-keys-bucket/data data --recursive
64-
6561
# rename validator paths
6662
declare -A NAMES=([aleph-node-validator-0]=5D34dL5prEUaGNQtPPZ3yN5Y6BnkfXunKXXz6fo7ZJbLwRRH [aleph-node-validator-1]=5GBNeWRhZc2jXu7D55rBimKYDk8PGk8itRYFTPfC8RJLKG5o [aleph-node-validator-2]=5Dfis6XL8J2P6JHUnUtArnFWndn62SydeP8ee8sG2ky9nfm9 [aleph-node-validator-3]=5F4H97f7nQovyrbiq4ZetaaviNwThSVcFobcA5aGab6167dK [aleph-node-validator-4]=5DiDShBWa1fQx6gLzpf3SFBhMinCoyvHM1BWjPNsmXS8hkrW [aleph-node-validator-5]=5EFb84yH9tpcFuiKUcsmdoF7xeeY3ajG1ZLQimxQoFt9HMKR [aleph-node-validator-6]=5DZLHESsfGrJ5YzT3HuRPXsSNb589xQ4Unubh1mYLodzKdVY [aleph-node-validator-7]=5GHJzqvG6tXnngCpG7B12qjUvbo5e4e9z8Xjidk3CQZHxTPZ [aleph-node-validator-8]=5CUnSsgAyLND3bxxnfNhgWXSe9Wn676JzLpGLgyJv858qhoX [aleph-node-validator-9]=5CVKn7HAZW1Ky4r7Vkgsr7VEW88C2sHgUNDiwHY9Ct2hjU8q)
67-
6863
for NAME in "${!NAMES[@]}"; do
6964
mv -v data/$NAME data/${NAMES[$NAME]}
7065
done
7166
72-
# generate chainspec, it will reuse keys from the synced keystore
73-
docker run -i -v $(pwd)/data:/data --env RUST_BACKTRACE=1 --entrypoint "/usr/local/bin/aleph-node" public.ecr.aws/p6e8q1z1/aleph-node:${COMMIT_ID} bootstrap-chain --raw --base-path /data --chain-id a0dnet1 --account-ids 5D34dL5prEUaGNQtPPZ3yN5Y6BnkfXunKXXz6fo7ZJbLwRRH,5GBNeWRhZc2jXu7D55rBimKYDk8PGk8itRYFTPfC8RJLKG5o,5Dfis6XL8J2P6JHUnUtArnFWndn62SydeP8ee8sG2ky9nfm9,5F4H97f7nQovyrbiq4ZetaaviNwThSVcFobcA5aGab6167dK,5DiDShBWa1fQx6gLzpf3SFBhMinCoyvHM1BWjPNsmXS8hkrW,5EFb84yH9tpcFuiKUcsmdoF7xeeY3ajG1ZLQimxQoFt9HMKR,5DZLHESsfGrJ5YzT3HuRPXsSNb589xQ4Unubh1mYLodzKdVY,5GHJzqvG6tXnngCpG7B12qjUvbo5e4e9z8Xjidk3CQZHxTPZ,5CUnSsgAyLND3bxxnfNhgWXSe9Wn676JzLpGLgyJv858qhoX,5CVKn7HAZW1Ky4r7Vkgsr7VEW88C2sHgUNDiwHY9Ct2hjU8q --sudo-account-id 5F4SvwaUEQubiqkPF8YnRfcN77cLsT2DfG4vFeQmSXNjR7hD > chainspec.skeleton.json
74-
75-
docker run -i -v $(pwd):/app public.ecr.aws/p6e8q1z1/fork-off:latest --ws-rpc-endpoint=wss://ws.test.azero.dev --initial-spec-path=chainspec.skeleton.json --combined-spec-path=chainspec.json
67+
- name: Generate chainspec
68+
env:
69+
RELEASE_TAG: ${{ steps.vars.outputs.sha_short }}
7670

71+
run: |
72+
#!/bin/bash
73+
aws s3 cp s3://alephzero-devnet-eu-central-1-keys-bucket/data data --recursive
74+
docker run -i -v $(pwd)/data:/data --env RUST_BACKTRACE=1 --entrypoint "/usr/local/bin/aleph-node" public.ecr.aws/p6e8q1z1/aleph-node:${RELEASE_TAG} bootstrap-chain --raw --base-path /data --chain-id a0dnet1 --account-ids 5D34dL5prEUaGNQtPPZ3yN5Y6BnkfXunKXXz6fo7ZJbLwRRH,5GBNeWRhZc2jXu7D55rBimKYDk8PGk8itRYFTPfC8RJLKG5o,5Dfis6XL8J2P6JHUnUtArnFWndn62SydeP8ee8sG2ky9nfm9,5F4H97f7nQovyrbiq4ZetaaviNwThSVcFobcA5aGab6167dK,5DiDShBWa1fQx6gLzpf3SFBhMinCoyvHM1BWjPNsmXS8hkrW,5EFb84yH9tpcFuiKUcsmdoF7xeeY3ajG1ZLQimxQoFt9HMKR,5DZLHESsfGrJ5YzT3HuRPXsSNb589xQ4Unubh1mYLodzKdVY,5GHJzqvG6tXnngCpG7B12qjUvbo5e4e9z8Xjidk3CQZHxTPZ,5CUnSsgAyLND3bxxnfNhgWXSe9Wn676JzLpGLgyJv858qhoX,5CVKn7HAZW1Ky4r7Vkgsr7VEW88C2sHgUNDiwHY9Ct2hjU8q --sudo-account-id 5F4SvwaUEQubiqkPF8YnRfcN77cLsT2DfG4vFeQmSXNjR7hD > chainspec.json
7775
aws s3 cp chainspec.json s3://alephzero-devnet-eu-central-1-keys-bucket/chainspec.json
7876
79-
# stop and clean devnet
80-
77+
- name: Stop and purge db Devnet
78+
run: |
79+
#!/bin/bash
8180
aws eks --region eu-central-1 update-kubeconfig --name alephzero-devnet-eu-central-1-eks
8281
8382
kubectl delete sts aleph-node-validator -n devnet --ignore-not-found=true
8483
kubectl delete pvc -l app=aleph-node-validator -n devnet --ignore-not-found=true
85-
kubectl delete job send-runtime-hook -n devnet --ignore-not-found=true
86-
87-
cd aleph-apps/aleph-node-validators/overlays/devnet/eu-central-1
88-
kustomize edit set image "aleph-node-validator-image-placeholder=public.ecr.aws/p6e8q1z1/aleph-node:${COMMIT_ID}"
89-
kustomize edit remove resource send-runtime-hook.yaml
90-
kustomize build . | kubectl apply -f -
91-
sleep 2
92-
kubectl rollout status --watch --timeout=3600s statefulset/aleph-node-validator -n devnet
9384
94-
echo "Waiting 15 minutes"
95-
sleep 900
85+
- name: Start Devnet
86+
env:
87+
RELEASE_TAG: ${{ steps.vars.outputs.sha_short }}
88+
run: |
89+
#!/bin/bash
9690
91+
cd aleph-apps/aleph-node-validators/overlays/devnet/eu-central-1
9792
kustomize edit set image "aleph-node-validator-image-placeholder=public.ecr.aws/p6e8q1z1/aleph-node:${RELEASE_TAG}"
9893
kustomize build . | kubectl apply -f -
9994
sleep 2
10095
kubectl rollout status --watch --timeout=3600s statefulset/aleph-node-validator -n devnet
10196
102-
kustomize edit add resource send-runtime-hook.yaml
103-
kustomize build . | kubectl apply -f -
97+
- name: Waiting 5 minutes for validators to boot
98+
run: |
99+
#!/bin/bash
100+
sleep 300
104101
105102
- name: GIT | Commit changes to aleph-apps repository.
106103
uses: EndBug/add-and-commit@v5.1.0

.github/workflows/e2e-tests-main-devnet.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,9 @@ jobs:
188188
run-aleph-client-subxt-codegen-check:
189189
needs: [build-test-docker]
190190
name: Checks if runtime file in aleph-client is up-to-date
191+
# disabling this check as it causes troubles
192+
# this should be reworked to sth like https://github.com/paritytech/subxt/blob/master/examples/examples/metadata_compatibility.rs
193+
if: false
191194
runs-on: ubuntu-20.04
192195
steps:
193196
- name: Checkout source code

.github/workflows/nightly-pipeline.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,8 @@ jobs:
170170
uses: ./.github/actions/run-e2e-test
171171
with:
172172
test-case: authorities_are_staking
173-
randomized: true
173+
node-count: 6
174+
follow-up-finalization-check: true
174175
timeout-minutes: 60
175176

176177
run-e2e-high-out-latency:

BUILD.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ is stored at `/lib64/ld-linux-x86-64.so.2`, you can execute `patchelf --set-inte
5353
aleph-node>`. Alternatively, you can use our nix-build script (used by docker based approach), i.q. `nix/nix-build.sh`.
5454

5555
Note: we recommend using `direnv` together with `nix-direnv` for setting up nix-shell. This way you can use your preferred shell,
56-
instead of one provided by nix-shell.
56+
instead of one provided by nix-shell.
5757
Example configuration for `direnv`. Copy it into `.envrc` file and then run `direnv-allow`:
5858
```
5959
# installs nix-direnv, https://github.com/nix-community/nix-direnv
@@ -88,7 +88,7 @@ It might influence some of the build scripts of our build dependencies and it mi
8888
the environment flags related with the build process, like `CXXFLAGS` etc.
8989
Example build procedure using Ubuntu 20.04 LTS and bash shell:
9090
```
91-
sudo apt install build-essential curl git clang libclang-dev pkg-config libssl-dev
91+
sudo apt install build-essential curl git clang libclang-dev pkg-config libssl-dev protobuf-compiler
9292
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
9393
source "$HOME/.cargo/env"
9494
git clone https://github.com/Cardinal-Cryptography/aleph-node.git

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)