Skip to content

Commit 12d54fe

Browse files
authored
Merge branch 'main' into fix-constant
2 parents 0b5c06b + 68747d3 commit 12d54fe

File tree

3,926 files changed

+118070
-52629
lines changed

Some content is hidden

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

3,926 files changed

+118070
-52629
lines changed

.cargo/config.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ xclippy = [
1212
"-Aclippy::enum-variant-names",
1313
"-Aclippy::result-large-err",
1414
"-Aclippy::mutable-key-type",
15-
"-Aclippy::map_identity", # We temporarily ignore this due to: https://github.com/rust-lang/rust-clippy/issues/11764
1615
"-Aclippy::doc_lazy_continuation",
1716
"-Aclippy::collapsible_match",
1817
"-Aclippy::needless_borrows_for_generic_args",
@@ -21,12 +20,12 @@ xclippy = [
2120
"-Aclippy::empty_line_after_doc_comments",
2221
"-Aclippy::manual-ok-err",
2322
"-Aclippy::doc-overindented-list-items",
24-
"-Aclippy::unneeded_struct_pattern",
2523
"-Aclippy::manual_div_ceil",
2624
"-Aclippy::manual-repeat-n",
2725
"-Aclippy::sliced-string-as-bytes",
2826
"-Aclippy::obfuscated-if-else",
2927
"-Aclippy::unnecessary-map-or",
28+
"-Aclippy::nonminimal-bool",
3029
]
3130
x = "run --package aptos-cargo-cli --bin aptos-cargo-cli --"
3231

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
!**/*.mv
1818
!**/*.rs
1919
!**/*.mrb
20+
!**/*.mpb
2021
!**/*.errmap
2122
!config/src/config/test_data
2223
!aptos-move/aptos-gas-profiling/templates/

.github/actions/fullnode-sync/fullnode_sync.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,9 @@ def setup_fullnode_config(bootstrapping_mode, continuous_syncing_mode, data_dir_
253253
# Avoid having to set ulimit configurations
254254
fullnode_config['storage'] = {"ensure_rlimit_nofile": 0}
255255

256+
# Enable storage sharding (AIP-97)
257+
fullnode_config['storage']['rocksdb_configs'] = {"enable_storage_sharding": True}
258+
256259
# Write the config file back to disk
257260
with open(FULLNODE_CONFIG_NAME, "w") as file:
258261
yaml.dump(fullnode_config, file)

.github/actions/get-latest-docker-image-tag/action.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,22 @@ runs:
2323
ref: ${{ inputs.branch }}
2424
path: checkout_branch
2525
fetch-depth: 0
26+
2627
- uses: ./checkout_branch/.github/actions/python-setup # use python-setup from that branch
2728
with:
2829
pyproject_directory: checkout_branch/testsuite
30+
2931
- name: Determine image tag
3032
id: determine-test-image-tag
31-
# Forge relies on the default and failpoints variants
32-
run: |
33-
variants=(${{ inputs.variants }}) # split the variants string into an array
34-
variants_args=()
35-
for variant in "${variants[@]}"; do
36-
variants_args+=("--variant" "$variant")
37-
done
38-
./testrun find_latest_image.py "${variants_args[@]}"
39-
shell: bash
40-
working-directory: checkout_branch/testsuite # the checkout_branch is a subdirectory
33+
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # [email protected]
34+
with:
35+
max_attempts: 5
36+
timeout_minutes: 20
37+
command: |
38+
cd checkout_branch/testsuite
39+
variants=(${{ inputs.variants }}) # split the variants string into an array
40+
variants_args=()
41+
for variant in "${variants[@]}"; do
42+
variants_args+=("--variant" "$variant")
43+
done
44+
./testrun find_latest_image.py "${variants_args[@]}"

.github/actions/wait-images-ci/action.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,18 @@ inputs:
1111
description: "The number of seconds to wait for the images to be available"
1212
required: false
1313
default: "1800" # a sane default based on the longest observed build time on the main branch
14+
PROFILE_RELEASE:
15+
description: "If true, wait for the release default images to be available."
16+
required: false
17+
default: false
18+
PROFILE_PERF:
19+
description: "If true, wait for the performance images to be available."
20+
required: false
21+
default: false
22+
FEATURE_FAILPOINTS:
23+
description: "If true, wait for the failpoints images to be available."
24+
required: false
25+
default: false
1426
runs:
1527
using: composite
1628
steps:
@@ -23,5 +35,5 @@ runs:
2335
# The source code must be checkout out by the workflow that invokes this action.
2436
- name: Run wait-images-ci
2537
run: |
26-
GCP_DOCKER_ARTIFACT_REPO=${{ inputs.GCP_DOCKER_ARTIFACT_REPO }} GIT_SHA=${{ inputs.GIT_SHA }} ./docker/wait-images-ci.mjs --wait-for-image-seconds=${{ inputs.WAIT_FOR_IMAGE_SECONDS }}
38+
GCP_DOCKER_ARTIFACT_REPO=${{ inputs.GCP_DOCKER_ARTIFACT_REPO }} GIT_SHA=${{ inputs.GIT_SHA }} PROFILE_RELEASE=${{ inputs.PROFILE_RELEASE }} PROFILE_PERF=${{ inputs.PROFILE_PERF }} FEATURE_FAILPOINTS=${{ inputs.FEATURE_FAILPOINTS }} ./docker/wait-images-ci.mjs --wait-for-image-seconds=${{ inputs.WAIT_FOR_IMAGE_SECONDS }}
2739
shell: bash

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
poetry_version: 2.1.2
5353

5454
# Run CLI tests against local testnet built from devnet branch.
55-
- uses: nick-fields/retry@7f8f3d9f0f62fe5925341be21c2e8314fd4f7c7c # pin@v2
55+
- uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # pin@v3.0.2
5656
if: ${{ !inputs.SKIP_JOB }}
5757
name: devnet-tests
5858
with:
@@ -61,7 +61,7 @@ jobs:
6161
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
6262

6363
# Run CLI tests against local testnet built from testnet branch.
64-
- uses: nick-fields/retry@7f8f3d9f0f62fe5925341be21c2e8314fd4f7c7c # pin@v2
64+
- uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # pin@v3.0.2
6565
if: ${{ !inputs.SKIP_JOB }}
6666
name: testnet-tests
6767
with:
@@ -70,7 +70,7 @@ jobs:
7070
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
7171

7272
# Run CLI tests against local testnet built from mainnet branch.
73-
- uses: nick-fields/retry@7f8f3d9f0f62fe5925341be21c2e8314fd4f7c7c # pin@v2
73+
- uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # pin@v3.0.2
7474
if: ${{ !inputs.SKIP_JOB }}
7575
name: mainnet-tests
7676
with:

.github/workflows/cli-release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ jobs:
189189
with:
190190
formula-name: aptos
191191
tag-name: "${{ format('aptos-cli-v{0}', inputs.release_version) }}"
192-
base-branch: master
192+
base-branch: main
193193
create-pullrequest: true
194194
commit-message: |
195195
{{formulaName}} {{version}}

.github/workflows/forge-stable.yaml

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,31 @@ name: Continuous Forge Tests - Stable
33

44
# We have various Forge Stable tests here, that test out different situations and workloads.
55
#
6+
#
67
# Dashboard showing historical results: https://grafana.aptoslabs.com/d/bdnt45ggsg000f/forge-stable-performance?orgId=1
78

89
# Tests are named based on how they are set up, some of the common flavors are:
910
# * "realistic-env" - tests with "realistic-env" in their name try to have network and hardware environemnt
1011
# be more realisistic. They use "wrap_with_realistic_env", which sets:
1112
# * MultiRegionNetworkEmulationTest which splits nodes into 4 "regions", which have different
1213
# x-region and in-region latencies and reliability rates
13-
# * CpuChaosTest which tries to make nodes have heterogenous hardware, by loading a few cores fully
14-
# on a few nodes. But this is not too helpful, as block execution time variance is minimal
14+
# * CpuChaosTest which tries to make nodes have heterogenous hardware, by loading a few cores fully
15+
# on a few nodes. But this is not too helpful, as block execution time variance is minimal
1516
# (as we generally have a few idle cores, and real variance mostly comes from variance in cpu speed instead)
16-
# * sweep - means running a multiple tests within a single test, by having everything the same, except for one
17+
# * sweep - means running a multiple tests within a single test, by having everything the same, except for one
1718
# thing - i.e. the thing we sweep over. There are two main dimensions we "sweep" over:
18-
# * load sweep - this generally uses const tps workload, and varies the load across the tests (i.e. 10 vs 100 vs 1000 TPS)
19+
# * load sweep - this generally uses const tps workload, and varies the load across the tests (i.e. 10 vs 100 vs 1000 TPS)
1920
# * workload sweep - this varies the transaction type being submitted, trying to test out how the system behaves
2021
# when different part of the system are stressed (i.e. low vs high output sizes, good vs bad gas calibration, parallel vs sequential, etc)
2122
# * graceful - tests where we are overloading the system - i.e. submitting more transactions than we expect system to handle,
2223
# and seeing how it behaves. overall e2e latency is then high, but we can test that only validator -> block proposal has increased.
2324
# additionally, we generally add a small TPS high-fee traffic in these tests, to confirm it is unaffected by the high load.
2425
# * changing-working-quorum - tests where we intentionally make nodes unreachable (cut their network), and bring them back,
25-
# and go to cut network on next set of nodes - requiring state-sync to catch up, consensus to work with different set of
26+
# and go to cut network on next set of nodes - requiring state-sync to catch up, consensus to work with different set of
2627
# nodes being required to form consensus. During each iteration, we test that enough progress was made.
2728
#
2829
# Main success criteria used across the tests are:
29-
# * throughput and expiration/rejection rate
30+
# * throughput and expiration/rejection rate
3031
# * latency (avg / p50 / p90 / p99 )
3132
# * latency breakdown across the components - currently within a validator alone:
3233
# batch->pos->proposal->ordered->committed
@@ -62,31 +63,31 @@ on:
6263
required: true
6364
type: choice
6465
description: The specific stable test to run. If 'all', all stable tests will be run
65-
default: 'all'
66+
default: "all"
6667
options:
6768
- all
6869
- framework-upgrade-test
69-
# Test varies the load, i.e. sending 10, 100, 1000, 5000, etc TPS, and then measuring
70+
# Test varies the load, i.e. sending 10, 100, 1000, 5000, etc TPS, and then measuring
7071
# onchain TPS, expired rate, as well as p50/p90/p99 latency, among other things,
71-
# testing that we don't degrade performance both for low, mid and high loads.
72+
# testing that we don't degrade performance both for low, mid and high loads.
7273
- realistic-env-load-sweep
73-
# Test varies the workload, across some basic workloads (i.e. some cheap, some expensive),
74+
# Test varies the workload, across some basic workloads (i.e. some cheap, some expensive),
7475
# and checks that throughput and performance across different stages
7576
- realistic-env-workload-sweep
7677
# Test sends ConstTps workload above what the system can handle, while additionally sending
7778
# non-small high-fee traffic (1000 TPS), and measures overall system performance.
7879
- realistic-env-graceful-overload
79-
# Test varies the workload (opposite ends of gas calibration, high and low output sizes,
80-
# sequential / parallel, etc), and sends ConstTPS for each above what the system can handle,
81-
# while sending low TPS of high fee transactions. And primarily confirms that high-fee traffic
80+
# Test varies the workload (opposite ends of gas calibration, high and low output sizes,
81+
# sequential / parallel, etc), and sends ConstTPS for each above what the system can handle,
82+
# while sending low TPS of high fee transactions. And primarily confirms that high-fee traffic
8283
# has predictably low latency, and execution pipeline doesn't get backed up.
8384
- realistic-env-graceful-workload-sweep
84-
# Test varies workload, which is user-contracts, such that max throughput varies from high to mid to low,
85+
# Test varies workload, which is user-contracts, such that max throughput varies from high to mid to low,
8586
# while testing that unrelated transactions paying the same gas price, are able to go through.
8687
- realistic-env-fairness-workload-sweep
8788
# Test which tunes all configurations for largest throughput possible (potentially sacrificing latency a bit)
8889
- realistic-network-tuned-for-throughput
89-
# Run small-ish load, but checks that at all times all nodes are making progress,
90+
# Run small-ish load, but checks that at all times all nodes are making progress,
9091
# catching any unexpected unreliabilities/delays in consensus
9192
- consensus-stress-test
9293
# Send a mix of different workloads, to catch issues with different interactions of workloads.
@@ -96,7 +97,7 @@ on:
9697
- fullnode-reboot-stress-test
9798
- compat
9899
# Send low TPS (100 TPS)
99-
# Cut network on enough nodes, such that all others are needed for consensus. Then bring a few back, and cut
100+
# Cut network on enough nodes, such that all others are needed for consensus. Then bring a few back, and cut
100101
# same amount of new ones - requiring all that were brought back to state-sync and continue executing.
101102
# Check that in each iteration - we were able to make meaningful progress.
102103
- changing-working-quorum-test
@@ -105,7 +106,7 @@ on:
105106
- changing-working-quorum-test-high-load
106107
- pfn-const-tps-realistic-env
107108
# Run a production config (same as land blocking run) max load (via mempool backlog), but run it for 2 hours,
108-
# to check reliability and consistency of the newtork.
109+
# to check reliability and consistency of the newtork.
109110
- realistic-env-max-load-long
110111
JOB_PARALLELISM:
111112
required: false
@@ -121,7 +122,7 @@ on:
121122
- "testsuite/find_latest_image.py"
122123

123124
concurrency:
124-
group: forge-stable-${{ format('{0}-{1}-{2}-{3}', github.ref_name, inputs.GIT_SHA, inputs.IMAGE_TAG, inputs.TEST_NAME) }}
125+
group: forge-stable-${{ format('{0}-{1}-{2}-{3}', github.ref_name, inputs.GIT_SHA || github.sha || github.head_ref || github.ref, inputs.IMAGE_TAG, inputs.TEST_NAME) }}
125126
cancel-in-progress: true
126127

127128
env:
@@ -288,3 +289,4 @@ jobs:
288289
FORGE_ENABLE_FAILPOINTS: ${{ matrix.FORGE_ENABLE_FAILPOINTS || false }}
289290
POST_TO_SLACK: true
290291
SEND_RESULTS_TO_TRUNK: true
292+
FORGE_CONTINUOUS_TEST_MODE: true

.github/workflows/fuzzer-data-update.yml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,37 @@ jobs:
3939
# - move_bytecode_verifier_compiled_modules_seed_corpus
4040
# All of them reuse the same seed corpus, so we only need to download/upload one of them.
4141
- name: Download existing corpus
42+
working-directory: testsuite/fuzzer/
4243
run: |
4344
gcloud storage cp gs://aptos-core-corpora/move_aptosvm_publish_and_run_seed_corpus.zip move_aptosvm_publish_and_run_seed_corpus.zip
45+
gcloud storage cp gs://aptos-core-corpora/move_aptosvm_publish_and_run_transactional_seed_corpus.zip move_aptosvm_publish_and_run_transactional_seed_corpus.zip
4446
unzip -q move_aptosvm_publish_and_run_seed_corpus.zip -d move_aptosvm_publish_and_run_seed_corpus
47+
unzip -q move_aptosvm_publish_and_run_transactional_seed_corpus.zip -d move_aptosvm_publish_and_run_transactional_seed_corpus
4548
46-
- name: Generate runnable states
49+
- name: Generate runnable states from data
50+
working-directory: testsuite/fuzzer/
4751
run: |
4852
chmod +x ./fuzz.sh
49-
./fuzz.sh block-builder generate_runnable_states_recursive testsuite/fuzzer/data/0x1/ move_aptosvm_publish_and_run_seed_corpus
53+
./fuzz.sh block-builder generate_runnable_states_recursive data/0x1/ move_aptosvm_publish_and_run_seed_corpus
54+
55+
# TODO: split task based on directory changes
56+
- name: Generate runnable states from e2e tests
57+
working-directory: testsuite/fuzzer/
58+
run: |
59+
./fuzz.sh block-builder generate_runnable_states_recursive /aptos-move/e2e-move-tests move_aptosvm_publish_and_run_seed_corpus
60+
61+
- name: Generate runnable states transactional from transactional tests
62+
working-directory: testsuite/fuzzer/
63+
run: |
64+
./fuzz.sh block-builder generate_runnable_states_from_all_tests move_aptosvm_publish_and_run_transactional_seed_corpus
5065
66+
# TODO: run distillation before pushing(?)
5167
- name: Create and upload new corpus
68+
working-directory: testsuite/fuzzer/
5269
run: |
5370
zip -r move_aptosvm_publish_and_run_seed_corpus.zip move_aptosvm_publish_and_run_seed_corpus
5471
gcloud storage cp move_aptosvm_publish_and_run_seed_corpus.zip gs://aptos-core-corpora/move_aptosvm_publish_and_run_seed_corpus.zip
55-
gcloud storage objects update gs://aptos-core-corpora/move_aptosvm_publish_and_run_seed_corpus.zip --add-acl=publicRead
72+
gcloud storage objects update gs://aptos-core-corpora/move_aptosvm_publish_and_run_seed_corpus.zip --canned-acl=publicRead
73+
zip -r move_aptosvm_publish_and_run_transactional_seed_corpus.zip move_aptosvm_publish_and_run_transactional_seed_corpus
74+
gcloud storage cp move_aptosvm_publish_and_run_transactional_seed_corpus.zip gs://aptos-core-corpora/move_aptosvm_publish_and_run_transactional_seed_corpus.zip
75+
gcloud storage objects update gs://aptos-core-corpora/move_aptosvm_publish_and_run_transactional_seed_corpus.zip--canned-acl=publicRead

.github/workflows/node-api-compatibility-tests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,15 @@ jobs:
8383
if: ${{ !inputs.SKIP_JOB }}
8484

8585
# Build the API specs.
86-
- uses: nick-fields/retry@7f8f3d9f0f62fe5925341be21c2e8314fd4f7c7c # pin@v2
86+
- uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # pin@v3.0.2
8787
if: ${{ !inputs.SKIP_JOB }}
8888
name: generate-yaml-spec
8989
with:
9090
max_attempts: 3
9191
timeout_minutes: 20
9292
command: docker run --rm --mount=type=bind,source=${{ runner.temp }}/specs,target=/specs ${{ vars.GCP_DOCKER_ARTIFACT_REPO }}/tools:${IMAGE_TAG} aptos-openapi-spec-generator -f yaml -o /specs/spec.yaml
9393

94-
- uses: nick-fields/retry@7f8f3d9f0f62fe5925341be21c2e8314fd4f7c7c # pin@v2
94+
- uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # pin@v3.0.2
9595
if: ${{ !inputs.SKIP_JOB }}
9696
name: generate-json-spec
9797
with:

0 commit comments

Comments
 (0)