Skip to content

Commit 602392a

Browse files
authored
Merge branch 'main' into main
2 parents 6be3ce2 + 3eb19c4 commit 602392a

File tree

2,098 files changed

+73713
-21492
lines changed

Some content is hidden

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

2,098 files changed

+73713
-21492
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+44-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,45 @@
1-
### Description
1+
## Description
2+
<!-- Please include a summary of the change, including which issue it fixes or what feature it adds. Include relevant motivation, context and documentation as appropriate. List dependencies that are required for this change, if any. -->
23

3-
### Test Plan
4-
<!-- Please provide us with clear details for verifying that your changes work. -->
4+
## Type of Change
5+
- [ ] New feature
6+
- [ ] Bug fix
7+
- [ ] Breaking change
8+
- [ ] Performance improvement
9+
- [ ] Refactoring
10+
- [ ] Dependency update
11+
- [ ] Documentation update
12+
- [ ] Tests
13+
14+
## Which Components or Systems Does This Change Impact?
15+
- [ ] Validator Node
16+
- [ ] Full Node (API, Indexer, etc.)
17+
- [ ] Move/Aptos Virtual Machine
18+
- [ ] Aptos Framework
19+
- [ ] Aptos CLI/SDK
20+
- [ ] Developer Infrastructure
21+
- [ ] Other (specify)
22+
23+
## How Has This Been Tested?
24+
<!--
25+
- Please ensure that the functionality introduced by this change is well tested and verified to work as expected.
26+
- Ensure tests cover both happy and unhappy paths.
27+
- List and link relevant tests.
28+
-->
29+
30+
## Key Areas to Review
31+
<!--
32+
- Identify any critical parts of the code that require special attention or understanding. Explain why these parts are crucial to the functionality or architecture of the project.
33+
- Point out any areas where complex logic has been implemented. Provide a brief explanation of the logic and your approach to make it easier for reviewers to follow.
34+
- Highlight any areas where you are particularly concerned or unsure about the code's impact on the change. This can include potential performance or security issues, or compatibility with existing features.
35+
-->
36+
37+
## Checklist
38+
- [ ] I have read and followed the [CONTRIBUTING](https://github.com/aptos-labs/aptos-core/blob/main/CONTRIBUTING.md) doc
39+
- [ ] I have performed a self-review of my own code
40+
- [ ] I have commented my code, particularly in hard-to-understand areas
41+
- [ ] I identified and added all stakeholders and component owners affected by this change as reviewers
42+
- [ ] I tested both happy and unhappy path of the functionality
43+
- [ ] I have made corresponding changes to the documentation
44+
45+
<!-- Thank you for your contribution! -->

.github/actions/file-change-determinator/action.yaml

+18
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: File Change Determinator
22
description: Runs the file change determinator (to identify which files changed in a pull request)
33
outputs:
4+
move_compiler_v2_changes:
5+
description: "Returns true if changes were detected that require the move compiler v2 tests to run"
6+
value: ${{ !steps.move_compiler_v2_determinator.outputs.should_skip }}
47
only_docs_changed:
58
description: "Returns true if only docs files were changed in the pull request"
69
value: ${{ steps.doc_change_determinator.outputs.should_skip }}
@@ -15,3 +18,18 @@ runs:
1518
with:
1619
skip_after_successful_duplicate: false # Don't skip if the action is a duplicate (this may cause false positives)
1720
paths_ignore: '["**/*.md"]'
21+
# Run the move compiler v2 change determinator
22+
- id: move_compiler_v2_determinator
23+
continue-on-error: true # Avoid skipping any checks if this job fails (see: https://github.com/fkirc/skip-duplicate-actions/issues/301)
24+
uses: fkirc/skip-duplicate-actions@v5
25+
with:
26+
skip_after_successful_duplicate: false # Don't skip if the action is a duplicate (this may cause false positives)
27+
paths: '[
28+
"aptos-move/aptos-transactional-test-harness",
29+
"aptos-move/e2e-move-tests/**",
30+
"aptos-move/framework/**",
31+
"aptos-move/move-examples",
32+
"third_party/move/**",
33+
".github/workflows/move-test-compiler-v2.yaml",
34+
".github/actions/move-tests-compiler-v2/**"
35+
]'

.github/actions/move-tests-compiler-v2/action.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ runs:
2323

2424
# Run Aptos Move tests with compiler V2
2525
- name: Run Aptos Move tests with compiler V2
26-
run: cargo nextest run --release -E 'not (test(test_smart_data_structures_gas))' --profile ci --locked -p e2e-move-tests -p aptos-framework --retries 3 --no-fail-fast
26+
run: cargo nextest run --release --profile ci --locked -p e2e-move-tests -p aptos-framework --no-fail-fast
2727
shell: bash
2828
env:
2929
MOVE_COMPILER_V2: true

.github/actions/run-faucet-tests/action.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ inputs:
99
description: "The docker image tag to use for the local testnet if NETWORK=custom."
1010
required: true
1111
GCP_DOCKER_ARTIFACT_REPO:
12-
description: "The GCP Docker artifact repository."
12+
description: "The GCP Docker artifact repository"
1313
required: true
1414

1515
runs:
@@ -24,7 +24,7 @@ runs:
2424
- name: Run Redis server
2525
uses: shogo82148/actions-setup-redis@v1
2626
with:
27-
redis-version: '6.x'
27+
redis-version: "6.x"
2828

2929
# Set up Rust for running the integration tests.
3030
- name: Set up Rust

.github/actions/run-local-testnet/action.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ runs:
3737
3838
shell: bash
3939
40-
4140
# Install node + npm.
4241
- uses: actions/setup-node@v3
4342
with:

.github/actions/run-ts-sdk-e2e-tests/action.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ runs:
6868
timeout_minutes: 25
6969
command: cd ./ecosystem/typescript/sdk && pnpm run test:ci
7070

71-
7271
# Run the indexer TS SDK tests.
7372
- uses: nick-fields/retry@7f8f3d9f0f62fe5925341be21c2e8314fd4f7c7c # pin@v2
7473
name: ts-sdk-indexer-test

.github/actions/rust-unit-tests/action.yaml

+13-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ inputs:
44
GIT_CREDENTIALS:
55
description: "Optional credentials to pass to git. Useful if you need to pull private repos for dependencies"
66
required: false
7+
BUILDKITE_ANALYTICS_TOKEN:
8+
description: "The Buildkite API token"
9+
required: true
710

811
runs:
912
using: composite
@@ -28,6 +31,11 @@ runs:
2831
- uses: taiki-e/install-action@v1.5.6
2932
with:
3033
tool: nextest
34+
35+
# Install buildkite-test-collector
36+
- name: Install buildkite-test-collector
37+
run: cargo install buildkite-test-collector
38+
shell: bash
3139

3240
# Run a postgres database
3341
- name: Run postgres database
@@ -36,7 +44,10 @@ runs:
3644

3745
# Run the rust unit tests
3846
- name: Run all unit tests
39-
run: cargo nextest run --profile ci --cargo-profile ci --locked --workspace --exclude smoke-test --exclude aptos-testcases --retries 3 --no-fail-fast
47+
run: |
48+
NEXTEST_EXPERIMENTAL_LIBTEST_JSON=1 cargo nextest run --profile ci --cargo-profile ci --locked --workspace --exclude smoke-test --exclude aptos-testcases --retries 3 --no-fail-fast --message-format libtest-json > nextest_output.json
49+
buildkite-test-collector < nextest_output.json || echo "Warning: buildkite-test-collector encountered an error"
50+
rm nextest_output.json
4051
shell: bash
4152
env:
4253
INDEXER_DATABASE_URL: postgresql://postgres@localhost/postgres
@@ -47,3 +58,4 @@ runs:
4758
CVC5_EXE: /home/runner/bin/cvc5
4859
DOTNET_ROOT: /home/runner/.dotnet
4960
BOOGIE_EXE: /home/runner/.dotnet/tools/boogie
61+
BUILDKITE_ANALYTICS_TOKEN: ${{ inputs.BUILDKITE_ANALYTICS_TOKEN }}

.github/workflows/aptos-node-release.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
aptos_node_cargo_toml: aptos-node/Cargo.toml
3333

3434
- name: Create Pull Request
35-
uses: peter-evans/create-pull-request@671dc9c9e0c2d73f07fa45a3eb0220e1622f0c5f # pin@v4
35+
uses: peter-evans/create-pull-request@a4f52f8033a6168103c2538976c07b467e8163bc # pin@v6.0.1
3636
with:
3737
add-paths: aptos-node
3838
title: "[aptos-node] update release version"

.github/workflows/check-protos.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ concurrency:
2626
jobs:
2727
check:
2828
runs-on: ubuntu-latest
29+
if: | # Only run on each PR once an appropriate event occurs
30+
(
31+
github.event_name == 'workflow_dispatch' ||
32+
github.event_name == 'push' ||
33+
contains(github.event.pull_request.labels.*.name, 'CICD:run-e2e-tests') ||
34+
github.event.pull_request.auto_merge != null
35+
)
2936
steps:
3037
- uses: actions/checkout@v3
3138

.github/workflows/cli-e2e-tests.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
with:
5858
max_attempts: 5
5959
timeout_minutes: 20
60-
command: cd ./crates/aptos/e2e && poetry run python main.py -d --base-network devnet --image-repo-with-project ${{ secrets.GCP_DOCKER_ARTIFACT_REPO }} --test-cli-tag ${{ inputs.GIT_SHA }} --working-directory ${{ runner.temp }}/aptos-e2e-tests-devnet
60+
command: cd ./crates/aptos/e2e && poetry run python main.py -d --base-network devnet --image-repo-with-project ${{ vars.GCP_DOCKER_ARTIFACT_REPO }} --test-cli-tag ${{ inputs.GIT_SHA }} --working-directory ${{ runner.temp }}/aptos-e2e-tests-devnet
6161

6262
# Run CLI tests against local testnet built from testnet branch.
6363
- uses: nick-fields/retry@7f8f3d9f0f62fe5925341be21c2e8314fd4f7c7c # pin@v2
@@ -66,7 +66,7 @@ jobs:
6666
with:
6767
max_attempts: 5
6868
timeout_minutes: 20
69-
command: cd ./crates/aptos/e2e && poetry run python main.py -d --base-network testnet --image-repo-with-project ${{ secrets.GCP_DOCKER_ARTIFACT_REPO }} --test-cli-tag ${{ inputs.GIT_SHA }} --working-directory ${{ runner.temp }}/aptos-e2e-tests-testnet
69+
command: cd ./crates/aptos/e2e && poetry run python main.py -d --base-network testnet --image-repo-with-project ${{ vars.GCP_DOCKER_ARTIFACT_REPO }} --test-cli-tag ${{ inputs.GIT_SHA }} --working-directory ${{ runner.temp }}/aptos-e2e-tests-testnet
7070

7171
# Run CLI tests against local testnet built from mainnet branch.
7272
- uses: nick-fields/retry@7f8f3d9f0f62fe5925341be21c2e8314fd4f7c7c # pin@v2
@@ -75,7 +75,7 @@ jobs:
7575
with:
7676
max_attempts: 5
7777
timeout_minutes: 20
78-
command: cd ./crates/aptos/e2e && poetry run python main.py -d --base-network mainnet --image-repo-with-project ${{ secrets.GCP_DOCKER_ARTIFACT_REPO }} --test-cli-tag ${{ inputs.GIT_SHA }} --working-directory ${{ runner.temp }}/aptos-e2e-tests-mainnet
78+
command: cd ./crates/aptos/e2e && poetry run python main.py -d --base-network mainnet --image-repo-with-project ${{ vars.GCP_DOCKER_ARTIFACT_REPO }} --test-cli-tag ${{ inputs.GIT_SHA }} --working-directory ${{ runner.temp }}/aptos-e2e-tests-mainnet
7979

8080
- name: Print local testnet logs on failure
8181
if: ${{ !inputs.SKIP_JOB && failure() }}

.github/workflows/copy-images-to-dockerhub.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ jobs:
5858
env:
5959
FORCE_COLOR: 3 # Force color output as per https://github.com/google/zx#using-github-actions
6060
GIT_SHA: ${{ inputs.GIT_SHA || github.sha }} # If GIT_SHA is not provided, use the sha of the triggering branch
61-
GCP_DOCKER_ARTIFACT_REPO: ${{ secrets.GCP_DOCKER_ARTIFACT_REPO }}
62-
GCP_DOCKER_ARTIFACT_REPO_US: ${{ secrets.GCP_DOCKER_ARTIFACT_REPO_US }}
6361
AWS_ACCOUNT_ID: ${{ secrets.AWS_ECR_ACCOUNT_NUM }}
62+
GCP_DOCKER_ARTIFACT_REPO: ${{ vars.GCP_DOCKER_ARTIFACT_REPO }}
6463
IMAGE_TAG_PREFIX: ${{ inputs.image_tag_prefix }}
6564
run: ./docker/release-images.mjs --wait-for-image-seconds=3600

.github/workflows/coverage.yaml

+6-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
rust-unit-coverage:
2525
if: |
2626
contains(github.event.pull_request.labels.*.name, 'CICD:run-coverage') ||
27-
${{ github.event_name == 'schedule' && github.ref_name == 'main' }}
27+
(github.event_name == 'schedule' && github.ref_name == 'main')
2828
# Note the tests run slowly due to instrutmentation. It takes CI 10 hrs
2929
timeout-minutes: 720
3030
runs-on: high-perf-docker
@@ -49,7 +49,7 @@ jobs:
4949
rust-smoke-coverage:
5050
if: |
5151
contains(github.event.pull_request.labels.*.name, 'CICD:run-coverage') ||
52-
${{ github.event_name == 'schedule' && github.ref_name == 'main' }}
52+
(github.event_name == 'schedule' && github.ref_name == 'main')
5353
timeout-minutes: 240
5454
runs-on: high-perf-docker
5555
steps:
@@ -71,7 +71,10 @@ jobs:
7171
path: lcov_smoke.info
7272

7373
upload-to-codecov:
74-
if: (contains(github.event.pull_request.labels.*.name, 'CICD:run-coverage') || ${{ github.event_name }} == 'schedule') && !cancelled()
74+
if: |
75+
contains(github.event.pull_request.labels.*.name, 'CICD:run-coverage') ||
76+
(github.event_name == 'schedule' && github.ref_name == 'main')
77+
&& !cancelled()
7578
needs: [ rust-unit-coverage, rust-smoke-coverage ]
7679
runs-on: ubuntu-latest
7780
steps:

.github/workflows/docker-build-test.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ concurrency:
5252
cancel-in-progress: true
5353

5454
env:
55-
GCP_DOCKER_ARTIFACT_REPO: ${{ secrets.GCP_DOCKER_ARTIFACT_REPO }}
56-
GCP_DOCKER_ARTIFACT_REPO_US: ${{ secrets.GCP_DOCKER_ARTIFACT_REPO_US }}
5755
AWS_ECR_ACCOUNT_NUM: ${{ secrets.ENV_ECR_AWS_ACCOUNT_NUM }}
5856
# In case of pull_request events by default github actions merges main into the PR branch and then runs the tests etc
5957
# on the prospective merge result instead of only on the tip of the PR.

.github/workflows/docker-indexer-grpc-test.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ jobs:
1717
contents: read
1818
id-token: write
1919
env:
20-
VALIDATOR_IMAGE_REPO: ${{ secrets.GCP_DOCKER_ARTIFACT_REPO }}/validator
21-
FAUCET_IMAGE_REPO: ${{ secrets.GCP_DOCKER_ARTIFACT_REPO }}/faucet
22-
INDEXER_GRPC_IMAGE_REPO: ${{ secrets.GCP_DOCKER_ARTIFACT_REPO }}/indexer-grpc
20+
VALIDATOR_IMAGE_REPO: ${{ vars.GCP_DOCKER_ARTIFACT_REPO }}/validator
21+
FAUCET_IMAGE_REPO: ${{ vars.GCP_DOCKER_ARTIFACT_REPO }}/faucet
22+
INDEXER_GRPC_IMAGE_REPO: ${{ vars.GCP_DOCKER_ARTIFACT_REPO }}/indexer-grpc
2323
IMAGE_TAG: ${{ inputs.GIT_SHA || 'devnet' }} # hardcode to a known good build when not running on workflow_call
2424

2525
steps:

.github/workflows/docker-update-images.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030

3131
- name: Create Pull Request
3232
if: ${{ steps.check_update.outputs.NEED_UPDATE == 'True' }}
33-
uses: peter-evans/create-pull-request@v5
33+
uses: peter-evans/create-pull-request@a4f52f8033a6168103c2538976c07b467e8163bc # pin@v6.0.1
3434
with:
3535
token: ${{ secrets.REPO_TOKEN }}
3636
commit-message: "Update Docker images"

.github/workflows/faucet-tests-main.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,4 @@ jobs:
7171
with:
7272
NETWORK: custom
7373
IMAGE_TAG: ${{ env.IMAGE_TAG }}
74-
GCP_DOCKER_ARTIFACT_REPO: ${{ secrets.GCP_DOCKER_ARTIFACT_REPO }}
74+
GCP_DOCKER_ARTIFACT_REPO: ${{ vars.GCP_DOCKER_ARTIFACT_REPO }}

.github/workflows/faucet-tests-prod.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717

1818
permissions:
1919
contents: read
20-
id-token: write # Required for GCP Workload Identity federation which we use to login into Google Artifact Registry
20+
id-token: write # Required for GCP Workload Identity federation which we use to login into Google Artifact Registry
2121

2222
jobs:
2323
# Note on the job-level `if` conditions:
@@ -51,7 +51,7 @@ jobs:
5151
- uses: ./.github/actions/run-faucet-tests
5252
with:
5353
NETWORK: devnet
54-
GCP_DOCKER_ARTIFACT_REPO: ${{ secrets.GCP_DOCKER_ARTIFACT_REPO }}
54+
GCP_DOCKER_ARTIFACT_REPO: ${{ vars.GCP_DOCKER_ARTIFACT_REPO }}
5555

5656
# These tests ensure that the faucet works with the nodes running on testnet.
5757
run-tests-testnet:
@@ -74,4 +74,4 @@ jobs:
7474
- uses: ./.github/actions/run-faucet-tests
7575
with:
7676
NETWORK: testnet
77-
GCP_DOCKER_ARTIFACT_REPO: ${{ secrets.GCP_DOCKER_ARTIFACT_REPO }}
77+
GCP_DOCKER_ARTIFACT_REPO: ${{ vars.GCP_DOCKER_ARTIFACT_REPO }}

.github/workflows/indexer-grpc-integration-tests.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ jobs:
3333
runs-on: high-perf-docker
3434
env:
3535
# spin up the local testnet using the latest devnet image
36-
VALIDATOR_IMAGE_REPO: ${{ secrets.GCP_DOCKER_ARTIFACT_REPO }}/validator
37-
FAUCET_IMAGE_REPO: ${{ secrets.GCP_DOCKER_ARTIFACT_REPO }}/faucet
38-
INDEXER_GRPC_IMAGE_REPO: ${{ secrets.GCP_DOCKER_ARTIFACT_REPO }}/indexer-grpc
36+
VALIDATOR_IMAGE_REPO: ${{ vars.GCP_DOCKER_ARTIFACT_REPO }}/validator
37+
FAUCET_IMAGE_REPO: ${{ vars.GCP_DOCKER_ARTIFACT_REPO }}/faucet
38+
INDEXER_GRPC_IMAGE_REPO: ${{ vars.GCP_DOCKER_ARTIFACT_REPO }}/indexer-grpc
3939
IMAGE_TAG: devnet
4040

4141
steps:

.github/workflows/lint-test.yaml

+24
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,33 @@ jobs:
118118
if: needs.file_change_determinator.outputs.only_docs_changed != 'true'
119119
with:
120120
GIT_CREDENTIALS: ${{ secrets.GIT_CREDENTIALS }}
121+
BUILDKITE_ANALYTICS_TOKEN: ${{ secrets.BUILDKITE_ANALYTICS_TOKEN }}
121122
- run: echo "Skipping rust unit tests! Unrelated changes detected."
122123
if: needs.file_change_determinator.outputs.only_docs_changed == 'true'
123124

125+
# Run the cached packages build. This is a PR required job.
126+
rust-build-cached-packages:
127+
needs: file_change_determinator
128+
if: | # Only run on each PR once an appropriate event occurs
129+
(
130+
github.event_name == 'workflow_dispatch' ||
131+
github.event_name == 'push' ||
132+
contains(github.event.pull_request.labels.*.name, 'CICD:run-e2e-tests') ||
133+
github.event.pull_request.auto_merge != null
134+
)
135+
runs-on: high-perf-docker
136+
steps:
137+
- uses: actions/checkout@v4
138+
if: needs.file_change_determinator.outputs.only_docs_changed != 'true'
139+
- uses: aptos-labs/aptos-core/.github/actions/rust-setup@main
140+
with:
141+
GIT_CREDENTIALS: ${{ secrets.GIT_CREDENTIALS }}
142+
- name: Run aptos cached packages build test
143+
if: needs.file_change_determinator.outputs.only_docs_changed != 'true'
144+
run: scripts/cargo_build_aptos_cached_packages.sh --check
145+
- run: echo "Skipping cached packages test! Unrelated changes detected."
146+
if: needs.file_change_determinator.outputs.only_docs_changed == 'true'
147+
124148
# Run the consensus only unit tests
125149
rust-consensus-only-unit-test:
126150
runs-on: high-perf-docker

0 commit comments

Comments
 (0)