Skip to content

Commit 23c634e

Browse files
committed
Merge branch 'master' into proposervm-epochs-e2e
2 parents 6dd2221 + 96f30d1 commit 23c634e

File tree

1,727 files changed

+16647
-11083
lines changed

Some content is hidden

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

1,727 files changed

+16647
-11083
lines changed

.github/CODEOWNERS

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,25 @@
88
* @StephenButtolph
99
*.md @meaghanfitzgerald @StephenButtolph
1010
/.dockerignore @maru-ava
11-
/.envrc @maru-ava
12-
/.github/ @maru-ava
13-
/.github/*.md @maru-ava @meaghanfitzgerald
11+
/.envrc @joshua-kim @maru-ava
12+
/.github/ @joshua-kim @maru-ava
13+
/.github/*.md @joshua-kim @maru-ava @meaghanfitzgerald
1414
/.github/CODEOWNERS @StephenButtolph
15-
/.gitignore @maru-ava @StephenButtolph
16-
/.golangci.yml @maru-ava @StephenButtolph
17-
/Dockerfile @maru-ava
18-
/Taskfile.yml @maru-ava
19-
/flake.lock @maru-ava
20-
/flake.nix @maru-ava
15+
/.github/actions/c-chain-reexecution-benchmark/ @aaronbuchwald
16+
/.github/workflows/c-chain-reexecution-benchmark* @aaronbuchwald
17+
/.gitignore @joshua-kim @maru-ava @StephenButtolph
18+
/.golangci.yml @joshua-kim @maru-ava @StephenButtolph
19+
/Dockerfile @joshua-kim @maru-ava
20+
/Taskfile.yml @joshua-kim @maru-ava
21+
/flake.lock @joshua-kim @maru-ava
22+
/flake.nix @joshua-kim @maru-ava
2123
/network/p2p/ @joshua-kim
2224
/network/p2p/*.md @joshua-kim @meaghanfitzgerald
23-
/scripts/ @maru-ava
24-
/scripts/*.md @maru-ava @meaghanfitzgerald
25-
/tests/ @maru-ava
26-
/tests/*.md @maru-ava @meaghanfitzgerald
25+
/scripts/ @joshua-kim @maru-ava
26+
/scripts/*.md @joshua-kim @maru-ava @meaghanfitzgerald
27+
/scripts/benchmark_cchain_range.sh @aaronbuchwald
28+
/tests/ @joshua-kim @maru-ava
29+
/tests/*.md @joshua-kim @maru-ava @meaghanfitzgerald
30+
/tests/reexecute/ @aaronbuchwald
2731
/x/merkledb @joshua-kim @rrazvan1
2832
/x/sync @joshua-kim @rrazvan1

.github/actionlint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ self-hosted-runner:
22
labels:
33
- custom-arm64-jammy
44
- custom-arm64-noble
5+
- avalanche-avalanchego-runner # Github Action Runner Controller
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: 'C-Chain Re-Execution Benchmark'
2+
description: 'Run C-Chain re-execution benchmark'
3+
4+
inputs:
5+
start-block:
6+
description: 'The start block for the benchmark.'
7+
default: '101'
8+
end-block:
9+
description: 'The end block for the benchmark.'
10+
default: '250000'
11+
source-block-dir:
12+
description: 'The source block directory. Supports S3 directory/zip and local directories.'
13+
default: 's3://avalanchego-bootstrap-testing/cchain-mainnet-blocks-1m-ldb.zip'
14+
current-state-dir:
15+
description: 'The current state directory. Supports S3 directory/zip and local directories.'
16+
default: 's3://avalanchego-bootstrap-testing/cchain-current-state-hashdb-full-100.zip'
17+
aws-role:
18+
description: 'AWS role to assume for S3 access.'
19+
required: true
20+
aws-region:
21+
description: 'AWS region to use for S3 access.'
22+
required: true
23+
prometheus-username:
24+
description: 'The username for the Prometheus instance.'
25+
required: true
26+
default: ''
27+
prometheus-password:
28+
description: 'The password for the Prometheus instance.'
29+
required: true
30+
default: ''
31+
external-data-json-cache-key:
32+
description: 'Cache key for the external data JSON file provided for comparison to GitHub Action Benchmark.'
33+
required: true
34+
default: 'c-chain-reexecution-benchmark-data.json'
35+
workspace:
36+
description: 'Working directory to use for the benchmark.'
37+
required: true
38+
default: ${{ github.workspace }}
39+
github-token:
40+
description: 'GitHub token provided to GitHub Action Benchmark.'
41+
required: true
42+
push-github-action-benchmark:
43+
description: 'Whether to push the benchmark result to GitHub.'
44+
required: true
45+
default: false
46+
47+
runs:
48+
using: composite
49+
steps:
50+
- uses: ./.github/actions/setup-go-for-project
51+
- name: Set task env
52+
shell: bash
53+
run: |
54+
{
55+
echo "EXECUTION_DATA_DIR=${{ inputs.workspace }}/reexecution-data"
56+
echo "BENCHMARK_OUTPUT_FILE=${{ inputs.workspace }}/reexecute-cchain-range-benchmark-res.txt"
57+
echo "START_BLOCK=${{ inputs.start-block }}"
58+
echo "END_BLOCK=${{ inputs.end-block }}"
59+
echo "SOURCE_BLOCK_DIR=${{ inputs.source-block-dir }}"
60+
echo "CURRENT_STATE_DIR=${{ inputs.current-state-dir }}"
61+
} >> $GITHUB_ENV
62+
- name: Configure AWS Credentials
63+
uses: aws-actions/configure-aws-credentials@v4
64+
with:
65+
role-to-assume: ${{ inputs.aws-role }}
66+
aws-region: ${{ inputs.aws-region }}
67+
- name: Run C-Chain Re-Execution
68+
uses: ./.github/actions/run-monitored-tmpnet-cmd
69+
with:
70+
run: ./scripts/run_task.sh reexecute-cchain-range-with-copied-data
71+
prometheus_push_url: ${{ inputs.prometheus-push-url }}
72+
prometheus_username: ${{ inputs.prometheus-username }}
73+
prometheus_password: ${{ inputs.prometheus-password }}
74+
grafana_dashboard_id: 'Gl1I20mnk/c-chain'
75+
runtime: "" # Set runtime input to empty string to disable log collection
76+
77+
- name: Download Previous Benchmark Result
78+
uses: actions/cache@v4
79+
with:
80+
path: ./cache
81+
key: ${{ inputs.external-data-json-cache-key }}
82+
83+
- name: Compare Benchmark Result
84+
uses: benchmark-action/github-action-benchmark@v1
85+
with:
86+
tool: 'go'
87+
output-file-path: ${{ env.BENCHMARK_OUTPUT_FILE }}
88+
external-data-json-path: ./cache/${{ inputs.external-data-json-cache-key }}
89+
fail-on-alert: true
90+
github-token: ${{ inputs.github-token }}
91+
summary-always: true
92+
comment-on-alert: true
93+
auto-push: false
94+
95+
- name: Push Benchmark Result
96+
if: ${{ inputs.push-github-action-benchmark }}
97+
uses: benchmark-action/github-action-benchmark@v1
98+
with:
99+
tool: 'go'
100+
output-file-path: ${{ env.BENCHMARK_OUTPUT_FILE }}
101+
github-token: ${{ inputs.github-token }}
102+
auto-push: ${{ inputs.push-github-action-benchmark }}

.github/actions/run-monitored-tmpnet-cmd/action.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ inputs:
4040
default: ${{ github.run_attempt }}
4141
job:
4242
default: ${{ github.job }}
43+
grafana_dashboard_id:
44+
description: 'The identifier of the Grafana dashboard to use, in the format <UID>/<dashboard-name>.'
45+
default: 'kBQpRdWnk/avalanche-main-dashboard'
4346

4447
runs:
4548
using: composite
@@ -51,14 +54,14 @@ runs:
5154
- uses: cachix/install-nix-action@02a151ada4993995686f9ed4f1be7cfbb229e56f #v31
5255
with:
5356
github_access_token: ${{ inputs.github_token }}
54-
- run: ${{ github.action_path }}/nix-develop.sh --command echo "dependencies installed"
57+
- run: $GITHUB_ACTION_PATH/nix-develop.sh --command echo "dependencies installed"
5558
shell: bash
5659
- name: Notify of metrics availability
5760
if: (inputs.prometheus_username != '')
5861
shell: bash
59-
run: ${{ github.action_path }}/notify-metrics-availability.sh
62+
run: $GITHUB_ACTION_PATH/notify-metrics-availability.sh
6063
env:
61-
GRAFANA_URL: https://grafana-poc.avax-dev.network/d/kBQpRdWnk/avalanche-main-dashboard?orgId=1&refresh=10s&var-filter=is_ephemeral_node%7C%3D%7Cfalse&var-filter=gh_repo%7C%3D%7C${{ inputs.repository_owner }}%2F${{ inputs.repository_name }}&var-filter=gh_run_id%7C%3D%7C${{ inputs.run_id }}&var-filter=gh_run_attempt%7C%3D%7C${{ inputs.run_attempt }}
64+
GRAFANA_URL: https://grafana-poc.avax-dev.network/d/${{ inputs.grafana_dashboard_id }}?orgId=1&refresh=10s&var-filter=is_ephemeral_node%7C%3D%7Cfalse&var-filter=gh_repo%7C%3D%7C${{ inputs.repository_owner }}%2F${{ inputs.repository_name }}&var-filter=gh_run_id%7C%3D%7C${{ inputs.run_id }}&var-filter=gh_run_attempt%7C%3D%7C${{ inputs.run_attempt }}
6265
GH_JOB_ID: ${{ inputs.job }}
6366
FILTER_BY_OWNER: ${{ inputs.filter_by_owner }}
6467
- name: Warn that collection of metrics and logs will not be performed
@@ -68,7 +71,7 @@ runs:
6871
- name: Run command
6972
shell: bash
7073
# --impure ensures the env vars are accessible to the command
71-
run: ${{ inputs.run_env }} ${{ github.action_path }}/nix-develop.sh --impure --command bash -x ${{ inputs.run }}
74+
run: ${{ inputs.run_env }} $GITHUB_ACTION_PATH/nix-develop.sh --impure --command bash -x ${{ inputs.run }}
7275
env:
7376
# Always collect metrics locally even when nodes are running in kube to enable collection from the test workload
7477
TMPNET_START_METRICS_COLLECTOR: ${{ inputs.prometheus_username != '' }}
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: C-Chain Re-Execution Benchmark ARC
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
inputs:
7+
start-block:
8+
description: 'The start block for the benchmark.'
9+
required: false
10+
default: 101
11+
end-block:
12+
description: 'The end block for the benchmark.'
13+
required: false
14+
default: 250000
15+
source-block-dir:
16+
description: 'The source block directory. Supports S3 directory/zip and local directories.'
17+
required: false
18+
default: s3://avalanchego-bootstrap-testing/cchain-mainnet-blocks-1m-ldb.zip
19+
current-state-dir:
20+
description: 'The current state directory. Supports S3 directory/zip and local directories.'
21+
required: false
22+
default: s3://avalanchego-bootstrap-testing/cchain-current-state-hashdb-full-100.zip
23+
runner:
24+
description: 'Runner to execute the benchmark. Input to the runs-on field of the job.'
25+
required: false
26+
default: ubuntu-latest
27+
28+
schedule:
29+
- cron: '0 9 * * *' # Runs every day at 09:00 UTC (04:00 EST)
30+
31+
jobs:
32+
c-chain-reexecution-arc: # PR smoke test + scheduled run + manual workflow
33+
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'ava-labs/avalanchego' }}
34+
permissions:
35+
id-token: write
36+
contents: write
37+
runs-on: ${{ github.event.inputs.runner || 'avalanche-avalanchego-runner-2ti' }}
38+
container:
39+
image: ghcr.io/actions/actions-runner:2.325.0
40+
steps:
41+
- uses: actions/checkout@v4
42+
- name: Set task parameters
43+
id: set-params
44+
run: |
45+
if [[ "${{ github.event_name }}" == "schedule" ]]; then
46+
{
47+
echo "start-block=33000001"
48+
echo "end-block=34000000"
49+
echo "source-block-dir=s3://avalanchego-bootstrap-testing/cchain-mainnet-blocks-50m-ldb.zip"
50+
echo "current-state-dir=s3://avalanchego-bootstrap-testing/cchain-current-state-hashdb-full-33m/"
51+
} >> "$GITHUB_OUTPUT"
52+
elif [[ "${{ github.event_name }}" == "pull_request" ]]; then
53+
{
54+
echo "start-block=101"
55+
echo "end-block=250000"
56+
echo "source-block-dir=s3://avalanchego-bootstrap-testing/cchain-mainnet-blocks-1m-ldb.zip"
57+
echo "current-state-dir=s3://avalanchego-bootstrap-testing/cchain-current-state-hashdb-full-100.zip"
58+
} >> "$GITHUB_OUTPUT"
59+
else
60+
{
61+
echo "start-block=${{ github.event.inputs.start-block }}"
62+
echo "end-block=${{ github.event.inputs.end-block }}"
63+
echo "source-block-dir=${{ github.event.inputs.source-block-dir }}"
64+
echo "current-state-dir=${{ github.event.inputs.current-state-dir }}"
65+
} >> "$GITHUB_OUTPUT"
66+
fi
67+
- name: Install ARC Dependencies
68+
shell: bash
69+
run: |
70+
# xz-utils might be present on some containers. Install if not present.
71+
if ! command -v xz &> /dev/null; then
72+
sudo apt-get update
73+
sudo apt-get install -y xz-utils
74+
fi
75+
- name: Run C-Chain Re-Execution Benchmark
76+
uses: ./.github/actions/c-chain-reexecution-benchmark
77+
with:
78+
start-block: ${{ steps.set-params.outputs.start-block }}
79+
end-block: ${{ steps.set-params.outputs.end-block }}
80+
source-block-dir: ${{ steps.set-params.outputs.source-block-dir }}
81+
current-state-dir: ${{ steps.set-params.outputs.current-state-dir }}
82+
prometheus-username: ${{ secrets.PROMETHEUS_ID || '' }}
83+
prometheus-password: ${{ secrets.PROMETHEUS_PASSWORD || '' }}
84+
push-github-action-benchmark: ${{ github.event_name == 'schedule' }}
85+
aws-role: ${{ secrets.AWS_S3_READ_ONLY_ROLE }}
86+
aws-region: 'us-east-2'
87+
github-token: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: C-Chain Re-Execution Benchmark GH Runner
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
c-chain-reexecution-pr-gh-runner: # Smoke test on GitHub hosted runner
8+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'ava-labs/avalanchego'}}
9+
permissions:
10+
id-token: write
11+
contents: write
12+
runs-on: 'ubuntu-latest'
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Run C-Chain Re-Execution Benchmark
16+
uses: ./.github/actions/c-chain-reexecution-benchmark
17+
with:
18+
start-block: 101
19+
end-block: 250000
20+
source-block-dir: s3://avalanchego-bootstrap-testing/cchain-mainnet-blocks-1m-ldb.zip
21+
current-state-dir: s3://avalanchego-bootstrap-testing/cchain-current-state-hashdb-full-100.zip
22+
prometheus-username: ${{ secrets.PROMETHEUS_ID || '' }}
23+
prometheus-password: ${{ secrets.PROMETHEUS_PASSWORD || '' }}
24+
aws-role: ${{ secrets.AWS_S3_READ_ONLY_ROLE }}
25+
aws-region: 'us-east-2'
26+
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ci.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,13 @@ jobs:
140140
# responsible for pushes.
141141
push: false
142142
# This version should match the version installed in the nix dev shell
143-
version: 1.47.2
143+
version: 1.52.1
144144
links-lint:
145145
name: Markdown Links Lint
146146
runs-on: ubuntu-latest
147147
steps:
148148
- uses: actions/checkout@v4
149-
- uses: umbrelladocs/action-linkspector@a0567ce1c7c13de4a2358587492ed43cab5d0102 #v1.3.4
149+
- uses: umbrelladocs/action-linkspector@de84085e0f51452a470558693d7d308fbb2fa261 #v1.2.5
150150
with:
151151
fail_level: any
152152
check_generated_protobuf:
@@ -233,30 +233,41 @@ jobs:
233233
shell: bash
234234
run: nix develop --command ./scripts/run_task.sh test-bootstrap-monitor-e2e
235235
load:
236-
name: Run load test
236+
name: Run process-based load test
237237
runs-on: ubuntu-latest
238238
steps:
239239
- uses: actions/checkout@v4
240240
- uses: ./.github/actions/setup-go-for-project
241241
- uses: ./.github/actions/run-monitored-tmpnet-cmd
242242
with:
243-
run: ./scripts/run_task.sh test-load
243+
run: ./scripts/run_task.sh test-load -- --load-timeout=30s
244244
artifact_prefix: load
245245
prometheus_username: ${{ secrets.PROMETHEUS_ID || '' }}
246246
prometheus_password: ${{ secrets.PROMETHEUS_PASSWORD || '' }}
247247
loki_username: ${{ secrets.LOKI_ID || '' }}
248248
loki_password: ${{ secrets.LOKI_PASSWORD || '' }}
249-
load_kube:
250-
name: Run load test on kube
249+
load_kube_kind:
250+
name: Run load test on kind cluster
251251
runs-on: ubuntu-latest
252252
steps:
253253
- uses: actions/checkout@v4
254254
- uses: ./.github/actions/setup-go-for-project
255255
- uses: ./.github/actions/run-monitored-tmpnet-cmd
256256
with:
257-
run: ./scripts/run_task.sh test-load-kube
257+
run: ./scripts/run_task.sh test-load-kube-kind -- --load-timeout=30s
258+
runtime: kube
258259
artifact_prefix: load-kube
259260
prometheus_username: ${{ secrets.PROMETHEUS_ID || '' }}
260261
prometheus_password: ${{ secrets.PROMETHEUS_PASSWORD || '' }}
261262
loki_username: ${{ secrets.LOKI_ID || '' }}
262263
loki_password: ${{ secrets.LOKI_PASSWORD || '' }}
264+
robustness:
265+
runs-on: ubuntu-latest
266+
steps:
267+
- uses: actions/checkout@v4
268+
- uses: ./.github/actions/setup-go-for-project
269+
- uses: ./.github/actions/install-nix
270+
# TODO(marun) Extend testing of robustness beyond deploying a suitable test environment
271+
- name: Deploy kind with chaos mesh
272+
shell: bash
273+
run: nix develop --command ./scripts/run_task.sh test-robustness

0 commit comments

Comments
 (0)