diff --git a/.backportrc.json b/.backportrc.json
new file mode 100644
index 0000000000000..c790f84c9eb78
--- /dev/null
+++ b/.backportrc.json
@@ -0,0 +1,12 @@
+{
+ "repoOwner": "aptos-labs",
+ "repoName": "aptos-core",
+
+ "branchLabelMapping": {
+ "^v(\\d+).(\\d+)$": "aptos-release-v$1.$2"
+ },
+ "commitConflicts": true,
+ "prTitle": "[cp][{{targetBranch}}] {{sourcePullRequest.title}}",
+ "targetPRLabels": ["cherry-pick"],
+ "assignees": ["thepomeranian"]
+}
diff --git a/.dockerignore b/.dockerignore
index 34ec98bf8c62c..3a4bd7c40a38b 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -20,7 +20,7 @@
!**/*.errmap
!config/src/config/test_data
!aptos-move/aptos-gas-profiling/templates/
-!aptos-move/aptos-release-builder/data/release.yaml
+!aptos-move/aptos-release-builder/data/*.yaml
!aptos-move/aptos-release-builder/data/proposals/*
!aptos-move/framework/
!aptos-move/move-examples/hello_blockchain/
diff --git a/.github/actions/rust-check-merge-base/action.yaml b/.github/actions/rust-check-merge-base/action.yaml
new file mode 100644
index 0000000000000..32906536122b2
--- /dev/null
+++ b/.github/actions/rust-check-merge-base/action.yaml
@@ -0,0 +1,19 @@
+name: Rust Check Merge Base
+description: Runs the rust merge base freshness check
+inputs:
+ GIT_CREDENTIALS:
+ description: "Optional credentials to pass to git. Useful if you need to pull private repos for dependencies"
+ required: false
+
+runs:
+ using: composite
+ steps:
+ # The source code must be checked out by the workflow that invokes this action.
+ - uses: aptos-labs/aptos-core/.github/actions/rust-setup@main
+ with:
+ GIT_CREDENTIALS: ${{ inputs.GIT_CREDENTIALS }}
+
+ # Check the freshness of the merge base
+ - name: Check the freshness of the merge base
+ run: cargo x check-merge-base -vvv
+ shell: bash
diff --git a/.github/actions/rust-doc-tests/action.yaml b/.github/actions/rust-doc-tests/action.yaml
new file mode 100644
index 0000000000000..511a32565a1c6
--- /dev/null
+++ b/.github/actions/rust-doc-tests/action.yaml
@@ -0,0 +1,16 @@
+name: Rust Doc Tests
+description: Runs only the rust doc tests
+inputs:
+ GIT_CREDENTIALS:
+ description: "Optional credentials to pass to git. Useful if you need to pull private repos for dependencies"
+ required: false
+
+runs:
+ using: composite
+ steps:
+ # The source code must be checked out by the workflow that invokes this action.
+
+ # Run the rust doc tests
+ - name: Run rust doc tests
+ run: cargo test --profile ci --locked --doc --workspace --exclude aptos-node-checker
+ shell: bash
diff --git a/.github/workflows/backport-to-release-branches.yaml b/.github/workflows/backport-to-release-branches.yaml
new file mode 100644
index 0000000000000..e006d95b78d7e
--- /dev/null
+++ b/.github/workflows/backport-to-release-branches.yaml
@@ -0,0 +1,38 @@
+name: Backport to Release Branches
+
+on:
+ pull_request_target:
+ types: ["labeled", "closed"]
+
+permissions:
+ contents: write
+ pull-requests: write
+
+jobs:
+ permission-check:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check repository permission for user which triggered workflow
+ uses: sushichop/action-repository-permission@13d208f5ae7a6a3fc0e5a7c2502c214983f0241c
+ with:
+ required-permission: write
+ comment-not-permitted: Sorry, you don't have permission to trigger this workflow.
+
+ backport:
+ name: Backport PR
+ needs: [permission-check]
+ runs-on: ubuntu-latest
+ steps:
+ - name: Backport Action
+ uses: sorenlouv/backport-github-action@ad888e978060bc1b2798690dd9d03c4036560947
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ add_original_reviewers: true
+
+ - name: Info log
+ if: ${{ success() }}
+ run: cat ~/.backport/backport.info.log
+
+ - name: Debug log
+ if: ${{ failure() }}
+ run: cat ~/.backport/backport.debug.log
diff --git a/CODEOWNERS b/CODEOWNERS
index 73eb4fa743af3..e9f52c43400a2 100644
--- a/CODEOWNERS
+++ b/CODEOWNERS
@@ -38,6 +38,9 @@
# Owners for the `/consensus` directory and all its subdirectories.
/consensus/ @zekun000 @sasha8 @ibalajiarun
+# Owners for consensus observer
+/consensus/src/consensus-observer/ @joshlind @zekun000
+
# Owners for quorum store.
/consensus/src/quorum_store/ @bchocho @sasha8 @gelash
@@ -74,7 +77,7 @@
/crates/aptos-telemetry-service @ibalajiarun @geekflyer
# Owners for the inspection-service crate
-/crates/inspection-service/ @joshlind @brianolson
+/crates/inspection-service/ @joshlind
# Owners for the `/dashboards` directory and all its subdirectories.
/dashboards/ @aptos-labs/prod-eng
@@ -90,7 +93,7 @@
/mempool/ @bchocho
# Owners for the network and all its subdirectories.
-/network/ @joshlind @brianolson
+/network/ @joshlind @zekun000
# Owners for the scripts
/scripts/ @aptos-labs/prod-eng
diff --git a/Cargo.lock b/Cargo.lock
index 1f78250d973b3..0662d30fc71ae 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -108,6 +108,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011"
dependencies = [
"cfg-if",
+ "const-random",
"getrandom 0.2.11",
"once_cell",
"serde",
@@ -130,6 +131,27 @@ version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fd"
+[[package]]
+name = "allocative"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "082af274fd02beef17b7f0725a49ecafe6c075ef56cac9d6363eb3916a9817ae"
+dependencies = [
+ "allocative_derive",
+ "ctor",
+]
+
+[[package]]
+name = "allocative_derive"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fe233a377643e0fc1a56421d7c90acdec45c291b30345eb9f08e8d0ddce5a4ab"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.48",
+]
+
[[package]]
name = "allocator-api2"
version = "0.2.16"
@@ -240,7 +262,7 @@ dependencies = [
[[package]]
name = "aptos"
-version = "3.4.1"
+version = "4.2.0"
dependencies = [
"anyhow",
"aptos-api-types",
@@ -284,13 +306,14 @@ dependencies = [
"chrono",
"clap 4.4.14",
"clap_complete",
+ "colored",
"dashmap",
"diesel",
- "diesel-async 0.4.1 (git+https://github.com/weiznich/diesel_async.git?rev=d02798c67065d763154d7272dd0c09b39757d0f2)",
+ "diesel-async",
"dirs",
"futures",
"hex",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"jemallocator",
"maplit",
"move-binary-format",
@@ -298,6 +321,7 @@ dependencies = [
"move-cli",
"move-command-line-common",
"move-compiler",
+ "move-compiler-v2",
"move-core-types",
"move-coverage",
"move-disassembler",
@@ -311,7 +335,8 @@ dependencies = [
"poem",
"processor",
"rand 0.7.3",
- "reqwest",
+ "regex",
+ "reqwest 0.11.23",
"self_update",
"serde",
"serde_json",
@@ -368,8 +393,8 @@ dependencies = [
"aptos-system-utils 0.1.0",
"aptos-types",
"bcs 0.1.4",
- "http",
- "hyper",
+ "http 0.2.11",
+ "hyper 0.14.28",
"sha256",
"tokio",
"url",
@@ -416,14 +441,12 @@ dependencies = [
"aptos-storage-interface",
"aptos-types",
"aptos-vm",
- "async-trait",
"bcs 0.1.4",
"bytes",
"fail",
"futures",
"hex",
- "hyper",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"mime",
"mini-moka",
"move-core-types",
@@ -438,7 +461,7 @@ dependencies = [
"proptest",
"rand 0.7.3",
"regex",
- "reqwest",
+ "reqwest 0.11.23",
"serde",
"serde_json",
"tokio",
@@ -459,6 +482,7 @@ dependencies = [
"aptos-executor-types",
"aptos-framework",
"aptos-genesis",
+ "aptos-indexer-grpc-table-info",
"aptos-mempool",
"aptos-mempool-notifications",
"aptos-sdk",
@@ -471,7 +495,7 @@ dependencies = [
"bcs 0.1.4",
"bytes",
"goldenfile",
- "hyper",
+ "hyper 0.14.28",
"rand 0.7.3",
"regex",
"serde_json",
@@ -542,9 +566,11 @@ dependencies = [
"aptos-config",
"aptos-crypto",
"aptos-db",
+ "aptos-db-indexer-schemas",
"aptos-executor",
"aptos-executor-test-helpers",
"aptos-executor-types",
+ "aptos-indexer-grpc-table-info",
"aptos-infallible",
"aptos-jellyfish-merkle",
"aptos-logger",
@@ -561,7 +587,7 @@ dependencies = [
"clap 4.4.14",
"csv",
"futures",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"move-binary-format",
"move-bytecode-verifier",
"num_cpus",
@@ -570,7 +596,7 @@ dependencies = [
"proptest",
"rand 0.7.3",
"regex",
- "reqwest",
+ "reqwest 0.11.23",
"serde",
"serde_json",
"serde_yaml 0.8.26",
@@ -597,9 +623,9 @@ dependencies = [
"aptos-types",
"bcs 0.1.4",
"bytes",
- "hyper",
+ "hyper 0.14.28",
"once_cell",
- "reqwest",
+ "reqwest 0.11.23",
"serde",
"tokio",
"tokio-stream",
@@ -650,7 +676,7 @@ dependencies = [
"dashmap",
"derivative",
"fail",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"move-binary-format",
"move-core-types",
"move-vm-types",
@@ -677,7 +703,7 @@ dependencies = [
"clap 4.4.14",
"criterion",
"dashmap",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"jemallocator",
"move-core-types",
"once_cell",
@@ -730,7 +756,7 @@ dependencies = [
"env_logger",
"guppy",
"log",
- "reqwest",
+ "reqwest 0.11.23",
"url",
]
@@ -773,7 +799,8 @@ dependencies = [
"bcs 0.1.4",
"clap 4.4.14",
"futures",
- "itertools 0.12.1",
+ "itertools 0.13.0",
+ "move-binary-format",
"move-compiler",
"move-core-types",
"move-model",
@@ -820,7 +847,6 @@ dependencies = [
"get_if_addrs",
"maplit",
"num_cpus",
- "number_range",
"poem-openapi",
"rand 0.7.3",
"serde",
@@ -861,6 +887,7 @@ dependencies = [
"aptos-logger",
"aptos-mempool",
"aptos-metrics-core",
+ "aptos-netcore",
"aptos-network",
"aptos-peer-monitoring-service-types",
"aptos-reliable-broadcast",
@@ -888,7 +915,7 @@ dependencies = [
"futures",
"futures-channel",
"hex",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"lru 0.7.8",
"maplit",
"mini-moka",
@@ -900,6 +927,7 @@ dependencies = [
"once_cell",
"ordered-float 3.9.2",
"proptest",
+ "proptest-derive",
"rand 0.7.3",
"rayon",
"scopeguard",
@@ -946,9 +974,10 @@ dependencies = [
"aptos-short-hex-str",
"aptos-types",
"bcs 0.1.4",
+ "derivative",
"fail",
"futures",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"mini-moka",
"mirai-annotations",
"once_cell",
@@ -1069,7 +1098,7 @@ dependencies = [
"claims",
"dashmap",
"futures",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"maplit",
"mockall",
"ordered-float 3.9.2",
@@ -1143,7 +1172,7 @@ dependencies = [
"either",
"hex",
"indicatif 0.15.0",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"lru 0.7.8",
"move-core-types",
"num-derive",
@@ -1184,6 +1213,7 @@ name = "aptos-db-indexer-schemas"
version = "0.1.0"
dependencies = [
"anyhow",
+ "aptos-crypto",
"aptos-proptest-helpers",
"aptos-schemadb",
"aptos-storage-interface",
@@ -1215,7 +1245,7 @@ dependencies = [
"aptos-vm",
"bcs 0.1.4",
"clap 4.4.14",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"tokio",
]
@@ -1285,6 +1315,7 @@ dependencies = [
"aptos-network",
"aptos-reliable-broadcast",
"aptos-runtimes",
+ "aptos-safety-rules",
"aptos-time-service",
"aptos-types",
"aptos-validator-transaction-pool",
@@ -1380,6 +1411,7 @@ dependencies = [
"aptos-executor-types",
"aptos-experimental-runtimes",
"aptos-genesis",
+ "aptos-indexer-grpc-table-info",
"aptos-infallible",
"aptos-logger",
"aptos-metrics-core",
@@ -1395,7 +1427,7 @@ dependencies = [
"bytes",
"dashmap",
"fail",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"move-core-types",
"once_cell",
"proptest",
@@ -1438,7 +1470,7 @@ dependencies = [
"clap 4.4.14",
"derivative",
"indicatif 0.15.0",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"jemallocator",
"move-core-types",
"num_cpus",
@@ -1472,7 +1504,7 @@ dependencies = [
"crossbeam-channel",
"ctrlc",
"dashmap",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"num_cpus",
"once_cell",
"rayon",
@@ -1514,23 +1546,45 @@ dependencies = [
"aptos-types",
"bcs 0.1.4",
"criterion",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"once_cell",
"serde",
"thiserror",
]
+[[package]]
+name = "aptos-experimental-hexy"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "aptos-crypto",
+ "aptos-experimental-layered-map",
+ "aptos-infallible",
+ "aptos-metrics-core",
+ "criterion",
+ "itertools 0.13.0",
+ "jemallocator",
+ "once_cell",
+ "proptest",
+ "rand 0.7.3",
+]
+
[[package]]
name = "aptos-experimental-layered-map"
version = "0.1.0"
dependencies = [
+ "ahash 0.8.11",
"aptos-crypto",
"aptos-drop-helper",
"aptos-infallible",
"aptos-metrics-core",
"bitvec 1.0.1",
+ "criterion",
+ "itertools 0.13.0",
+ "jemallocator",
"once_cell",
"proptest",
+ "rand 0.7.3",
]
[[package]]
@@ -1610,7 +1664,7 @@ dependencies = [
"poem-openapi",
"rand 0.7.3",
"redis",
- "reqwest",
+ "reqwest 0.11.23",
"serde",
"serde_json",
"serde_yaml 0.8.26",
@@ -1654,7 +1708,7 @@ dependencies = [
"env_logger",
"futures",
"gcp-bigquery-client",
- "reqwest",
+ "reqwest 0.11.23",
"serde",
"serde_json",
"tokio",
@@ -1691,8 +1745,8 @@ dependencies = [
"either",
"futures",
"hex",
- "hyper",
- "itertools 0.12.1",
+ "hyper 0.14.28",
+ "itertools 0.13.0",
"json-patch",
"k8s-openapi",
"kube",
@@ -1701,7 +1755,7 @@ dependencies = [
"prometheus-http-query",
"rand 0.7.3",
"regex",
- "reqwest",
+ "reqwest 0.11.23",
"serde",
"serde_json",
"serde_yaml 0.8.26",
@@ -1733,7 +1787,7 @@ dependencies = [
"once_cell",
"rand 0.7.3",
"random_word",
- "reqwest",
+ "reqwest 0.11.23",
"serde_yaml 0.8.26",
"tokio",
"url",
@@ -1773,7 +1827,7 @@ dependencies = [
"either",
"flate2",
"hex",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"libsecp256k1",
"log",
"lru 0.7.8",
@@ -1782,6 +1836,7 @@ dependencies = [
"move-cli",
"move-command-line-common",
"move-compiler",
+ "move-compiler-v2",
"move-core-types",
"move-docgen",
"move-model",
@@ -1996,7 +2051,7 @@ dependencies = [
"once_cell",
"prost 0.12.3",
"redis",
- "reqwest",
+ "reqwest 0.11.23",
"serde",
"tempfile",
"tokio",
@@ -2053,6 +2108,26 @@ dependencies = [
"tracing",
]
+[[package]]
+name = "aptos-indexer-grpc-file-store-backfiller"
+version = "1.0.0"
+dependencies = [
+ "anyhow",
+ "aptos-indexer-grpc-server-framework",
+ "aptos-indexer-grpc-utils",
+ "aptos-protos 1.3.1",
+ "async-trait",
+ "clap 4.4.14",
+ "futures",
+ "jemallocator",
+ "serde",
+ "serde_json",
+ "tokio",
+ "tonic 0.11.0",
+ "tracing",
+ "url",
+]
+
[[package]]
name = "aptos-indexer-grpc-fullnode"
version = "1.0.0"
@@ -2092,8 +2167,8 @@ dependencies = [
"futures",
"goldenfile",
"hex",
- "hyper",
- "itertools 0.12.1",
+ "hyper 0.14.28",
+ "itertools 0.13.0",
"move-binary-format",
"move-core-types",
"move-package",
@@ -2124,30 +2199,6 @@ dependencies = [
"tokio",
]
-[[package]]
-name = "aptos-indexer-grpc-integration-tests"
-version = "0.1.0"
-dependencies = [
- "anyhow",
- "aptos-config",
- "aptos-indexer-grpc-cache-worker",
- "aptos-indexer-grpc-file-store",
- "aptos-indexer-grpc-server-framework",
- "aptos-indexer-grpc-utils",
- "aptos-logger",
- "aptos-transaction-emitter-lib",
- "aptos-transaction-generator-lib",
- "aptos-types",
- "once_cell",
- "redis",
- "regex",
- "reqwest",
- "tempfile",
- "tokio",
- "tracing",
- "url",
-]
-
[[package]]
name = "aptos-indexer-grpc-server-framework"
version = "1.0.0"
@@ -2183,13 +2234,13 @@ dependencies = [
"aptos-logger",
"aptos-mempool",
"aptos-runtimes",
- "aptos-schemadb",
"aptos-storage-interface",
"aptos-types",
"flate2",
"futures",
"google-cloud-storage",
- "hyper",
+ "hyper 0.14.28",
+ "itertools 0.13.0",
"rocksdb",
"serde",
"serde_json",
@@ -2198,7 +2249,6 @@ dependencies = [
"tokio",
"tokio-stream",
"tokio-util 0.7.10",
- "tonic 0.11.0",
]
[[package]]
@@ -2215,7 +2265,7 @@ dependencies = [
"cloud-storage",
"dashmap",
"futures",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"lz4",
"once_cell",
"prometheus",
@@ -2232,6 +2282,34 @@ dependencies = [
"url",
]
+[[package]]
+name = "aptos-indexer-test-transactions"
+version = "1.0.0"
+dependencies = [
+ "aptos-protos 1.3.1",
+ "serde_json",
+]
+
+[[package]]
+name = "aptos-indexer-transaction-generator"
+version = "1.0.0"
+dependencies = [
+ "anyhow",
+ "aptos-indexer-grpc-utils",
+ "aptos-protos 1.3.1",
+ "clap 4.4.14",
+ "futures",
+ "itertools 0.13.0",
+ "serde",
+ "serde_json",
+ "serde_yaml 0.8.26",
+ "tempfile",
+ "tokio",
+ "tokio-stream",
+ "tonic 0.11.0",
+ "url",
+]
+
[[package]]
name = "aptos-infallible"
version = "0.1.0"
@@ -2254,10 +2332,10 @@ dependencies = [
"aptos-time-service",
"assert_approx_eq",
"futures",
- "hyper",
+ "hyper 0.14.28",
"once_cell",
"prometheus",
- "reqwest",
+ "reqwest 0.11.23",
"rusty-fork",
"serde_json",
"tokio",
@@ -2280,7 +2358,7 @@ dependencies = [
"arr_macro",
"bcs 0.1.4",
"byteorder",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"num-derive",
"num-traits",
"once_cell",
@@ -2312,6 +2390,7 @@ dependencies = [
"aptos-network",
"aptos-reliable-broadcast",
"aptos-runtimes",
+ "aptos-safety-rules",
"aptos-time-service",
"aptos-types",
"aptos-validator-transaction-pool",
@@ -2333,9 +2412,9 @@ version = "0.1.0"
dependencies = [
"anyhow",
"aptos-types",
- "http",
+ "http 0.2.11",
"move-core-types",
- "reqwest",
+ "reqwest 0.11.23",
"serde",
"serde_json",
"tokio",
@@ -2362,7 +2441,7 @@ dependencies = [
"ark-ff",
"base64 0.13.1",
"hex",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"num-bigint 0.3.3",
"num-modular",
"num-traits",
@@ -2426,13 +2505,15 @@ name = "aptos-keyless-pepper-example-client-rust"
version = "0.1.0"
dependencies = [
"aptos-crypto",
+ "aptos-infallible",
"aptos-keyless-pepper-common",
"aptos-types",
"ark-bls12-381",
"ark-serialize",
"bcs 0.1.4",
+ "firestore",
"hex",
- "reqwest",
+ "reqwest 0.11.23",
"serde_json",
"tokio",
]
@@ -2444,6 +2525,7 @@ dependencies = [
"aes-gcm",
"anyhow",
"aptos-crypto",
+ "aptos-infallible",
"aptos-inspection-service",
"aptos-keyless-pepper-common",
"aptos-logger",
@@ -2455,14 +2537,15 @@ dependencies = [
"ark-serialize",
"bcs 0.1.4",
"dashmap",
+ "firestore",
"hex",
- "hyper",
+ "hyper 0.14.28",
"jsonwebtoken 8.3.0",
"jwt",
"once_cell",
"rand 0.7.3",
"regex",
- "reqwest",
+ "reqwest 0.11.23",
"serde",
"serde_json",
"sha3 0.9.1",
@@ -2495,6 +2578,7 @@ dependencies = [
"aptos-vm-types",
"bcs 0.1.4",
"bytes",
+ "claims",
"goldenfile",
"move-binary-format",
"move-command-line-common",
@@ -2601,7 +2685,7 @@ dependencies = [
"enum_dispatch",
"fail",
"futures",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"maplit",
"num_cpus",
"once_cell",
@@ -2652,6 +2736,7 @@ name = "aptos-move-debugger"
version = "0.1.0"
dependencies = [
"anyhow",
+ "aptos-block-executor",
"aptos-consensus",
"aptos-crypto",
"aptos-gas-profiling",
@@ -2664,8 +2749,9 @@ dependencies = [
"aptos-vm-types",
"bcs 0.1.4",
"clap 4.4.14",
+ "itertools 0.13.0",
"regex",
- "reqwest",
+ "reqwest 0.11.23",
"tokio",
"url",
]
@@ -2730,7 +2816,7 @@ dependencies = [
[[package]]
name = "aptos-moving-average"
version = "0.1.0"
-source = "git+https://github.com/aptos-labs/aptos-indexer-processors.git?rev=5244b84fa5ed872e5280dc8df032d744d62ad29d#5244b84fa5ed872e5280dc8df032d744d62ad29d"
+source = "git+https://github.com/aptos-labs/aptos-indexer-processors.git?rev=fa1ce4947f4c2be57529f1c9732529e05a06cb7f#fa1ce4947f4c2be57529f1c9732529e05a06cb7f"
dependencies = [
"chrono",
]
@@ -2820,7 +2906,7 @@ dependencies = [
"futures",
"futures-util",
"hex",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"maplit",
"once_cell",
"ordered-float 3.9.2",
@@ -2932,26 +3018,27 @@ dependencies = [
"aptos-indexer-grpc-server-framework",
"aptos-metrics-core",
"async-trait",
+ "axum 0.7.5",
"backoff",
"bytes",
"chrono",
"clap 4.4.14",
"diesel",
"diesel_migrations",
+ "enum_dispatch",
"field_count",
"futures",
"google-cloud-storage",
"image",
"once_cell",
"regex",
- "reqwest",
+ "reqwest 0.11.23",
"serde",
"serde_json",
"sha256",
"tokio",
"tracing",
"url",
- "warp",
]
[[package]]
@@ -2996,8 +3083,6 @@ dependencies = [
"aptos-peer-monitoring-service-server",
"aptos-peer-monitoring-service-types",
"aptos-runtimes",
- "aptos-safety-rules",
- "aptos-schemadb",
"aptos-state-sync-driver",
"aptos-storage-interface",
"aptos-storage-service-client",
@@ -3047,7 +3132,7 @@ dependencies = [
"poem",
"poem-openapi",
"prometheus-parse",
- "reqwest",
+ "reqwest 0.11.23",
"serde",
"serde_json",
"serde_yaml 0.8.26",
@@ -3094,7 +3179,6 @@ dependencies = [
name = "aptos-openapi"
version = "0.1.0"
dependencies = [
- "async-trait",
"percent-encoding",
"poem",
"poem-openapi",
@@ -3121,7 +3205,7 @@ version = "0.1.0"
dependencies = [
"anyhow",
"aptos-framework",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"move-command-line-common",
"move-package",
"tempfile",
@@ -3235,8 +3319,7 @@ dependencies = [
[[package]]
name = "aptos-protos"
-version = "1.3.0"
-source = "git+https://github.com/aptos-labs/aptos-core.git?tag=aptos-node-v1.12.1#4b9a2593facaee92b28df2e99b2773a7e4f930f5"
+version = "1.3.1"
dependencies = [
"futures-core",
"pbjson",
@@ -3248,6 +3331,7 @@ dependencies = [
[[package]]
name = "aptos-protos"
version = "1.3.1"
+source = "git+https://github.com/aptos-labs/aptos-core.git?rev=5c48aee129b5a141be2792ffa3d9bd0a1a61c9cb#5c48aee129b5a141be2792ffa3d9bd0a1a61c9cb"
dependencies = [
"futures-core",
"pbjson",
@@ -3301,19 +3385,29 @@ dependencies = [
"aptos-genesis",
"aptos-infallible",
"aptos-keygen",
+ "aptos-language-e2e-tests",
+ "aptos-move-debugger",
"aptos-rest-client",
"aptos-temppath",
"aptos-types",
+ "aptos-vm",
+ "aptos-vm-logging",
+ "aptos-vm-types",
"bcs 0.1.4",
"clap 4.4.14",
"futures",
"git2 0.16.1",
"handlebars",
"hex",
+ "move-binary-format",
+ "move-bytecode-verifier",
"move-core-types",
"move-model",
+ "move-vm-runtime",
+ "move-vm-types",
"once_cell",
- "reqwest",
+ "parking_lot 0.12.1",
+ "reqwest 0.11.23",
"serde",
"serde_json",
"serde_yaml 0.8.26",
@@ -3322,6 +3416,7 @@ dependencies = [
"strum_macros 0.24.3",
"tokio",
"url",
+ "walkdir",
]
[[package]]
@@ -3373,7 +3468,7 @@ dependencies = [
"clap 4.4.14",
"hex",
"move-core-types",
- "reqwest",
+ "reqwest 0.11.23",
"serde",
"serde_json",
"thiserror",
@@ -3417,13 +3512,12 @@ dependencies = [
"clap 4.4.14",
"futures",
"hex",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"move-core-types",
"once_cell",
- "reqwest",
+ "reqwest 0.11.23",
"serde",
"serde_json",
- "serde_yaml 0.8.26",
"tokio",
"url",
"warp",
@@ -3457,7 +3551,6 @@ dependencies = [
name = "aptos-safety-rules"
version = "0.1.0"
dependencies = [
- "anyhow",
"aptos-config",
"aptos-consensus-types",
"aptos-crypto",
@@ -3472,6 +3565,7 @@ dependencies = [
"aptos-vault-client",
"claims",
"criterion",
+ "hex",
"once_cell",
"proptest",
"rand 0.7.3",
@@ -3512,7 +3606,7 @@ dependencies = [
"aptos-types",
"bitvec 1.0.1",
"criterion",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"jemallocator",
"once_cell",
"proptest",
@@ -3644,7 +3738,6 @@ dependencies = [
"aptos-data-client",
"aptos-data-streaming-service",
"aptos-db",
- "aptos-db-indexer-schemas",
"aptos-event-notifications",
"aptos-executor",
"aptos-executor-test-helpers",
@@ -3792,8 +3885,8 @@ dependencies = [
"anyhow",
"aptos-profiler 0.1.0",
"async-mutex",
- "http",
- "hyper",
+ "http 0.2.11",
+ "hyper 0.14.28",
"lazy_static",
"mime",
"pprof",
@@ -3812,8 +3905,8 @@ dependencies = [
"anyhow",
"aptos-profiler 0.1.0 (git+https://github.com/aptos-labs/aptos-core.git?rev=4541add3fd29826ec57f22658ca286d2d6134b93)",
"async-mutex",
- "http",
- "hyper",
+ "http 0.2.11",
+ "hyper 0.14.28",
"lazy_static",
"mime",
"pprof",
@@ -3868,7 +3961,7 @@ dependencies = [
"prometheus",
"rand 0.7.3",
"rand_core 0.5.1",
- "reqwest",
+ "reqwest 0.11.23",
"reqwest-middleware",
"reqwest-retry",
"serde",
@@ -3907,7 +4000,7 @@ dependencies = [
"prometheus",
"rand 0.7.3",
"rand_core 0.5.1",
- "reqwest",
+ "reqwest 0.11.23",
"reqwest-middleware",
"reqwest-retry",
"serde",
@@ -3952,9 +4045,9 @@ dependencies = [
"csv",
"futures",
"hex",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"rand 0.7.3",
- "reqwest",
+ "reqwest 0.11.23",
"tokio",
"tokio-scoped",
]
@@ -3992,9 +4085,7 @@ dependencies = [
"criterion",
"criterion-cpu-time",
"num_cpus",
- "once_cell",
"proptest",
- "rayon",
]
[[package]]
@@ -4030,11 +4121,11 @@ dependencies = [
"async-trait",
"clap 4.4.14",
"futures",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"once_cell",
"rand 0.7.3",
"rand_core 0.5.1",
- "reqwest",
+ "reqwest 0.11.23",
"serde",
"tokio",
"url",
@@ -4140,7 +4231,7 @@ dependencies = [
"fxhash",
"hashbrown 0.14.3",
"hex",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"jsonwebtoken 8.3.0",
"move-binary-format",
"move-bytecode-verifier",
@@ -4164,7 +4255,7 @@ dependencies = [
"rand 0.7.3",
"rayon",
"regex",
- "reqwest",
+ "reqwest 0.11.23",
"ring 0.16.20",
"rsa 0.9.6",
"serde",
@@ -4314,6 +4405,7 @@ dependencies = [
"aptos-vm",
"bcs 0.1.4",
"bytes",
+ "claims",
"move-core-types",
"move-vm-runtime",
"move-vm-types",
@@ -4419,25 +4511,12 @@ dependencies = [
"aptos-config",
"aptos-logger",
"bcs 0.1.4",
- "hyper",
+ "hyper 0.14.28",
"serde",
"serde_json",
"warp",
]
-[[package]]
-name = "aptos-writeset-generator"
-version = "0.1.0"
-dependencies = [
- "anyhow",
- "aptos-crypto",
- "aptos-types",
- "aptos-vm",
- "move-core-types",
- "move-vm-runtime",
- "move-vm-types",
-]
-
[[package]]
name = "arbitrary"
version = "1.3.2"
@@ -4754,9 +4833,9 @@ dependencies = [
[[package]]
name = "async-compression"
-version = "0.4.5"
+version = "0.4.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bc2d0cfb2a7388d34f590e76686704c494ed7aaceed62ee1ba35cbf363abc2a5"
+checksum = "cd066d0b4ef8ecb03a55319dc13aa6910616d0f44008a045bb1835af830abff5"
dependencies = [
"flate2",
"futures-core",
@@ -5020,102 +5099,102 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
[[package]]
name = "axum"
-version = "0.5.17"
+version = "0.6.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "acee9fd5073ab6b045a275b3e709c163dd36c90685219cb21804a147b58dba43"
+checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf"
dependencies = [
"async-trait",
- "axum-core 0.2.9",
+ "axum-core 0.3.4",
"bitflags 1.3.2",
"bytes",
"futures-util",
- "http",
- "http-body",
- "hyper",
+ "http 0.2.11",
+ "http-body 0.4.6",
+ "hyper 0.14.28",
"itoa",
- "matchit 0.5.0",
+ "matchit",
"memchr",
"mime",
"percent-encoding",
"pin-project-lite",
+ "rustversion",
"serde",
- "serde_json",
- "serde_urlencoded",
- "sync_wrapper",
- "tokio",
+ "sync_wrapper 0.1.2",
"tower",
- "tower-http 0.3.5",
"tower-layer",
"tower-service",
]
[[package]]
name = "axum"
-version = "0.6.20"
+version = "0.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf"
+checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf"
dependencies = [
"async-trait",
- "axum-core 0.3.4",
- "bitflags 1.3.2",
+ "axum-core 0.4.3",
"bytes",
"futures-util",
- "http",
- "http-body",
- "hyper",
+ "http 1.1.0",
+ "http-body 1.0.0",
+ "http-body-util",
+ "hyper 1.4.1",
+ "hyper-util",
"itoa",
- "matchit 0.7.3",
+ "matchit",
"memchr",
"mime",
"percent-encoding",
"pin-project-lite",
"rustversion",
"serde",
- "sync_wrapper",
+ "serde_json",
+ "serde_path_to_error",
+ "serde_urlencoded",
+ "sync_wrapper 1.0.1",
+ "tokio",
"tower",
"tower-layer",
"tower-service",
+ "tracing",
]
[[package]]
name = "axum-core"
-version = "0.2.9"
+version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "37e5939e02c56fecd5c017c37df4238c0a839fa76b7f97acdd7efb804fd181cc"
+checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c"
dependencies = [
"async-trait",
"bytes",
"futures-util",
- "http",
- "http-body",
+ "http 0.2.11",
+ "http-body 0.4.6",
"mime",
+ "rustversion",
"tower-layer",
"tower-service",
]
[[package]]
name = "axum-core"
-version = "0.3.4"
+version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c"
+checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3"
dependencies = [
"async-trait",
"bytes",
"futures-util",
- "http",
- "http-body",
+ "http 1.1.0",
+ "http-body 1.0.0",
+ "http-body-util",
"mime",
+ "pin-project-lite",
"rustversion",
+ "sync_wrapper 0.1.2",
"tower-layer",
"tower-service",
-]
-
-[[package]]
-name = "axum-test"
-version = "0.1.0"
-dependencies = [
- "axum 0.5.17",
- "tokio",
+ "tracing",
]
[[package]]
@@ -5314,7 +5393,7 @@ version = "0.69.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0"
dependencies = [
- "bitflags 2.4.1",
+ "bitflags 2.6.0",
"cexpr",
"clang-sys",
"itertools 0.12.1",
@@ -5357,9 +5436,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bitflags"
-version = "2.4.1"
+version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07"
+checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
[[package]]
name = "bitmaps"
@@ -5537,8 +5616,8 @@ dependencies = [
"futures-core",
"futures-util",
"hex",
- "http",
- "hyper",
+ "http 0.2.11",
+ "hyper 0.14.28",
"hyperlocal",
"log",
"pin-project-lite",
@@ -5723,6 +5802,19 @@ dependencies = [
"serde",
]
+[[package]]
+name = "canonical_json"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f89083fd014d71c47a718d7f4ac050864dac8587668dbe90baf9e261064c5710"
+dependencies = [
+ "hex",
+ "regex",
+ "serde",
+ "serde_json",
+ "thiserror",
+]
+
[[package]]
name = "captcha"
version = "0.0.9"
@@ -5826,11 +5918,17 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+[[package]]
+name = "cfg_aliases"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e"
+
[[package]]
name = "chrono"
-version = "0.4.31"
+version = "0.4.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38"
+checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401"
dependencies = [
"android-tzdata",
"iana-time-zone",
@@ -5838,7 +5936,7 @@ dependencies = [
"num-traits",
"serde",
"wasm-bindgen",
- "windows-targets 0.48.5",
+ "windows-targets 0.52.0",
]
[[package]]
@@ -5988,6 +6086,7 @@ dependencies = [
"anstyle",
"clap_lex 0.6.0",
"strsim 0.10.0",
+ "terminal_size",
]
[[package]]
@@ -6065,7 +6164,7 @@ dependencies = [
"lazy_static",
"pem 0.8.3",
"percent-encoding",
- "reqwest",
+ "reqwest 0.11.23",
"ring 0.16.20",
"serde",
"serde_json",
@@ -6214,6 +6313,26 @@ version = "0.9.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8"
+[[package]]
+name = "const-random"
+version = "0.1.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359"
+dependencies = [
+ "const-random-macro",
+]
+
+[[package]]
+name = "const-random-macro"
+version = "0.1.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e"
+dependencies = [
+ "getrandom 0.2.11",
+ "once_cell",
+ "tiny-keccak",
+]
+
[[package]]
name = "const_fn"
version = "0.4.9"
@@ -6259,24 +6378,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e"
[[package]]
-name = "cookie"
-version = "0.16.2"
+name = "convert_case"
+version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb"
+checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca"
dependencies = [
- "percent-encoding",
+ "unicode-segmentation",
+]
+
+[[package]]
+name = "cookie"
+version = "0.16.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb"
+dependencies = [
+ "percent-encoding",
"time",
"version_check",
]
[[package]]
name = "cookie"
-version = "0.17.0"
+version = "0.18.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7efb37c3e1ccb1ff97164ad95ac1606e8ccd35b3fa0a7d99a304c7f4a428cc24"
+checksum = "4ddef33a339a91ea89fb53151bd0a4689cfce27055c291dfa69945475d22c747"
dependencies = [
"aes-gcm",
- "base64 0.21.6",
+ "base64 0.22.1",
"hkdf 0.12.4",
"hmac 0.12.1",
"percent-encoding",
@@ -6591,6 +6719,16 @@ dependencies = [
"memchr",
]
+[[package]]
+name = "ctor"
+version = "0.1.26"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096"
+dependencies = [
+ "quote",
+ "syn 1.0.109",
+]
+
[[package]]
name = "ctr"
version = "0.9.2"
@@ -6706,16 +6844,6 @@ dependencies = [
"darling_macro 0.13.4",
]
-[[package]]
-name = "darling"
-version = "0.14.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850"
-dependencies = [
- "darling_core 0.14.4",
- "darling_macro 0.14.4",
-]
-
[[package]]
name = "darling"
version = "0.20.9"
@@ -6740,20 +6868,6 @@ dependencies = [
"syn 1.0.109",
]
-[[package]]
-name = "darling_core"
-version = "0.14.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0"
-dependencies = [
- "fnv",
- "ident_case",
- "proc-macro2",
- "quote",
- "strsim 0.10.0",
- "syn 1.0.109",
-]
-
[[package]]
name = "darling_core"
version = "0.20.9"
@@ -6779,17 +6893,6 @@ dependencies = [
"syn 1.0.109",
]
-[[package]]
-name = "darling_macro"
-version = "0.14.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e"
-dependencies = [
- "darling_core 0.14.4",
- "quote",
- "syn 1.0.109",
-]
-
[[package]]
name = "darling_macro"
version = "0.20.9"
@@ -6978,7 +7081,7 @@ version = "0.99.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321"
dependencies = [
- "convert_case",
+ "convert_case 0.4.0",
"proc-macro2",
"quote",
"rustc_version",
@@ -7015,7 +7118,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62c6fcf842f17f8c78ecf7c81d75c5ce84436b41ee07e03f490fbb5f5a8731d8"
dependencies = [
"bigdecimal",
- "bitflags 2.4.1",
+ "bitflags 2.6.0",
"byteorder",
"chrono",
"diesel_derives",
@@ -7028,20 +7131,6 @@ dependencies = [
"serde_json",
]
-[[package]]
-name = "diesel-async"
-version = "0.4.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "acada1517534c92d3f382217b485db8a8638f111b0e3f2a2a8e26165050f77be"
-dependencies = [
- "async-trait",
- "diesel",
- "futures-util",
- "scoped-futures",
- "tokio",
- "tokio-postgres",
-]
-
[[package]]
name = "diesel-async"
version = "0.4.1"
@@ -7056,18 +7145,6 @@ dependencies = [
"tokio-postgres",
]
-[[package]]
-name = "diesel_async_migrations"
-version = "0.11.0"
-source = "git+https://github.com/niroco/diesel_async_migrations?rev=11f331b73c5cfcc894380074f748d8fda710ac12#11f331b73c5cfcc894380074f748d8fda710ac12"
-dependencies = [
- "diesel",
- "diesel-async 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "macros",
- "scoped-futures",
- "tracing",
-]
-
[[package]]
name = "diesel_derives"
version = "2.1.2"
@@ -7272,6 +7349,7 @@ dependencies = [
"aptos-gas-schedule",
"aptos-language-e2e-tests",
"aptos-package-builder",
+ "aptos-transaction-generator-lib",
"aptos-types",
"aptos-vm",
"aptos-vm-types",
@@ -7870,6 +7948,29 @@ version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6"
+[[package]]
+name = "firestore"
+version = "0.43.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "11f7f676812c6a51d8584aa52252e2d3a02417ee0b27966c7059fe4ef80945d5"
+dependencies = [
+ "async-trait",
+ "backoff",
+ "chrono",
+ "futures",
+ "gcloud-sdk",
+ "hex",
+ "hyper 1.4.1",
+ "rand 0.8.5",
+ "rsb_derive",
+ "rvstruct",
+ "serde",
+ "struct-path",
+ "tokio",
+ "tokio-stream",
+ "tracing",
+]
+
[[package]]
name = "fixed"
version = "1.25.1"
@@ -8205,42 +8306,27 @@ version = "0.3.55"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2"
-[[package]]
-name = "gcemeta"
-version = "0.2.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "47d460327b24cc34c86d53d60a90e9e6044817f7906ebd9baa5c3d0ee13e1ecf"
-dependencies = [
- "bytes",
- "hyper",
- "serde",
- "serde_json",
- "thiserror",
- "tokio",
- "tracing",
-]
-
[[package]]
name = "gcloud-sdk"
-version = "0.20.7"
+version = "0.25.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3a24376e7850e7864bb326debc5765a1dda4fc47603c22e2bc0ebf30ff59141b"
+checksum = "898e349fb0fabc16892de7858e5650b70a8044edeee13469cb2f7649040bf3c2"
dependencies = [
"async-trait",
+ "bytes",
"chrono",
"futures",
- "gcemeta",
- "hyper",
- "jsonwebtoken 8.3.0",
+ "hyper 1.4.1",
+ "jsonwebtoken 9.3.0",
"once_cell",
- "prost 0.11.9",
- "prost-types 0.11.9",
- "reqwest",
+ "prost 0.13.1",
+ "prost-types 0.13.1",
+ "reqwest 0.12.5",
"secret-vault-value",
"serde",
"serde_json",
"tokio",
- "tonic 0.9.2",
+ "tonic 0.12.1",
"tower",
"tower-layer",
"tower-util",
@@ -8257,10 +8343,10 @@ dependencies = [
"async-stream",
"async-trait",
"dyn-clone",
- "hyper",
+ "hyper 0.14.28",
"hyper-rustls 0.24.2",
"log",
- "reqwest",
+ "reqwest 0.11.23",
"serde",
"serde_json",
"thiserror",
@@ -8480,7 +8566,7 @@ dependencies = [
"google-cloud-token",
"home",
"jsonwebtoken 8.3.0",
- "reqwest",
+ "reqwest 0.11.23",
"serde",
"serde_json",
"thiserror",
@@ -8497,7 +8583,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8bdaaa4bc036e8318274d1b25f0f2265b3e95418b765fd1ea1c7ef938fd69bd"
dependencies = [
"google-cloud-token",
- "http",
+ "http 0.2.11",
"thiserror",
"tokio",
"tokio-retry",
@@ -8523,7 +8609,7 @@ version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96e4ad0802d3f416f62e7ce01ac1460898ee0efc98f8b45cd4aab7611607012f"
dependencies = [
- "reqwest",
+ "reqwest 0.11.23",
"thiserror",
"tokio",
]
@@ -8564,7 +8650,7 @@ dependencies = [
"once_cell",
"percent-encoding",
"regex",
- "reqwest",
+ "reqwest 0.11.23",
"ring 0.16.20",
"rsa 0.6.1",
"serde",
@@ -8661,7 +8747,26 @@ dependencies = [
"futures-core",
"futures-sink",
"futures-util",
- "http",
+ "http 0.2.11",
+ "indexmap 2.2.5",
+ "slab",
+ "tokio",
+ "tokio-util 0.7.10",
+ "tracing",
+]
+
+[[package]]
+name = "h2"
+version = "0.4.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab"
+dependencies = [
+ "atomic-waker",
+ "bytes",
+ "fnv",
+ "futures-core",
+ "futures-sink",
+ "http 1.1.0",
"indexmap 2.2.5",
"slab",
"tokio",
@@ -8682,6 +8787,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "02b4af3693f1b705df946e9fe5631932443781d0aabb423b62fcd4d73f6d2fd0"
dependencies = [
"crunchy",
+ "num-traits",
]
[[package]]
@@ -8762,8 +8868,23 @@ checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270"
dependencies = [
"base64 0.21.6",
"bytes",
- "headers-core",
- "http",
+ "headers-core 0.2.0",
+ "http 0.2.11",
+ "httpdate",
+ "mime",
+ "sha1",
+]
+
+[[package]]
+name = "headers"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "322106e6bd0cba2d5ead589ddb8150a13d7c4217cf80d7c4f682ca994ccc6aa9"
+dependencies = [
+ "base64 0.21.6",
+ "bytes",
+ "headers-core 0.3.0",
+ "http 1.1.0",
"httpdate",
"mime",
"sha1",
@@ -8775,7 +8896,16 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429"
dependencies = [
- "http",
+ "http 0.2.11",
+]
+
+[[package]]
+name = "headers-core"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "54b4a22553d4242c49fddb9ba998a99962b5cc6f22cb5a3482bec22522403ce4"
+dependencies = [
+ "http 1.1.0",
]
[[package]]
@@ -8937,6 +9067,17 @@ dependencies = [
"itoa",
]
+[[package]]
+name = "http"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258"
+dependencies = [
+ "bytes",
+ "fnv",
+ "itoa",
+]
+
[[package]]
name = "http-body"
version = "0.4.6"
@@ -8944,7 +9085,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2"
dependencies = [
"bytes",
- "http",
+ "http 0.2.11",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "http-body"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643"
+dependencies = [
+ "bytes",
+ "http 1.1.0",
+]
+
+[[package]]
+name = "http-body-util"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f"
+dependencies = [
+ "bytes",
+ "futures-util",
+ "http 1.1.0",
+ "http-body 1.0.0",
"pin-project-lite",
]
@@ -8980,7 +9144,7 @@ dependencies = [
"crossbeam-utils",
"form_urlencoded",
"futures-util",
- "hyper",
+ "hyper 0.14.28",
"isahc",
"lazy_static",
"levenshtein",
@@ -9019,9 +9183,9 @@ dependencies = [
"futures-channel",
"futures-core",
"futures-util",
- "h2",
- "http",
- "http-body",
+ "h2 0.3.26",
+ "http 0.2.11",
+ "http-body 0.4.6",
"httparse",
"httpdate",
"itoa",
@@ -9033,14 +9197,35 @@ dependencies = [
"want",
]
+[[package]]
+name = "hyper"
+version = "1.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05"
+dependencies = [
+ "bytes",
+ "futures-channel",
+ "futures-util",
+ "h2 0.4.5",
+ "http 1.1.0",
+ "http-body 1.0.0",
+ "httparse",
+ "httpdate",
+ "itoa",
+ "pin-project-lite",
+ "smallvec",
+ "tokio",
+ "want",
+]
+
[[package]]
name = "hyper-rustls"
version = "0.23.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c"
dependencies = [
- "http",
- "hyper",
+ "http 0.2.11",
+ "hyper 0.14.28",
"log",
"rustls 0.20.9",
"rustls-native-certs 0.6.3",
@@ -9055,8 +9240,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590"
dependencies = [
"futures-util",
- "http",
- "hyper",
+ "http 0.2.11",
+ "hyper 0.14.28",
"log",
"rustls 0.21.10",
"rustls-native-certs 0.6.3",
@@ -9064,18 +9249,49 @@ dependencies = [
"tokio-rustls 0.24.1",
]
+[[package]]
+name = "hyper-rustls"
+version = "0.27.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155"
+dependencies = [
+ "futures-util",
+ "http 1.1.0",
+ "hyper 1.4.1",
+ "hyper-util",
+ "rustls 0.23.7",
+ "rustls-native-certs 0.7.0",
+ "rustls-pki-types",
+ "tokio",
+ "tokio-rustls 0.26.0",
+ "tower-service",
+]
+
[[package]]
name = "hyper-timeout"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1"
dependencies = [
- "hyper",
+ "hyper 0.14.28",
"pin-project-lite",
"tokio",
"tokio-io-timeout",
]
+[[package]]
+name = "hyper-timeout"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793"
+dependencies = [
+ "hyper 1.4.1",
+ "hyper-util",
+ "pin-project-lite",
+ "tokio",
+ "tower-service",
+]
+
[[package]]
name = "hyper-tls"
version = "0.5.0"
@@ -9083,12 +9299,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905"
dependencies = [
"bytes",
- "hyper",
+ "hyper 0.14.28",
"native-tls",
"tokio",
"tokio-native-tls",
]
+[[package]]
+name = "hyper-util"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3ab92f4f49ee4fb4f997c784b7a2e0fa70050211e0b6a287f898c3c9785ca956"
+dependencies = [
+ "bytes",
+ "futures-channel",
+ "futures-util",
+ "http 1.1.0",
+ "http-body 1.0.0",
+ "hyper 1.4.1",
+ "pin-project-lite",
+ "socket2 0.5.5",
+ "tokio",
+ "tower",
+ "tower-service",
+ "tracing",
+]
+
[[package]]
name = "hyperlocal"
version = "0.8.0"
@@ -9097,7 +9333,7 @@ checksum = "0fafdf7b2b2de7c9784f76e02c0935e65a8117ec3b768644379983ab333ac98c"
dependencies = [
"futures-util",
"hex",
- "hyper",
+ "hyper 0.14.28",
"pin-project 1.1.3",
"tokio",
]
@@ -9388,6 +9624,12 @@ dependencies = [
"web-sys",
]
+[[package]]
+name = "integer-encoding"
+version = "3.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02"
+
[[package]]
name = "internment"
version = "0.5.6"
@@ -9467,7 +9709,7 @@ dependencies = [
"encoding_rs",
"event-listener 2.5.3",
"futures-lite 1.13.0",
- "http",
+ "http 0.2.11",
"log",
"mime",
"once_cell",
@@ -9507,6 +9749,15 @@ dependencies = [
"either",
]
+[[package]]
+name = "itertools"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186"
+dependencies = [
+ "either",
+]
+
[[package]]
name = "itoa"
version = "1.0.10"
@@ -9610,6 +9861,21 @@ dependencies = [
"simple_asn1 0.6.2",
]
+[[package]]
+name = "jsonwebtoken"
+version = "9.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b9ae10193d25051e74945f1ea2d0b42e03cc3b890f7e4cc5faa44997d808193f"
+dependencies = [
+ "base64 0.21.6",
+ "js-sys",
+ "pem 3.0.4",
+ "ring 0.17.7",
+ "serde",
+ "serde_json",
+ "simple_asn1 0.6.2",
+]
+
[[package]]
name = "jwt"
version = "0.16.0"
@@ -9682,11 +9948,11 @@ dependencies = [
"dirs-next",
"either",
"futures",
- "http",
- "http-body",
- "hyper",
+ "http 0.2.11",
+ "http-body 0.4.6",
+ "hyper 0.14.28",
"hyper-rustls 0.23.2",
- "hyper-timeout",
+ "hyper-timeout 0.4.1",
"jsonpath_lib",
"k8s-openapi",
"kube-core",
@@ -9701,7 +9967,7 @@ dependencies = [
"tokio",
"tokio-util 0.6.10",
"tower",
- "tower-http 0.2.5",
+ "tower-http",
"tracing",
]
@@ -9713,7 +9979,7 @@ checksum = "c52b6ab05d160691083430f6f431707a4e05b64903f2ffa0095ee5efde759117"
dependencies = [
"chrono",
"form_urlencoded",
- "http",
+ "http 0.2.11",
"json-patch",
"k8s-openapi",
"once_cell",
@@ -9863,9 +10129,9 @@ checksum = "db13adb97ab515a3691f56e4dbab09283d0b86cb45abd991d8634a9d6f501760"
[[package]]
name = "libc"
-version = "0.2.152"
+version = "0.2.155"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7"
+checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c"
[[package]]
name = "libfuzzer-sys"
@@ -9924,7 +10190,7 @@ version = "0.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8"
dependencies = [
- "bitflags 2.4.1",
+ "bitflags 2.6.0",
"libc",
"redox_syscall 0.4.1",
]
@@ -10054,15 +10320,6 @@ version = "0.4.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456"
-[[package]]
-name = "listener"
-version = "0.1.0"
-dependencies = [
- "bytes",
- "clap 4.4.14",
- "tokio",
-]
-
[[package]]
name = "lock_api"
version = "0.4.11"
@@ -10135,12 +10392,12 @@ dependencies = [
]
[[package]]
-name = "macros"
-version = "0.1.0"
-source = "git+https://github.com/niroco/diesel_async_migrations?rev=11f331b73c5cfcc894380074f748d8fda710ac12#11f331b73c5cfcc894380074f748d8fda710ac12"
+name = "lz4_flex"
+version = "0.11.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "75761162ae2b0e580d7e7c390558127e5f01b4194debd6221fd8c207fc80e3f5"
dependencies = [
- "proc-macro2",
- "quote",
+ "twox-hash",
]
[[package]]
@@ -10170,12 +10427,6 @@ version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5"
-[[package]]
-name = "matchit"
-version = "0.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "73cbba799671b762df5a175adf59ce145165747bb891505c43d09aefbbf38beb"
-
[[package]]
name = "matchit"
version = "0.7.3"
@@ -10411,7 +10662,7 @@ dependencies = [
"better_any",
"bytes",
"datatest-stable",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"move-binary-format",
"move-command-line-common",
"move-compiler",
@@ -10578,6 +10829,7 @@ dependencies = [
"move-stdlib",
"move-symbol-pool",
"once_cell",
+ "pathdiff",
"petgraph 0.5.1",
"regex",
"sha3 0.9.1",
@@ -10605,9 +10857,10 @@ dependencies = [
"ethnum",
"flexi_logger",
"im",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"log",
"move-binary-format",
+ "move-borrow-graph",
"move-bytecode-source-map",
"move-bytecode-verifier",
"move-command-line-common",
@@ -10623,6 +10876,8 @@ dependencies = [
"num 0.4.1",
"once_cell",
"petgraph 0.5.1",
+ "strum 0.24.1",
+ "strum_macros 0.24.3",
"walkdir",
]
@@ -10630,9 +10885,8 @@ dependencies = [
name = "move-compiler-v2-transactional-tests"
version = "0.1.0"
dependencies = [
- "aptos-vm",
"datatest-stable",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"move-command-line-common",
"move-compiler-v2",
"move-model",
@@ -10710,7 +10964,7 @@ dependencies = [
"codespan",
"codespan-reporting",
"datatest-stable",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"log",
"move-compiler",
"move-core-types",
@@ -10837,7 +11091,7 @@ dependencies = [
"codespan-reporting",
"datatest-stable",
"internment",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"log",
"move-binary-format",
"move-bytecode-source-map",
@@ -10865,7 +11119,7 @@ dependencies = [
"datatest-stable",
"evm-exec-utils",
"hex",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"move-abigen",
"move-binary-format",
"move-bytecode-source-map",
@@ -10902,7 +11156,7 @@ dependencies = [
"clap 4.4.14",
"codespan-reporting",
"datatest-stable",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"log",
"move-abigen",
"move-command-line-common",
@@ -10933,7 +11187,7 @@ dependencies = [
"codespan",
"codespan-reporting",
"futures",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"log",
"move-binary-format",
"move-command-line-common",
@@ -10960,7 +11214,7 @@ dependencies = [
"anyhow",
"codespan-reporting",
"datatest-stable",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"log",
"move-binary-format",
"move-core-types",
@@ -11005,7 +11259,7 @@ dependencies = [
"datatest-stable",
"ethnum",
"im",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"log",
"move-binary-format",
"move-core-types",
@@ -11100,7 +11354,7 @@ dependencies = [
"ethnum",
"evm",
"evm-exec-utils",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"maplit",
"move-command-line-common",
"move-compiler",
@@ -11163,7 +11417,7 @@ dependencies = [
"difference",
"evm",
"evm-exec-utils",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"move-binary-format",
"move-bytecode-utils",
"move-command-line-common",
@@ -11177,6 +11431,7 @@ dependencies = [
"move-to-yul",
"move-vm-runtime",
"move-vm-test-utils",
+ "move-vm-types",
"once_cell",
"primitive-types 0.10.1",
"rayon",
@@ -11267,9 +11522,10 @@ name = "move-vm-types"
version = "0.1.0"
dependencies = [
"bcs 0.1.4",
+ "bytes",
"claims",
"derivative",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"move-binary-format",
"move-core-types",
"proptest",
@@ -11289,12 +11545,29 @@ dependencies = [
"bytes",
"encoding_rs",
"futures-util",
- "http",
+ "http 0.2.11",
"httparse",
"log",
"memchr",
"mime",
"spin 0.9.8",
+ "version_check",
+]
+
+[[package]]
+name = "multer"
+version = "3.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "83e87776546dc87511aa5ee218730c92b666d7264ab6ed41f9d215af9cd5224b"
+dependencies = [
+ "bytes",
+ "encoding_rs",
+ "futures-util",
+ "http 1.1.0",
+ "httparse",
+ "memchr",
+ "mime",
+ "spin 0.9.8",
"tokio",
"version_check",
]
@@ -11406,8 +11679,20 @@ version = "0.27.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053"
dependencies = [
- "bitflags 2.4.1",
+ "bitflags 2.6.0",
+ "cfg-if",
+ "libc",
+]
+
+[[package]]
+name = "nix"
+version = "0.28.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4"
+dependencies = [
+ "bitflags 2.6.0",
"cfg-if",
+ "cfg_aliases",
"libc",
]
@@ -11715,17 +12000,6 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3"
-[[package]]
-name = "number_range"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "60080faccd4ca50ad0b801b2be686136376b13f691f6eac84817e40973b2e1bb"
-dependencies = [
- "anyhow",
- "itertools 0.10.5",
- "num 0.4.1",
-]
-
[[package]]
name = "object"
version = "0.32.2"
@@ -11765,7 +12039,7 @@ version = "0.10.62"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8cde4d2d9200ad5909f8dac647e29482e07c3a35de8a13fce7c9c7747ad9f671"
dependencies = [
- "bitflags 2.4.1",
+ "bitflags 2.6.0",
"cfg-if",
"foreign-types 0.3.2",
"libc",
@@ -11944,7 +12218,7 @@ version = "3.6.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b"
dependencies = [
- "proc-macro-crate 2.0.1",
+ "proc-macro-crate 2.0.0",
"proc-macro2",
"quote",
"syn 1.0.109",
@@ -12004,6 +12278,40 @@ dependencies = [
"windows-targets 0.48.5",
]
+[[package]]
+name = "parquet"
+version = "52.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0f22ba0d95db56dde8685e3fadcb915cdaadda31ab8abbe3ff7f0ad1ef333267"
+dependencies = [
+ "ahash 0.8.11",
+ "bytes",
+ "chrono",
+ "futures",
+ "half 2.2.1",
+ "hashbrown 0.14.3",
+ "lz4_flex",
+ "num 0.4.1",
+ "num-bigint 0.4.4",
+ "paste",
+ "seq-macro",
+ "thrift",
+ "tokio",
+ "twox-hash",
+]
+
+[[package]]
+name = "parquet_derive"
+version = "52.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cbfe02f8b63a15a78398db242f9b1d2dcc201319075ea6222c7108ffd48b23c0"
+dependencies = [
+ "parquet",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.48",
+]
+
[[package]]
name = "parse-zoneinfo"
version = "0.3.0"
@@ -12052,7 +12360,7 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "499cff8432e71c5f8784d9645aac0f9fca604d67f59b68a606170b5e229c6538"
dependencies = [
- "bitflags 2.4.1",
+ "bitflags 2.6.0",
"ciborium",
"coset",
"data-encoding",
@@ -12146,6 +12454,16 @@ dependencies = [
"base64 0.13.1",
]
+[[package]]
+name = "pem"
+version = "3.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae"
+dependencies = [
+ "base64 0.22.1",
+ "serde",
+]
+
[[package]]
name = "pem-rfc7468"
version = "0.3.1"
@@ -12443,39 +12761,41 @@ dependencies = [
[[package]]
name = "poem"
-version = "1.3.59"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "504774c97b0744c1ee108a37e5a65a9745a4725c4c06277521dabc28eb53a904"
+version = "3.0.1"
+source = "git+https://github.com/poem-web/poem.git?rev=809b2816d3504beeba140fef3fdfe9432d654c5b#809b2816d3504beeba140fef3fdfe9432d654c5b"
dependencies = [
"anyhow",
- "async-trait",
"bytes",
"chrono",
- "cookie 0.17.0",
+ "cookie 0.18.1",
"futures-util",
- "headers",
- "http",
- "hyper",
+ "headers 0.4.0",
+ "http 1.1.0",
+ "http-body-util",
+ "hyper 1.4.1",
+ "hyper-util",
"mime",
- "multer",
- "nix 0.27.1",
+ "multer 3.1.0",
+ "nix 0.28.0",
"parking_lot 0.12.1",
"percent-encoding",
"pin-project-lite",
"poem-derive",
- "quick-xml 0.30.0",
+ "quick-xml 0.32.0",
"regex",
"rfc7239",
- "rustls-pemfile 1.0.4",
+ "rustls-pemfile 2.1.1",
"serde",
"serde_json",
"serde_urlencoded",
+ "serde_yaml 0.9.30",
"smallvec",
+ "sync_wrapper 1.0.1",
"tempfile",
"thiserror",
"time",
"tokio",
- "tokio-rustls 0.24.1",
+ "tokio-rustls 0.25.0",
"tokio-stream",
"tokio-util 0.7.10",
"tracing",
@@ -12484,11 +12804,10 @@ dependencies = [
[[package]]
name = "poem-derive"
-version = "1.3.59"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "42ddcf4680d8d867e1e375116203846acb088483fa2070244f90589f458bbb31"
+version = "3.0.0"
+source = "git+https://github.com/poem-web/poem.git?rev=809b2816d3504beeba140fef3fdfe9432d654c5b#809b2816d3504beeba140fef3fdfe9432d654c5b"
dependencies = [
- "proc-macro-crate 2.0.1",
+ "proc-macro-crate 3.1.0",
"proc-macro2",
"quote",
"syn 2.0.48",
@@ -12496,19 +12815,19 @@ dependencies = [
[[package]]
name = "poem-openapi"
-version = "2.0.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e69c569eb0671cc85e65cfb6bd960d0168d24732ff58825227b4d2a10167ba91"
+version = "5.0.2"
+source = "git+https://github.com/poem-web/poem.git?rev=809b2816d3504beeba140fef3fdfe9432d654c5b#809b2816d3504beeba140fef3fdfe9432d654c5b"
dependencies = [
- "base64 0.13.1",
+ "base64 0.22.1",
"bytes",
"derive_more",
"futures-util",
+ "indexmap 2.2.5",
"mime",
"num-traits",
"poem",
"poem-openapi-derive",
- "quick-xml 0.23.1",
+ "quick-xml 0.32.0",
"regex",
"serde",
"serde_json",
@@ -12521,19 +12840,18 @@ dependencies = [
[[package]]
name = "poem-openapi-derive"
-version = "2.0.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "274cf13f710999977a3c1e396c2a5000d104075a7127ce6470fbdae4706be621"
+version = "5.0.2"
+source = "git+https://github.com/poem-web/poem.git?rev=809b2816d3504beeba140fef3fdfe9432d654c5b#809b2816d3504beeba140fef3fdfe9432d654c5b"
dependencies = [
- "darling 0.14.4",
- "http",
- "indexmap 1.9.3",
+ "darling 0.20.9",
+ "http 1.1.0",
+ "indexmap 2.2.5",
"mime",
- "proc-macro-crate 1.3.1",
+ "proc-macro-crate 3.1.0",
"proc-macro2",
"quote",
"regex",
- "syn 1.0.109",
+ "syn 2.0.48",
"thiserror",
]
@@ -12831,14 +13149,22 @@ dependencies = [
[[package]]
name = "proc-macro-crate"
-version = "2.0.1"
+version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "97dc5fea232fc28d2f597b37c4876b348a40e33f3b02cc975c8d006d78d94b1a"
+checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8"
dependencies = [
- "toml_datetime",
"toml_edit 0.20.2",
]
+[[package]]
+name = "proc-macro-crate"
+version = "3.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284"
+dependencies = [
+ "toml_edit 0.21.1",
+]
+
[[package]]
name = "proc-macro-error"
version = "1.0.4"
@@ -12887,40 +13213,46 @@ dependencies = [
[[package]]
name = "processor"
version = "1.0.0"
-source = "git+https://github.com/aptos-labs/aptos-indexer-processors.git?rev=5244b84fa5ed872e5280dc8df032d744d62ad29d#5244b84fa5ed872e5280dc8df032d744d62ad29d"
+source = "git+https://github.com/aptos-labs/aptos-indexer-processors.git?rev=fa1ce4947f4c2be57529f1c9732529e05a06cb7f#fa1ce4947f4c2be57529f1c9732529e05a06cb7f"
dependencies = [
"ahash 0.8.11",
+ "allocative",
+ "allocative_derive",
"anyhow",
- "aptos-moving-average 0.1.0 (git+https://github.com/aptos-labs/aptos-indexer-processors.git?rev=5244b84fa5ed872e5280dc8df032d744d62ad29d)",
- "aptos-protos 1.3.0",
+ "aptos-moving-average 0.1.0 (git+https://github.com/aptos-labs/aptos-indexer-processors.git?rev=fa1ce4947f4c2be57529f1c9732529e05a06cb7f)",
+ "aptos-protos 1.3.1 (git+https://github.com/aptos-labs/aptos-core.git?rev=5c48aee129b5a141be2792ffa3d9bd0a1a61c9cb)",
"async-trait",
- "base64 0.13.1",
"bcs 0.1.4",
"bigdecimal",
+ "bitflags 2.6.0",
+ "canonical_json",
"chrono",
"clap 4.4.14",
"diesel",
- "diesel-async 0.4.1 (git+https://github.com/weiznich/diesel_async.git?rev=d02798c67065d763154d7272dd0c09b39757d0f2)",
- "diesel_async_migrations",
+ "diesel-async",
"diesel_migrations",
"enum_dispatch",
"field_count",
"futures",
"futures-util",
- "gcloud-sdk",
"google-cloud-googleapis",
"google-cloud-pubsub",
+ "google-cloud-storage",
"hex",
+ "hyper 0.14.28",
"itertools 0.12.1",
"jemallocator",
"kanal",
+ "lazy_static",
"native-tls",
+ "num 0.4.1",
"num_cpus",
"once_cell",
+ "parquet",
+ "parquet_derive",
"postgres-native-tls",
"prometheus",
"prost 0.12.3",
- "prost-types 0.12.3",
"regex",
"serde",
"serde_json",
@@ -12928,6 +13260,7 @@ dependencies = [
"sha2 0.9.9",
"sha3 0.9.1",
"strum 0.24.1",
+ "tiny-keccak",
"tokio",
"tokio-postgres",
"tonic 0.11.0",
@@ -12977,7 +13310,7 @@ version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ae2f6a3f14ff35c16b51ac796d1dc73c15ad6472c48836c6c467f6d52266648"
dependencies = [
- "reqwest",
+ "reqwest 0.11.23",
"serde",
"serde_json",
"time",
@@ -13004,7 +13337,7 @@ checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf"
dependencies = [
"bit-set",
"bit-vec",
- "bitflags 2.4.1",
+ "bitflags 2.6.0",
"lazy_static",
"num-traits",
"rand 0.8.5",
@@ -13047,27 +13380,50 @@ dependencies = [
"prost-derive 0.12.3",
]
+[[package]]
+name = "prost"
+version = "0.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e13db3d3fde688c61e2446b4d843bc27a7e8af269a69440c0308021dc92333cc"
+dependencies = [
+ "bytes",
+ "prost-derive 0.13.1",
+]
+
[[package]]
name = "prost-derive"
version = "0.11.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4"
+checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4"
+dependencies = [
+ "anyhow",
+ "itertools 0.10.5",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "prost-derive"
+version = "0.12.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e"
dependencies = [
"anyhow",
- "itertools 0.10.5",
+ "itertools 0.11.0",
"proc-macro2",
"quote",
- "syn 1.0.109",
+ "syn 2.0.48",
]
[[package]]
name = "prost-derive"
-version = "0.12.3"
+version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e"
+checksum = "18bec9b0adc4eba778b33684b7ba3e7137789434769ee3ce3930463ef904cfca"
dependencies = [
"anyhow",
- "itertools 0.11.0",
+ "itertools 0.13.0",
"proc-macro2",
"quote",
"syn 2.0.48",
@@ -13091,6 +13447,15 @@ dependencies = [
"prost 0.12.3",
]
+[[package]]
+name = "prost-types"
+version = "0.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cee5168b05f49d4b0ca581206eb14a7b22fafd963efe729ac48eb03266e25cc2"
+dependencies = [
+ "prost 0.13.1",
+]
+
[[package]]
name = "protobuf"
version = "2.28.0"
@@ -13124,9 +13489,10 @@ dependencies = [
"chrono",
"clap 4.4.14",
"codespan-reporting",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"log",
"move-compiler",
+ "move-compiler-v2",
"move-model",
"move-prover",
"move-prover-boogie-backend",
@@ -13199,7 +13565,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "11bafc859c6815fbaffbbbf4229ecb767ac913fecb27f9ad4343662e9ef099ea"
dependencies = [
"memchr",
- "serde",
]
[[package]]
@@ -13213,9 +13578,9 @@ dependencies = [
[[package]]
name = "quick-xml"
-version = "0.30.0"
+version = "0.32.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956"
+checksum = "1d3a6e5838b60e0e8fa7a43f22ade549a37d61f8bdbe636d0d7816191de969c2"
dependencies = [
"memchr",
"serde",
@@ -13233,6 +13598,52 @@ dependencies = [
"parking_lot 0.12.1",
]
+[[package]]
+name = "quinn"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e4ceeeeabace7857413798eb1ffa1e9c905a9946a57d81fb69b4b71c4d8eb3ad"
+dependencies = [
+ "bytes",
+ "pin-project-lite",
+ "quinn-proto",
+ "quinn-udp",
+ "rustc-hash",
+ "rustls 0.23.7",
+ "thiserror",
+ "tokio",
+ "tracing",
+]
+
+[[package]]
+name = "quinn-proto"
+version = "0.11.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ddf517c03a109db8100448a4be38d498df8a210a99fe0e1b9eaf39e78c640efe"
+dependencies = [
+ "bytes",
+ "rand 0.8.5",
+ "ring 0.17.7",
+ "rustc-hash",
+ "rustls 0.23.7",
+ "slab",
+ "thiserror",
+ "tinyvec",
+ "tracing",
+]
+
+[[package]]
+name = "quinn-udp"
+version = "0.5.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8bffec3605b73c6f1754535084a85229fa8a30f86014e6c81aeec4abb68b0285"
+dependencies = [
+ "libc",
+ "once_cell",
+ "socket2 0.5.5",
+ "windows-sys 0.52.0",
+]
+
[[package]]
name = "quote"
version = "1.0.35"
@@ -13531,7 +13942,6 @@ version = "0.11.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41"
dependencies = [
- "async-compression",
"base64 0.21.6",
"bytes",
"cookie 0.16.2",
@@ -13539,10 +13949,10 @@ dependencies = [
"encoding_rs",
"futures-core",
"futures-util",
- "h2",
- "http",
- "http-body",
- "hyper",
+ "h2 0.3.26",
+ "http 0.2.11",
+ "http-body 0.4.6",
+ "hyper 0.14.28",
"hyper-rustls 0.24.2",
"hyper-tls",
"ipnet",
@@ -13568,10 +13978,56 @@ dependencies = [
"url",
"wasm-bindgen",
"wasm-bindgen-futures",
- "wasm-streams",
+ "wasm-streams 0.3.0",
"web-sys",
"webpki-roots 0.25.3",
- "winreg",
+ "winreg 0.50.0",
+]
+
+[[package]]
+name = "reqwest"
+version = "0.12.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37"
+dependencies = [
+ "async-compression",
+ "base64 0.22.1",
+ "bytes",
+ "futures-core",
+ "futures-util",
+ "http 1.1.0",
+ "http-body 1.0.0",
+ "http-body-util",
+ "hyper 1.4.1",
+ "hyper-rustls 0.27.2",
+ "hyper-util",
+ "ipnet",
+ "js-sys",
+ "log",
+ "mime",
+ "mime_guess",
+ "once_cell",
+ "percent-encoding",
+ "pin-project-lite",
+ "quinn",
+ "rustls 0.23.7",
+ "rustls-native-certs 0.7.0",
+ "rustls-pemfile 2.1.1",
+ "rustls-pki-types",
+ "serde",
+ "serde_json",
+ "serde_urlencoded",
+ "sync_wrapper 1.0.1",
+ "tokio",
+ "tokio-rustls 0.26.0",
+ "tokio-util 0.7.10",
+ "tower-service",
+ "url",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "wasm-streams 0.4.0",
+ "web-sys",
+ "winreg 0.52.0",
]
[[package]]
@@ -13582,8 +14038,8 @@ checksum = "88a3e86aa6053e59030e7ce2d2a3b258dd08fc2d337d52f73f6cb480f5858690"
dependencies = [
"anyhow",
"async-trait",
- "http",
- "reqwest",
+ "http 0.2.11",
+ "reqwest 0.11.23",
"serde",
"task-local-extensions",
"thiserror",
@@ -13600,10 +14056,10 @@ dependencies = [
"chrono",
"futures",
"getrandom 0.2.11",
- "http",
- "hyper",
+ "http 0.2.11",
+ "hyper 0.14.28",
"parking_lot 0.11.2",
- "reqwest",
+ "reqwest 0.11.23",
"reqwest-middleware",
"retry-policies",
"task-local-extensions",
@@ -13767,6 +14223,17 @@ dependencies = [
"zeroize",
]
+[[package]]
+name = "rsb_derive"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b2c53e42fccdc5f1172e099785fe78f89bc0c1e657d0c2ef591efbfac427e9a4"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
[[package]]
name = "rstack"
version = "0.3.3"
@@ -13881,7 +14348,7 @@ version = "0.38.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316"
dependencies = [
- "bitflags 2.4.1",
+ "bitflags 2.6.0",
"errno",
"libc",
"linux-raw-sys 0.4.12",
@@ -14049,6 +14516,26 @@ dependencies = [
"wait-timeout",
]
+[[package]]
+name = "rvs_derive"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6e1fa12378eb54f3d4f2db8dcdbe33af610b7e7d001961c1055858282ecef2a5"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "rvstruct"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5107860ec34506b64cf3680458074eac5c2c564f7ccc140918bbcd1714fd8d5d"
+dependencies = [
+ "rvs_derive",
+]
+
[[package]]
name = "ryu"
version = "1.0.16"
@@ -14221,12 +14708,12 @@ name = "self_update"
version = "0.39.0"
source = "git+https://github.com/banool/self_update.git?rev=8306158ad0fd5b9d4766a3c6bf967e7ef0ea5c4b#8306158ad0fd5b9d4766a3c6bf967e7ef0ea5c4b"
dependencies = [
- "hyper",
+ "hyper 0.14.28",
"indicatif 0.17.7",
"log",
"quick-xml 0.23.1",
"regex",
- "reqwest",
+ "reqwest 0.11.23",
"self-replace",
"semver",
"serde_json",
@@ -14246,14 +14733,10 @@ dependencies = [
]
[[package]]
-name = "sender"
-version = "0.1.0"
-dependencies = [
- "bytes",
- "clap 4.4.14",
- "event-listener 2.5.3",
- "tokio",
-]
+name = "seq-macro"
+version = "0.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4"
[[package]]
name = "serde"
@@ -14374,6 +14857,16 @@ dependencies = [
"thiserror",
]
+[[package]]
+name = "serde_path_to_error"
+version = "0.1.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6"
+dependencies = [
+ "itoa",
+ "serde",
+]
+
[[package]]
name = "serde_regex"
version = "1.1.0"
@@ -14493,14 +14986,13 @@ dependencies = [
[[package]]
name = "server-framework"
version = "1.0.0"
-source = "git+https://github.com/aptos-labs/aptos-indexer-processors.git?rev=5244b84fa5ed872e5280dc8df032d744d62ad29d#5244b84fa5ed872e5280dc8df032d744d62ad29d"
+source = "git+https://github.com/aptos-labs/aptos-indexer-processors.git?rev=fa1ce4947f4c2be57529f1c9732529e05a06cb7f#fa1ce4947f4c2be57529f1c9732529e05a06cb7f"
dependencies = [
"anyhow",
"aptos-system-utils 0.1.0 (git+https://github.com/aptos-labs/aptos-core.git?rev=4541add3fd29826ec57f22658ca286d2d6134b93)",
"async-trait",
"backtrace",
"clap 4.4.14",
- "futures",
"prometheus",
"serde",
"serde_yaml 0.8.26",
@@ -14846,6 +15338,7 @@ dependencies = [
"aptos-consensus",
"aptos-crypto",
"aptos-db",
+ "aptos-db-indexer",
"aptos-db-indexer-schemas",
"aptos-debugger",
"aptos-dkg",
@@ -14881,13 +15374,13 @@ dependencies = [
"digest 0.9.0",
"futures",
"hex",
- "hyper",
+ "hyper 0.14.28",
"move-core-types",
"num_cpus",
"once_cell",
"rand 0.7.3",
"regex",
- "reqwest",
+ "reqwest 0.11.23",
"serde",
"serde_json",
"serde_yaml 0.8.26",
@@ -15056,6 +15549,15 @@ version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
+[[package]]
+name = "struct-path"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "899edf28cf7320503eda593b4bbce1bc5e9533501a11d45537e2c5be90128fc7"
+dependencies = [
+ "convert_case 0.6.0",
+]
+
[[package]]
name = "structopt"
version = "0.3.26"
@@ -15162,7 +15664,7 @@ dependencies = [
"anyhow",
"aptos-types",
"async-trait",
- "reqwest",
+ "reqwest 0.11.23",
]
[[package]]
@@ -15216,6 +15718,15 @@ version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160"
+[[package]]
+name = "sync_wrapper"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394"
+dependencies = [
+ "futures-core",
+]
+
[[package]]
name = "sysinfo"
version = "0.28.4"
@@ -15358,6 +15869,16 @@ dependencies = [
"winapi-util",
]
+[[package]]
+name = "terminal_size"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7"
+dependencies = [
+ "rustix 0.38.28",
+ "windows-sys 0.48.0",
+]
+
[[package]]
name = "termtree"
version = "0.4.1"
@@ -15405,7 +15926,7 @@ dependencies = [
"crossbeam-channel",
"getrandom 0.2.11",
"hex",
- "itertools 0.12.1",
+ "itertools 0.13.0",
"module-generation",
"move-binary-format",
"move-bytecode-verifier",
@@ -15416,7 +15937,6 @@ dependencies = [
"move-vm-test-utils",
"move-vm-types",
"num_cpus",
- "once_cell",
"rand 0.8.5",
"tracing",
"tracing-subscriber 0.3.18",
@@ -15508,6 +16028,17 @@ dependencies = [
"num_cpus",
]
+[[package]]
+name = "thrift"
+version = "0.17.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7e54bc85fc7faa8bc175c4bab5b92ba8d9a3ce893d0e9f42cc455c8ab16a9e09"
+dependencies = [
+ "byteorder",
+ "integer-encoding",
+ "ordered-float 2.10.1",
+]
+
[[package]]
name = "tiff"
version = "0.9.0"
@@ -15712,6 +16243,17 @@ dependencies = [
"tokio",
]
+[[package]]
+name = "tokio-rustls"
+version = "0.25.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f"
+dependencies = [
+ "rustls 0.22.4",
+ "rustls-pki-types",
+ "tokio",
+]
+
[[package]]
name = "tokio-rustls"
version = "0.26.0"
@@ -15822,9 +16364,9 @@ dependencies = [
[[package]]
name = "toml_datetime"
-version = "0.6.3"
+version = "0.6.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b"
+checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf"
dependencies = [
"serde",
]
@@ -15853,6 +16395,17 @@ dependencies = [
"winnow",
]
+[[package]]
+name = "toml_edit"
+version = "0.21.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1"
+dependencies = [
+ "indexmap 2.2.5",
+ "toml_datetime",
+ "winnow",
+]
+
[[package]]
name = "tonic"
version = "0.9.2"
@@ -15867,15 +16420,14 @@ dependencies = [
"flate2",
"futures-core",
"futures-util",
- "h2",
- "http",
- "http-body",
- "hyper",
- "hyper-timeout",
+ "h2 0.3.26",
+ "http 0.2.11",
+ "http-body 0.4.6",
+ "hyper 0.14.28",
+ "hyper-timeout 0.4.1",
"percent-encoding",
"pin-project 1.1.3",
"prost 0.11.9",
- "rustls-native-certs 0.6.3",
"rustls-pemfile 1.0.4",
"tokio",
"tokio-rustls 0.24.1",
@@ -15898,11 +16450,11 @@ dependencies = [
"base64 0.22.1",
"bytes",
"flate2",
- "h2",
- "http",
- "http-body",
- "hyper",
- "hyper-timeout",
+ "h2 0.3.26",
+ "http 0.2.11",
+ "http-body 0.4.6",
+ "hyper 0.14.28",
+ "hyper-timeout 0.4.1",
"percent-encoding",
"pin-project 1.1.3",
"prost 0.12.3",
@@ -15920,6 +16472,39 @@ dependencies = [
"zstd",
]
+[[package]]
+name = "tonic"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "38659f4a91aba8598d27821589f5db7dddd94601e7a01b1e485a50e5484c7401"
+dependencies = [
+ "async-stream",
+ "async-trait",
+ "axum 0.7.5",
+ "base64 0.22.1",
+ "bytes",
+ "h2 0.4.5",
+ "http 1.1.0",
+ "http-body 1.0.0",
+ "http-body-util",
+ "hyper 1.4.1",
+ "hyper-timeout 0.5.1",
+ "hyper-util",
+ "percent-encoding",
+ "pin-project 1.1.3",
+ "prost 0.13.1",
+ "rustls-native-certs 0.7.0",
+ "rustls-pemfile 2.1.1",
+ "socket2 0.5.5",
+ "tokio",
+ "tokio-rustls 0.26.0",
+ "tokio-stream",
+ "tower",
+ "tower-layer",
+ "tower-service",
+ "tracing",
+]
+
[[package]]
name = "tonic-reflection"
version = "0.11.0"
@@ -15964,8 +16549,8 @@ dependencies = [
"bytes",
"futures-core",
"futures-util",
- "http",
- "http-body",
+ "http 0.2.11",
+ "http-body 0.4.6",
"http-range-header",
"pin-project-lite",
"tower-layer",
@@ -15973,25 +16558,6 @@ dependencies = [
"tracing",
]
-[[package]]
-name = "tower-http"
-version = "0.3.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858"
-dependencies = [
- "bitflags 1.3.2",
- "bytes",
- "futures-core",
- "futures-util",
- "http",
- "http-body",
- "http-range-header",
- "pin-project-lite",
- "tower",
- "tower-layer",
- "tower-service",
-]
-
[[package]]
name = "tower-layer"
version = "0.3.2"
@@ -16193,7 +16759,7 @@ dependencies = [
"byteorder",
"bytes",
"data-encoding",
- "http",
+ "http 0.2.11",
"httparse",
"log",
"rand 0.8.5",
@@ -16203,6 +16769,16 @@ dependencies = [
"utf-8",
]
+[[package]]
+name = "twox-hash"
+version = "1.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675"
+dependencies = [
+ "cfg-if",
+ "static_assertions",
+]
+
[[package]]
name = "typed-arena"
version = "2.0.2"
@@ -16504,9 +17080,9 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
[[package]]
name = "uuid"
-version = "1.6.1"
+version = "1.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560"
+checksum = "5de17fd2f7da591098415cff336e12965a28061ddace43b59cb3c430179c9439"
dependencies = [
"getrandom 0.2.11",
"serde",
@@ -16601,13 +17177,13 @@ dependencies = [
"bytes",
"futures-channel",
"futures-util",
- "headers",
- "http",
- "hyper",
+ "headers 0.3.9",
+ "http 0.2.11",
+ "hyper 0.14.28",
"log",
"mime",
"mime_guess",
- "multer",
+ "multer 2.1.0",
"percent-encoding",
"pin-project 1.1.3",
"rustls-pemfile 1.0.4",
@@ -16630,9 +17206,9 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "948552bbb7a5fb4ba3169fd09b6c1ab53c1b2fdd82603295df550f7a1ec644c0"
dependencies = [
- "hyper",
+ "hyper 0.14.28",
"once_cell",
- "reqwest",
+ "reqwest 0.11.23",
"thiserror",
"unicase",
"warp",
@@ -16735,6 +17311,19 @@ dependencies = [
"web-sys",
]
+[[package]]
+name = "wasm-streams"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129"
+dependencies = [
+ "futures-util",
+ "js-sys",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "web-sys",
+]
+
[[package]]
name = "wasm-timer"
version = "0.2.5"
@@ -17099,6 +17688,16 @@ dependencies = [
"windows-sys 0.48.0",
]
+[[package]]
+name = "winreg"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5"
+dependencies = [
+ "cfg-if",
+ "windows-sys 0.48.0",
+]
+
[[package]]
name = "wyz"
version = "0.2.0"
@@ -17166,8 +17765,8 @@ dependencies = [
"async-trait",
"base64 0.21.6",
"futures",
- "http",
- "hyper",
+ "http 0.2.11",
+ "hyper 0.14.28",
"hyper-rustls 0.24.2",
"itertools 0.12.1",
"log",
diff --git a/Cargo.toml b/Cargo.toml
index 1372c1480ae57..3e01cd584eeda 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -41,7 +41,6 @@ members = [
"aptos-move/mvhashmap",
"aptos-move/package-builder",
"aptos-move/vm-genesis",
- "aptos-move/writeset-transaction-generator",
"aptos-node",
"aptos-utils",
"config",
@@ -118,12 +117,14 @@ members = [
"ecosystem/indexer-grpc/indexer-grpc-cache-worker",
"ecosystem/indexer-grpc/indexer-grpc-data-service",
"ecosystem/indexer-grpc/indexer-grpc-file-store",
+ "ecosystem/indexer-grpc/indexer-grpc-file-store-backfiller",
"ecosystem/indexer-grpc/indexer-grpc-fullnode",
"ecosystem/indexer-grpc/indexer-grpc-in-memory-cache-benchmark",
- "ecosystem/indexer-grpc/indexer-grpc-integration-tests",
"ecosystem/indexer-grpc/indexer-grpc-server-framework",
"ecosystem/indexer-grpc/indexer-grpc-table-info",
"ecosystem/indexer-grpc/indexer-grpc-utils",
+ "ecosystem/indexer-grpc/indexer-test-transactions",
+ "ecosystem/indexer-grpc/indexer-transaction-generator",
"ecosystem/indexer-grpc/transaction-filter",
"ecosystem/nft-metadata-crawler-parser",
"ecosystem/node-checker",
@@ -136,6 +137,7 @@ members = [
"execution/executor-types",
"experimental/execution/ptx-executor",
"experimental/runtimes",
+ "experimental/storage/hexy",
"experimental/storage/layered-map",
"keyless/circuit",
"keyless/common",
@@ -180,9 +182,6 @@ members = [
"storage/schemadb",
"storage/scratchpad",
"storage/storage-interface",
- "testsuite/dos/http_test",
- "testsuite/dos/listener",
- "testsuite/dos/sender",
"testsuite/forge",
"testsuite/forge-cli",
"testsuite/fuzzer",
@@ -334,6 +333,7 @@ aptos-enum-conversion-derive = { path = "crates/aptos-enum-conversion-derive" }
aptos-executor-service = { path = "execution/executor-service" }
aptos-executor-test-helpers = { path = "execution/executor-test-helpers" }
aptos-executor-types = { path = "execution/executor-types" }
+aptos-experimental-hexy = { path = "experimental/storage/hexy" }
aptos-experimental-layered-map = { path = "experimental/storage/layered-map" }
aptos-experimental-ptx-executor = { path = "experimental/execution/ptx-executor" }
aptos-experimental-runtimes = { path = "experimental/runtimes" }
@@ -360,11 +360,14 @@ aptos-indexer = { path = "crates/indexer" }
aptos-indexer-grpc-cache-worker = { path = "ecosystem/indexer-grpc/indexer-grpc-cache-worker" }
aptos-indexer-grpc-data-service = { path = "ecosystem/indexer-grpc/indexer-grpc-data-service" }
aptos-indexer-grpc-file-store = { path = "ecosystem/indexer-grpc/indexer-grpc-file-store" }
+aptos-indexer-grpc-file-store-backfiller = { path = "ecosystem/indexer-grpc/indexer-grpc-file-store-backfiller" }
aptos-indexer-grpc-fullnode = { path = "ecosystem/indexer-grpc/indexer-grpc-fullnode" }
aptos-indexer-grpc-in-memory-cache-benchmark = { path = "ecosystem/indexer-grpc/indexer-grpc-in-memory-cache-benchmark" }
aptos-indexer-grpc-table-info = { path = "ecosystem/indexer-grpc/indexer-grpc-table-info" }
+aptos-indexer-test-transactions = { path = "ecosystem/indexer-grpc/indexer-test-transactions" }
aptos-indexer-grpc-utils = { path = "ecosystem/indexer-grpc/indexer-grpc-utils" }
aptos-indexer-grpc-server-framework = { path = "ecosystem/indexer-grpc/indexer-grpc-server-framework" }
+aptos-indexer-transaction-generator = { path = "ecosystem/indexer-grpc/indexer-transaction-generator" }
aptos-infallible = { path = "crates/aptos-infallible" }
aptos-inspection-service = { path = "crates/aptos-inspection-service" }
aptos-jellyfish-merkle = { path = "storage/jellyfish-merkle" }
@@ -457,7 +460,6 @@ aptos-vm-genesis = { path = "aptos-move/vm-genesis" }
aptos-vm-types = { path = "aptos-move/aptos-vm-types" }
aptos-vm-validator = { path = "vm-validator" }
aptos-warp-webserver = { path = "crates/aptos-warp-webserver" }
-aptos-writeset-generator = { path = "aptos-move/writeset-transaction-generator" }
aptos-cargo-cli = { path = "devtools/aptos-cargo-cli" }
# External crate dependencies.
@@ -488,7 +490,7 @@ async-mutex = "1.4.0"
async-recursion = "1.0.5"
async-stream = "0.3"
async-trait = "0.1.53"
-axum = "0.5.16"
+axum = "0.7.5"
base64 = "0.13.0"
base64-url = "2.0.1"
backoff = { version = "0.4.0", features = ["tokio"] }
@@ -514,7 +516,7 @@ cfg_block = "0.1.1"
cfg-if = "1.0.0"
ciborium = "0.2"
claims = "0.7"
-clap = { version = "4.3.9", features = ["derive", "env", "unstable-styles"] }
+clap = { version = "4.3.9", features = ["derive", "env", "unstable-styles", "wrap_help"] }
clap-verbosity-flag = "2.1.1"
clap_complete = "4.4.1"
cloud-storage = { version = "0.11.1", features = [
@@ -576,6 +578,7 @@ fail = "0.5.0"
ff = { version = "0.13", features = ["derive"] }
field_count = "0.1.1"
file_diff = "1.0.0"
+firestore = "0.43.0"
fixed = "1.25.1"
flate2 = "1.0.24"
flexi_logger = "0.27.4"
@@ -613,7 +616,7 @@ indoc = "1.0.6"
inferno = "0.11.14"
internment = { version = "0.5.0", features = ["arc"] }
ipnet = "2.5.0"
-itertools = "0.12"
+itertools = "0.13"
jemallocator = { version = "0.5.0", features = [
"profiling",
"unprefixed_malloc_on_supported_platforms",
@@ -647,7 +650,6 @@ num_cpus = "1.13.1"
num-derive = "0.3.3"
num-integer = "0.1.42"
num-traits = "0.2.15"
-number_range = "0.3.2"
once_cell = "1.10.0"
ordered-float = "3.9.1"
ouroboros = "0.15.6"
@@ -669,9 +671,10 @@ percent-encoding = "2.1.0"
petgraph = "0.5.1"
pin-project = "1.0.10"
plotters = { version = "0.3.5", default-features = false }
-poem = { version = "=1.3.59", features = ["anyhow", "rustls"] }
-poem-openapi = { version = "=2.0.11", features = ["swagger-ui", "url"] }
-poem-openapi-derive = "=2.0.11"
+# We're using git deps until https://github.com/poem-web/poem/pull/829 gets formally released.
+poem = { git = "https://github.com/poem-web/poem.git", rev = "809b2816d3504beeba140fef3fdfe9432d654c5b", features = ["anyhow", "rustls"] }
+poem-openapi = { git = "https://github.com/poem-web/poem.git", rev = "809b2816d3504beeba140fef3fdfe9432d654c5b", features = ["swagger-ui", "url"] }
+poem-openapi-derive = { git = "https://github.com/poem-web/poem.git", rev = "809b2816d3504beeba140fef3fdfe9432d654c5b" }
poseidon-ark = { git = "https://github.com/arnaucube/poseidon-ark.git", rev = "6d2487aa1308d9d3860a2b724c485d73095c1c68" }
pprof = { version = "0.11", features = ["flamegraph", "protobuf-codec"] }
pretty = "0.10.0"
@@ -705,6 +708,7 @@ reqwest = { version = "0.11.11", features = [
"blocking",
"cookies",
"json",
+ "multipart",
"stream",
] }
reqwest-middleware = "0.2.0"
diff --git a/api/Cargo.toml b/api/Cargo.toml
index c037526d47d02..fcc5efdca74ec 100644
--- a/api/Cargo.toml
+++ b/api/Cargo.toml
@@ -28,13 +28,11 @@ aptos-runtimes = { workspace = true }
aptos-storage-interface = { workspace = true }
aptos-types = { workspace = true }
aptos-vm = { workspace = true }
-async-trait = { workspace = true }
bcs = { workspace = true }
bytes = { workspace = true }
fail = { workspace = true }
futures = { workspace = true }
hex = { workspace = true }
-hyper = { workspace = true }
itertools = { workspace = true }
mime = { workspace = true }
mini-moka = { workspace = true }
diff --git a/api/doc/CHANGELOG.md b/api/doc/CHANGELOG.md
index 440c4161df200..53e0caca35421 100644
--- a/api/doc/CHANGELOG.md
+++ b/api/doc/CHANGELOG.md
@@ -5,7 +5,7 @@ All notable changes to the Supra Node API will be captured in this file. This ch
**Note**: The Supra Node API does not follow semantic version while we are in active development. Instead, breaking changes will be announced with each devnet cut. Once we launch our mainnet, the API will follow semantic versioning closely.
## Unreleased
-N/A
+- OpenAPI layout changed slightly in some enum cases, see [#13929](https://github.com/aptos-labs/aptos-core/pull/13929) for more information.
## 1.2.0 (2022-09-29)
- **[Breaking Changes]** Following the deprecation notice from the previous release, the following breaking changes have landed in this release. Please see the notes from last release for information on the new endpoints you must migrate to:
diff --git a/api/doc/spec.html b/api/doc/spec.html
index 99f0632e278ee..6a07046200dd6 100644
--- a/api/doc/spec.html
+++ b/api/doc/spec.html
@@ -4,7 +4,7 @@
-
Aptos REST API
+ Aptos Node API
diff --git a/api/doc/spec.json b/api/doc/spec.json
index d36e4a6a0100d..bf944fc8e7000 100644
--- a/api/doc/spec.json
+++ b/api/doc/spec.json
@@ -13968,6 +13968,9 @@
},
{
"$ref": "#/components/schemas/AccountSignature_MultiKeySignature"
+ },
+ {
+ "$ref": "#/components/schemas/AccountSignature_NoAccountSignature"
}
],
"discriminator": {
@@ -13976,7 +13979,8 @@
"ed25519_signature": "#/components/schemas/AccountSignature_Ed25519Signature",
"multi_ed25519_signature": "#/components/schemas/AccountSignature_MultiEd25519Signature",
"single_key_signature": "#/components/schemas/AccountSignature_SingleKeySignature",
- "multi_key_signature": "#/components/schemas/AccountSignature_MultiKeySignature"
+ "multi_key_signature": "#/components/schemas/AccountSignature_MultiKeySignature",
+ "no_account_signature": "#/components/schemas/AccountSignature_NoAccountSignature"
}
}
},
@@ -13990,6 +13994,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "ed25519_signature"
+ ],
"example": "ed25519_signature"
}
}
@@ -14009,6 +14016,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "multi_ed25519_signature"
+ ],
"example": "multi_ed25519_signature"
}
}
@@ -14028,6 +14038,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "multi_key_signature"
+ ],
"example": "multi_key_signature"
}
}
@@ -14037,6 +14050,28 @@
}
]
},
+ "AccountSignature_NoAccountSignature": {
+ "allOf": [
+ {
+ "type": "object",
+ "required": [
+ "type"
+ ],
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "no_account_signature"
+ ],
+ "example": "no_account_signature"
+ }
+ }
+ },
+ {
+ "$ref": "#/components/schemas/NoAccountSignature"
+ }
+ ]
+ },
"AccountSignature_SingleKeySignature": {
"allOf": [
{
@@ -14047,6 +14082,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "single_key_signature"
+ ],
"example": "single_key_signature"
}
}
@@ -14743,6 +14781,17 @@
}
}
},
+ "FederatedKeyless": {
+ "type": "object",
+ "required": [
+ "value"
+ ],
+ "properties": {
+ "value": {
+ "$ref": "#/components/schemas/HexEncodedBytes"
+ }
+ }
+ },
"FeePayerSignature": {
"type": "object",
"description": "Fee payer signature for fee payer transactions\n\nThis allows you to have transactions across multiple accounts and with a fee payer",
@@ -14842,6 +14891,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "write_set_payload"
+ ],
"example": "write_set_payload"
}
}
@@ -15267,6 +15319,7 @@
"required": [
"name",
"is_native",
+ "is_event",
"abilities",
"generic_type_params",
"fields"
@@ -15279,6 +15332,10 @@
"type": "boolean",
"description": "Whether the struct is a native struct of Move"
},
+ "is_event": {
+ "type": "boolean",
+ "description": "Whether the struct is marked with the #[event] annotation"
+ },
"abilities": {
"type": "array",
"description": "Abilities associated with the struct",
@@ -15539,6 +15596,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "entry_function_payload"
+ ],
"example": "entry_function_payload"
}
}
@@ -15548,6 +15608,10 @@
}
]
},
+ "NoAccountSignature": {
+ "type": "object",
+ "description": "A placeholder to represent the absence of account signature"
+ },
"PendingTransaction": {
"type": "object",
"description": "A transaction waiting in mempool",
@@ -15601,6 +15665,9 @@
},
{
"$ref": "#/components/schemas/PublicKey_Keyless"
+ },
+ {
+ "$ref": "#/components/schemas/PublicKey_FederatedKeyless"
}
],
"discriminator": {
@@ -15609,7 +15676,8 @@
"ed25519": "#/components/schemas/PublicKey_Ed25519",
"secp256k1_ecdsa": "#/components/schemas/PublicKey_Secp256k1Ecdsa",
"secp256r1_ecdsa": "#/components/schemas/PublicKey_Secp256r1Ecdsa",
- "keyless": "#/components/schemas/PublicKey_Keyless"
+ "keyless": "#/components/schemas/PublicKey_Keyless",
+ "federated_keyless": "#/components/schemas/PublicKey_FederatedKeyless"
}
}
},
@@ -15623,6 +15691,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "ed25519"
+ ],
"example": "ed25519"
}
}
@@ -15632,6 +15703,28 @@
}
]
},
+ "PublicKey_FederatedKeyless": {
+ "allOf": [
+ {
+ "type": "object",
+ "required": [
+ "type"
+ ],
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "federated_keyless"
+ ],
+ "example": "federated_keyless"
+ }
+ }
+ },
+ {
+ "$ref": "#/components/schemas/FederatedKeyless"
+ }
+ ]
+ },
"PublicKey_Keyless": {
"allOf": [
{
@@ -15642,6 +15735,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "keyless"
+ ],
"example": "keyless"
}
}
@@ -15661,6 +15757,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "secp256k1_ecdsa"
+ ],
"example": "secp256k1_ecdsa"
}
}
@@ -15680,6 +15779,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "secp256r1_ecdsa"
+ ],
"example": "secp256r1_ecdsa"
}
}
@@ -15835,6 +15937,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "ed25519"
+ ],
"example": "ed25519"
}
}
@@ -15854,6 +15959,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "keyless"
+ ],
"example": "keyless"
}
}
@@ -15873,6 +15981,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "secp256k1_ecdsa"
+ ],
"example": "secp256k1_ecdsa"
}
}
@@ -15892,6 +16003,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "web_authn"
+ ],
"example": "web_authn"
}
}
@@ -16111,6 +16225,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "module_bundle_payload"
+ ],
"example": "module_bundle_payload"
}
}
@@ -16130,6 +16247,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "entry_function_payload"
+ ],
"example": "entry_function_payload"
}
}
@@ -16149,6 +16269,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "multisig_payload"
+ ],
"example": "multisig_payload"
}
}
@@ -16168,6 +16291,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "script_payload"
+ ],
"example": "script_payload"
}
}
@@ -16218,6 +16344,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "single_sender"
+ ],
"example": "single_sender"
}
}
@@ -16237,6 +16366,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "ed25519_signature"
+ ],
"example": "ed25519_signature"
}
}
@@ -16256,6 +16388,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "fee_payer_signature"
+ ],
"example": "fee_payer_signature"
}
}
@@ -16275,6 +16410,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "multi_agent_signature"
+ ],
"example": "multi_agent_signature"
}
}
@@ -16294,6 +16432,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "multi_ed25519_signature"
+ ],
"example": "multi_ed25519_signature"
}
}
@@ -16313,6 +16454,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "block_epilogue_transaction"
+ ],
"example": "block_epilogue_transaction"
}
}
@@ -16332,6 +16476,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "block_metadata_transaction"
+ ],
"example": "block_metadata_transaction"
}
}
@@ -16351,6 +16498,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "genesis_transaction"
+ ],
"example": "genesis_transaction"
}
}
@@ -16370,6 +16520,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "pending_transaction"
+ ],
"example": "pending_transaction"
}
}
@@ -16389,6 +16542,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "state_checkpoint_transaction"
+ ],
"example": "state_checkpoint_transaction"
}
}
@@ -16408,6 +16564,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "user_transaction"
+ ],
"example": "user_transaction"
}
}
@@ -16427,6 +16586,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "validator_transaction"
+ ],
"example": "validator_transaction"
}
}
@@ -16632,6 +16794,9 @@
"properties": {
"validator_transaction_type": {
"type": "string",
+ "enum": [
+ "dkg_result"
+ ],
"example": "dkg_result"
}
}
@@ -16651,6 +16816,9 @@
"properties": {
"validator_transaction_type": {
"type": "string",
+ "enum": [
+ "observed_jwk_update"
+ ],
"example": "observed_jwk_update"
}
}
@@ -16831,6 +16999,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "delete_module"
+ ],
"example": "delete_module"
}
}
@@ -16850,6 +17021,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "delete_resource"
+ ],
"example": "delete_resource"
}
}
@@ -16869,6 +17043,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "delete_table_item"
+ ],
"example": "delete_table_item"
}
}
@@ -16888,6 +17065,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "write_module"
+ ],
"example": "write_module"
}
}
@@ -16907,6 +17087,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "write_resource"
+ ],
"example": "write_resource"
}
}
@@ -16926,6 +17109,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "write_table_item"
+ ],
"example": "write_table_item"
}
}
@@ -16957,6 +17143,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "direct_write_set"
+ ],
"example": "direct_write_set"
}
}
@@ -16976,6 +17165,9 @@
"properties": {
"type": {
"type": "string",
+ "enum": [
+ "script_write_set"
+ ],
"example": "script_write_set"
}
}
diff --git a/api/doc/spec.yaml b/api/doc/spec.yaml
index 9e22e463b078d..a515d33940b19 100644
--- a/api/doc/spec.yaml
+++ b/api/doc/spec.yaml
@@ -10453,6 +10453,7 @@ components:
- $ref: '#/components/schemas/AccountSignature_MultiEd25519Signature'
- $ref: '#/components/schemas/AccountSignature_SingleKeySignature'
- $ref: '#/components/schemas/AccountSignature_MultiKeySignature'
+ - $ref: '#/components/schemas/AccountSignature_NoAccountSignature'
discriminator:
propertyName: type
mapping:
@@ -10460,6 +10461,7 @@ components:
multi_ed25519_signature: '#/components/schemas/AccountSignature_MultiEd25519Signature'
single_key_signature: '#/components/schemas/AccountSignature_SingleKeySignature'
multi_key_signature: '#/components/schemas/AccountSignature_MultiKeySignature'
+ no_account_signature: '#/components/schemas/AccountSignature_NoAccountSignature'
AccountSignature_Ed25519Signature:
allOf:
- type: object
@@ -10468,6 +10470,8 @@ components:
properties:
type:
type: string
+ enum:
+ - ed25519_signature
example: ed25519_signature
- $ref: '#/components/schemas/Ed25519Signature'
AccountSignature_MultiEd25519Signature:
@@ -10478,6 +10482,8 @@ components:
properties:
type:
type: string
+ enum:
+ - multi_ed25519_signature
example: multi_ed25519_signature
- $ref: '#/components/schemas/MultiEd25519Signature'
AccountSignature_MultiKeySignature:
@@ -10488,8 +10494,22 @@ components:
properties:
type:
type: string
+ enum:
+ - multi_key_signature
example: multi_key_signature
- $ref: '#/components/schemas/MultiKeySignature'
+ AccountSignature_NoAccountSignature:
+ allOf:
+ - type: object
+ required:
+ - type
+ properties:
+ type:
+ type: string
+ enum:
+ - no_account_signature
+ example: no_account_signature
+ - $ref: '#/components/schemas/NoAccountSignature'
AccountSignature_SingleKeySignature:
allOf:
- type: object
@@ -10498,6 +10518,8 @@ components:
properties:
type:
type: string
+ enum:
+ - single_key_signature
example: single_key_signature
- $ref: '#/components/schemas/SingleKeySignature'
Address:
@@ -11022,6 +11044,13 @@ components:
$ref: '#/components/schemas/ExportedProviderJWKs'
multi_sig:
$ref: '#/components/schemas/ExportedAggregateSignature'
+ FederatedKeyless:
+ type: object
+ required:
+ - value
+ properties:
+ value:
+ $ref: '#/components/schemas/HexEncodedBytes'
FeePayerSignature:
type: object
description: |-
@@ -11090,6 +11119,8 @@ components:
properties:
type:
type: string
+ enum:
+ - write_set_payload
example: write_set_payload
- $ref: '#/components/schemas/WriteSetPayload'
GenesisTransaction:
@@ -11409,6 +11440,7 @@ components:
required:
- name
- is_native
+ - is_event
- abilities
- generic_type_params
- fields
@@ -11418,6 +11450,9 @@ components:
is_native:
type: boolean
description: Whether the struct is a native struct of Move
+ is_event:
+ type: boolean
+ description: 'Whether the struct is marked with the #[event] annotation'
abilities:
type: array
description: Abilities associated with the struct
@@ -11677,8 +11712,13 @@ components:
properties:
type:
type: string
+ enum:
+ - entry_function_payload
example: entry_function_payload
- $ref: '#/components/schemas/EntryFunctionPayload'
+ NoAccountSignature:
+ type: object
+ description: A placeholder to represent the absence of account signature
PendingTransaction:
type: object
description: A transaction waiting in mempool
@@ -11714,6 +11754,7 @@ components:
- $ref: '#/components/schemas/PublicKey_Secp256k1Ecdsa'
- $ref: '#/components/schemas/PublicKey_Secp256r1Ecdsa'
- $ref: '#/components/schemas/PublicKey_Keyless'
+ - $ref: '#/components/schemas/PublicKey_FederatedKeyless'
discriminator:
propertyName: type
mapping:
@@ -11721,6 +11762,7 @@ components:
secp256k1_ecdsa: '#/components/schemas/PublicKey_Secp256k1Ecdsa'
secp256r1_ecdsa: '#/components/schemas/PublicKey_Secp256r1Ecdsa'
keyless: '#/components/schemas/PublicKey_Keyless'
+ federated_keyless: '#/components/schemas/PublicKey_FederatedKeyless'
PublicKey_Ed25519:
allOf:
- type: object
@@ -11729,8 +11771,22 @@ components:
properties:
type:
type: string
+ enum:
+ - ed25519
example: ed25519
- $ref: '#/components/schemas/Ed25519'
+ PublicKey_FederatedKeyless:
+ allOf:
+ - type: object
+ required:
+ - type
+ properties:
+ type:
+ type: string
+ enum:
+ - federated_keyless
+ example: federated_keyless
+ - $ref: '#/components/schemas/FederatedKeyless'
PublicKey_Keyless:
allOf:
- type: object
@@ -11739,6 +11795,8 @@ components:
properties:
type:
type: string
+ enum:
+ - keyless
example: keyless
- $ref: '#/components/schemas/Keyless'
PublicKey_Secp256k1Ecdsa:
@@ -11749,6 +11807,8 @@ components:
properties:
type:
type: string
+ enum:
+ - secp256k1_ecdsa
example: secp256k1_ecdsa
- $ref: '#/components/schemas/Secp256k1Ecdsa'
PublicKey_Secp256r1Ecdsa:
@@ -11759,6 +11819,8 @@ components:
properties:
type:
type: string
+ enum:
+ - secp256r1_ecdsa
example: secp256r1_ecdsa
- $ref: '#/components/schemas/Secp256r1Ecdsa'
RSA_JWK:
@@ -11861,6 +11923,8 @@ components:
properties:
type:
type: string
+ enum:
+ - ed25519
example: ed25519
- $ref: '#/components/schemas/Ed25519'
Signature_Keyless:
@@ -11871,6 +11935,8 @@ components:
properties:
type:
type: string
+ enum:
+ - keyless
example: keyless
- $ref: '#/components/schemas/Keyless'
Signature_Secp256k1Ecdsa:
@@ -11881,6 +11947,8 @@ components:
properties:
type:
type: string
+ enum:
+ - secp256k1_ecdsa
example: secp256k1_ecdsa
- $ref: '#/components/schemas/Secp256k1Ecdsa'
Signature_WebAuthn:
@@ -11891,6 +11959,8 @@ components:
properties:
type:
type: string
+ enum:
+ - web_authn
example: web_authn
- $ref: '#/components/schemas/WebAuthn'
SingleKeySignature:
@@ -12038,6 +12108,8 @@ components:
properties:
type:
type: string
+ enum:
+ - module_bundle_payload
example: module_bundle_payload
- $ref: '#/components/schemas/DeprecatedModuleBundlePayload'
TransactionPayload_EntryFunctionPayload:
@@ -12048,6 +12120,8 @@ components:
properties:
type:
type: string
+ enum:
+ - entry_function_payload
example: entry_function_payload
- $ref: '#/components/schemas/EntryFunctionPayload'
TransactionPayload_MultisigPayload:
@@ -12058,6 +12132,8 @@ components:
properties:
type:
type: string
+ enum:
+ - multisig_payload
example: multisig_payload
- $ref: '#/components/schemas/MultisigPayload'
TransactionPayload_ScriptPayload:
@@ -12068,6 +12144,8 @@ components:
properties:
type:
type: string
+ enum:
+ - script_payload
example: script_payload
- $ref: '#/components/schemas/ScriptPayload'
TransactionSignature:
@@ -12095,6 +12173,8 @@ components:
properties:
type:
type: string
+ enum:
+ - single_sender
example: single_sender
- $ref: '#/components/schemas/AccountSignature'
TransactionSignature_Ed25519Signature:
@@ -12105,6 +12185,8 @@ components:
properties:
type:
type: string
+ enum:
+ - ed25519_signature
example: ed25519_signature
- $ref: '#/components/schemas/Ed25519Signature'
TransactionSignature_FeePayerSignature:
@@ -12115,6 +12197,8 @@ components:
properties:
type:
type: string
+ enum:
+ - fee_payer_signature
example: fee_payer_signature
- $ref: '#/components/schemas/FeePayerSignature'
TransactionSignature_MultiAgentSignature:
@@ -12125,6 +12209,8 @@ components:
properties:
type:
type: string
+ enum:
+ - multi_agent_signature
example: multi_agent_signature
- $ref: '#/components/schemas/MultiAgentSignature'
TransactionSignature_MultiEd25519Signature:
@@ -12135,6 +12221,8 @@ components:
properties:
type:
type: string
+ enum:
+ - multi_ed25519_signature
example: multi_ed25519_signature
- $ref: '#/components/schemas/MultiEd25519Signature'
Transaction_BlockEpilogueTransaction:
@@ -12145,6 +12233,8 @@ components:
properties:
type:
type: string
+ enum:
+ - block_epilogue_transaction
example: block_epilogue_transaction
- $ref: '#/components/schemas/BlockEpilogueTransaction'
Transaction_BlockMetadataTransaction:
@@ -12155,6 +12245,8 @@ components:
properties:
type:
type: string
+ enum:
+ - block_metadata_transaction
example: block_metadata_transaction
- $ref: '#/components/schemas/BlockMetadataTransaction'
Transaction_GenesisTransaction:
@@ -12165,6 +12257,8 @@ components:
properties:
type:
type: string
+ enum:
+ - genesis_transaction
example: genesis_transaction
- $ref: '#/components/schemas/GenesisTransaction'
Transaction_PendingTransaction:
@@ -12175,6 +12269,8 @@ components:
properties:
type:
type: string
+ enum:
+ - pending_transaction
example: pending_transaction
- $ref: '#/components/schemas/PendingTransaction'
Transaction_StateCheckpointTransaction:
@@ -12185,6 +12281,8 @@ components:
properties:
type:
type: string
+ enum:
+ - state_checkpoint_transaction
example: state_checkpoint_transaction
- $ref: '#/components/schemas/StateCheckpointTransaction'
Transaction_UserTransaction:
@@ -12195,6 +12293,8 @@ components:
properties:
type:
type: string
+ enum:
+ - user_transaction
example: user_transaction
- $ref: '#/components/schemas/UserTransaction'
Transaction_ValidatorTransaction:
@@ -12205,6 +12305,8 @@ components:
properties:
type:
type: string
+ enum:
+ - validator_transaction
example: validator_transaction
- $ref: '#/components/schemas/ValidatorTransaction'
TransactionsBatchSingleSubmissionFailure:
@@ -12366,6 +12468,8 @@ components:
properties:
validator_transaction_type:
type: string
+ enum:
+ - dkg_result
example: dkg_result
- $ref: '#/components/schemas/DKGResultTransaction'
ValidatorTransaction_JWKUpdateTransaction:
@@ -12376,6 +12480,8 @@ components:
properties:
validator_transaction_type:
type: string
+ enum:
+ - observed_jwk_update
example: observed_jwk_update
- $ref: '#/components/schemas/JWKUpdateTransaction'
VersionedEvent:
@@ -12492,6 +12598,8 @@ components:
properties:
type:
type: string
+ enum:
+ - delete_module
example: delete_module
- $ref: '#/components/schemas/DeleteModule'
WriteSetChange_DeleteResource:
@@ -12502,6 +12610,8 @@ components:
properties:
type:
type: string
+ enum:
+ - delete_resource
example: delete_resource
- $ref: '#/components/schemas/DeleteResource'
WriteSetChange_DeleteTableItem:
@@ -12512,6 +12622,8 @@ components:
properties:
type:
type: string
+ enum:
+ - delete_table_item
example: delete_table_item
- $ref: '#/components/schemas/DeleteTableItem'
WriteSetChange_WriteModule:
@@ -12522,6 +12634,8 @@ components:
properties:
type:
type: string
+ enum:
+ - write_module
example: write_module
- $ref: '#/components/schemas/WriteModule'
WriteSetChange_WriteResource:
@@ -12532,6 +12646,8 @@ components:
properties:
type:
type: string
+ enum:
+ - write_resource
example: write_resource
- $ref: '#/components/schemas/WriteResource'
WriteSetChange_WriteTableItem:
@@ -12542,6 +12658,8 @@ components:
properties:
type:
type: string
+ enum:
+ - write_table_item
example: write_table_item
- $ref: '#/components/schemas/WriteTableItem'
WriteSetPayload:
@@ -12560,6 +12678,8 @@ components:
properties:
type:
type: string
+ enum:
+ - direct_write_set
example: direct_write_set
- $ref: '#/components/schemas/DirectWriteSet'
WriteSet_ScriptWriteSet:
@@ -12570,6 +12690,8 @@ components:
properties:
type:
type: string
+ enum:
+ - script_write_set
example: script_write_set
- $ref: '#/components/schemas/ScriptWriteSet'
WriteTableItem:
diff --git a/api/goldens/aptos_api__tests__state_test__test_get_account_module.json b/api/goldens/aptos_api__tests__state_test__test_get_account_module.json
index d830872f6c3f2..37c8ff52436ac 100644
--- a/api/goldens/aptos_api__tests__state_test__test_get_account_module.json
+++ b/api/goldens/aptos_api__tests__state_test__test_get_account_module.json
@@ -120,6 +120,7 @@
{
"name": "GUID",
"is_native": false,
+ "is_event": false,
"abilities": [
"drop",
"store"
@@ -135,6 +136,7 @@
{
"name": "ID",
"is_native": false,
+ "is_event": false,
"abilities": [
"copy",
"drop",
diff --git a/api/goldens/aptos_api__tests__view_function__test_simple_view_invalid.json b/api/goldens/aptos_api__tests__view_function__test_simple_view_invalid.json
index 0c0dbfce4633d..7d32adc125baa 100644
--- a/api/goldens/aptos_api__tests__view_function__test_simple_view_invalid.json
+++ b/api/goldens/aptos_api__tests__view_function__test_simple_view_invalid.json
@@ -1 +1 @@
-{"message":"PartialVMError with status INVALID_MAIN_FUNCTION_SIGNATURE and message function not marked as view function","error_code":"invalid_input","vm_error_code":null}
\ No newline at end of file
+{"message":"PartialVMError with status INVALID_MAIN_FUNCTION_SIGNATURE and message 'function not marked as view function'","error_code":"invalid_input","vm_error_code":null}
\ No newline at end of file
diff --git a/api/openapi-spec-generator/src/main.rs b/api/openapi-spec-generator/src/main.rs
index bfad65df7d813..cc608e6edce62 100644
--- a/api/openapi-spec-generator/src/main.rs
+++ b/api/openapi-spec-generator/src/main.rs
@@ -4,7 +4,7 @@
mod fake_context;
use anyhow::Result;
-use aptos_api::get_api_service;
+use aptos_api::{get_api_service, spec::get_spec};
use clap::{Parser, ValueEnum};
use fake_context::get_fake_context;
use std::{path::PathBuf, sync::Arc};
@@ -49,9 +49,10 @@ pub fn main() -> Result<()> {
let api_service = get_api_service(Arc::new(get_fake_context()));
let spec = match args.output_args.format {
- OutputFormat::Json => api_service.spec(),
- OutputFormat::Yaml => api_service.spec_yaml(),
+ OutputFormat::Json => get_spec(&api_service, false),
+ OutputFormat::Yaml => get_spec(&api_service, true),
};
+
args.output_args.write(&spec)
}
diff --git a/api/src/accept_type.rs b/api/src/accept_type.rs
index e4ca0eb085100..1a0d900988405 100644
--- a/api/src/accept_type.rs
+++ b/api/src/accept_type.rs
@@ -17,7 +17,6 @@ pub enum AcceptType {
/// This impl allows us to get the data straight from the arguments to the
/// endpoint handler.
-#[async_trait::async_trait]
impl<'a> FromRequest<'a> for AcceptType {
async fn from_request(request: &'a Request, _body: &mut RequestBody) -> Result {
let accept = Accept::from_request_without_body(request).await?;
diff --git a/api/src/accounts.rs b/api/src/accounts.rs
index 1f597ce8552e1..d94454f6b34e3 100644
--- a/api/src/accounts.rs
+++ b/api/src/accounts.rs
@@ -183,7 +183,7 @@ pub struct Account {
/// Address of account
address: Address,
/// Lookup ledger version
- ledger_version: u64,
+ pub ledger_version: u64,
/// Where to start for pagination
start: Option,
/// Max number of items to retrieve
@@ -193,8 +193,6 @@ pub struct Account {
}
impl Account {
- /// Creates a new account struct and determines the current ledger info, and determines the
- /// ledger version to query
pub fn new(
context: Arc,
address: Address,
@@ -202,8 +200,7 @@ impl Account {
start: Option,
limit: Option,
) -> Result {
- // Use the latest ledger version, or the requested associated version
- let (latest_ledger_info, requested_ledger_version) = context
+ let (latest_ledger_info, requested_version) = context
.get_latest_ledger_info_and_verify_lookup_version(
requested_ledger_version.map(|inner| inner.0),
)?;
@@ -211,7 +208,7 @@ impl Account {
Ok(Self {
context,
address,
- ledger_version: requested_ledger_version,
+ ledger_version: requested_version,
start,
limit,
latest_ledger_info,
@@ -471,7 +468,7 @@ impl Account {
})?;
// Find the resource and retrieve the struct field
- let resource = self.find_resource(&struct_tag)?;
+ let (_, resource) = self.find_resource(&struct_tag)?;
let (_id, value) = resource
.into_iter()
.find(|(id, _)| id == &field_name)
@@ -511,12 +508,19 @@ impl Account {
Ok(*event_handle.key())
}
- /// Find a resource associated with an account
+ /// Find a resource associated with an account. If the resource is an enum variant,
+ /// returns the variant name in the option.
fn find_resource(
&self,
resource_type: &StructTag,
- ) -> Result, BasicErrorWith404> {
- let (ledger_info, ledger_version, state_view) =
+ ) -> Result<
+ (
+ Option,
+ Vec<(Identifier, move_core_types::value::MoveValue)>,
+ ),
+ BasicErrorWith404,
+ > {
+ let (ledger_info, requested_ledger_version, state_view) =
self.context.state_view(Some(self.ledger_version))?;
let bytes = state_view
@@ -534,7 +538,12 @@ impl Account {
)
})?
.ok_or_else(|| {
- resource_not_found(self.address, resource_type, ledger_version, &ledger_info)
+ resource_not_found(
+ self.address,
+ resource_type,
+ requested_ledger_version,
+ &ledger_info,
+ )
})?;
state_view
diff --git a/api/src/basic.rs b/api/src/basic.rs
index 0dc9ff170243d..d6fed2dd70e3f 100644
--- a/api/src/basic.rs
+++ b/api/src/basic.rs
@@ -87,12 +87,10 @@ impl BasicApi {
let ledger_info = api_spawn_blocking(move || context.get_latest_ledger_info()).await?;
// If we have a duration, check that it's close to the current time, otherwise it's ok
- if let Some(duration) = duration_secs.0 {
- let timestamp = ledger_info.timestamp();
-
- let timestamp = Duration::from_micros(timestamp);
- let expectation = SystemTime::now()
- .sub(Duration::from_secs(duration as u64))
+ if let Some(max_skew) = duration_secs.0 {
+ let ledger_timestamp = Duration::from_micros(ledger_info.timestamp());
+ let skew_threshold = SystemTime::now()
+ .sub(Duration::from_secs(max_skew as u64))
.duration_since(UNIX_EPOCH)
.context("Failed to determine absolute unix time based on given duration")
.map_err(|err| {
@@ -103,9 +101,9 @@ impl BasicApi {
)
})?;
- if timestamp < expectation {
+ if ledger_timestamp < skew_threshold {
return Err(HealthCheckError::service_unavailable_with_code(
- "The latest ledger info timestamp is less than the expected timestamp",
+ format!("The latest ledger info timestamp is {:?}, which is beyond the allowed skew ({}s).", ledger_timestamp, max_skew),
AptosErrorCode::HealthCheckFailed,
&ledger_info,
));
diff --git a/api/src/bcs_payload.rs b/api/src/bcs_payload.rs
index 52ad783690bba..422037d817781 100644
--- a/api/src/bcs_payload.rs
+++ b/api/src/bcs_payload.rs
@@ -49,12 +49,11 @@ impl Payload for Bcs {
}
}
-#[poem::async_trait]
impl ParsePayload for Bcs {
const IS_REQUIRED: bool = true;
async fn from_request(request: &Request, body: &mut RequestBody) -> Result {
- let data: Vec = FromRequest::from_request(request, body).await?;
+ let data = Vec::::from_request(request, body).await?;
Ok(Self(data))
}
}
diff --git a/api/src/check_size.rs b/api/src/check_size.rs
index 9b3de83b8c145..4f6f1d35e0d19 100644
--- a/api/src/check_size.rs
+++ b/api/src/check_size.rs
@@ -1,9 +1,9 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0
-use hyper::Method;
use poem::{
error::SizedLimitError,
+ http::Method,
web::headers::{self, HeaderMapExt},
Endpoint, Middleware, Request, Result,
};
@@ -37,7 +37,6 @@ pub struct PostSizeLimitEndpoint {
max_size: u64,
}
-#[async_trait::async_trait]
impl Endpoint for PostSizeLimitEndpoint {
type Output = E::Output;
diff --git a/api/src/context.rs b/api/src/context.rs
index a077845cb0b63..4cea588b9906a 100644
--- a/api/src/context.rs
+++ b/api/src/context.rs
@@ -16,20 +16,19 @@ use aptos_api_types::{
AptosErrorCode, AsConverter, BcsBlock, GasEstimation, LedgerInfo, ResourceGroup,
TransactionOnChainData,
};
-use aptos_config::config::{NodeConfig, RoleType};
+use aptos_config::config::{GasEstimationConfig, NodeConfig, RoleType};
use aptos_crypto::HashValue;
use aptos_gas_schedule::{AptosGasParameters, FromOnChainGasSchedule};
use aptos_logger::{error, info, Schema};
use aptos_mempool::{MempoolClientRequest, MempoolClientSender, SubmissionStatus};
use aptos_storage_interface::{
state_view::{DbStateView, DbStateViewAtVersion, LatestDbStateCheckpointView},
- DbReader, Order, MAX_REQUEST_LIMIT,
+ AptosDbError, DbReader, Order, MAX_REQUEST_LIMIT,
};
use aptos_types::{
access_path::{AccessPath, Path},
account_address::AccountAddress,
account_config::{AccountResource, NewBlockEvent},
- block_executor::config::BlockExecutorConfigFromOnchain,
chain_id::ChainId,
contract_event::EventWithVersion,
event::EventKey,
@@ -42,7 +41,9 @@ use aptos_types::{
TStateView,
},
transaction::{
- block_epilogue::BlockEndInfo, SignedTransaction, Transaction, TransactionWithProof, Version,
+ block_epilogue::BlockEndInfo,
+ use_case::{UseCaseAwareTransaction, UseCaseKey},
+ SignedTransaction, Transaction, TransactionWithProof, Version,
},
};
use futures::{channel::oneshot, SinkExt};
@@ -124,8 +125,7 @@ impl Context {
})),
gas_limit_cache: Arc::new(RwLock::new(GasLimitCache {
last_updated_epoch: None,
- block_executor_onchain_config: OnChainExecutionConfig::default_if_missing()
- .block_executor_onchain_config(),
+ execution_onchain_config: OnChainExecutionConfig::default_if_missing(),
})),
view_function_stats,
simulate_txn_stats,
@@ -221,20 +221,26 @@ impl Context {
.map_err(|e| e.into())
}
- pub fn get_latest_ledger_info(&self) -> Result {
+ pub fn get_oldest_version_and_block_height(
+ &self,
+ ) -> Result<(Version, u64), E> {
+ self.db
+ .get_first_viable_block()
+ .context("Failed to retrieve oldest block information")
+ .map_err(|e| E::service_unavailable_with_code_no_info(e, AptosErrorCode::InternalError))
+ }
+
+ pub fn get_latest_storage_ledger_info(
+ &self,
+ ) -> Result {
let ledger_info = self
.get_latest_ledger_info_with_signatures()
.context("Failed to retrieve latest ledger info")
.map_err(|e| {
E::service_unavailable_with_code_no_info(e, AptosErrorCode::InternalError)
})?;
- let (oldest_version, oldest_block_height) = self
- .db
- .get_first_viable_block()
- .context("Failed to retrieve oldest block information")
- .map_err(|e| {
- E::service_unavailable_with_code_no_info(e, AptosErrorCode::InternalError)
- })?;
+
+ let (oldest_version, oldest_block_height) = self.get_oldest_version_and_block_height()?;
let (_, _, newest_block_event) = self
.db
.get_block_info_by_version(ledger_info.ledger_info().version())
@@ -252,6 +258,15 @@ impl Context {
))
}
+ pub fn get_latest_ledger_info(&self) -> Result {
+ if let Some(indexer_reader) = self.indexer_reader.as_ref() {
+ if indexer_reader.is_internal_indexer_enabled() {
+ return self.get_latest_internal_indexer_ledger_info();
+ }
+ }
+ self.get_latest_storage_ledger_info()
+ }
+
pub fn get_latest_ledger_info_and_verify_lookup_version(
&self,
requested_ledger_version: Option,
@@ -277,6 +292,45 @@ impl Context {
Ok((latest_ledger_info, requested_ledger_version))
}
+ pub fn get_latest_internal_indexer_ledger_info(
+ &self,
+ ) -> Result {
+ if let Some(indexer_reader) = self.indexer_reader.as_ref() {
+ if let Some(latest_version) = indexer_reader
+ .get_latest_internal_indexer_ledger_version()
+ .map_err(|err| {
+ E::service_unavailable_with_code_no_info(err, AptosErrorCode::InternalError)
+ })?
+ {
+ let (_, _, new_block_event) = self
+ .db
+ .get_block_info_by_version(latest_version)
+ .map_err(|_| {
+ E::service_unavailable_with_code_no_info(
+ "Failed to get block",
+ AptosErrorCode::InternalError,
+ )
+ })?;
+ let (oldest_version, oldest_block_height) =
+ self.get_oldest_version_and_block_height()?;
+ return Ok(LedgerInfo::new_ledger_info(
+ &self.chain_id(),
+ new_block_event.epoch(),
+ latest_version,
+ oldest_version,
+ oldest_block_height,
+ new_block_event.height(),
+ new_block_event.proposed_time(),
+ ));
+ }
+ }
+
+ Err(E::service_unavailable_with_code_no_info(
+ "Indexer reader doesn't exist, or doesn't have data.",
+ AptosErrorCode::InternalError,
+ ))
+ }
+
pub fn get_latest_ledger_info_with_signatures(&self) -> Result {
Ok(self.db.get_latest_ledger_info()?)
}
@@ -350,19 +404,26 @@ impl Context {
address: AccountAddress,
version: u64,
) -> Result> {
- let mut iter = self.db.get_prefixed_state_value_iterator(
- &StateKeyPrefix::from(address),
- None,
- version,
- )?;
+ let mut iter = if !db_sharding_enabled(&self.node_config) {
+ Box::new(
+ self.db
+ .get_prefixed_state_value_iterator(
+ &StateKeyPrefix::from(address),
+ None,
+ version,
+ )?
+ .map(|item| item.map_err(|err| anyhow!(err.to_string()))),
+ )
+ } else {
+ self.indexer_reader
+ .as_ref()
+ .ok_or_else(|| format_err!("Indexer reader doesn't exist"))?
+ .get_prefixed_state_value_iterator(&StateKeyPrefix::from(address), None, version)?
+ };
let kvs = iter
.by_ref()
.take(MAX_REQUEST_LIMIT as usize)
- .map(|res| match res {
- Ok((k, v)) => Ok((k, v)),
- Err(res) => Err(anyhow::Error::from(res)),
- })
.collect::>()?;
if iter.next().transpose()?.is_some() {
bail!("Too many state items under account ({:?}).", address);
@@ -377,11 +438,26 @@ impl Context {
version: u64,
limit: u64,
) -> Result<(Vec<(StructTag, Vec)>, Option)> {
- let account_iter = self.db.get_prefixed_state_value_iterator(
- &StateKeyPrefix::from(address),
- prev_state_key,
- version,
- )?;
+ let account_iter = if !db_sharding_enabled(&self.node_config) {
+ Box::new(
+ self.db
+ .get_prefixed_state_value_iterator(
+ &StateKeyPrefix::from(address),
+ prev_state_key,
+ version,
+ )?
+ .map(|item| item.map_err(|err| anyhow!(err.to_string()))),
+ )
+ } else {
+ self.indexer_reader
+ .as_ref()
+ .ok_or_else(|| format_err!("Indexer reader doesn't exist"))?
+ .get_prefixed_state_value_iterator(
+ &StateKeyPrefix::from(address),
+ prev_state_key,
+ version,
+ )?
+ };
// TODO: Consider rewriting this to consider resource groups:
// * If a resource group is found, expand
// * Return Option)>>
@@ -408,7 +484,7 @@ impl Context {
Some(Err(format_err!( "storage prefix scan return inconsistent key ({:?})", k )))
}
},
- Err(e) => Some(Err(e.into())),
+ Err(e) => Some(Err(e)),
})
.take(limit as usize + 1);
let kvs = resource_iter
@@ -453,11 +529,26 @@ impl Context {
version: u64,
limit: u64,
) -> Result<(Vec<(ModuleId, Vec)>, Option)> {
- let account_iter = self.db.get_prefixed_state_value_iterator(
- &StateKeyPrefix::from(address),
- prev_state_key,
- version,
- )?;
+ let account_iter = if !db_sharding_enabled(&self.node_config) {
+ Box::new(
+ self.db
+ .get_prefixed_state_value_iterator(
+ &StateKeyPrefix::from(address),
+ prev_state_key,
+ version,
+ )?
+ .map(|item| item.map_err(|err| anyhow!(err.to_string()))),
+ )
+ } else {
+ self.indexer_reader
+ .as_ref()
+ .ok_or_else(|| format_err!("Indexer reader doesn't exist"))?
+ .get_prefixed_state_value_iterator(
+ &StateKeyPrefix::from(address),
+ prev_state_key,
+ version,
+ )?
+ };
let mut module_iter = account_iter
.filter_map(|res| match res {
Ok((k, v)) => match k.inner() {
@@ -473,7 +564,7 @@ impl Context {
Some(Err(format_err!( "storage prefix scan return inconsistent key ({:?})", k )))
}
},
- Err(e) => Some(Err(e.into())),
+ Err(e) => Some(Err(e)),
})
.take(limit as usize + 1);
let kvs = module_iter
@@ -730,15 +821,31 @@ impl Context {
.saturating_sub(limit as u64)
};
- let txns = self
- .db
- .get_account_transactions(
+ let txns_res = if !db_sharding_enabled(&self.node_config) {
+ self.db.get_account_transactions(
address,
start_seq_number,
limit as u64,
true,
ledger_version,
)
+ } else {
+ self.indexer_reader
+ .as_ref()
+ .ok_or(anyhow!("Indexer reader is None"))
+ .map_err(|err| {
+ E::internal_with_code(err, AptosErrorCode::InternalError, ledger_info)
+ })?
+ .get_account_transactions(
+ address,
+ start_seq_number,
+ limit as u64,
+ true,
+ ledger_version,
+ )
+ .map_err(|e| AptosDbError::Other(e.to_string()))
+ };
+ let txns = txns_res
.context("Failed to retrieve account transactions")
.map_err(|err| {
E::internal_with_code(err, AptosErrorCode::InternalError, ledger_info)
@@ -813,28 +920,25 @@ impl Context {
limit: u16,
ledger_version: u64,
) -> Result> {
- if let Some(start) = start {
- Ok(self.db.get_events(
- event_key,
- start,
- Order::Ascending,
- limit as u64,
- ledger_version,
- )?)
+ let (start, order) = if let Some(start) = start {
+ (start, Order::Ascending)
} else {
- Ok(self
- .db
- .get_events(
- event_key,
- u64::MAX,
- Order::Descending,
- limit as u64,
- ledger_version,
- )
- .map(|mut result| {
- result.reverse();
- result
- })?)
+ (u64::MAX, Order::Descending)
+ };
+ let mut res = if !db_sharding_enabled(&self.node_config) {
+ self.db
+ .get_events(event_key, start, order, limit as u64, ledger_version)?
+ } else {
+ self.indexer_reader
+ .as_ref()
+ .ok_or(anyhow!("Internal indexer reader doesn't exist"))?
+ .get_events(event_key, start, order, limit as u64, ledger_version)?
+ };
+ if order == Order::Descending {
+ res.reverse();
+ Ok(res)
+ } else {
+ Ok(res)
}
}
@@ -894,9 +998,10 @@ impl Context {
start_version: Version,
limit: u64,
ledger_version: Version,
- ) -> Result<(Vec<(u64, u64)>, Vec)> {
+ count_majority_use_case: bool,
+ ) -> Result<(Vec<(u64, u64)>, Vec, Option)> {
if start_version > ledger_version || limit == 0 {
- return Ok((vec![], vec![]));
+ return Ok((vec![], vec![], None));
}
// This is just an estimation, so we can just skip over errors
@@ -908,11 +1013,16 @@ impl Context {
let mut gas_prices = Vec::new();
let mut block_end_infos = Vec::new();
+ let mut count_by_use_case = HashMap::new();
for (txn, info) in txns.zip(infos) {
match txn.as_ref() {
Ok(Transaction::UserTransaction(txn)) => {
if let Ok(info) = info.as_ref() {
gas_prices.push((txn.gas_unit_price(), info.gas_used()));
+ if count_majority_use_case {
+ let use_case_key = txn.parse_use_case();
+ *count_by_use_case.entry(use_case_key).or_insert(0) += 1;
+ }
}
},
Ok(Transaction::BlockEpilogue(txn)) => {
@@ -924,7 +1034,80 @@ impl Context {
}
}
- Ok((gas_prices, block_end_infos))
+ let majority_use_case_fraction = if count_majority_use_case {
+ count_by_use_case.iter().max_by_key(|(_, v)| *v).and_then(
+ |(max_use_case, max_value)| {
+ if let UseCaseKey::ContractAddress(_) = max_use_case {
+ Some(*max_value as f32 / count_by_use_case.values().sum::() as f32)
+ } else {
+ None
+ }
+ },
+ )
+ } else {
+ None
+ };
+ Ok((gas_prices, block_end_infos, majority_use_case_fraction))
+ }
+
+ fn block_min_inclusion_price(
+ &self,
+ ledger_info: &LedgerInfo,
+ first: Version,
+ last: Version,
+ gas_estimation_config: &GasEstimationConfig,
+ execution_config: &OnChainExecutionConfig,
+ ) -> Option {
+ let user_use_case_spread_factor = if gas_estimation_config.incorporate_reordering_effects {
+ execution_config
+ .transaction_shuffler_type()
+ .user_use_case_spread_factor()
+ } else {
+ None
+ };
+
+ match self.get_gas_prices_and_used(
+ first,
+ last - first,
+ ledger_info.ledger_version.0,
+ user_use_case_spread_factor.is_some(),
+ ) {
+ Ok((prices_and_used, block_end_infos, majority_use_case_fraction)) => {
+ let is_full_block =
+ if majority_use_case_fraction.map_or(false, |fraction| fraction > 0.5) {
+ // If majority use case is above half of transactions, UseCaseAware block reordering
+ // will allow other transactions to get in the block (AIP-68)
+ false
+ } else if prices_and_used.len() >= gas_estimation_config.full_block_txns {
+ true
+ } else if !block_end_infos.is_empty() {
+ assert_eq!(1, block_end_infos.len());
+ block_end_infos.first().unwrap().limit_reached()
+ } else if let Some(block_gas_limit) =
+ execution_config.block_gas_limit_type().block_gas_limit()
+ {
+ let gas_used = prices_and_used.iter().map(|(_, used)| *used).sum::();
+ gas_used >= block_gas_limit
+ } else {
+ false
+ };
+
+ if is_full_block {
+ Some(
+ self.next_bucket(
+ prices_and_used
+ .iter()
+ .map(|(price, _)| *price)
+ .min()
+ .unwrap(),
+ ),
+ )
+ } else {
+ None
+ }
+ },
+ Err(_) => None,
+ }
}
pub fn estimate_gas_price(
@@ -933,7 +1116,7 @@ impl Context {
) -> Result {
let config = &self.node_config.api.gas_estimation;
let min_gas_unit_price = self.min_gas_unit_price(ledger_info)?;
- let block_config = self.block_executor_onchain_config(ledger_info)?;
+ let execution_config = self.execution_onchain_config(ledger_info)?;
if !config.enabled {
return Ok(self.default_gas_estimation(min_gas_unit_price));
}
@@ -1014,40 +1197,9 @@ impl Context {
let mut min_inclusion_prices = vec![];
// TODO: if multiple calls to db is a perf issue, combine into a single call and then split
for (first, last) in blocks {
- let min_inclusion_price = match self.get_gas_prices_and_used(
- first,
- last - first,
- ledger_info.ledger_version.0,
- ) {
- Ok((prices_and_used, block_end_infos)) => {
- let is_full_block = if prices_and_used.len() >= config.full_block_txns {
- true
- } else if !block_end_infos.is_empty() {
- assert_eq!(1, block_end_infos.len());
- block_end_infos.first().unwrap().limit_reached()
- } else if let Some(block_gas_limit) =
- block_config.block_gas_limit_type.block_gas_limit()
- {
- let gas_used = prices_and_used.iter().map(|(_, used)| *used).sum::();
- gas_used >= block_gas_limit
- } else {
- false
- };
-
- if is_full_block {
- self.next_bucket(
- prices_and_used
- .iter()
- .map(|(price, _)| *price)
- .min()
- .unwrap(),
- )
- } else {
- min_gas_unit_price
- }
- },
- Err(_) => min_gas_unit_price,
- };
+ let min_inclusion_price = self
+ .block_min_inclusion_price(ledger_info, first, last, config, &execution_config)
+ .unwrap_or(min_gas_unit_price);
min_inclusion_prices.push(min_inclusion_price);
cache
.min_inclusion_prices
@@ -1215,16 +1367,16 @@ impl Context {
}
}
- pub fn block_executor_onchain_config(
+ pub fn execution_onchain_config(
&self,
ledger_info: &LedgerInfo,
- ) -> Result {
+ ) -> Result {
// If it's the same epoch, use the cached results
{
let cache = self.gas_limit_cache.read().unwrap();
if let Some(ref last_updated_epoch) = cache.last_updated_epoch {
if *last_updated_epoch == ledger_info.epoch.0 {
- return Ok(cache.block_executor_onchain_config.clone());
+ return Ok(cache.execution_onchain_config.clone());
}
}
}
@@ -1235,7 +1387,7 @@ impl Context {
// If a different thread updated the cache, we can exit early
if let Some(ref last_updated_epoch) = cache.last_updated_epoch {
if *last_updated_epoch == ledger_info.epoch.0 {
- return Ok(cache.block_executor_onchain_config.clone());
+ return Ok(cache.execution_onchain_config.clone());
}
}
@@ -1247,14 +1399,13 @@ impl Context {
E::internal_with_code(e, AptosErrorCode::InternalError, ledger_info)
})?;
- let block_executor_onchain_config = OnChainExecutionConfig::fetch_config(&state_view)
- .unwrap_or_else(OnChainExecutionConfig::default_if_missing)
- .block_executor_onchain_config();
+ let execution_onchain_config = OnChainExecutionConfig::fetch_config(&state_view)
+ .unwrap_or_else(OnChainExecutionConfig::default_if_missing);
// Update the cache
- cache.block_executor_onchain_config = block_executor_onchain_config.clone();
+ cache.execution_onchain_config = execution_onchain_config.clone();
cache.last_updated_epoch = Some(ledger_info.epoch.0);
- Ok(block_executor_onchain_config)
+ Ok(execution_onchain_config)
}
}
@@ -1314,7 +1465,7 @@ pub struct GasEstimationCache {
pub struct GasLimitCache {
last_updated_epoch: Option,
- block_executor_onchain_config: BlockExecutorConfigFromOnchain,
+ execution_onchain_config: OnChainExecutionConfig,
}
/// This function just calls tokio::task::spawn_blocking with the given closure and in
@@ -1444,3 +1595,7 @@ impl FunctionStats {
}
}
}
+
+fn db_sharding_enabled(node_config: &NodeConfig) -> bool {
+ node_config.storage.rocksdb_configs.enable_storage_sharding
+}
diff --git a/api/src/index.rs b/api/src/index.rs
index 94b5289636413..ba91cbb34c342 100644
--- a/api/src/index.rs
+++ b/api/src/index.rs
@@ -33,7 +33,6 @@ impl IndexApi {
self.context
.check_api_output_enabled("Get ledger info", &accept_type)?;
let ledger_info = self.context.get_latest_ledger_info()?;
-
let node_role = self.context.node_role();
api_spawn_blocking(move || match accept_type {
diff --git a/api/src/lib.rs b/api/src/lib.rs
index 838394268d667..fa72f894e47e4 100644
--- a/api/src/lib.rs
+++ b/api/src/lib.rs
@@ -21,6 +21,7 @@ mod page;
mod response;
mod runtime;
mod set_failpoints;
+pub mod spec;
mod state;
#[cfg(test)]
pub mod tests;
diff --git a/api/src/log.rs b/api/src/log.rs
index f305815176d00..b9ee7a2ab4d52 100644
--- a/api/src/log.rs
+++ b/api/src/log.rs
@@ -9,9 +9,11 @@ use aptos_logger::{
prelude::{sample, SampleRate},
warn, Schema,
};
-use hyper::Method;
use once_cell::sync::Lazy;
-use poem::{http::header, Endpoint, Request, Response, Result};
+use poem::{
+ http::{header, Method},
+ Endpoint, Request, Response, Result,
+};
use poem_openapi::OperationId;
use regex::Regex;
use std::time::Duration;
diff --git a/api/src/runtime.rs b/api/src/runtime.rs
index cf666d1f959df..219036a90b5d7 100644
--- a/api/src/runtime.rs
+++ b/api/src/runtime.rs
@@ -3,9 +3,19 @@
// SPDX-License-Identifier: Apache-2.0
use crate::{
- accounts::AccountsApi, basic::BasicApi, blocks::BlocksApi, check_size::PostSizeLimit,
- context::Context, error_converter::convert_error, events::EventsApi, index::IndexApi,
- log::middleware_log, set_failpoints, state::StateApi, transactions::TransactionsApi,
+ accounts::AccountsApi,
+ basic::BasicApi,
+ blocks::BlocksApi,
+ check_size::PostSizeLimit,
+ context::Context,
+ error_converter::convert_error,
+ events::EventsApi,
+ index::IndexApi,
+ log::middleware_log,
+ set_failpoints,
+ spec::{spec_endpoint_json, spec_endpoint_yaml},
+ state::StateApi,
+ transactions::TransactionsApi,
view_function::ViewFunctionApi,
};
use anyhow::Context as AnyhowContext;
@@ -164,8 +174,8 @@ pub fn attach_poem_to_runtime(
let api_service = get_api_service(context.clone());
- let spec_json = api_service.spec_endpoint();
- let spec_yaml = api_service.spec_endpoint_yaml();
+ let spec_json = spec_endpoint_json(&api_service);
+ let spec_yaml = spec_endpoint_yaml(&api_service);
let mut address = config.api.address;
diff --git a/api/src/spec.rs b/api/src/spec.rs
new file mode 100644
index 0000000000000..10293cb71e097
--- /dev/null
+++ b/api/src/spec.rs
@@ -0,0 +1,58 @@
+// Copyright (c) Aptos Foundation
+// SPDX-License-Identifier: Apache-2.0
+
+use poem::{
+ endpoint::{make_sync, Endpoint},
+ Response,
+};
+use poem_openapi::{OpenApi, OpenApiService, Webhook};
+
+/// Get the spec as JSON. We implement our own function because poem-openapi versions
+/// greater than 2.0.11 add this charset thing to the content type. This causes issues
+/// with our current Accept logic and messes up some code generators and our spec page,
+/// so we remove it.
+pub fn get_spec(service: &OpenApiService, yaml: bool) -> String
+where
+ T: OpenApi,
+ W: Webhook,
+{
+ let spec = if yaml {
+ service.spec_yaml()
+ } else {
+ service.spec()
+ };
+ spec.replace("; charset=utf-8", "")
+}
+
+/// Create an endpoint to serve the OpenAPI specification as json. We define this
+/// ourselves because we need to use our custom `get_spec` function that changes the
+/// spec to remove charset from the content type.
+pub fn spec_endpoint_json(service: &OpenApiService) -> impl Endpoint
+where
+ T: OpenApi,
+ W: Webhook,
+{
+ let spec = get_spec(service, false);
+ make_sync(move |_| {
+ Response::builder()
+ .content_type("application/json")
+ .body(spec.clone())
+ })
+}
+
+/// Create an endpoint to serve the OpenAPI specification as yaml. We define this
+/// ourselves because we need to use our custom `get_spec` function that changes the
+/// spec to remove charset from the content type.
+pub fn spec_endpoint_yaml(service: &OpenApiService) -> impl Endpoint
+where
+ T: OpenApi,
+ W: Webhook,
+{
+ let spec = get_spec(service, true);
+ make_sync(move |_| {
+ Response::builder()
+ .content_type("application/x-yaml")
+ .header("Content-Disposition", "inline; filename=\"spec.yaml\"")
+ .body(spec.clone())
+ })
+}
diff --git a/api/src/tests/accounts_test.rs b/api/src/tests/accounts_test.rs
index da00aeff218e7..a5199cf61c452 100644
--- a/api/src/tests/accounts_test.rs
+++ b/api/src/tests/accounts_test.rs
@@ -3,7 +3,8 @@
// SPDX-License-Identifier: Apache-2.0
use super::new_test_context;
-use aptos_api_test_context::{current_function_name, find_value};
+use crate::tests::new_test_context_with_db_sharding_and_internal_indexer;
+use aptos_api_test_context::{current_function_name, find_value, TestContext};
use aptos_api_types::{MoveModuleBytecode, MoveResource, MoveStructTag, StateKeyWrapper};
use aptos_cached_packages::aptos_stdlib;
use serde_json::json;
@@ -36,9 +37,21 @@ async fn test_get_account_resources_by_address_0x0() {
async fn test_get_account_resources_by_valid_account_address() {
let context = new_test_context(current_function_name!());
let addresses = vec!["0x1", "0x00000000000000000000000000000001"];
+ let mut res = vec![];
for address in &addresses {
- context.get(&account_resources(address)).await;
+ let resp = context.get(&account_resources(address)).await;
+ res.push(resp);
}
+
+ let shard_context =
+ new_test_context_with_db_sharding_and_internal_indexer(current_function_name!());
+ let mut shard_res = vec![];
+ for address in &addresses {
+ let resp = shard_context.get(&account_resources(address)).await;
+ shard_res.push(resp);
+ }
+
+ assert_eq!(res, shard_res);
}
// Unstable due to framework changes
@@ -96,13 +109,15 @@ async fn test_account_modules_structs() {
context.check_golden_output(resp);
}
-#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
-async fn test_get_account_resources_by_ledger_version() {
- let mut context = new_test_context(current_function_name!());
+async fn test_account_resources_by_ledger_version_with_context(mut context: TestContext) {
let account = context.gen_account();
let txn = context.create_user_account(&account).await;
context.commit_block(&vec![txn.clone()]).await;
+ if let Some(indexer_reader) = context.context.indexer_reader.as_ref() {
+ indexer_reader.wait_for_internal_indexer(2).unwrap();
+ }
+
let ledger_version_1_resources = context
.get(&account_resources(
&context.root_account().await.address().to_hex_literal(),
@@ -125,13 +140,23 @@ async fn test_get_account_resources_by_ledger_version() {
assert_eq!(root_account["data"]["sequence_number"], "0");
}
+#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
+async fn test_get_account_resources_by_ledger_version() {
+ let context = new_test_context(current_function_name!());
+ test_account_resources_by_ledger_version_with_context(context).await;
+ let shard_context =
+ new_test_context_with_db_sharding_and_internal_indexer(current_function_name!());
+ test_account_resources_by_ledger_version_with_context(shard_context).await;
+}
+
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
async fn test_get_account_resources_by_too_large_ledger_version() {
let mut context = new_test_context(current_function_name!());
+ let account = context.root_account().await;
let resp = context
.expect_status_code(404)
.get(&account_resources_with_ledger_version(
- &context.root_account().await.address().to_hex_literal(),
+ &account.address().to_hex_literal(),
1000000000000000000,
))
.await;
@@ -151,9 +176,7 @@ async fn test_get_account_resources_by_invalid_ledger_version() {
context.check_golden_output(resp);
}
-#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
-async fn test_get_account_modules_by_ledger_version() {
- let mut context = new_test_context(current_function_name!());
+async fn test_get_account_modules_by_ledger_version_with_context(mut context: TestContext) {
let payload =
aptos_stdlib::publish_module_source("test_module", "module 0xa550c18::test_module {}");
@@ -162,6 +185,10 @@ async fn test_get_account_modules_by_ledger_version() {
root_account.sign_with_transaction_builder(context.transaction_factory().payload(payload));
context.commit_block(&vec![txn.clone()]).await;
+ if let Some(indexer_reader) = context.context.indexer_reader.as_ref() {
+ indexer_reader.wait_for_internal_indexer(2).unwrap();
+ }
+
let modules = context
.get(&account_modules(
&context.root_account().await.address().to_hex_literal(),
@@ -178,6 +205,15 @@ async fn test_get_account_modules_by_ledger_version() {
assert_eq!(modules, json!([]));
}
+#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
+async fn test_get_account_modules_by_ledger_version() {
+ let context = new_test_context(current_function_name!());
+ test_get_account_modules_by_ledger_version_with_context(context).await;
+ let shard_context =
+ new_test_context_with_db_sharding_and_internal_indexer(current_function_name!());
+ test_get_account_modules_by_ledger_version_with_context(shard_context).await;
+}
+
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
async fn test_get_core_account_data() {
let mut context = new_test_context(current_function_name!());
diff --git a/api/src/tests/events_test.rs b/api/src/tests/events_test.rs
index acf517b61a04c..1c1f69830cc06 100644
--- a/api/src/tests/events_test.rs
+++ b/api/src/tests/events_test.rs
@@ -3,6 +3,7 @@
// SPDX-License-Identifier: Apache-2.0
use super::new_test_context;
+use crate::tests::new_test_context_with_db_sharding_and_internal_indexer;
use aptos_api_test_context::{current_function_name, TestContext};
use percent_encoding::{utf8_percent_encode, NON_ALPHANUMERIC};
use serde_json::json;
@@ -35,7 +36,21 @@ async fn test_get_events_filter_by_start_sequence_number() {
.as_str(),
)
.await;
- context.check_golden_output(resp);
+ context.check_golden_output(resp.clone());
+
+ // assert the same resp after db sharding migration with internal indexer turned on
+ let shard_context =
+ new_test_context_with_db_sharding_and_internal_indexer(current_function_name!());
+ let new_resp = shard_context
+ .get(
+ format!(
+ "/accounts/{}/events/{}?start=1",
+ ACCOUNT_ADDRESS, CREATION_NUMBER
+ )
+ .as_str(),
+ )
+ .await;
+ assert_eq!(resp, new_resp);
}
// turn it back until we have multiple events in genesis
@@ -84,7 +99,14 @@ async fn test_get_events_by_account_event_handle() {
let resp = context
.get("/accounts/0x1/events/0x1::reconfiguration::Configuration/events")
.await;
- context.check_golden_output(resp);
+ context.check_golden_output(resp.clone());
+
+ let shard_context =
+ new_test_context_with_db_sharding_and_internal_indexer(current_function_name!());
+ let new_resp = shard_context
+ .get("/accounts/0x1/events/0x1::reconfiguration::Configuration/events")
+ .await;
+ assert_eq!(resp, new_resp);
}
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
diff --git a/api/src/tests/mod.rs b/api/src/tests/mod.rs
index e581acdbad02a..e7978f66a126e 100644
--- a/api/src/tests/mod.rs
+++ b/api/src/tests/mod.rs
@@ -22,7 +22,7 @@ mod view_function;
mod webauthn_secp256r1_ecdsa;
use aptos_api_test_context::{new_test_context as super_new_test_context, TestContext};
-use aptos_config::config::NodeConfig;
+use aptos_config::config::{internal_indexer_db_config::InternalIndexerDBConfig, NodeConfig};
fn new_test_context(test_name: String) -> TestContext {
new_test_context_with_config(test_name, NodeConfig::default())
@@ -31,3 +31,10 @@ fn new_test_context(test_name: String) -> TestContext {
fn new_test_context_with_config(test_name: String, node_config: NodeConfig) -> TestContext {
super_new_test_context(test_name, node_config, false)
}
+
+fn new_test_context_with_db_sharding_and_internal_indexer(test_name: String) -> TestContext {
+ let mut node_config = NodeConfig::default();
+ node_config.storage.rocksdb_configs.enable_storage_sharding = true;
+ node_config.indexer_db_config = InternalIndexerDBConfig::new(true, true, true, 10_000);
+ super_new_test_context(test_name, node_config, true)
+}
diff --git a/api/src/tests/modules.rs b/api/src/tests/modules.rs
index e451ff9718585..66131a72f0de9 100644
--- a/api/src/tests/modules.rs
+++ b/api/src/tests/modules.rs
@@ -64,4 +64,23 @@ async fn test_abi() {
assert_eq!(function["is_view"], false);
}
+
+ // Confirm that MyEvent is considered an event.
+ let structs = modules.as_array().unwrap()[0]["abi"]["structs"]
+ .as_array()
+ .unwrap();
+ let my_event = structs
+ .iter()
+ .find(|s| s["name"].as_str().unwrap() == "MyEvent")
+ .unwrap();
+
+ assert_eq!(my_event["is_event"], true);
+
+ // Confirm that State is not considered an event.
+ let my_struct = structs
+ .iter()
+ .find(|s| s["name"].as_str().unwrap() == "State")
+ .unwrap();
+
+ assert_eq!(my_struct["is_event"], false);
}
diff --git a/api/src/tests/move/pack_abi/sources/test.move b/api/src/tests/move/pack_abi/sources/test.move
index 83b95de8f87bc..5bf35cbe4b2bb 100644
--- a/api/src/tests/move/pack_abi/sources/test.move
+++ b/api/src/tests/move/pack_abi/sources/test.move
@@ -4,6 +4,11 @@ module abi::test {
value: u64
}
+ #[event]
+ struct MyEvent has store {
+ value: u64
+ }
+
public fun public_function(s: &signer, state: State) {
move_to(s, state)
}
@@ -11,6 +16,7 @@ module abi::test {
public entry fun public_entry_function(s1: &signer, s2: &signer, value: u64) {
move_to(s1, State { value });
move_to(s2, State { value });
+
}
entry fun private_entry_function(s: &signer, value: u64) {
diff --git a/api/src/tests/multisig_transactions_test.rs b/api/src/tests/multisig_transactions_test.rs
index a01ccf1c9f547..b4f4cdddb6886 100644
--- a/api/src/tests/multisig_transactions_test.rs
+++ b/api/src/tests/multisig_transactions_test.rs
@@ -415,6 +415,54 @@ async fn test_multisig_transaction_with_mismatching_payload() {
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
async fn test_multisig_transaction_simulation() {
+ let mut context = new_test_context(current_function_name!());
+ let owner_account_1 = &mut context.create_account().await;
+ let owner_account_2 = &mut context.create_account().await;
+ let owner_account_3 = &mut context.create_account().await;
+ let multisig_account = context
+ .create_multisig_account(
+ owner_account_1,
+ vec![owner_account_2.address(), owner_account_3.address()],
+ 1, /* 1-of-3 */
+ 1000, /* initial balance */
+ )
+ .await;
+
+ let multisig_payload = construct_multisig_txn_transfer_payload(owner_account_1.address(), 1000);
+ context
+ .create_multisig_transaction(owner_account_1, multisig_account, multisig_payload.clone())
+ .await;
+
+ // Simulate the multisig tx
+ let simulation_resp = context
+ .simulate_multisig_transaction(
+ owner_account_1,
+ multisig_account,
+ "0x1::aptos_account::transfer",
+ &[],
+ &[&owner_account_1.address().to_hex_literal(), "1000"],
+ 200,
+ )
+ .await;
+ // Validate that the simulation did successfully execute a transfer of 1000 coins from the
+ // multisig account.
+ let simulation_resp = &simulation_resp.as_array().unwrap()[0];
+ assert!(simulation_resp["success"].as_bool().unwrap());
+ let withdraw_event = &simulation_resp["events"].as_array().unwrap()[0];
+ assert_eq!(
+ withdraw_event["type"].as_str().unwrap(),
+ "0x1::coin::CoinWithdraw"
+ );
+ let withdraw_from_account =
+ AccountAddress::from_hex_literal(withdraw_event["data"]["account"].as_str().unwrap())
+ .unwrap();
+ let withdrawn_amount = withdraw_event["data"]["amount"].as_str().unwrap();
+ assert_eq!(withdraw_from_account, multisig_account);
+ assert_eq!(withdrawn_amount, "1000");
+}
+
+#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
+async fn test_multisig_transaction_simulation_2_of_3() {
let mut context = new_test_context(current_function_name!());
let owner_account_1 = &mut context.create_account().await;
let owner_account_2 = &mut context.create_account().await;
@@ -429,8 +477,16 @@ async fn test_multisig_transaction_simulation() {
)
.await;
- // Should be able to simulate the multisig tx without having enough approvals or the transaction
- // created.
+ let multisig_payload = construct_multisig_txn_transfer_payload(owner_account_1.address(), 1000);
+ context
+ .create_multisig_transaction(owner_account_1, multisig_account, multisig_payload.clone())
+ .await;
+
+ context
+ .approve_multisig_transaction(owner_account_2, multisig_account, 1)
+ .await;
+
+ // Simulate the multisig transaction
let simulation_resp = context
.simulate_multisig_transaction(
owner_account_1,
@@ -456,6 +512,27 @@ async fn test_multisig_transaction_simulation() {
let withdrawn_amount = withdraw_event["data"]["amount"].as_str().unwrap();
assert_eq!(withdraw_from_account, multisig_account);
assert_eq!(withdrawn_amount, "1000");
+}
+
+#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
+async fn test_multisig_transaction_simulation_fail() {
+ let mut context = new_test_context(current_function_name!());
+ let owner_account_1 = &mut context.create_account().await;
+ let owner_account_2 = &mut context.create_account().await;
+ let owner_account_3 = &mut context.create_account().await;
+ let multisig_account = context
+ .create_multisig_account(
+ owner_account_1,
+ vec![owner_account_2.address(), owner_account_3.address()],
+ 1, /* 1-of-3 */
+ 1000, /* initial balance */
+ )
+ .await;
+
+ let multisig_payload = construct_multisig_txn_transfer_payload(owner_account_1.address(), 2000);
+ context
+ .create_multisig_transaction(owner_account_1, multisig_account, multisig_payload.clone())
+ .await;
// Simulating transferring more than what the multisig account has should fail.
let simulation_resp = context
@@ -469,7 +546,56 @@ async fn test_multisig_transaction_simulation() {
)
.await;
let simulation_resp = &simulation_resp.as_array().unwrap()[0];
+ let transaction_failed = &simulation_resp["events"]
+ .as_array()
+ .unwrap()
+ .iter()
+ .any(|event| {
+ event["type"]
+ .as_str()
+ .unwrap()
+ .contains("TransactionExecutionFailed")
+ });
+ assert!(transaction_failed);
+}
+
+#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
+async fn test_multisig_transaction_simulation_fail_2_of_3_insufficient_approvals() {
+ let mut context = new_test_context(current_function_name!());
+ let owner_account_1 = &mut context.create_account().await;
+ let owner_account_2 = &mut context.create_account().await;
+ let owner_account_3 = &mut context.create_account().await;
+ let multisig_account = context
+ .create_multisig_account(
+ owner_account_1,
+ vec![owner_account_2.address(), owner_account_3.address()],
+ 2, /* 2-of-3 */
+ 1000, /* initial balance */
+ )
+ .await;
+
+ let multisig_payload = construct_multisig_txn_transfer_payload(owner_account_1.address(), 2000);
+ context
+ .create_multisig_transaction(owner_account_1, multisig_account, multisig_payload.clone())
+ .await;
+
+ // Simulating without sufficient approvals has should fail.
+ let simulation_resp = context
+ .simulate_multisig_transaction(
+ owner_account_1,
+ multisig_account,
+ "0x1::aptos_account::transfer",
+ &[],
+ &[&owner_account_1.address().to_hex_literal(), "1000"],
+ 200,
+ )
+ .await;
+ let simulation_resp = &simulation_resp.as_array().unwrap()[0];
assert!(!simulation_resp["success"].as_bool().unwrap());
+ assert!(simulation_resp["vm_status"]
+ .as_str()
+ .unwrap()
+ .contains("MULTISIG_TRANSACTION_INSUFFICIENT_APPROVALS"));
}
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
@@ -487,6 +613,11 @@ async fn test_simulate_multisig_transaction_should_charge_gas_against_sender() {
.await;
assert_eq!(10, context.get_apt_balance(multisig_account).await);
+ let multisig_payload = construct_multisig_txn_transfer_payload(owner_account.address(), 10);
+ context
+ .create_multisig_transaction(owner_account, multisig_account, multisig_payload.clone())
+ .await;
+
// This simulation should succeed because gas should be paid out of the sender account (owner),
// not the multisig account itself.
let simulation_resp = context
diff --git a/api/src/tests/simulation_test.rs b/api/src/tests/simulation_test.rs
index 3e60ecb9af937..7f2623e1f028e 100644
--- a/api/src/tests/simulation_test.rs
+++ b/api/src/tests/simulation_test.rs
@@ -2,10 +2,14 @@
// SPDX-License-Identifier: Apache-2.0
use super::new_test_context;
-use aptos_api_test_context::{current_function_name, TestContext};
+use aptos_api_test_context::{current_function_name, pretty, TestContext};
use aptos_crypto::ed25519::Ed25519Signature;
-use aptos_types::transaction::{
- authenticator::TransactionAuthenticator, EntryFunction, TransactionPayload,
+use aptos_types::{
+ account_address::AccountAddress,
+ transaction::{
+ authenticator::{AccountAuthenticator, TransactionAuthenticator},
+ EntryFunction, RawTransaction, SignedTransaction, TransactionPayload,
+ },
};
use move_core_types::{ident_str, language_storage::ModuleId};
use serde_json::json;
@@ -153,3 +157,272 @@ async fn test_simulate_txn_with_aggregator() {
unreachable!("Simulation uses Ed25519 authenticator.");
}
}
+
+#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
+async fn test_bcs_simulate_simple() {
+ let transfer_amount: u64 = SMALL_TRANSFER_AMOUNT;
+
+ let mut context = new_test_context(current_function_name!());
+ let alice = &mut context.gen_account();
+ let bob = &mut context.gen_account();
+ let txn = context.mint_user_account(alice).await;
+ context.commit_block(&vec![txn]).await;
+
+ let txn = context.account_transfer_to(alice, bob.address(), transfer_amount);
+ let body = bcs::to_bytes(&txn).unwrap();
+
+ // expected to fail due to using a valid signature.
+ let _resp = context
+ .expect_status_code(400)
+ .post_bcs_txn("/transactions/simulate", body)
+ .await;
+
+ if let TransactionAuthenticator::Ed25519 {
+ public_key,
+ signature: _,
+ } = txn.authenticator_ref()
+ {
+ let txn = SignedTransaction::new_signed_transaction(
+ txn.clone().into_raw_transaction(),
+ TransactionAuthenticator::Ed25519 {
+ public_key: public_key.clone(),
+ signature: Ed25519Signature::dummy_signature(),
+ },
+ );
+
+ let body = bcs::to_bytes(&txn).unwrap();
+
+ // expected to succeed
+ let resp = context
+ .expect_status_code(200)
+ .post_bcs_txn("/transactions/simulate", body)
+ .await;
+
+ assert!(resp[0]["success"].as_bool().unwrap(), "{}", pretty(&resp));
+ } else {
+ unreachable!("Simulation uses Ed25519 authenticator.");
+ }
+}
+
+#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
+async fn test_bcs_simulate_without_auth_key_check() {
+ let transfer_amount: u64 = SMALL_TRANSFER_AMOUNT;
+
+ let mut context = new_test_context(current_function_name!());
+ let alice = &mut context.gen_account();
+ let bob = &mut context.gen_account();
+ let txn = context.mint_user_account(alice).await;
+ context.commit_block(&vec![txn]).await;
+
+ // Construct a signed transaction.
+ let txn = context.account_transfer_to(alice, bob.address(), transfer_amount);
+ // Replace the authenticator with a NoAccountAuthenticator in the transaction.
+ let txn = SignedTransaction::new_signed_transaction(
+ txn.clone().into_raw_transaction(),
+ TransactionAuthenticator::SingleSender {
+ sender: AccountAuthenticator::NoAccountAuthenticator,
+ },
+ );
+
+ let body = bcs::to_bytes(&txn).unwrap();
+
+ // expected to succeed
+ let resp = context
+ .expect_status_code(200)
+ .post_bcs_txn("/transactions/simulate", body)
+ .await;
+ assert!(resp[0]["success"].as_bool().unwrap(), "{}", pretty(&resp));
+}
+
+#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
+async fn test_bcs_simulate_fee_payer_transaction_without_gas_fee_check() {
+ let mut context = new_test_context(current_function_name!());
+ let alice = &mut context.gen_account();
+ let bob = &mut context.gen_account();
+ let txn = context.mint_user_account(alice).await;
+ context.commit_block(&vec![txn]).await;
+
+ let transfer_amount: u64 = SMALL_TRANSFER_AMOUNT;
+ let txn = context.account_transfer_to(alice, bob.address(), transfer_amount);
+ let raw_txn = RawTransaction::new(
+ txn.sender(),
+ txn.sequence_number(),
+ txn.payload().clone(),
+ txn.max_gas_amount(),
+ 100,
+ txn.expiration_timestamp_secs(),
+ txn.chain_id(),
+ );
+ let txn = SignedTransaction::new_signed_transaction(
+ raw_txn.clone(),
+ TransactionAuthenticator::FeePayer {
+ sender: AccountAuthenticator::NoAccountAuthenticator,
+ secondary_signer_addresses: vec![],
+ secondary_signers: vec![],
+ fee_payer_address: AccountAddress::ONE,
+ fee_payer_signer: AccountAuthenticator::NoAccountAuthenticator,
+ },
+ );
+ let body = bcs::to_bytes(&txn).unwrap();
+ let resp = context
+ .expect_status_code(200)
+ .post_bcs_txn("/transactions/simulate", body)
+ .await;
+ assert!(!resp[0]["success"].as_bool().unwrap(), "{}", pretty(&resp));
+ assert!(
+ resp[0]["vm_status"]
+ .as_str()
+ .unwrap()
+ .contains("INSUFFICIENT_BALANCE_FOR_TRANSACTION_FEE"),
+ "{}",
+ pretty(&resp)
+ );
+
+ let txn = SignedTransaction::new_signed_transaction(
+ raw_txn.clone(),
+ TransactionAuthenticator::FeePayer {
+ sender: AccountAuthenticator::NoAccountAuthenticator,
+ secondary_signer_addresses: vec![],
+ secondary_signers: vec![],
+ fee_payer_address: AccountAddress::ZERO,
+ fee_payer_signer: AccountAuthenticator::NoAccountAuthenticator,
+ },
+ );
+ let body = bcs::to_bytes(&txn).unwrap();
+ let resp = context
+ .expect_status_code(200)
+ .post_bcs_txn("/transactions/simulate", body)
+ .await;
+ assert!(resp[0]["success"].as_bool().unwrap(), "{}", pretty(&resp));
+}
+
+#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
+async fn test_bcs_simulate_automated_account_creation() {
+ let mut context = new_test_context(current_function_name!());
+ let alice = &mut context.gen_account();
+ let bob = &mut context.gen_account();
+
+ let transfer_amount: u64 = 0;
+ let txn = context.account_transfer_to(alice, bob.address(), transfer_amount);
+ let raw_txn = RawTransaction::new(
+ txn.sender(),
+ txn.sequence_number(),
+ txn.payload().clone(),
+ txn.max_gas_amount(),
+ 100,
+ txn.expiration_timestamp_secs(),
+ txn.chain_id(),
+ );
+ // Replace the authenticator with a NoAccountAuthenticator in the transaction.
+ let txn = SignedTransaction::new_signed_transaction(
+ raw_txn.clone(),
+ TransactionAuthenticator::SingleSender {
+ sender: AccountAuthenticator::NoAccountAuthenticator,
+ },
+ );
+
+ let body = bcs::to_bytes(&txn).unwrap();
+
+ let resp = context
+ .expect_status_code(200)
+ .post_bcs_txn("/transactions/simulate", body)
+ .await;
+ assert!(!resp[0]["success"].as_bool().unwrap(), "{}", pretty(&resp));
+ assert!(
+ resp[0]["vm_status"]
+ .as_str()
+ .unwrap()
+ .contains("SENDING_ACCOUNT_DOES_NOT_EXIST"),
+ "{}",
+ pretty(&resp)
+ );
+
+ let txn =
+ SignedTransaction::new_signed_transaction(raw_txn, TransactionAuthenticator::FeePayer {
+ sender: AccountAuthenticator::NoAccountAuthenticator,
+ secondary_signer_addresses: vec![],
+ secondary_signers: vec![],
+ fee_payer_address: AccountAddress::ZERO,
+ fee_payer_signer: AccountAuthenticator::NoAccountAuthenticator,
+ });
+ let body = bcs::to_bytes(&txn).unwrap();
+ let resp = context
+ .expect_status_code(200)
+ .post_bcs_txn("/transactions/simulate", body)
+ .await;
+ assert!(resp[0]["success"].as_bool().unwrap(), "{}", pretty(&resp));
+}
+
+#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
+async fn test_bcs_execute_simple_no_authenticator_fail() {
+ let transfer_amount: u64 = SMALL_TRANSFER_AMOUNT;
+
+ let mut context = new_test_context(current_function_name!());
+ let alice = &mut context.gen_account();
+ let bob = &mut context.gen_account();
+ let txn = context.mint_user_account(alice).await;
+ context.commit_block(&vec![txn]).await;
+
+ // Construct a signed transaction.
+ let txn = context.account_transfer_to(alice, bob.address(), transfer_amount);
+ // Replace the authenticator with a NoAccountAuthenticator in the transaction.
+ let txn = SignedTransaction::new_signed_transaction(
+ txn.clone().into_raw_transaction(),
+ TransactionAuthenticator::SingleSender {
+ sender: AccountAuthenticator::NoAccountAuthenticator,
+ },
+ );
+
+ let body = bcs::to_bytes(&txn).unwrap();
+
+ // expected to fail due to the use of NoAccountAuthenticator in an actual execution
+ let resp = context
+ .expect_status_code(400)
+ .post_bcs_txn("/transactions", body)
+ .await;
+ assert!(resp["message"]
+ .as_str()
+ .unwrap()
+ .contains("INVALID_SIGNATURE"));
+}
+
+#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
+async fn test_bcs_execute_fee_payer_transaction_no_authenticator_fail() {
+ let mut context = new_test_context(current_function_name!());
+ let alice = &mut context.gen_account();
+ let bob = &mut context.gen_account();
+ let txn = context.mint_user_account(alice).await;
+ context.commit_block(&vec![txn]).await;
+
+ let transfer_amount: u64 = SMALL_TRANSFER_AMOUNT;
+ let txn = context.account_transfer_to(alice, bob.address(), transfer_amount);
+ let raw_txn = RawTransaction::new(
+ txn.sender(),
+ txn.sequence_number(),
+ txn.payload().clone(),
+ txn.max_gas_amount(),
+ 100,
+ txn.expiration_timestamp_secs(),
+ txn.chain_id(),
+ );
+
+ let txn = SignedTransaction::new_signed_transaction(
+ raw_txn.clone(),
+ TransactionAuthenticator::FeePayer {
+ sender: AccountAuthenticator::NoAccountAuthenticator,
+ secondary_signer_addresses: vec![],
+ secondary_signers: vec![],
+ fee_payer_address: AccountAddress::ZERO,
+ fee_payer_signer: AccountAuthenticator::NoAccountAuthenticator,
+ },
+ );
+ let body = bcs::to_bytes(&txn).unwrap();
+ let resp = context
+ .expect_status_code(400)
+ .post_bcs_txn("/transactions", body)
+ .await;
+ assert!(resp["message"]
+ .as_str()
+ .unwrap()
+ .contains("INVALID_SIGNATURE"));
+}
diff --git a/api/src/tests/state_test.rs b/api/src/tests/state_test.rs
index 48ba32bc23444..e1ace9ca255e9 100644
--- a/api/src/tests/state_test.rs
+++ b/api/src/tests/state_test.rs
@@ -171,7 +171,7 @@ async fn test_merkle_leaves_with_nft_transfer() {
let num_leaves_at_beginning = ctx
.db
- .get_state_leaf_count(ctx.db.get_latest_ledger_info_version().unwrap())
+ .get_state_item_count(ctx.db.get_latest_ledger_info_version().unwrap())
.unwrap();
let transfer_to_owner_txn = creator.sign_multi_agent_with_transaction_builder(
@@ -188,7 +188,7 @@ async fn test_merkle_leaves_with_nft_transfer() {
ctx.commit_block(&vec![transfer_to_owner_txn]).await;
let num_leaves_after_transfer_nft = ctx
.db
- .get_state_leaf_count(ctx.db.get_latest_ledger_info_version().unwrap())
+ .get_state_item_count(ctx.db.get_latest_ledger_info_version().unwrap())
.unwrap();
assert_eq!(
num_leaves_after_transfer_nft,
@@ -209,7 +209,7 @@ async fn test_merkle_leaves_with_nft_transfer() {
ctx.commit_block(&vec![transfer_to_creator_txn]).await;
let num_leaves_after_return_nft = ctx
.db
- .get_state_leaf_count(ctx.db.get_latest_ledger_info_version().unwrap())
+ .get_state_item_count(ctx.db.get_latest_ledger_info_version().unwrap())
.unwrap();
assert_eq!(
diff --git a/api/src/tests/transactions_test.rs b/api/src/tests/transactions_test.rs
index 0c5ef97e0db06..a05da2c713e49 100644
--- a/api/src/tests/transactions_test.rs
+++ b/api/src/tests/transactions_test.rs
@@ -3,7 +3,9 @@
// SPDX-License-Identifier: Apache-2.0
use super::new_test_context;
-use crate::tests::new_test_context_with_config;
+use crate::tests::{
+ new_test_context_with_config, new_test_context_with_db_sharding_and_internal_indexer,
+};
use aptos_api_test_context::{assert_json, current_function_name, pretty, TestContext};
use aptos_config::config::{GasEstimationStaticOverride, NodeConfig};
use aptos_crypto::{
@@ -19,7 +21,7 @@ use aptos_types::{
authenticator::{AuthenticationKey, TransactionAuthenticator},
EntryFunction, Script, SignedTransaction,
},
- utility_coin::SUPRA_COIN_TYPE,
+ utility_coin::{SupraCoinType, CoinType},
};
use move_core_types::{
identifier::Identifier,
@@ -750,13 +752,15 @@ async fn test_signing_message_with_payload(
assert_eq!(ledger["ledger_version"].as_str().unwrap(), "3"); // metadata + user txn + state checkpoint
}
-#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
-async fn test_get_account_transactions() {
- let mut context = new_test_context(current_function_name!());
+async fn test_account_transaction_with_context(mut context: TestContext) {
let account = context.gen_account();
let txn = context.create_user_account(&account).await;
context.commit_block(&vec![txn]).await;
+ if let Some(indexer_reader) = context.context.indexer_reader.as_ref() {
+ indexer_reader.wait_for_internal_indexer(2).unwrap();
+ }
+
let txns = context
.get(
format!(
@@ -771,6 +775,15 @@ async fn test_get_account_transactions() {
assert_json(txns, expected_txns);
}
+#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
+async fn test_get_account_transactions() {
+ let context = new_test_context(current_function_name!());
+ test_account_transaction_with_context(context).await;
+ let shard_context =
+ new_test_context_with_db_sharding_and_internal_indexer(current_function_name!());
+ test_account_transaction_with_context(shard_context).await;
+}
+
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
async fn test_get_account_transactions_filter_transactions_by_start_sequence_number() {
let mut context = new_test_context(current_function_name!());
@@ -866,7 +879,7 @@ async fn test_get_txn_execute_failed_by_invalid_entry_function_address() {
"0x1222",
"Coin",
"transfer",
- vec![SUPRA_COIN_TYPE.clone()],
+ vec![SupraCoinType::type_tag()],
vec![
bcs::to_bytes(&AccountAddress::from_hex_literal("0xdd").unwrap()).unwrap(),
bcs::to_bytes(&1u64).unwrap(),
@@ -885,7 +898,7 @@ async fn test_get_txn_execute_failed_by_invalid_entry_function_module_name() {
"0x1",
"CoinInvalid",
"transfer",
- vec![SUPRA_COIN_TYPE.clone()],
+ vec![SupraCoinType::type_tag()],
vec![
bcs::to_bytes(&AccountAddress::from_hex_literal("0xdd").unwrap()).unwrap(),
bcs::to_bytes(&1u64).unwrap(),
@@ -904,7 +917,7 @@ async fn test_get_txn_execute_failed_by_invalid_entry_function_name() {
"0x1",
"Coin",
"transfer_invalid",
- vec![SUPRA_COIN_TYPE.clone()],
+ vec![SupraCoinType::type_tag()],
vec![
bcs::to_bytes(&AccountAddress::from_hex_literal("0xdd").unwrap()).unwrap(),
bcs::to_bytes(&1u64).unwrap(),
@@ -923,7 +936,7 @@ async fn test_get_txn_execute_failed_by_invalid_entry_function_arguments() {
"0x1",
"Coin",
"transfer",
- vec![SUPRA_COIN_TYPE.clone()],
+ vec![SupraCoinType::type_tag()],
vec![
bcs::to_bytes(&AccountAddress::from_hex_literal("0xdd").unwrap()).unwrap(),
bcs::to_bytes(&1u8).unwrap(), // invalid type
@@ -942,7 +955,7 @@ async fn test_get_txn_execute_failed_by_missing_entry_function_arguments() {
"0x1",
"Coin",
"transfer",
- vec![SUPRA_COIN_TYPE.clone()],
+ vec![SupraCoinType::type_tag()],
vec![
bcs::to_bytes(&AccountAddress::from_hex_literal("0xdd").unwrap()).unwrap(),
// missing arguments
@@ -965,7 +978,7 @@ async fn test_get_txn_execute_failed_by_entry_function_validation() {
"0x1",
"Coin",
"transfer",
- vec![SUPRA_COIN_TYPE.clone()],
+ vec![SupraCoinType::type_tag()],
vec![
bcs::to_bytes(&AccountAddress::from_hex_literal("0xdd").unwrap()).unwrap(),
bcs::to_bytes(&123u64).unwrap(), // exceed limit, account balance is 0.
@@ -988,7 +1001,7 @@ async fn test_get_txn_execute_failed_by_entry_function_invalid_module_name() {
"0x1",
"coin",
"transfer::what::what",
- vec![SUPRA_COIN_TYPE.clone()],
+ vec![SupraCoinType::type_tag()],
vec![
bcs::to_bytes(&AccountAddress::from_hex_literal("0xdd").unwrap()).unwrap(),
bcs::to_bytes(&123u64).unwrap(), // exceed limit, account balance is 0.
@@ -1011,7 +1024,7 @@ async fn test_get_txn_execute_failed_by_entry_function_invalid_function_name() {
"0x1",
"coin::coin",
"transfer",
- vec![SUPRA_COIN_TYPE.clone()],
+ vec![SupraCoinType::type_tag()],
vec![
bcs::to_bytes(&AccountAddress::from_hex_literal("0xdd").unwrap()).unwrap(),
bcs::to_bytes(&123u64).unwrap(), // exceed limit, account balance is 0.
@@ -1552,7 +1565,7 @@ async fn test_simulation_failure_with_detail_error() {
Identifier::new("MemeCoin").unwrap(),
),
Identifier::new("transfer").unwrap(),
- vec![SUPRA_COIN_TYPE.clone()],
+ vec![SupraCoinType::type_tag()],
vec![
bcs::to_bytes(&AccountAddress::from_hex_literal("0xdd").unwrap()).unwrap(),
bcs::to_bytes(&1u64).unwrap(),
diff --git a/api/src/transactions.rs b/api/src/transactions.rs
index 76e78c8bea425..4d972b17161e4 100644
--- a/api/src/transactions.rs
+++ b/api/src/transactions.rs
@@ -37,7 +37,7 @@ use aptos_types::{
RawTransactionWithData, SignedTransaction, TransactionPayload,
},
vm_status::StatusCode,
- SUPRA_COIN_TYPE,
+ SupraCoinType, CoinType,
};
use aptos_vm::{AptosSimulationVM, AptosVM};
use move_core_types::{ident_str, language_storage::ModuleId, vm_status::VMStatus};
@@ -568,7 +568,7 @@ impl TransactionsApi {
&state_view,
ModuleId::new(AccountAddress::ONE, ident_str!("coin").into()),
ident_str!("balance").into(),
- vec![SUPRA_COIN_TYPE.clone()],
+ vec![SupraCoinType::type_tag()],
vec![signed_transaction.sender().to_vec()],
context.node_config.api.max_gas_view_function,
);
@@ -995,7 +995,7 @@ impl TransactionsApi {
address.into(),
page.start_option(),
page.limit(&latest_ledger_info)?,
- latest_ledger_info.version(),
+ account.ledger_version,
&latest_ledger_info,
)?;
match accept_type {
@@ -1435,8 +1435,7 @@ impl TransactionsApi {
let mut user_transactions = Vec::new();
for transaction in transactions.into_iter() {
match transaction {
- Transaction::UserTransaction(user_txn) => {
- let mut txn = *user_txn;
+ Transaction::UserTransaction(mut user_txn) => {
match &vm_status {
VMStatus::Error {
message: Some(msg), ..
@@ -1444,13 +1443,13 @@ impl TransactionsApi {
| VMStatus::ExecutionFailure {
message: Some(msg), ..
} => {
- txn.info.vm_status +=
+ user_txn.info.vm_status +=
format!("\nExecution failed with message: {}", msg)
.as_str();
},
_ => (),
}
- user_transactions.push(txn);
+ user_transactions.push(user_txn);
},
_ => {
return Err(SubmitTransactionError::internal_with_code(
diff --git a/api/test-context/Cargo.toml b/api/test-context/Cargo.toml
index 9c4a9e61a8858..db9be88d6dee1 100644
--- a/api/test-context/Cargo.toml
+++ b/api/test-context/Cargo.toml
@@ -23,6 +23,7 @@ aptos-executor = { workspace = true }
aptos-executor-types = { workspace = true }
aptos-framework = { workspace = true }
aptos-genesis = { workspace = true }
+aptos-indexer-grpc-table-info = { workspace = true }
aptos-mempool = { workspace = true, features = ["fuzzing"] }
aptos-mempool-notifications = { workspace = true }
aptos-sdk = { workspace = true }
diff --git a/api/test-context/src/test_context.rs b/api/test-context/src/test_context.rs
index 609019db0d513..4f17097f7c271 100644
--- a/api/test-context/src/test_context.rs
+++ b/api/test-context/src/test_context.rs
@@ -10,7 +10,7 @@ use aptos_api_types::{
use aptos_cached_packages::aptos_stdlib;
use aptos_config::{
config::{
- NodeConfig, RocksdbConfigs, StorageDirPaths, BUFFERED_STATE_TARGET_ITEMS,
+ NodeConfig, RocksdbConfigs, StorageDirPaths, BUFFERED_STATE_TARGET_ITEMS_FOR_TEST,
DEFAULT_MAX_NUM_NODES_PER_LRU_CACHE_SHARD, NO_OP_STORAGE_PRUNER_CONFIG,
},
keys::ConfigKey,
@@ -20,6 +20,7 @@ use aptos_db::AptosDB;
use aptos_executor::{block_executor::BlockExecutor, db_bootstrapper};
use aptos_executor_types::BlockExecutorTrait;
use aptos_framework::BuiltPackage;
+use aptos_indexer_grpc_table_info::internal_indexer_db_service::MockInternalIndexerDBService;
use aptos_mempool::mocks::MockSharedMempool;
use aptos_mempool_notifications::MempoolNotificationSender;
use aptos_sdk::{
@@ -94,7 +95,7 @@ impl ApiSpecificConfig {
pub fn new_test_context(
test_name: String,
- node_config: NodeConfig,
+ mut node_config: NodeConfig,
use_db_with_indexer: bool,
) -> TestContext {
// Speculative logging uses a global variable and when many instances use it together, they
@@ -119,17 +120,27 @@ pub fn new_test_context(
let validator_owner = validator_identity.account_address.unwrap();
let (db, db_rw) = if use_db_with_indexer {
- DbReaderWriter::wrap(AptosDB::new_for_test_with_indexer(&tmp_dir))
+ DbReaderWriter::wrap(AptosDB::new_for_test_with_indexer(
+ &tmp_dir,
+ node_config.storage.rocksdb_configs.enable_storage_sharding,
+ ))
} else {
DbReaderWriter::wrap(
AptosDB::open(
StorageDirPaths::from_path(&tmp_dir),
false, /* readonly */
NO_OP_STORAGE_PRUNER_CONFIG, /* pruner */
- RocksdbConfigs::default(),
+ RocksdbConfigs {
+ enable_storage_sharding: node_config
+ .storage
+ .rocksdb_configs
+ .enable_storage_sharding,
+ ..Default::default()
+ },
false, /* indexer */
- BUFFERED_STATE_TARGET_ITEMS,
+ BUFFERED_STATE_TARGET_ITEMS_FOR_TEST,
DEFAULT_MAX_NUM_NODES_PER_LRU_CACHE_SHARD,
+ None,
)
.unwrap(),
)
@@ -140,12 +151,18 @@ pub fn new_test_context(
let mempool = MockSharedMempool::new_in_runtime(&db_rw, VMValidator::new(db.clone()));
+ node_config
+ .storage
+ .set_data_dir(tmp_dir.path().to_path_buf());
+ let mock_indexer_service =
+ MockInternalIndexerDBService::new_for_test(db_rw.reader.clone(), &node_config);
+
let context = Context::new(
ChainId::test(),
db.clone(),
mempool.ac_client.clone(),
node_config.clone(),
- None, /* table info reader */
+ mock_indexer_service.get_indexer_reader(),
);
// Configure the testing depending on which API version we're testing.
diff --git a/api/types/src/bytecode.rs b/api/types/src/bytecode.rs
index 83e6ab0b8d89f..0f9a40e243805 100644
--- a/api/types/src/bytecode.rs
+++ b/api/types/src/bytecode.rs
@@ -46,6 +46,16 @@ pub trait Bytecode {
fn function_is_view(&self, name: &IdentStr) -> bool;
+ fn struct_is_event(&self, name: &IdentStr) -> bool {
+ match self.metadata() {
+ Some(m) => match m.struct_attributes.get(name.as_str()) {
+ Some(attrs) => attrs.iter().any(|attr| attr.is_event()),
+ None => false,
+ },
+ None => false,
+ }
+ }
+
fn new_move_struct_field(&self, def: &FieldDefinition) -> MoveStructField {
MoveStructField {
name: self.identifier_at(def.name).to_owned().into(),
@@ -109,8 +119,13 @@ pub trait Bytecode {
.map(|f| self.new_move_struct_field(f))
.collect(),
),
+ StructFieldInformation::DeclaredVariants(..) => {
+ // TODO(#13806): implement for enums. Currently we pretend they don't have fields
+ (false, vec![])
+ },
};
let name = self.identifier_at(handle.name).to_owned();
+ let is_event = self.struct_is_event(&name);
let abilities = handle
.abilities
.into_iter()
@@ -124,6 +139,7 @@ pub trait Bytecode {
MoveStruct {
name: name.into(),
is_native,
+ is_event,
abilities,
generic_type_params,
fields,
diff --git a/api/types/src/convert.rs b/api/types/src/convert.rs
index d7d160fb1d585..c5101f72d7d2e 100644
--- a/api/types/src/convert.rs
+++ b/api/types/src/convert.rs
@@ -45,6 +45,7 @@ use move_core_types::{
ident_str,
identifier::{IdentStr, Identifier},
language_storage::{ModuleId, StructTag, TypeTag},
+ transaction_argument::convert_txn_args,
value::{MoveStructLayout, MoveTypeLayout},
};
use serde_json::Value;
@@ -154,7 +155,10 @@ impl<'a, S: StateView> MoveConverter<'a, S> {
&self,
typ: &StructTag,
bytes: &'_ [u8],
- ) -> Result> {
+ ) -> Result<(
+ Option,
+ Vec<(Identifier, move_core_types::value::MoveValue)>,
+ )> {
self.inner.view_struct_fields(typ, bytes)
}
@@ -272,7 +276,26 @@ impl<'a, S: StateView> MoveConverter<'a, S> {
) -> Result {
use aptos_types::transaction::TransactionPayload::*;
let ret = match payload {
- Script(s) => TransactionPayload::ScriptPayload(s.try_into()?),
+ Script(s) => {
+ let (code, ty_args, args) = s.into_inner();
+ let script_args = self.inner.view_script_arguments(&code, &args, &ty_args);
+
+ let json_args = match script_args {
+ Ok(values) => values
+ .into_iter()
+ .map(|v| MoveValue::try_from(v)?.json())
+ .collect::>()?,
+ Err(_e) => convert_txn_args(&args)
+ .into_iter()
+ .map(|arg| HexEncodedBytes::from(arg).json())
+ .collect::>()?,
+ };
+ TransactionPayload::ScriptPayload(ScriptPayload {
+ code: MoveScriptBytecode::new(code).try_parse_abi(),
+ type_arguments: ty_args.into_iter().map(|arg| arg.into()).collect(),
+ arguments: json_args,
+ })
+ },
EntryFunction(fun) => {
let (module, function, ty_args, args) = fun.into_inner();
let func_args = self
@@ -988,14 +1011,9 @@ impl<'a, S: StateView> MoveConverter<'a, S> {
fn get_table_info(&self, handle: TableHandle) -> Result