diff --git a/.cargo/config b/.cargo/config.toml
similarity index 86%
rename from .cargo/config
rename to .cargo/config.toml
index b6879bf01e5f0..47c98de4efc2a 100644
--- a/.cargo/config
+++ b/.cargo/config.toml
@@ -7,6 +7,7 @@ xclippy = [
"clippy", "--all-targets", "--all-features", "--",
"-Wclippy::all",
"-Wclippy::disallowed_methods",
+ "-Aclippy::unnecessary_get_then_check",
]
xlint = "run --package x --bin x -- lint"
xtest = "run --package x --bin x -- external-crates-tests"
@@ -22,6 +23,9 @@ move-clippy = [
"-Aclippy::upper_case_acronyms",
"-Aclippy::type_complexity",
"-Aclippy::new_without_default",
+ "-Aclippy::question_mark",
+ "-Aclippy::unnecessary_get_then_check",
+ "-Aclippy::needless_borrows_for_generic_args",
]
mysql-clippy = [
@@ -38,6 +42,7 @@ mysql-clippy = [
"-Aclippy::upper_case_acronyms",
"-Aclippy::type_complexity",
"-Aclippy::new_without_default",
+ "-Aclippy::unnecessary_get_then_check",
]
[build]
diff --git a/.github/workflows/release-notes-generator.yml b/.github/workflows/release-notes-generator.yml
new file mode 100644
index 0000000000000..993efe023436f
--- /dev/null
+++ b/.github/workflows/release-notes-generator.yml
@@ -0,0 +1,71 @@
+name: Create Sui Release with Release Notes
+
+concurrency: ${{ github.workflow }}-${{ inputs.release_tag }}
+
+on:
+ workflow_dispatch:
+ inputs:
+ release_tag:
+ description: 'Sui Release Tag'
+ type: string
+ required: true
+ previous_branch:
+ description: 'Previous Release Branch (Ex: releases/sui-vX.XX.X-release)'
+ type: string
+ required: true
+ current_branch:
+ description: 'Current Release Branch (Ex: releases/sui-vX.XX.X-release)'
+ type: string
+ required: true
+
+env:
+ RELEASE_NOTES_FILE: "./release_notes.txt"
+
+jobs:
+ get-release-notes:
+ name: Get Release Notes for ${{ inputs.release_tag }} release
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Get commits for branches
+ shell: bash
+ working-directory: ./
+ run: |
+ echo "previous_commit=$(curl https://api.github.com/repos/MystenLabs/sui/commits/${{ inputs.previous_branch }} | jq .sha)" >> $GITHUB_ENV
+ echo "current_commit=$(curl https://api.github.com/repos/MystenLabs/sui/commits/${{ inputs.current_branch }} | jq .sha)" >> $GITHUB_ENV
+
+ - name: Checkout main
+ uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # Pin v4.1.1
+ with:
+ fetch-depth: 0
+ ref: main
+
+ - name: Setup Python
+ uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # pin@v5.0.0
+ with:
+ python-version: 3.10.10
+
+ - name: Generate Release Notes
+ shell: bash
+ working-directory: ./
+ run: |
+ GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} python ./scripts/release_notes.py generate ${{ env.previous_commit }} ${{ env.current_commit }} | tee -a ${{ env.RELEASE_NOTES_FILE }}
+ echo "---" >> ${{ env.RELEASE_NOTES_FILE }}
+ echo "#### Full Log: https://github.com/MystenLabs/sui/commits/${{ inputs.release_tag }}" >> ${{ env.RELEASE_NOTES_FILE }}
+
+ if [[ ${{ inputs.release_tag }} == devnet* ]]; then
+ echo "pre_release=true" >> $GITHUB_ENV
+ else
+ echo "pre_release=false" >> $GITHUB_ENV
+ fi
+
+ - name: Create Release
+ uses: actions/create-release@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
+ with:
+ tag_name: ${{ inputs.release_tag }}
+ release_name: ${{ inputs.release_tag }}
+ body_path: ${{ env.RELEASE_NOTES_FILE }}
+ draft: false
+ prerelease: ${{ env.pre_release }}
diff --git a/Cargo.lock b/Cargo.lock
index 988cc85bff310..fd91fa9a6cbee 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -38,6 +38,12 @@ version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
+[[package]]
+name = "adler2"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
+
[[package]]
name = "aead"
version = "0.5.2"
@@ -177,7 +183,7 @@ dependencies = [
"rcgen",
"ring 0.17.8",
"rustls 0.23.12",
- "rustls-webpki 0.102.6",
+ "rustls-webpki 0.102.7",
"serde",
"serde_json",
"socket2 0.5.7",
@@ -208,10 +214,10 @@ name = "anemo-build"
version = "0.0.0"
source = "git+https://github.com/mystenlabs/anemo.git?rev=dbb5a074c2d25660525ab5d36d65ff0cb8051949#dbb5a074c2d25660525ab5d36d65ff0cb8051949"
dependencies = [
- "prettyplease 0.2.20",
+ "prettyplease 0.2.22",
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -254,15 +260,6 @@ version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299"
-[[package]]
-name = "ansi_term"
-version = "0.12.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
-dependencies = [
- "winapi",
-]
-
[[package]]
name = "anstream"
version = "0.6.15"
@@ -423,7 +420,7 @@ version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348"
dependencies = [
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -436,7 +433,7 @@ dependencies = [
"num-bigint 0.4.6",
"num-traits",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -509,7 +506,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -549,9 +546,9 @@ checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b"
[[package]]
name = "arrayvec"
-version = "0.7.4"
+version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711"
+checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50"
[[package]]
name = "arrow"
@@ -1024,7 +1021,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
"synstructure",
]
@@ -1036,7 +1033,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -1062,7 +1059,7 @@ version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a3203e79f4dd9bdda415ed03cf14dae5a2bf775c683a00f94e9cd1faf0f596e5"
dependencies = [
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -1113,7 +1110,7 @@ checksum = "d7ebdfa2ebdab6b1760375fa7d6f382b9f486eac35fc994625a00e89280bdbb7"
dependencies = [
"async-task 4.7.1",
"concurrent-queue",
- "fastrand 2.1.0",
+ "fastrand 2.1.1",
"futures-lite 2.3.0",
"slab",
]
@@ -1202,9 +1199,9 @@ dependencies = [
"darling 0.20.10",
"proc-macro-crate 1.1.3",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"strum 0.25.0",
- "syn 2.0.74",
+ "syn 2.0.76",
"thiserror",
]
@@ -1265,7 +1262,7 @@ dependencies = [
"futures-lite 2.3.0",
"parking",
"polling 3.7.3",
- "rustix 0.38.34",
+ "rustix 0.38.35",
"slab",
"tracing",
"windows-sys 0.59.0",
@@ -1298,8 +1295,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -1347,8 +1344,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -1369,8 +1366,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -1426,12 +1423,13 @@ checksum = "62af46d040ba9df09edc6528dae9d8e49f5f3e82f55b7d2ec31a733c38dbc49d"
[[package]]
name = "atomicwrites"
-version = "0.3.1"
+version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eb8f2cd6962fa53c0e2a9d3f97eaa7dbd1e3cbbeeb4745403515b42ae07b3ff6"
+checksum = "fc7b2dbe9169059af0f821e811180fddc971fc210c776c133c7819ccd6e478db"
dependencies = [
+ "rustix 0.38.35",
"tempfile",
- "winapi",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -1441,8 +1439,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -1475,7 +1473,7 @@ dependencies = [
"aws-smithy-types",
"aws-types",
"bytes",
- "fastrand 2.1.0",
+ "fastrand 2.1.1",
"hex",
"http 0.2.12",
"hyper 0.14.30",
@@ -1495,7 +1493,7 @@ checksum = "70a66ac8ef5fa9cf01c2d999f39d16812e90ec1467bd382cbbb74ba23ea86201"
dependencies = [
"aws-smithy-async",
"aws-smithy-types",
- "fastrand 2.1.0",
+ "fastrand 2.1.1",
"tokio",
"tracing",
"zeroize",
@@ -1535,7 +1533,7 @@ dependencies = [
"aws-smithy-runtime-api",
"aws-smithy-types",
"aws-types",
- "fastrand 2.1.0",
+ "fastrand 2.1.1",
"http 0.2.12",
"percent-encoding",
"tracing",
@@ -1560,7 +1558,7 @@ dependencies = [
"aws-smithy-types",
"aws-types",
"bytes",
- "fastrand 2.1.0",
+ "fastrand 2.1.1",
"http 0.2.12",
"regex",
"tokio-stream",
@@ -1586,7 +1584,7 @@ dependencies = [
"aws-smithy-types",
"aws-smithy-xml",
"aws-types",
- "fastrand 2.1.0",
+ "fastrand 2.1.1",
"http 0.2.12",
"regex",
"tokio-stream",
@@ -1738,7 +1736,7 @@ dependencies = [
"aws-smithy-http-tower",
"aws-smithy-types",
"bytes",
- "fastrand 2.1.0",
+ "fastrand 2.1.1",
"http 0.2.12",
"http-body 0.4.6",
"hyper 0.14.30",
@@ -1832,7 +1830,7 @@ dependencies = [
"aws-smithy-runtime-api",
"aws-smithy-types",
"bytes",
- "fastrand 2.1.0",
+ "fastrand 2.1.1",
"http 0.2.12",
"http-body 0.4.6",
"once_cell",
@@ -2069,7 +2067,7 @@ dependencies = [
"cc",
"cfg-if",
"libc",
- "miniz_oxide",
+ "miniz_oxide 0.7.4",
"object",
"rustc-demangle",
]
@@ -2226,7 +2224,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3deeecb812ca5300b7d3f66f730cc2ebd3511c3d36c691dd79c165d5b19a26e3"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -2238,7 +2236,7 @@ checksum = "230c5f1ca6a325a32553f8640d31ac9b49f2411e901e427570154868b46da4f7"
[[package]]
name = "bin-version"
-version = "1.31.1"
+version = "1.32.0"
dependencies = [
"const-str",
"git-version",
@@ -2265,13 +2263,13 @@ dependencies = [
"lazy_static",
"lazycell",
"peeking_take_while",
- "prettyplease 0.2.20",
+ "prettyplease 0.2.22",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"regex",
"rustc-hash 1.1.0",
"shlex",
- "syn 2.0.74",
+ "syn 2.0.76",
]
[[package]]
@@ -2404,8 +2402,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780"
dependencies = [
"arrayref",
- "arrayvec 0.7.4",
- "constant_time_eq 0.3.0",
+ "arrayvec 0.7.6",
+ "constant_time_eq 0.3.1",
]
[[package]]
@@ -2415,21 +2413,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94230421e395b9920d23df13ea5d77a20e1725331f90fbbf6df6040b33f756ae"
dependencies = [
"arrayref",
- "arrayvec 0.7.4",
- "constant_time_eq 0.3.0",
+ "arrayvec 0.7.6",
+ "constant_time_eq 0.3.1",
]
[[package]]
name = "blake3"
-version = "1.5.3"
+version = "1.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e9ec96fe9a81b5e365f9db71fe00edc4fe4ca2cc7dcb7861f0603012a7caa210"
+checksum = "d82033247fd8e890df8f740e407ad4d038debb9eb1f40533fffb32e7d17dc6f7"
dependencies = [
"arrayref",
- "arrayvec 0.7.4",
+ "arrayvec 0.7.6",
"cc",
"cfg-if",
- "constant_time_eq 0.3.0",
+ "constant_time_eq 0.3.1",
]
[[package]]
@@ -2475,7 +2473,7 @@ dependencies = [
"maplit",
"paste",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -2541,9 +2539,9 @@ dependencies = [
[[package]]
name = "bnum"
-version = "0.10.0"
+version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "56953345e39537a3e18bdaeba4cb0c58a78c1f61f361dc0fa7c5c7340ae87c5f"
+checksum = "3e31ea183f6ee62ac8b8a8cf7feddd766317adfb13ff469de57ce033efd6a790"
[[package]]
name = "brotli"
@@ -2647,7 +2645,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3db406d29fbcd95542e92559bed4d8ad92636d1ca8b3b72ede10b4bcc010e659"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -2659,9 +2657,9 @@ checksum = "5ce89b21cab1437276d2650d57e971f9d548a2d9037cc231abdc0562b97498ce"
[[package]]
name = "bytemuck"
-version = "1.16.3"
+version = "1.17.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "102087e286b4677862ea56cf8fc58bb2cdfa8725c40ffb80fe3a008eb7f2fc83"
+checksum = "773d90827bc3feecfb67fab12e24de0749aad83c74b9504ecde46237b5cd24e2"
[[package]]
name = "byteorder"
@@ -2746,7 +2744,7 @@ dependencies = [
"cached_proc_macro_types",
"darling 0.14.4",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -2758,9 +2756,9 @@ checksum = "ade8366b8bd5ba243f0a58f036cc0ca8a2f069cff1a2351ef1cac6b083e16fc0"
[[package]]
name = "camino"
-version = "1.1.7"
+version = "1.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239"
+checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3"
dependencies = [
"serde",
]
@@ -2785,7 +2783,7 @@ checksum = "434168fe6533055f0f4204039abe3ff6d7db338ef46872a5fa39e9d5ad5ab7a9"
dependencies = [
"cap-primitives",
"cap-std",
- "rustix 0.38.34",
+ "rustix 0.38.35",
"smallvec",
]
@@ -2801,7 +2799,7 @@ dependencies = [
"io-lifetimes 2.0.3",
"ipnet",
"maybe-owned",
- "rustix 0.38.34",
+ "rustix 0.38.35",
"windows-sys 0.52.0",
"winx",
]
@@ -2825,7 +2823,7 @@ dependencies = [
"cap-primitives",
"io-extras",
"io-lifetimes 2.0.3",
- "rustix 0.38.34",
+ "rustix 0.38.35",
]
[[package]]
@@ -2838,7 +2836,7 @@ dependencies = [
"cap-primitives",
"iana-time-zone",
"once_cell",
- "rustix 0.38.34",
+ "rustix 0.38.35",
"winx",
]
@@ -2902,12 +2900,13 @@ dependencies = [
[[package]]
name = "cc"
-version = "1.1.10"
+version = "1.1.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e9e8aabfac534be767c909e0690571677d49f41bd8465ae876fe043d52ba5292"
+checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6"
dependencies = [
"jobserver",
"libc",
+ "shlex",
]
[[package]]
@@ -2921,9 +2920,9 @@ dependencies = [
[[package]]
name = "cfg-expr"
-version = "0.15.8"
+version = "0.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02"
+checksum = "345c78335be0624ed29012dc10c49102196c6882c12dde65d9f35b02da2aada8"
dependencies = [
"smallvec",
"target-lexicon",
@@ -3033,9 +3032,9 @@ dependencies = [
[[package]]
name = "clap"
-version = "4.5.15"
+version = "4.5.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "11d8838454fda655dafd3accb2b6e2bea645b9e4078abe84a22ceb947235c5cc"
+checksum = "ed6719fffa43d0d87e5fd8caeab59be1554fb028cd30edc88fc4369b17971019"
dependencies = [
"clap_builder",
"clap_derive",
@@ -3062,8 +3061,8 @@ checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0"
dependencies = [
"heck 0.5.0",
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -3205,17 +3204,6 @@ dependencies = [
"windows-sys 0.48.0",
]
-[[package]]
-name = "colored-diff"
-version = "0.2.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "410208eb08c3f3ad44b95b51c4fc0d5993cbcc9dd39cfadb4214b9115a97dcb5"
-dependencies = [
- "ansi_term",
- "dissimilar",
- "itertools 0.10.5",
-]
-
[[package]]
name = "combine"
version = "4.6.7"
@@ -3309,8 +3297,8 @@ dependencies = [
"tokio-rustls 0.26.0",
"tokio-stream",
"tokio-util 0.7.11",
- "tonic 0.12.1",
- "tonic-build 0.12.1",
+ "tonic 0.12.2",
+ "tonic-build 0.12.2",
"tower",
"tower-http",
"tracing",
@@ -3420,9 +3408,9 @@ checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc"
[[package]]
name = "constant_time_eq"
-version = "0.3.0"
+version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2"
+checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6"
[[package]]
name = "containers-api"
@@ -3541,6 +3529,15 @@ dependencies = [
"siphasher",
]
+[[package]]
+name = "counter"
+version = "0.5.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2d458e66999348f56fd3ffcfbb7f7951542075ca8359687c703de6500c1ddccd"
+dependencies = [
+ "num-traits",
+]
+
[[package]]
name = "cpp_demangle"
version = "0.3.5"
@@ -3552,9 +3549,9 @@ dependencies = [
[[package]]
name = "cpp_demangle"
-version = "0.4.3"
+version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7e8227005286ec39567949b33df9896bcadfa6051bccca2488129f108ca23119"
+checksum = "96e58d342ad113c2b878f16d5d034c03be492ae460cdbc02b7f0f2284d310c7d"
dependencies = [
"cfg-if",
]
@@ -3592,7 +3589,7 @@ version = "0.91.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "98b022ed2a5913a38839dfbafe6cf135342661293b08049843362df4301261dc"
dependencies = [
- "arrayvec 0.7.4",
+ "arrayvec 0.7.6",
"bumpalo",
"cranelift-bforest 0.91.1",
"cranelift-codegen-meta 0.91.1",
@@ -4028,8 +4025,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -4045,6 +4042,62 @@ dependencies = [
"zeroize",
]
+[[package]]
+name = "cynic"
+version = "3.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "478c02b53607e3f21c374f024c2cfc2154e554905bba478e8e09409f10ce3726"
+dependencies = [
+ "cynic-proc-macros",
+ "ref-cast",
+ "reqwest 0.12.7",
+ "serde",
+ "serde_json",
+ "static_assertions",
+ "thiserror",
+]
+
+[[package]]
+name = "cynic-codegen"
+version = "3.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7c0ec86f960a00ce087e96ff6f073f6ff28b6876d69ce8caa06c03fb4143981c"
+dependencies = [
+ "counter",
+ "cynic-parser",
+ "darling 0.20.10",
+ "once_cell",
+ "ouroboros 0.18.4",
+ "proc-macro2 1.0.86",
+ "quote 1.0.37",
+ "strsim 0.10.0",
+ "syn 2.0.76",
+ "thiserror",
+]
+
+[[package]]
+name = "cynic-parser"
+version = "0.4.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "718f6cd8c54ae5249fd42b0c86639df0100b8a86eea2e5f1b915cde2e1481453"
+dependencies = [
+ "indexmap 2.4.0",
+ "lalrpop-util",
+ "logos",
+]
+
+[[package]]
+name = "cynic-proc-macros"
+version = "3.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "25a69ecdf4aa110fed1c0c8de290bc8ccb2835388733cf2f418f0abdf6ff3899"
+dependencies = [
+ "cynic-codegen",
+ "darling 0.20.10",
+ "quote 1.0.37",
+ "syn 2.0.76",
+]
+
[[package]]
name = "darling"
version = "0.13.4"
@@ -4084,7 +4137,7 @@ dependencies = [
"fnv",
"ident_case",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"strsim 0.10.0",
"syn 1.0.109",
]
@@ -4098,7 +4151,7 @@ dependencies = [
"fnv",
"ident_case",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"strsim 0.10.0",
"syn 1.0.109",
]
@@ -4112,9 +4165,9 @@ dependencies = [
"fnv",
"ident_case",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"strsim 0.11.1",
- "syn 2.0.74",
+ "syn 2.0.76",
]
[[package]]
@@ -4124,7 +4177,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835"
dependencies = [
"darling_core 0.13.4",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -4135,7 +4188,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e"
dependencies = [
"darling_core 0.14.4",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -4146,8 +4199,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806"
dependencies = [
"darling_core 0.20.10",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -4433,7 +4486,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -4444,7 +4497,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e79116f119dd1dba1abf1f3405f03b9b0e79a27a3883864bfebded8a3dc768cd"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -4455,8 +4508,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -4476,7 +4529,7 @@ checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f"
dependencies = [
"darling 0.14.4",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -4498,16 +4551,16 @@ checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce"
dependencies = [
"convert_case",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"rustc_version",
- "syn 2.0.74",
+ "syn 2.0.76",
]
[[package]]
name = "determinator"
-version = "0.10.0"
+version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c644b91adb5bcc66d3533607b6d3ee5c1c2d858d2d95e41dd6aae673e29e0509"
+checksum = "bf14b901cdfba3f731d01c4c184100e85f586a272d38874824175b845dbaeaf9"
dependencies = [
"camino",
"globset",
@@ -4522,9 +4575,9 @@ dependencies = [
[[package]]
name = "diesel"
-version = "2.2.2"
+version = "2.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bf97ee7261bb708fa3402fa9c17a54b70e90e3cb98afb3dc8999d5512cb03f94"
+checksum = "65e13bab2796f412722112327f3e575601a3e9cdcbe426f0d30dbf43f3f5dc71"
dependencies = [
"bitflags 2.6.0",
"byteorder",
@@ -4547,21 +4600,21 @@ checksum = "81c5131a2895ef64741dad1d483f358c2a229a3a2d1b256778cdc5e146db64d4"
dependencies = [
"heck 0.4.1",
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
name = "diesel_derives"
-version = "2.2.2"
+version = "2.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d6ff2be1e7312c858b2ef974f5c7089833ae57b5311b334b30923af58e5718d8"
+checksum = "e7f2c3de51e2ba6bf2a648285696137aaf0f5f487bcbea93972fe8a364e131a4"
dependencies = [
"diesel_table_macro_syntax",
"dsl_auto_type",
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -4581,7 +4634,7 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "209c735641a413bc68c4923a9d6ad4bcb3ca306b794edaa7eb0b3228a99ffb25"
dependencies = [
- "syn 2.0.74",
+ "syn 2.0.76",
]
[[package]]
@@ -4720,8 +4773,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -4801,8 +4854,8 @@ dependencies = [
"either",
"heck 0.5.0",
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -5018,8 +5071,8 @@ checksum = "5ffccbb6966c05b32ef8fbac435df276c4ae4d3dc55a8cd0eb9745e6c12f546a"
dependencies = [
"heck 0.4.1",
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -5045,7 +5098,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c134c37760b27a871ba422106eedbb8247da973a09e82558bf26d619c882b159"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -5057,8 +5110,8 @@ checksum = "aa18ce2bc66555b3218614519ac839ddb759a7d6720732f979ef8d13be147ecd"
dependencies = [
"once_cell",
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -5078,8 +5131,8 @@ checksum = "59c3b24c345d8c314966bdc1832f6c2635bfcce8e7cf363bd115987bba2ee242"
dependencies = [
"darling 0.20.10",
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -5279,14 +5332,14 @@ dependencies = [
"ethers-core",
"ethers-etherscan",
"eyre",
- "prettyplease 0.2.20",
+ "prettyplease 0.2.22",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"regex",
"reqwest 0.11.27",
"serde",
"serde_json",
- "syn 2.0.74",
+ "syn 2.0.76",
"toml 0.8.19",
"walkdir",
]
@@ -5302,9 +5355,9 @@ dependencies = [
"ethers-contract-abigen",
"ethers-core",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"serde_json",
- "syn 2.0.74",
+ "syn 2.0.76",
]
[[package]]
@@ -5313,7 +5366,7 @@ version = "2.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "82d80cc6ad30b14a48ab786523af33b37f28a8623fc06afd55324816ef18fb1f"
dependencies = [
- "arrayvec 0.7.4",
+ "arrayvec 0.7.6",
"bytes",
"cargo_metadata 0.18.1",
"chrono",
@@ -5330,11 +5383,11 @@ dependencies = [
"serde",
"serde_json",
"strum 0.26.3",
- "syn 2.0.74",
+ "syn 2.0.76",
"tempfile",
"thiserror",
"tiny-keccak",
- "unicode-xid 0.2.4",
+ "unicode-xid 0.2.5",
]
[[package]]
@@ -5466,7 +5519,7 @@ dependencies = [
"tokio",
"tracing",
"walkdir",
- "yansi",
+ "yansi 0.5.1",
]
[[package]]
@@ -5622,7 +5675,7 @@ name = "fastcrypto-derive"
version = "0.1.3"
source = "git+https://github.com/MystenLabs/fastcrypto?rev=5f2c63266a065996d53f98156f0412782b468597#5f2c63266a065996d53f98156f0412782b468597"
dependencies = [
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -5687,7 +5740,7 @@ dependencies = [
"num-bigint 0.4.6",
"once_cell",
"regex",
- "reqwest 0.12.5",
+ "reqwest 0.12.7",
"schemars",
"serde",
"serde_json",
@@ -5705,9 +5758,9 @@ dependencies = [
[[package]]
name = "fastrand"
-version = "2.1.0"
+version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a"
+checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6"
[[package]]
name = "fd-lock"
@@ -5716,7 +5769,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ef033ed5e9bad94e55838ca0ca906db0e043f517adda0c8b79c7a8c66c93c1b5"
dependencies = [
"cfg-if",
- "rustix 0.38.34",
+ "rustix 0.38.35",
"windows-sys 0.48.0",
]
@@ -5727,7 +5780,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e5768da2206272c81ef0b5e951a41862938a6070da63bcea197899942d3b947"
dependencies = [
"cfg-if",
- "rustix 0.38.34",
+ "rustix 0.38.35",
"windows-sys 0.52.0",
]
@@ -5775,7 +5828,7 @@ dependencies = [
"num-integer",
"num-traits",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -5793,15 +5846,15 @@ checksum = "cca4fdab1b9b7e274e7de51202e37f9cfa542b28c77f8d09b817d77a726b4807"
dependencies = [
"darling 0.13.4",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
[[package]]
name = "filetime"
-version = "0.2.24"
+version = "0.2.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bf401df4a4e3872c4fe8151134cf483738e74b67fc934d6532c882b3d24a4550"
+checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586"
dependencies = [
"cfg-if",
"libc",
@@ -5879,12 +5932,12 @@ dependencies = [
[[package]]
name = "flate2"
-version = "1.0.31"
+version = "1.0.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f211bbe8e69bbd0cfdea405084f128ae8b4aaa6b0b522fc8f2b009084797920"
+checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253"
dependencies = [
"crc32fast",
- "miniz_oxide",
+ "miniz_oxide 0.8.0",
]
[[package]]
@@ -5934,7 +5987,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "033b337d725b97690d86893f9de22b67b80dcc4e9ad815f348254c38119db8fb"
dependencies = [
"io-lifetimes 2.0.3",
- "rustix 0.38.34",
+ "rustix 0.38.35",
"windows-sys 0.52.0",
]
@@ -6044,7 +6097,7 @@ version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5"
dependencies = [
- "fastrand 2.1.0",
+ "fastrand 2.1.1",
"futures-core",
"futures-io",
"parking",
@@ -6068,8 +6121,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -6146,7 +6199,7 @@ dependencies = [
"hyper 0.14.30",
"hyper-rustls 0.25.0",
"log",
- "reqwest 0.12.5",
+ "reqwest 0.12.7",
"serde",
"serde_json",
"thiserror",
@@ -6241,8 +6294,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "53010ccb100b96a67bc32c0175f0ed1426b31b655d562898e57325f81c023ac0"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -6322,19 +6375,20 @@ dependencies = [
[[package]]
name = "guppy"
-version = "0.15.2"
+version = "0.17.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f822a2716041492e071691606474f5a7e4fa7c2acbfd7da7b29884fb448291c7"
+checksum = "3bff2f6a9d515cf6453282af93363f93bdf570792a6f4f619756e46696d773fa"
dependencies = [
+ "ahash 0.8.11",
"camino",
- "cargo_metadata 0.15.4",
+ "cargo_metadata 0.18.1",
"cfg-if",
"debug-ignore",
"fixedbitset 0.4.2",
"guppy-summaries",
"guppy-workspace-hack",
- "indexmap 1.9.3",
- "itertools 0.10.5",
+ "indexmap 2.4.0",
+ "itertools 0.13.0",
"nested",
"once_cell",
"pathdiff",
@@ -6391,9 +6445,9 @@ dependencies = [
[[package]]
name = "h2"
-version = "0.4.5"
+version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab"
+checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205"
dependencies = [
"atomic-waker",
"bytes",
@@ -6410,10 +6464,11 @@ dependencies = [
[[package]]
name = "hakari"
-version = "0.13.2"
+version = "0.17.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2af0223111b69beda15417ad6a960bffb093c916f0eaa559036c7036efa2d199"
+checksum = "12bd2b14c094d2793daf279eb7624f4525e26f555fbc1647613756cf83f44755"
dependencies = [
+ "ahash 0.8.11",
"atomicwrites",
"bimap",
"camino",
@@ -6424,7 +6479,7 @@ dependencies = [
"guppy-workspace-hack",
"include_dir",
"indenter",
- "itertools 0.10.5",
+ "itertools 0.12.1",
"owo-colors 3.5.0",
"pathdiff",
"rayon",
@@ -6746,7 +6801,7 @@ dependencies = [
"bytes",
"futures-channel",
"futures-util",
- "h2 0.4.5",
+ "h2 0.4.6",
"http 1.1.0",
"http-body 1.0.1",
"httparse",
@@ -6801,7 +6856,7 @@ dependencies = [
"hyper 0.14.30",
"log",
"rustls 0.22.4",
- "rustls-native-certs 0.7.1",
+ "rustls-native-certs 0.7.3",
"rustls-pki-types",
"tokio",
"tokio-rustls 0.25.0",
@@ -6818,7 +6873,7 @@ dependencies = [
"hyper 1.4.1",
"hyper-util",
"rustls 0.23.12",
- "rustls-native-certs 0.7.1",
+ "rustls-native-certs 0.7.3",
"rustls-pki-types",
"tokio",
"tokio-rustls 0.26.0",
@@ -7001,7 +7056,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -7022,7 +7077,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7cab85a7ed0bd5f0e76d93846e0147172bed2e2d3f859bcc33a8d9699cad1a75"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
]
[[package]]
@@ -7208,11 +7263,11 @@ dependencies = [
[[package]]
name = "is-terminal"
-version = "0.4.12"
+version = "0.4.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b"
+checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b"
dependencies = [
- "hermit-abi 0.3.9",
+ "hermit-abi 0.4.0",
"libc",
"windows-sys 0.52.0",
]
@@ -7406,7 +7461,7 @@ version = "0.16.2"
source = "git+https://github.com/wlmyng/jsonrpsee.git?rev=b1b300784795f6a64d0fcdf8f03081a9bc38bde8#b1b300784795f6a64d0fcdf8f03081a9bc38bde8"
dependencies = [
"anyhow",
- "arrayvec 0.7.4",
+ "arrayvec 0.7.6",
"async-lock 2.8.0",
"async-trait",
"beef",
@@ -7453,7 +7508,7 @@ dependencies = [
"heck 0.4.1",
"proc-macro-crate 1.1.3",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -7613,7 +7668,7 @@ dependencies = [
"string_cache",
"term",
"tiny-keccak",
- "unicode-xid 0.2.4",
+ "unicode-xid 0.2.5",
"walkdir",
]
@@ -7713,9 +7768,9 @@ dependencies = [
[[package]]
name = "libc"
-version = "0.2.155"
+version = "0.2.158"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c"
+checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439"
[[package]]
name = "libloading"
@@ -7784,9 +7839,9 @@ dependencies = [
[[package]]
name = "libz-sys"
-version = "1.1.19"
+version = "1.1.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fdc53a7799a7496ebc9fd29f31f7df80e83c9bda5299768af5f9e59eeea74647"
+checksum = "d2d16453e800a8cf6dd2fc3eb4bc99b786a9b90c663b8559a5b1a041bf89e472"
dependencies = [
"cc",
"pkg-config",
@@ -7831,6 +7886,39 @@ dependencies = [
"value-bag",
]
+[[package]]
+name = "logos"
+version = "0.14.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ff1ceb190eb9bdeecdd8f1ad6a71d6d632a50905948771718741b5461fb01e13"
+dependencies = [
+ "logos-derive",
+]
+
+[[package]]
+name = "logos-codegen"
+version = "0.14.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "90be66cb7bd40cb5cc2e9cfaf2d1133b04a3d93b72344267715010a466e0915a"
+dependencies = [
+ "beef",
+ "fnv",
+ "lazy_static",
+ "proc-macro2 1.0.86",
+ "quote 1.0.37",
+ "regex-syntax 0.8.4",
+ "syn 2.0.76",
+]
+
+[[package]]
+name = "logos-derive"
+version = "0.14.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "45154231e8e96586b39494029e58f12f8ffcb5ecf80333a603a13aa205ea8cbd"
+dependencies = [
+ "logos-codegen",
+]
+
[[package]]
name = "lru"
version = "0.7.8"
@@ -8040,12 +8128,6 @@ version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d"
-[[package]]
-name = "markdown-gen"
-version = "1.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8034621d7f1258317ca1dfb9205e3925d27ee4aa2a46620a09c567daf0310562"
-
[[package]]
name = "match_opt"
version = "0.1.2"
@@ -8118,7 +8200,7 @@ version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64"
dependencies = [
- "rustix 0.38.34",
+ "rustix 0.38.35",
]
[[package]]
@@ -8130,6 +8212,15 @@ dependencies = [
"libc",
]
+[[package]]
+name = "memmap2"
+version = "0.9.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322"
+dependencies = [
+ "libc",
+]
+
[[package]]
name = "memoffset"
version = "0.6.5"
@@ -8184,8 +8275,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dcf09caffaac8068c346b6df2a7fc27a177fd20b39421a39ce0a211bde679a6c"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -8206,7 +8297,7 @@ checksum = "ffb161cc72176cb37aa47f1fc520d3ef02263d67d661f44f05d05a079e1237fd"
dependencies = [
"migrations_internals",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
]
[[package]]
@@ -8240,6 +8331,15 @@ dependencies = [
"adler",
]
+[[package]]
+name = "miniz_oxide"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1"
+dependencies = [
+ "adler2",
+]
+
[[package]]
name = "mio"
version = "0.8.11"
@@ -8287,7 +8387,7 @@ checksum = "22ce75669015c4f47b289fd4d4f56e894e4c96003ffdf3ac51313126f94c6cbb"
dependencies = [
"cfg-if",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -8689,7 +8789,7 @@ dependencies = [
"move-ir-to-bytecode-syntax",
"move-ir-types",
"move-symbol-pool",
- "ouroboros",
+ "ouroboros 0.17.2",
]
[[package]]
@@ -8777,8 +8877,8 @@ name = "move-proc-macros"
version = "0.1.0"
dependencies = [
"enum-compat-util",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -9084,7 +9184,7 @@ dependencies = [
[[package]]
name = "msim"
version = "0.1.0"
-source = "git+https://github.com/MystenLabs/mysten-sim.git?rev=220f52a15804a768610ac0ae3b8da7de4a5c4d2b#220f52a15804a768610ac0ae3b8da7de4a5c4d2b"
+source = "git+https://github.com/MystenLabs/mysten-sim.git?rev=b320996d8dfb99b273fe31c0222c659332283c99#b320996d8dfb99b273fe31c0222c659332283c99"
dependencies = [
"ahash 0.7.8",
"async-task 4.3.0",
@@ -9113,11 +9213,11 @@ dependencies = [
[[package]]
name = "msim-macros"
version = "0.1.0"
-source = "git+https://github.com/MystenLabs/mysten-sim.git?rev=220f52a15804a768610ac0ae3b8da7de4a5c4d2b#220f52a15804a768610ac0ae3b8da7de4a5c4d2b"
+source = "git+https://github.com/MystenLabs/mysten-sim.git?rev=b320996d8dfb99b273fe31c0222c659332283c99#b320996d8dfb99b273fe31c0222c659332283c99"
dependencies = [
"darling 0.14.4",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -9188,7 +9288,7 @@ dependencies = [
"proc-macro-crate 1.1.3",
"proc-macro-error",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
"synstructure",
]
@@ -9207,9 +9307,9 @@ checksum = "defc4c55412d89136f966bbb339008b474350e5e6e78d2714439c386b3137a03"
[[package]]
name = "mysqlclient-sys"
-version = "0.4.0"
+version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b2aa3a303b6e9878b34811838301b00a56878693c47f9ac0ba397f91adc7bf12"
+checksum = "478e2040dbc35c73927b77a2be91a496de19deab376a6982ed61e89592434619"
dependencies = [
"pkg-config",
"vcpkg",
@@ -9237,6 +9337,7 @@ dependencies = [
"prometheus",
"prometheus-closure-metric",
"scopeguard",
+ "simple-server-timing-header",
"tap",
"tokio",
"tracing",
@@ -9259,7 +9360,7 @@ dependencies = [
"snap",
"tokio",
"tokio-stream",
- "tonic 0.12.1",
+ "tonic 0.12.2",
"tonic-health",
"tower",
"tower-http",
@@ -9276,6 +9377,7 @@ dependencies = [
"prometheus",
"serde",
"serde_json",
+ "simple-server-timing-header",
"telemetry-subscribers",
"tokio",
"tower",
@@ -9393,7 +9495,7 @@ dependencies = [
"tempfile",
"thiserror",
"tokio",
- "tonic 0.12.1",
+ "tonic 0.12.2",
"tracing",
"typed-store",
]
@@ -9455,7 +9557,7 @@ dependencies = [
"pretty_assertions",
"prometheus",
"rand 0.8.5",
- "reqwest 0.12.5",
+ "reqwest 0.12.7",
"serde-reflection",
"serde_yaml 0.8.26",
"sui-keys",
@@ -9509,7 +9611,7 @@ dependencies = [
"prometheus",
"proptest",
"rand 0.8.5",
- "reqwest 0.12.5",
+ "reqwest 0.12.7",
"sui-macros",
"sui-protocol-config",
"tap",
@@ -9573,7 +9675,7 @@ dependencies = [
"telemetry-subscribers",
"tempfile",
"tokio",
- "tonic 0.12.1",
+ "tonic 0.12.2",
"tracing",
"typed-store",
]
@@ -9615,8 +9717,8 @@ dependencies = [
"sui-protocol-config",
"thiserror",
"tokio",
- "tonic 0.12.1",
- "tonic-build 0.12.1",
+ "tonic 0.12.2",
+ "tonic-build 0.12.2",
"tracing",
"typed-store",
]
@@ -9649,14 +9751,14 @@ dependencies = [
"narwhal-types",
"prometheus",
"rand 0.8.5",
- "reqwest 0.12.5",
+ "reqwest 0.12.7",
"sui-protocol-config",
"tap",
"telemetry-subscribers",
"tempfile",
"thiserror",
"tokio",
- "tonic 0.12.1",
+ "tonic 0.12.2",
"tower",
"tracing",
"typed-store",
@@ -9705,7 +9807,7 @@ dependencies = [
[[package]]
name = "nexlint"
version = "0.1.0"
-source = "git+https://github.com/nextest-rs/nexlint.git?rev=94da5c787636dad779c340affa65219134d127f5#94da5c787636dad779c340affa65219134d127f5"
+source = "git+https://github.com/nextest-rs/nexlint.git?rev=7ce56bd591242a57660ed05f14ca2483c37d895b#7ce56bd591242a57660ed05f14ca2483c37d895b"
dependencies = [
"camino",
"debug-ignore",
@@ -9720,11 +9822,11 @@ dependencies = [
[[package]]
name = "nexlint-lints"
version = "0.1.0"
-source = "git+https://github.com/nextest-rs/nexlint.git?rev=94da5c787636dad779c340affa65219134d127f5#94da5c787636dad779c340affa65219134d127f5"
+source = "git+https://github.com/nextest-rs/nexlint.git?rev=7ce56bd591242a57660ed05f14ca2483c37d895b#7ce56bd591242a57660ed05f14ca2483c37d895b"
dependencies = [
"anyhow",
"camino",
- "colored-diff",
+ "diffy",
"globset",
"guppy",
"nexlint",
@@ -9854,7 +9956,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "16d0d3f2a488592e5368ebbe996e7f1d44aa13156efad201f5b4d84e150eaa93"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -9864,9 +9966,9 @@ version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fcc7c92f190c97f79b4a332f5e81dcf68c8420af2045c936c9be0bc9de6f63b5"
dependencies = [
- "proc-macro-crate 3.1.0",
+ "proc-macro-crate 3.2.0",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -9955,7 +10057,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -10063,8 +10165,8 @@ checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6"
dependencies = [
"proc-macro-crate 1.1.3",
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -10073,10 +10175,10 @@ version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56"
dependencies = [
- "proc-macro-crate 3.1.0",
+ "proc-macro-crate 3.2.0",
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -10145,7 +10247,7 @@ dependencies = [
"percent-encoding",
"quick-xml",
"rand 0.8.5",
- "reqwest 0.12.5",
+ "reqwest 0.12.7",
"ring 0.17.8",
"rustls-pemfile 2.1.3",
"serde",
@@ -10201,7 +10303,7 @@ version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce"
dependencies = [
- "arrayvec 0.7.4",
+ "arrayvec 0.7.6",
"auto_impl",
"bytes",
"ethereum-types",
@@ -10216,7 +10318,7 @@ checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c"
dependencies = [
"bytes",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -10373,7 +10475,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2ba07320d39dfea882faa70554b4bd342a5f273ed59ba7c1c6b4c840492c954"
dependencies = [
"aliasable",
- "ouroboros_macro",
+ "ouroboros_macro 0.17.2",
+ "static_assertions",
+]
+
+[[package]]
+name = "ouroboros"
+version = "0.18.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "944fa20996a25aded6b4795c6d63f10014a7a83f8be9828a11860b08c5fc4a67"
+dependencies = [
+ "aliasable",
+ "ouroboros_macro 0.18.4",
"static_assertions",
]
@@ -10386,8 +10499,22 @@ dependencies = [
"heck 0.4.1",
"proc-macro-error",
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
+]
+
+[[package]]
+name = "ouroboros_macro"
+version = "0.18.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "39b0deead1528fd0e5947a8546a9642a9777c25f6e1e26f34c97b204bbb465bd"
+dependencies = [
+ "heck 0.4.1",
+ "itertools 0.12.1",
+ "proc-macro2 1.0.86",
+ "proc-macro2-diagnostics",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -10452,7 +10579,7 @@ version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909"
dependencies = [
- "arrayvec 0.7.4",
+ "arrayvec 0.7.6",
"bitvec 0.20.4",
"byte-slice-cast",
"impl-trait-for-tuples",
@@ -10466,7 +10593,7 @@ version = "3.6.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee"
dependencies = [
- "arrayvec 0.7.4",
+ "arrayvec 0.7.6",
"bitvec 1.0.1",
"byte-slice-cast",
"impl-trait-for-tuples",
@@ -10482,7 +10609,7 @@ checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27"
dependencies = [
"proc-macro-crate 1.1.3",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -10492,9 +10619,9 @@ version = "3.6.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c"
dependencies = [
- "proc-macro-crate 3.1.0",
+ "proc-macro-crate 3.2.0",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -10828,8 +10955,8 @@ dependencies = [
"pest",
"pest_meta",
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -10912,8 +11039,8 @@ dependencies = [
"phf_generator",
"phf_shared 0.11.2",
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -10950,8 +11077,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -10973,7 +11100,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066"
dependencies = [
"atomic-waker",
- "fastrand 2.1.0",
+ "fastrand 2.1.1",
"futures-io",
]
@@ -11080,7 +11207,7 @@ dependencies = [
"concurrent-queue",
"hermit-abi 0.4.0",
"pin-project-lite",
- "rustix 0.38.34",
+ "rustix 0.38.35",
"tracing",
"windows-sys 0.59.0",
]
@@ -11122,9 +11249,9 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
[[package]]
name = "pprof"
-version = "0.11.1"
+version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "196ded5d4be535690899a4631cc9f18cdc41b7ebf24a79400f46f48e49a11059"
+checksum = "ef5c97c51bd34c7e742402e216abdeb44d415fbe6ae41d56b114723e953711cb"
dependencies = [
"backtrace",
"cfg-if",
@@ -11212,7 +11339,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66"
dependencies = [
"diff",
- "yansi",
+ "yansi 0.5.1",
]
[[package]]
@@ -11227,12 +11354,12 @@ dependencies = [
[[package]]
name = "prettyplease"
-version = "0.2.20"
+version = "0.2.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e"
+checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba"
dependencies = [
"proc-macro2 1.0.86",
- "syn 2.0.74",
+ "syn 2.0.76",
]
[[package]]
@@ -11296,11 +11423,11 @@ dependencies = [
[[package]]
name = "proc-macro-crate"
-version = "3.1.0"
+version = "3.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284"
+checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b"
dependencies = [
- "toml_edit 0.21.1",
+ "toml_edit 0.22.20",
]
[[package]]
@@ -11311,7 +11438,7 @@ checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
dependencies = [
"proc-macro-error-attr",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
"version_check",
]
@@ -11323,7 +11450,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"version_check",
]
@@ -11345,6 +11472,19 @@ dependencies = [
"unicode-ident",
]
+[[package]]
+name = "proc-macro2-diagnostics"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8"
+dependencies = [
+ "proc-macro2 1.0.86",
+ "quote 1.0.37",
+ "syn 2.0.76",
+ "version_check",
+ "yansi 1.0.1",
+]
+
[[package]]
name = "prometheus"
version = "0.13.4"
@@ -11377,7 +11517,7 @@ checksum = "0fcebfa99f03ae51220778316b37d24981e36322c82c24848f48c5bd0f64cbdb"
dependencies = [
"enum-as-inner",
"mime",
- "reqwest 0.12.5",
+ "reqwest 0.12.7",
"serde",
"time",
"url",
@@ -11490,11 +11630,11 @@ dependencies = [
"multimap 0.10.0",
"once_cell",
"petgraph 0.6.5",
- "prettyplease 0.2.20",
+ "prettyplease 0.2.22",
"prost 0.13.1",
"prost-types 0.13.1",
"regex",
- "syn 2.0.74",
+ "syn 2.0.76",
"tempfile",
]
@@ -11507,7 +11647,7 @@ dependencies = [
"anyhow",
"itertools 0.10.5",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -11520,8 +11660,8 @@ dependencies = [
"anyhow",
"itertools 0.12.1",
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -11533,8 +11673,8 @@ dependencies = [
"anyhow",
"itertools 0.13.0",
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -11598,7 +11738,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -11660,8 +11800,9 @@ dependencies = [
[[package]]
name = "quinn-proto"
-version = "0.11.3"
-source = "git+https://github.com/quinn-rs/quinn.git?rev=f0fa66f871b80b9d2d7075d76967c649aecc0b77#f0fa66f871b80b9d2d7075d76967c649aecc0b77"
+version = "0.11.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ba92fb39ec7ad06ca2582c0ca834dfeadcaf06ddfc8e635c80aa7e1c05315fdd"
dependencies = [
"bytes",
"rand 0.8.5",
@@ -11698,9 +11839,9 @@ dependencies = [
[[package]]
name = "quote"
-version = "1.0.36"
+version = "1.0.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7"
+checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
dependencies = [
"proc-macro2 1.0.86",
]
@@ -11876,8 +12017,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a25d631e41bfb5fdcde1d4e2215f62f7f0afa3ff11e26563765bd6ea1d229aeb"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -11927,9 +12068,9 @@ dependencies = [
[[package]]
name = "redox_users"
-version = "0.4.5"
+version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891"
+checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43"
dependencies = [
"getrandom 0.2.15",
"libredox",
@@ -11952,8 +12093,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bcc303e793d3734489387d205e9b186fac9c6cfacedd98cbb2e8a5943595f3e6"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -12090,14 +12231,14 @@ dependencies = [
"wasm-bindgen-futures",
"web-sys",
"webpki-roots 0.25.4",
- "winreg 0.50.0",
+ "winreg",
]
[[package]]
name = "reqwest"
-version = "0.12.5"
+version = "0.12.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37"
+checksum = "f8f4955649ef5c38cc7f9e8aa41761d48fb9677197daea9984dc54f56aad5e63"
dependencies = [
"async-compression",
"base64 0.22.1",
@@ -12105,7 +12246,7 @@ dependencies = [
"futures-channel",
"futures-core",
"futures-util",
- "h2 0.4.5",
+ "h2 0.4.6",
"http 1.1.0",
"http-body 1.0.1",
"http-body-util",
@@ -12121,7 +12262,7 @@ dependencies = [
"pin-project-lite",
"quinn",
"rustls 0.23.12",
- "rustls-native-certs 0.7.1",
+ "rustls-native-certs 0.7.3",
"rustls-pemfile 2.1.3",
"rustls-pki-types",
"serde",
@@ -12138,7 +12279,7 @@ dependencies = [
"wasm-streams",
"web-sys",
"webpki-roots 0.26.3",
- "winreg 0.52.0",
+ "windows-registry",
]
[[package]]
@@ -12150,7 +12291,7 @@ dependencies = [
"anyhow",
"async-trait",
"http 1.1.0",
- "reqwest 0.12.5",
+ "reqwest 0.12.7",
"serde",
"thiserror",
"tower-service",
@@ -12170,7 +12311,7 @@ dependencies = [
"http 1.1.0",
"hyper 1.4.1",
"parking_lot 0.11.2",
- "reqwest 0.12.5",
+ "reqwest 0.12.7",
"reqwest-middleware",
"retry-policies",
"tokio",
@@ -12251,9 +12392,9 @@ dependencies = [
[[package]]
name = "rkyv"
-version = "0.7.44"
+version = "0.7.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5cba464629b3394fc4dbc6f940ff8f5b4ff5c7aef40f29166fd4ad12acbc99c0"
+checksum = "9008cd6385b9e161d8229e1f6549dd23c3d022f132a2ea37ac3a10ac4935779b"
dependencies = [
"bitvec 1.0.1",
"bytecheck",
@@ -12270,12 +12411,12 @@ dependencies = [
[[package]]
name = "rkyv_derive"
-version = "0.7.44"
+version = "0.7.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a7dddfff8de25e6f62b9d64e6e432bf1c6736c57d20323e15ee10435fbda7c65"
+checksum = "503d1d27590a2b0a3a4ca4c94755aa2875657196ecbf401a42eff41d7de532c0"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -12297,7 +12438,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -12325,9 +12466,9 @@ dependencies = [
[[package]]
name = "roaring"
-version = "0.10.3"
+version = "0.10.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1c77081a55300e016cb86f2864415b7518741879db925b8d488a0ee0d2da6bf"
+checksum = "8f4b84ba6e838ceb47b41de5194a60244fac43d9fe03b71dbe8c5a201081d6d1"
dependencies = [
"bytemuck",
"byteorder",
@@ -12416,7 +12557,7 @@ checksum = "7229b505ae0706e64f37ffc54a9c163e11022a6636d58fe1f3f52018257ff9f7"
dependencies = [
"cfg-if",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"rustc_version",
"syn 1.0.109",
"unicode-ident",
@@ -12602,11 +12743,11 @@ dependencies = [
[[package]]
name = "rust_decimal"
-version = "1.35.0"
+version = "1.36.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1790d1c4c0ca81211399e0e0af16333276f375209e71a37b67698a373db5b47a"
+checksum = "b082d80e3e3cc52b2ed634388d436fe1f4de6af5786cc2de9ba9737527bdf555"
dependencies = [
- "arrayvec 0.7.4",
+ "arrayvec 0.7.6",
"num-traits",
]
@@ -12636,9 +12777,9 @@ checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6"
[[package]]
name = "rustc_version"
-version = "0.4.0"
+version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
+checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92"
dependencies = [
"semver",
]
@@ -12668,9 +12809,9 @@ dependencies = [
[[package]]
name = "rustix"
-version = "0.38.34"
+version = "0.38.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f"
+checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f"
dependencies = [
"bitflags 2.6.0",
"errno",
@@ -12714,7 +12855,7 @@ dependencies = [
"log",
"ring 0.17.8",
"rustls-pki-types",
- "rustls-webpki 0.102.6",
+ "rustls-webpki 0.102.7",
"subtle",
"zeroize",
]
@@ -12729,7 +12870,7 @@ dependencies = [
"once_cell",
"ring 0.17.8",
"rustls-pki-types",
- "rustls-webpki 0.102.6",
+ "rustls-webpki 0.102.7",
"subtle",
"zeroize",
]
@@ -12748,9 +12889,9 @@ dependencies = [
[[package]]
name = "rustls-native-certs"
-version = "0.7.1"
+version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a88d6d420651b496bdd98684116959239430022a115c1240e6c3993be0b15fba"
+checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5"
dependencies = [
"openssl-probe",
"rustls-pemfile 2.1.3",
@@ -12796,9 +12937,9 @@ dependencies = [
[[package]]
name = "rustls-webpki"
-version = "0.102.6"
+version = "0.102.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e6b52d4fda176fd835fdc55a835d4a89b8499cad995885a21149d5ad62f852e"
+checksum = "84678086bd54edf2b415183ed7a94d0efb049f1b646a33e22a36f3794be6ae56"
dependencies = [
"ring 0.17.8",
"rustls-pki-types",
@@ -12854,7 +12995,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "107c3d5d7f370ac09efa62a78375f94d94b8a33c61d8c278b96683fb4dbf2d8d"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -12900,9 +13041,9 @@ version = "2.11.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62"
dependencies = [
- "proc-macro-crate 3.1.0",
+ "proc-macro-crate 3.2.0",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -12944,9 +13085,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"serde_derive_internals",
- "syn 2.0.74",
+ "syn 2.0.76",
]
[[package]]
@@ -13092,9 +13233,9 @@ checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4"
[[package]]
name = "serde"
-version = "1.0.207"
+version = "1.0.209"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5665e14a49a4ea1b91029ba7d3bca9f299e1f7cfa194388ccc20f14743e784f2"
+checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09"
dependencies = [
"serde_derive",
]
@@ -13142,13 +13283,13 @@ dependencies = [
[[package]]
name = "serde_derive"
-version = "1.0.207"
+version = "1.0.209"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6aea2634c86b0e8ef2cfdc0c340baede54ec27b1e46febd7f80dffb2aa44a00e"
+checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -13158,15 +13299,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
name = "serde_json"
-version = "1.0.124"
+version = "1.0.127"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "66ad62847a56b3dba58cc891acd13884b9c61138d330c0d7b6181713d4fce38d"
+checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad"
dependencies = [
"indexmap 2.4.0",
"itoa",
@@ -13192,8 +13333,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -13268,8 +13409,8 @@ checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f"
dependencies = [
"darling 0.20.10",
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -13280,8 +13421,8 @@ checksum = "a8fee4991ef4f274617a51ad4af30519438dacb2f56ac773b08a1922ff743350"
dependencies = [
"darling 0.20.10",
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -13340,8 +13481,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -13537,6 +13678,12 @@ version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1de1d4f81173b03af4c0cbed3c898f6bff5b870e4a7f5d6f4057d62a7a4b686e"
+[[package]]
+name = "simple-server-timing-header"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "16e78919e05c9b8e123d435a4ad104b488ad1585631830e413830985c214086e"
+
[[package]]
name = "simple_asn1"
version = "0.6.2"
@@ -13660,7 +13807,7 @@ checksum = "990079665f075b699031e9c08fd3ab99be5029b96f3b78dc0709e8f77e4efebf"
dependencies = [
"heck 0.4.1",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -13685,7 +13832,7 @@ dependencies = [
"log",
"object_store 0.10.2",
"regex",
- "reqwest 0.12.5",
+ "reqwest 0.12.7",
"reqwest-middleware",
"reqwest-retry",
"serde",
@@ -13759,7 +13906,7 @@ dependencies = [
"lalrpop-util",
"phf",
"thiserror",
- "unicode-xid 0.2.4",
+ "unicode-xid 0.2.5",
]
[[package]]
@@ -13837,7 +13984,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55fe75cb4a364c7f7ae06c7dbbc8d84bddd85d6cdf9975963c3935bc1991761e"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -13849,15 +13996,15 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
[[package]]
name = "stacker"
-version = "0.1.15"
+version = "0.1.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c886bd4480155fd3ef527d45e9ac8dd7118a898a46530b7b94c3e21866259fce"
+checksum = "799c883d55abdb5e98af1a7b3f23b9b6de8ecada0ecac058672d7635eb48ca7b"
dependencies = [
"cc",
"cfg-if",
"libc",
"psm",
- "winapi",
+ "windows-sys 0.59.0",
]
[[package]]
@@ -13947,7 +14094,7 @@ checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59"
dependencies = [
"heck 0.4.1",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"rustversion",
"syn 1.0.109",
]
@@ -13960,9 +14107,9 @@ checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0"
dependencies = [
"heck 0.4.1",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"rustversion",
- "syn 2.0.74",
+ "syn 2.0.76",
]
[[package]]
@@ -13973,9 +14120,9 @@ checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be"
dependencies = [
"heck 0.5.0",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"rustversion",
- "syn 2.0.74",
+ "syn 2.0.76",
]
[[package]]
@@ -14011,7 +14158,7 @@ checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142"
[[package]]
name = "sui"
-version = "1.31.1"
+version = "1.32.0"
dependencies = [
"anemo",
"anyhow",
@@ -14053,7 +14200,7 @@ dependencies = [
"prometheus",
"rand 0.8.5",
"regex",
- "reqwest 0.12.5",
+ "reqwest 0.12.7",
"rusoto_core",
"rusoto_kms",
"rustyline",
@@ -14082,7 +14229,7 @@ dependencies = [
"sui-package-management",
"sui-protocol-config",
"sui-replay",
- "sui-sdk 1.31.1",
+ "sui-sdk 1.32.0",
"sui-simulator",
"sui-source-validation",
"sui-swarm",
@@ -14226,7 +14373,7 @@ dependencies = [
[[package]]
name = "sui-analytics-indexer"
-version = "1.31.1"
+version = "1.32.0"
dependencies = [
"anyhow",
"arrow 52.2.0",
@@ -14278,16 +14425,16 @@ dependencies = [
[[package]]
name = "sui-analytics-indexer-derive"
-version = "1.31.1"
+version = "1.32.0"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
[[package]]
name = "sui-archival"
-version = "1.31.1"
+version = "1.32.0"
dependencies = [
"anyhow",
"byteorder",
@@ -14347,7 +14494,7 @@ dependencies = [
"narwhal-config",
"prettytable-rs",
"prometheus-parse",
- "reqwest 0.12.5",
+ "reqwest 0.12.7",
"russh",
"russh-keys",
"serde",
@@ -14395,7 +14542,7 @@ dependencies = [
"sui-macros",
"sui-network",
"sui-protocol-config",
- "sui-sdk 1.31.1",
+ "sui-sdk 1.32.0",
"sui-simulator",
"sui-storage",
"sui-surfer",
@@ -14413,7 +14560,7 @@ dependencies = [
[[package]]
name = "sui-bridge"
-version = "1.31.1"
+version = "1.32.0"
dependencies = [
"anyhow",
"arc-swap",
@@ -14437,7 +14584,7 @@ dependencies = [
"once_cell",
"prometheus",
"rand 0.8.5",
- "reqwest 0.12.5",
+ "reqwest 0.12.7",
"serde",
"serde_json",
"serde_with 3.9.0",
@@ -14447,7 +14594,7 @@ dependencies = [
"sui-json-rpc-api",
"sui-json-rpc-types",
"sui-keys",
- "sui-sdk 1.31.1",
+ "sui-sdk 1.32.0",
"sui-test-transaction-builder",
"sui-types",
"tap",
@@ -14462,7 +14609,7 @@ dependencies = [
[[package]]
name = "sui-bridge-cli"
-version = "1.31.1"
+version = "1.32.0"
dependencies = [
"anyhow",
"clap",
@@ -14470,7 +14617,7 @@ dependencies = [
"fastcrypto",
"futures",
"move-core-types",
- "reqwest 0.12.5",
+ "reqwest 0.12.7",
"serde",
"serde_json",
"serde_with 3.9.0",
@@ -14479,7 +14626,7 @@ dependencies = [
"sui-config",
"sui-json-rpc-types",
"sui-keys",
- "sui-sdk 1.31.1",
+ "sui-sdk 1.32.0",
"sui-types",
"telemetry-subscribers",
"tokio",
@@ -14508,8 +14655,9 @@ dependencies = [
"sui-bridge",
"sui-config",
"sui-data-ingestion-core",
+ "sui-indexer-builder",
"sui-json-rpc-types",
- "sui-sdk 1.31.1",
+ "sui-sdk 1.32.0",
"sui-test-transaction-builder",
"sui-types",
"tap",
@@ -14521,7 +14669,7 @@ dependencies = [
[[package]]
name = "sui-cluster-test"
-version = "1.31.1"
+version = "1.32.0"
dependencies = [
"anyhow",
"async-trait",
@@ -14534,7 +14682,7 @@ dependencies = [
"move-core-types",
"prometheus",
"regex",
- "reqwest 0.12.5",
+ "reqwest 0.12.7",
"serde_json",
"shared-crypto",
"sui-config",
@@ -14545,7 +14693,7 @@ dependencies = [
"sui-json",
"sui-json-rpc-types",
"sui-keys",
- "sui-sdk 1.31.1",
+ "sui-sdk 1.32.0",
"sui-swarm",
"sui-swarm-config",
"sui-test-transaction-builder",
@@ -14576,7 +14724,7 @@ dependencies = [
"once_cell",
"prometheus",
"rand 0.8.5",
- "reqwest 0.12.5",
+ "reqwest 0.12.7",
"serde",
"serde_with 3.9.0",
"serde_yaml 0.8.26",
@@ -14651,7 +14799,7 @@ dependencies = [
"prometheus",
"rand 0.8.5",
"rayon",
- "reqwest 0.12.5",
+ "reqwest 0.12.7",
"roaring",
"rstest",
"scopeguard",
@@ -14675,7 +14823,6 @@ dependencies = [
"sui-move-build",
"sui-network",
"sui-protocol-config",
- "sui-rest-api",
"sui-simulator",
"sui-storage",
"sui-swarm-config",
@@ -14720,7 +14867,7 @@ dependencies = [
[[package]]
name = "sui-data-ingestion"
-version = "1.31.1"
+version = "1.32.0"
dependencies = [
"anyhow",
"async-trait",
@@ -14782,7 +14929,7 @@ dependencies = [
[[package]]
name = "sui-e2e-tests"
-version = "1.31.1"
+version = "1.32.0"
dependencies = [
"anyhow",
"assert_cmd",
@@ -14826,7 +14973,7 @@ dependencies = [
"sui-node",
"sui-protocol-config",
"sui-rest-api",
- "sui-sdk 1.31.1",
+ "sui-sdk 1.32.0",
"sui-simulator",
"sui-storage",
"sui-swarm",
@@ -14899,7 +15046,7 @@ dependencies = [
[[package]]
name = "sui-faucet"
-version = "1.31.1"
+version = "1.32.0"
dependencies = [
"anyhow",
"async-recursion",
@@ -14918,7 +15065,7 @@ dependencies = [
"sui-config",
"sui-json-rpc-types",
"sui-keys",
- "sui-sdk 1.31.1",
+ "sui-sdk 1.32.0",
"sui-types",
"tap",
"telemetry-subscribers",
@@ -14955,7 +15102,7 @@ dependencies = [
[[package]]
name = "sui-framework-snapshot"
-version = "1.31.1"
+version = "1.32.0"
dependencies = [
"anyhow",
"bcs",
@@ -15018,9 +15165,9 @@ dependencies = [
[[package]]
name = "sui-graphql-config"
-version = "1.31.1"
+version = "1.32.0"
dependencies = [
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -15065,7 +15212,6 @@ dependencies = [
"insta",
"itertools 0.10.5",
"lru 0.10.1",
- "markdown-gen",
"move-binary-format",
"move-bytecode-utils",
"move-core-types",
@@ -15077,7 +15223,7 @@ dependencies = [
"prometheus",
"rand 0.8.5",
"regex",
- "reqwest 0.12.5",
+ "reqwest 0.12.7",
"serde",
"serde_json",
"serde_with 3.9.0",
@@ -15096,7 +15242,7 @@ dependencies = [
"sui-package-resolver",
"sui-protocol-config",
"sui-rest-api",
- "sui-sdk 1.31.1",
+ "sui-sdk 1.32.0",
"sui-swarm-config",
"sui-test-transaction-builder",
"sui-types",
@@ -15121,7 +15267,7 @@ dependencies = [
"async-graphql",
"axum 0.7.5",
"hyper 1.4.1",
- "reqwest 0.12.5",
+ "reqwest 0.12.7",
"serde_json",
"sui-graphql-rpc-headers",
"thiserror",
@@ -15136,7 +15282,7 @@ dependencies = [
[[package]]
name = "sui-indexer"
-version = "1.31.1"
+version = "1.32.0"
dependencies = [
"anyhow",
"async-trait",
@@ -15179,7 +15325,7 @@ dependencies = [
"sui-package-resolver",
"sui-protocol-config",
"sui-rest-api",
- "sui-sdk 1.31.1",
+ "sui-sdk 1.32.0",
"sui-test-transaction-builder",
"sui-transaction-builder",
"sui-types",
@@ -15194,6 +15340,21 @@ dependencies = [
"url",
]
+[[package]]
+name = "sui-indexer-builder"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "async-trait",
+ "mysten-metrics",
+ "prometheus",
+ "sui-data-ingestion-core",
+ "sui-types",
+ "telemetry-subscribers",
+ "tokio",
+ "tracing",
+]
+
[[package]]
name = "sui-json"
version = "0.0.0"
@@ -15239,6 +15400,7 @@ dependencies = [
"move-core-types",
"move-package",
"mysten-metrics",
+ "mysten-service",
"once_cell",
"prometheus",
"serde",
@@ -15300,7 +15462,7 @@ dependencies = [
"move-package",
"prometheus",
"rand 0.8.5",
- "reqwest 0.12.5",
+ "reqwest 0.12.7",
"sui-config",
"sui-core",
"sui-json",
@@ -15313,7 +15475,7 @@ dependencies = [
"sui-open-rpc",
"sui-open-rpc-macros",
"sui-protocol-config",
- "sui-sdk 1.31.1",
+ "sui-sdk 1.32.0",
"sui-simulator",
"sui-swarm-config",
"sui-test-transaction-builder",
@@ -15374,7 +15536,7 @@ dependencies = [
[[package]]
name = "sui-light-client"
-version = "1.31.1"
+version = "1.32.0"
dependencies = [
"anyhow",
"async-trait",
@@ -15391,7 +15553,7 @@ dependencies = [
"sui-json-rpc-types",
"sui-package-resolver",
"sui-rest-api",
- "sui-sdk 1.31.1",
+ "sui-sdk 1.32.0",
"sui-types",
"tokio",
]
@@ -15408,7 +15570,7 @@ dependencies = [
[[package]]
name = "sui-metric-checker"
-version = "1.31.1"
+version = "1.32.0"
dependencies = [
"anyhow",
"backoff",
@@ -15418,7 +15580,7 @@ dependencies = [
"humantime",
"once_cell",
"prometheus-http-query",
- "reqwest 0.12.5",
+ "reqwest 0.12.7",
"serde",
"serde_yaml 0.9.34+deprecated",
"strum_macros 0.24.3",
@@ -15429,7 +15591,7 @@ dependencies = [
[[package]]
name = "sui-move"
-version = "1.31.1"
+version = "1.32.0"
dependencies = [
"anyhow",
"assert_cmd",
@@ -15471,7 +15633,7 @@ dependencies = [
[[package]]
name = "sui-move-build"
-version = "1.31.1"
+version = "1.32.0"
dependencies = [
"anyhow",
"datatest-stable",
@@ -15495,7 +15657,7 @@ dependencies = [
[[package]]
name = "sui-move-lsp"
-version = "1.31.1"
+version = "1.32.0"
dependencies = [
"bin-version",
"clap",
@@ -15617,15 +15779,15 @@ dependencies = [
"telemetry-subscribers",
"tempfile",
"tokio",
- "tonic 0.12.1",
- "tonic-build 0.12.1",
+ "tonic 0.12.2",
+ "tonic-build 0.12.2",
"tower",
"tracing",
]
[[package]]
name = "sui-node"
-version = "1.31.1"
+version = "1.32.0"
dependencies = [
"anemo",
"anemo-tower",
@@ -15644,10 +15806,12 @@ dependencies = [
"mysten-common",
"mysten-metrics",
"mysten-network",
+ "mysten-service",
"narwhal-network",
"narwhal-worker",
+ "parking_lot 0.12.3",
"prometheus",
- "reqwest 0.12.5",
+ "reqwest 0.12.7",
"serde",
"snap",
"sui-archival",
@@ -15676,7 +15840,7 @@ dependencies = [
[[package]]
name = "sui-open-rpc"
-version = "1.31.1"
+version = "1.32.0"
dependencies = [
"anyhow",
"bcs",
@@ -15705,14 +15869,14 @@ dependencies = [
"derive-syn-parse",
"itertools 0.10.5",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
"unescape",
]
[[package]]
name = "sui-oracle"
-version = "1.31.1"
+version = "1.32.0"
dependencies = [
"anyhow",
"bcs",
@@ -15724,7 +15888,7 @@ dependencies = [
"once_cell",
"prometheus",
"rand 0.8.5",
- "reqwest 0.12.5",
+ "reqwest 0.12.7",
"serde",
"serde_json",
"shared-crypto",
@@ -15732,7 +15896,7 @@ dependencies = [
"sui-json-rpc-types",
"sui-keys",
"sui-move-build",
- "sui-sdk 1.31.1",
+ "sui-sdk 1.32.0",
"sui-types",
"tap",
"telemetry-subscribers",
@@ -15740,17 +15904,35 @@ dependencies = [
"tracing",
]
+[[package]]
+name = "sui-package-dump"
+version = "1.32.0"
+dependencies = [
+ "anyhow",
+ "bcs",
+ "cynic",
+ "cynic-codegen",
+ "fastcrypto",
+ "move-core-types",
+ "reqwest 0.12.7",
+ "serde",
+ "serde_json",
+ "sui-types",
+ "tracing",
+]
+
[[package]]
name = "sui-package-management"
-version = "1.31.1"
+version = "1.32.0"
dependencies = [
"anyhow",
"move-core-types",
"move-package",
"move-symbol-pool",
"sui-json-rpc-types",
- "sui-sdk 1.31.1",
+ "sui-sdk 1.32.0",
"sui-types",
+ "thiserror",
"tracing",
]
@@ -15784,9 +15966,9 @@ version = "0.7.0"
dependencies = [
"msim-macros",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"sui-enum-compat-util",
- "syn 2.0.74",
+ "syn 2.0.76",
]
[[package]]
@@ -15808,7 +15990,7 @@ name = "sui-protocol-config-macros"
version = "0.1.0"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -15838,7 +16020,7 @@ dependencies = [
"prost-build 0.13.1",
"protobuf",
"rand 0.8.5",
- "reqwest 0.12.5",
+ "reqwest 0.12.7",
"rustls 0.23.12",
"rustls-pemfile 2.1.3",
"serde",
@@ -15891,7 +16073,7 @@ dependencies = [
"sui-json-rpc-api",
"sui-json-rpc-types",
"sui-protocol-config",
- "sui-sdk 1.31.1",
+ "sui-sdk 1.32.0",
"sui-storage",
"sui-transaction-checks",
"sui-types",
@@ -15919,7 +16101,7 @@ dependencies = [
"openapiv3",
"prometheus",
"rand 0.8.5",
- "reqwest 0.12.5",
+ "reqwest 0.12.7",
"schemars",
"serde",
"serde_json",
@@ -15931,11 +16113,12 @@ dependencies = [
"tap",
"thiserror",
"tokio",
+ "url",
]
[[package]]
name = "sui-rosetta"
-version = "1.31.1"
+version = "1.32.0"
dependencies = [
"anyhow",
"async-trait",
@@ -15951,7 +16134,7 @@ dependencies = [
"mysten-metrics",
"once_cell",
"rand 0.8.5",
- "reqwest 0.12.5",
+ "reqwest 0.12.7",
"serde",
"serde_json",
"shared-crypto",
@@ -15963,7 +16146,7 @@ dependencies = [
"sui-keys",
"sui-move-build",
"sui-node",
- "sui-sdk 1.31.1",
+ "sui-sdk 1.32.0",
"sui-swarm-config",
"sui-types",
"telemetry-subscribers",
@@ -15977,7 +16160,7 @@ dependencies = [
[[package]]
name = "sui-rpc-loadgen"
-version = "1.31.1"
+version = "1.32.0"
dependencies = [
"anyhow",
"async-trait",
@@ -15995,19 +16178,19 @@ dependencies = [
"sui-json-rpc",
"sui-json-rpc-types",
"sui-keys",
- "sui-sdk 1.31.1",
+ "sui-sdk 1.32.0",
"sui-types",
"telemetry-subscribers",
"test-cluster",
"tokio",
- "tonic 0.12.1",
+ "tonic 0.12.2",
"tracing",
]
[[package]]
name = "sui-sdk"
version = "0.0.0"
-source = "git+https://github.com/mystenlabs/sui-rust-sdk.git?rev=9a125ed5764fb5bcc1acb6074064bc8f9ea85b38#9a125ed5764fb5bcc1acb6074064bc8f9ea85b38"
+source = "git+https://github.com/mystenlabs/sui-rust-sdk.git?rev=bd233b6879b917fb95e17f21927c198e7a60c924#bd233b6879b917fb95e17f21927c198e7a60c924"
dependencies = [
"base64ct",
"bcs",
@@ -16026,7 +16209,7 @@ dependencies = [
[[package]]
name = "sui-sdk"
-version = "1.31.1"
+version = "1.32.0"
dependencies = [
"anyhow",
"async-recursion",
@@ -16042,7 +16225,7 @@ dependencies = [
"jsonrpsee",
"move-core-types",
"rand 0.8.5",
- "reqwest 0.12.5",
+ "reqwest 0.12.7",
"serde",
"serde_json",
"serde_with 3.9.0",
@@ -16062,7 +16245,7 @@ dependencies = [
[[package]]
name = "sui-security-watchdog"
-version = "1.31.1"
+version = "1.32.0"
dependencies = [
"anyhow",
"arrow-array 52.2.0",
@@ -16073,7 +16256,7 @@ dependencies = [
"lexical-util",
"mysten-metrics",
"prometheus",
- "reqwest 0.12.5",
+ "reqwest 0.12.7",
"serde",
"serde_json",
"snowflake-api",
@@ -16109,7 +16292,7 @@ dependencies = [
[[package]]
name = "sui-single-node-benchmark"
-version = "1.31.1"
+version = "1.32.0"
dependencies = [
"async-trait",
"bcs",
@@ -16120,6 +16303,7 @@ dependencies = [
"move-bytecode-utils",
"move-core-types",
"move-package",
+ "move-symbol-pool",
"once_cell",
"prometheus",
"serde",
@@ -16171,7 +16355,7 @@ dependencies = [
[[package]]
name = "sui-source-validation"
-version = "1.31.1"
+version = "1.32.0"
dependencies = [
"anyhow",
"colored",
@@ -16188,7 +16372,8 @@ dependencies = [
"rand 0.8.5",
"sui-json-rpc-types",
"sui-move-build",
- "sui-sdk 1.31.1",
+ "sui-package-management",
+ "sui-sdk 1.32.0",
"sui-test-transaction-builder",
"sui-types",
"tar",
@@ -16218,13 +16403,13 @@ dependencies = [
"move-symbol-pool",
"mysten-metrics",
"prometheus",
- "reqwest 0.12.5",
+ "reqwest 0.12.7",
"serde",
"sui",
"sui-json-rpc-types",
"sui-move",
"sui-move-build",
- "sui-sdk 1.31.1",
+ "sui-sdk 1.32.0",
"sui-source-validation",
"telemetry-subscribers",
"tempfile",
@@ -16273,7 +16458,7 @@ dependencies = [
"percent-encoding",
"pretty_assertions",
"prometheus",
- "reqwest 0.12.5",
+ "reqwest 0.12.7",
"serde",
"serde_json",
"sui-config",
@@ -16295,7 +16480,7 @@ dependencies = [
[[package]]
name = "sui-surfer"
-version = "1.31.1"
+version = "1.32.0"
dependencies = [
"async-trait",
"bcs",
@@ -16378,7 +16563,7 @@ dependencies = [
name = "sui-telemetry"
version = "0.1.0"
dependencies = [
- "reqwest 0.12.5",
+ "reqwest 0.12.7",
"serde",
"sui-core",
"tracing",
@@ -16393,13 +16578,13 @@ dependencies = [
"shared-crypto",
"sui-genesis-builder",
"sui-move-build",
- "sui-sdk 1.31.1",
+ "sui-sdk 1.32.0",
"sui-types",
]
[[package]]
name = "sui-test-validator"
-version = "1.31.1"
+version = "1.32.0"
[[package]]
name = "sui-tls"
@@ -16413,9 +16598,9 @@ dependencies = [
"pkcs8 0.9.0",
"rand 0.8.5",
"rcgen",
- "reqwest 0.12.5",
+ "reqwest 0.12.7",
"rustls 0.23.12",
- "rustls-webpki 0.102.6",
+ "rustls-webpki 0.102.7",
"tokio",
"tokio-rustls 0.26.0",
"tower-layer",
@@ -16424,7 +16609,7 @@ dependencies = [
[[package]]
name = "sui-tool"
-version = "1.31.1"
+version = "1.32.0"
dependencies = [
"anemo",
"anemo-cli",
@@ -16434,7 +16619,6 @@ dependencies = [
"clap",
"colored",
"comfy-table",
- "diesel",
"eyre",
"fastcrypto",
"futures",
@@ -16455,11 +16639,11 @@ dependencies = [
"sui-archival",
"sui-config",
"sui-core",
- "sui-indexer",
"sui-network",
+ "sui-package-dump",
"sui-protocol-config",
"sui-replay",
- "sui-sdk 1.31.1",
+ "sui-sdk 1.32.0",
"sui-snapshot",
"sui-storage",
"sui-types",
@@ -16621,7 +16805,7 @@ dependencies = [
"tap",
"thiserror",
"tokio",
- "tonic 0.12.1",
+ "tonic 0.12.2",
"tracing",
"typed-store-error",
"url",
@@ -16711,7 +16895,7 @@ dependencies = [
[[package]]
name = "suins-indexer"
-version = "1.31.1"
+version = "1.32.0"
dependencies = [
"anyhow",
"async-trait",
@@ -16745,7 +16929,7 @@ dependencies = [
[[package]]
name = "suiop-cli"
-version = "1.31.1"
+version = "1.32.0"
dependencies = [
"anyhow",
"axum 0.7.5",
@@ -16762,7 +16946,7 @@ dependencies = [
"prettytable-rs",
"rand 0.8.5",
"regex",
- "reqwest 0.12.5",
+ "reqwest 0.12.7",
"semver",
"serde",
"serde_json",
@@ -16821,23 +17005,23 @@ dependencies = [
[[package]]
name = "symbolic-common"
-version = "10.2.1"
+version = "12.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1b55cdc318ede251d0957f07afe5fed912119b8c1bc5a7804151826db999e737"
+checksum = "b1944ea8afd197111bca0c0edea1e1f56abb3edd030e240c1035cc0e3ff51fec"
dependencies = [
"debugid",
- "memmap2",
+ "memmap2 0.9.4",
"stable_deref_trait",
"uuid 1.10.0",
]
[[package]]
name = "symbolic-demangle"
-version = "10.2.1"
+version = "12.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "79be897be8a483a81fff6a3a4e195b4ac838ef73ca42d348b3f722da9902e489"
+checksum = "ddaccaf1bf8e73c4f64f78dbb30aadd6965c71faa4ff3fba33f8d7296cf94a87"
dependencies = [
- "cpp_demangle 0.4.3",
+ "cpp_demangle 0.4.4",
"rustc-demangle",
"symbolic-common",
]
@@ -16860,18 +17044,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"unicode-ident",
]
[[package]]
name = "syn"
-version = "2.0.74"
+version = "2.0.76"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1fceb41e3d546d0bd83421d3409b1460cc7444cd389341a4c880fe7a042cb3d7"
+checksum = "578e081a14e0cefc3279b0472138c513f37b41a08d5a3cca9b6e4e8ceb6cd525"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"unicode-ident",
]
@@ -16886,6 +17070,9 @@ name = "sync_wrapper"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394"
+dependencies = [
+ "futures-core",
+]
[[package]]
name = "synstructure"
@@ -16894,9 +17081,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
- "unicode-xid 0.2.4",
+ "unicode-xid 0.2.5",
]
[[package]]
@@ -16946,7 +17133,7 @@ dependencies = [
"cap-std",
"fd-lock 4.0.2",
"io-lifetimes 2.0.3",
- "rustix 0.38.34",
+ "rustix 0.38.35",
"windows-sys 0.52.0",
"winx",
]
@@ -16971,7 +17158,7 @@ dependencies = [
"heck 0.4.1",
"proc-macro-error",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -17016,14 +17203,15 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
[[package]]
name = "target-spec"
-version = "1.4.0"
+version = "3.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0bf4306559bd50cb358e7af5692694d6f6fad95cf2c0bea2571dd419f5298e12"
+checksum = "419ccf3482090c626619fa2574290aaa00b696f9ab73af08fbf48260565431bf"
dependencies = [
"cfg-expr",
"guppy-workspace-hack",
"serde",
"target-lexicon",
+ "unicode-ident",
]
[[package]]
@@ -17060,9 +17248,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64"
dependencies = [
"cfg-if",
- "fastrand 2.1.0",
+ "fastrand 2.1.1",
"once_cell",
- "rustix 0.38.34",
+ "rustix 0.38.35",
"windows-sys 0.59.0",
]
@@ -17141,7 +17329,7 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7"
dependencies = [
- "rustix 0.38.34",
+ "rustix 0.38.35",
"windows-sys 0.48.0",
]
@@ -17175,7 +17363,7 @@ dependencies = [
"sui-macros",
"sui-node",
"sui-protocol-config",
- "sui-sdk 1.31.1",
+ "sui-sdk 1.32.0",
"sui-simulator",
"sui-swarm",
"sui-swarm-config",
@@ -17205,7 +17393,7 @@ checksum = "48db3bbc562408b2111f3a0c96ec416ffa3ab66f8a6ab42579b608b9f74744e1"
dependencies = [
"cargo_metadata 0.15.4",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"serde",
"strum_macros 0.24.3",
]
@@ -17221,9 +17409,9 @@ dependencies = [
"itertools 0.10.5",
"lazy_static",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"subprocess",
- "syn 2.0.74",
+ "syn 2.0.76",
"test-fuzz-internal",
"toolchain_find",
]
@@ -17269,8 +17457,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -17391,9 +17579,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
-version = "1.39.2"
+version = "1.39.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "daa4fb1bc778bd6f04cbfc4bb2d06a7396a8f299dc33ea1900cedaa316f467b1"
+checksum = "9babc99b9923bfa4804bd74722ff02c0381021eafa4db9949217e3be8e84fff5"
dependencies = [
"backtrace",
"bytes",
@@ -17439,8 +17627,8 @@ version = "2.2.0"
source = "git+https://github.com/mystenmark/tokio-madsim-fork.git?rev=e47aafebf98e9c1734a8848a1876d5946c44bdd1#e47aafebf98e9c1734a8848a1876d5946c44bdd1"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -17450,8 +17638,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -17667,17 +17855,6 @@ dependencies = [
"winnow 0.5.40",
]
-[[package]]
-name = "toml_edit"
-version = "0.21.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1"
-dependencies = [
- "indexmap 2.4.0",
- "toml_datetime 0.6.8",
- "winnow 0.5.40",
-]
-
[[package]]
name = "toml_edit"
version = "0.22.20"
@@ -17752,16 +17929,16 @@ dependencies = [
[[package]]
name = "tonic"
-version = "0.12.1"
+version = "0.12.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "38659f4a91aba8598d27821589f5db7dddd94601e7a01b1e485a50e5484c7401"
+checksum = "c6f6ba989e4b2c58ae83d862d3a3e27690b6e3ae630d0deb59f3697f32aa88ad"
dependencies = [
"async-stream",
"async-trait",
"axum 0.7.5",
"base64 0.22.1",
"bytes",
- "h2 0.4.5",
+ "h2 0.4.6",
"http 1.1.0",
"http-body 1.0.1",
"http-body-util",
@@ -17789,34 +17966,34 @@ dependencies = [
"prettyplease 0.1.25",
"proc-macro2 1.0.86",
"prost-build 0.11.9",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
[[package]]
name = "tonic-build"
-version = "0.12.1"
+version = "0.12.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "568392c5a2bd0020723e3f387891176aabafe36fd9fcd074ad309dfa0c8eb964"
+checksum = "fe4ee8877250136bd7e3d2331632810a4df4ea5e004656990d8d66d2f5ee8a67"
dependencies = [
- "prettyplease 0.2.20",
+ "prettyplease 0.2.22",
"proc-macro2 1.0.86",
"prost-build 0.13.1",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
name = "tonic-health"
-version = "0.12.1"
+version = "0.12.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e1e10e6a96ee08b6ce443487d4368442d328d0e746f3681f81127f7dc41b4955"
+checksum = "ec0a34e6f706bae26b2b490e1da5c3f6a6ff87cae442bcbc7c881bab9631b5a7"
dependencies = [
"async-stream",
"prost 0.13.1",
"tokio",
"tokio-stream",
- "tonic 0.12.1",
+ "tonic 0.12.2",
]
[[package]]
@@ -17927,8 +18104,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -18040,7 +18217,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b79e2e9c9ab44c6d7c20d5976961b47e8f49ac199154daa514b77cd1ab536625"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -18165,10 +18342,10 @@ dependencies = [
"itertools 0.10.5",
"msim",
"once_cell",
- "ouroboros",
+ "ouroboros 0.17.2",
"proc-macro2 1.0.86",
"prometheus",
- "quote 1.0.36",
+ "quote 1.0.37",
"rand 0.8.5",
"rocksdb",
"rstest",
@@ -18192,7 +18369,7 @@ version = "0.3.0"
dependencies = [
"itertools 0.10.5",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -18214,10 +18391,10 @@ dependencies = [
"memchr",
"nom",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"regex",
"regex-syntax 0.7.5",
- "syn 2.0.74",
+ "syn 2.0.76",
"zstd-sys",
]
@@ -18245,8 +18422,8 @@ version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a615d6c2764852a2e88a4f16e9ce1ea49bb776b5872956309e170d63a042a34f"
dependencies = [
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -18335,9 +18512,9 @@ checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
[[package]]
name = "unicode-xid"
-version = "0.2.4"
+version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c"
+checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a"
[[package]]
name = "universal-hash"
@@ -18457,7 +18634,7 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aae2faf80ac463422992abf4de234731279c058aaf33171ca70277c98406b124"
dependencies = [
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -18513,7 +18690,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e369bee1b05d510a7b4ed645f5faa90619e05437111783ea5848f28d97d3c2e"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
]
[[package]]
@@ -18579,7 +18756,7 @@ dependencies = [
"io-lifetimes 2.0.3",
"log",
"once_cell",
- "rustix 0.38.34",
+ "rustix 0.38.35",
"system-interface",
"thiserror",
"tracing",
@@ -18615,8 +18792,8 @@ dependencies = [
"log",
"once_cell",
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
"wasm-bindgen-shared",
]
@@ -18639,7 +18816,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c5020cfa87c7cecefef118055d44e3c1fc122c7ec25701d528ee458a0b45f38f"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -18661,7 +18838,7 @@ version = "0.2.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf"
dependencies = [
- "quote 1.0.36",
+ "quote 1.0.37",
"wasm-bindgen-macro-support",
]
@@ -18672,8 +18849,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
@@ -18695,9 +18872,9 @@ dependencies = [
[[package]]
name = "wasm-encoder"
-version = "0.215.0"
+version = "0.216.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4fb56df3e06b8e6b77e37d2969a50ba51281029a9aeb3855e76b7f49b6418847"
+checksum = "04c23aebea22c8a75833ae08ed31ccc020835b12a41999e58c31464271b94a88"
dependencies = [
"leb128",
]
@@ -18770,7 +18947,7 @@ dependencies = [
"enumset",
"lazy_static",
"leb128",
- "memmap2",
+ "memmap2 0.5.10",
"more-asserts 0.2.2",
"region",
"smallvec",
@@ -18808,7 +18985,7 @@ checksum = "97901fdbaae383dbb90ea162cc3a76a9fa58ac39aec7948b4c0b9bbef9307738"
dependencies = [
"proc-macro-error",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"syn 1.0.109",
]
@@ -18909,7 +19086,7 @@ dependencies = [
"once_cell",
"paste",
"rayon",
- "rustix 0.38.34",
+ "rustix 0.38.35",
"serde",
"serde_derive",
"serde_json",
@@ -18950,7 +19127,7 @@ dependencies = [
"bincode",
"directories-next",
"log",
- "rustix 0.38.34",
+ "rustix 0.38.35",
"serde",
"serde_derive",
"sha2 0.10.8",
@@ -18967,8 +19144,8 @@ checksum = "dc6aca484581f9651886dca45f9dea893e105713b58623d14b06c56d8fe3f3f1"
dependencies = [
"anyhow",
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
"wasmtime-component-util",
"wasmtime-wit-bindgen",
"wit-parser",
@@ -19056,7 +19233,7 @@ dependencies = [
"anyhow",
"cc",
"cfg-if",
- "rustix 0.38.34",
+ "rustix 0.38.35",
"wasmtime-asm-macros",
"wasmtime-versioned-export-macros",
"windows-sys 0.52.0",
@@ -19070,7 +19247,7 @@ checksum = "4b0462a46b80d2352ee553b17d626b6468e9cec2220cc58ac31754fd7b58245e"
dependencies = [
"object",
"once_cell",
- "rustix 0.38.34",
+ "rustix 0.38.35",
"wasmtime-versioned-export-macros",
]
@@ -19103,7 +19280,7 @@ dependencies = [
"memoffset 0.9.1",
"paste",
"psm",
- "rustix 0.38.34",
+ "rustix 0.38.35",
"sptr",
"wasm-encoder 0.41.2",
"wasmtime-asm-macros",
@@ -19135,8 +19312,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5399c175ddba4a471b9da45105dea3493059d52b2d54860eadb0df04c813948d"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -19160,7 +19337,7 @@ dependencies = [
"io-lifetimes 2.0.3",
"log",
"once_cell",
- "rustix 0.38.34",
+ "rustix 0.38.35",
"system-interface",
"thiserror",
"tokio",
@@ -19218,24 +19395,24 @@ dependencies = [
[[package]]
name = "wast"
-version = "215.0.0"
+version = "216.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1ff1d00d893593249e60720be04a7c1f42f1c4dc3806a2869f4e66ab61eb54cb"
+checksum = "f7eb1f2eecd913fdde0dc6c3439d0f24530a98ac6db6cb3d14d92a5328554a08"
dependencies = [
"bumpalo",
"leb128",
"memchr",
"unicode-width",
- "wasm-encoder 0.215.0",
+ "wasm-encoder 0.216.0",
]
[[package]]
name = "wat"
-version = "1.215.0"
+version = "1.216.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "670bf4d9c8cf76ae242d70ded47c546525b6dafaa6871f9bcb065344bf2b4e3d"
+checksum = "ac0409090fb5154f95fb5ba3235675fd9e579e731524d63b6a2f653e1280c82a"
dependencies = [
- "wast 215.0.0",
+ "wast 216.0.0",
]
[[package]]
@@ -19291,7 +19468,7 @@ dependencies = [
"either",
"home",
"once_cell",
- "rustix 0.38.34",
+ "rustix 0.38.35",
]
[[package]]
@@ -19335,9 +19512,9 @@ dependencies = [
"anyhow",
"heck 0.4.1",
"proc-macro2 1.0.86",
- "quote 1.0.36",
+ "quote 1.0.37",
"shellexpand 2.1.2",
- "syn 2.0.74",
+ "syn 2.0.76",
"witx",
]
@@ -19348,8 +19525,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "93e43fc332703d1ec3aa86a5ce8bb49e6b95b6c617b90e726d3e70a0f70f48a5"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
"wiggle-generate",
]
@@ -19409,6 +19586,36 @@ dependencies = [
"windows-targets 0.52.6",
]
+[[package]]
+name = "windows-registry"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0"
+dependencies = [
+ "windows-result",
+ "windows-strings",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-result"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e"
+dependencies = [
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-strings"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10"
+dependencies = [
+ "windows-result",
+ "windows-targets 0.52.6",
+]
+
[[package]]
name = "windows-sys"
version = "0.33.0"
@@ -19628,16 +19835,6 @@ 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 = "winx"
version = "0.36.3"
@@ -19662,7 +19859,7 @@ dependencies = [
"serde",
"serde_derive",
"serde_json",
- "unicode-xid 0.2.4",
+ "unicode-xid 0.2.5",
]
[[package]]
@@ -19713,7 +19910,7 @@ dependencies = [
[[package]]
name = "x"
-version = "1.31.1"
+version = "1.32.0"
dependencies = [
"anyhow",
"camino",
@@ -19748,7 +19945,7 @@ checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f"
dependencies = [
"libc",
"linux-raw-sys 0.4.14",
- "rustix 0.38.34",
+ "rustix 0.38.35",
]
[[package]]
@@ -19778,6 +19975,12 @@ version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec"
+[[package]]
+name = "yansi"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049"
+
[[package]]
name = "yasna"
version = "0.5.2"
@@ -19833,8 +20036,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
@@ -19853,8 +20056,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
dependencies = [
"proc-macro2 1.0.86",
- "quote 1.0.36",
- "syn 2.0.74",
+ "quote 1.0.37",
+ "syn 2.0.76",
]
[[package]]
diff --git a/Cargo.toml b/Cargo.toml
index eec37bc5d4b3f..c2d8ab6c2fd85 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -2,205 +2,206 @@
resolver = "2"
exclude = [
- "examples/tic-tac-toe/cli",
- "external-crates/move/crates/bytecode-interpreter-crypto",
- "external-crates/move/crates/bytecode-verifier-libfuzzer",
- "external-crates/move/crates/bytecode-verifier-tests",
- "external-crates/move/crates/bytecode-verifier-prop-tests",
- "external-crates/move/crates/bytecode-verifier-transactional-tests",
- "external-crates/move/crates/enum-compat-util",
- "external-crates/move/crates/invalid-mutations",
- "external-crates/move/crates/language-benchmarks",
- "external-crates/move/crates/module-generation",
- "external-crates/move/crates/move-abstract-interpreter",
- "external-crates/move/crates/move-abstract-stack",
- "external-crates/move/crates/move-analyzer",
- "external-crates/move/crates/move-binary-format",
- "external-crates/move/crates/move-borrow-graph",
- "external-crates/move/crates/move-bytecode-source-map",
- "external-crates/move/crates/move-bytecode-utils",
- "external-crates/move/crates/move-bytecode-verifier",
- "external-crates/move/crates/move-bytecode-verifier-meter",
- "external-crates/move/crates/move-bytecode-viewer",
- "external-crates/move/crates/move-cli",
- "external-crates/move/crates/move-command-line-common",
- "external-crates/move/crates/move-compiler",
- "external-crates/move/crates/move-compiler-transactional-tests",
- "external-crates/move/crates/move-core-types",
- "external-crates/move/crates/move-coverage",
- "external-crates/move/crates/move-disassembler",
- "external-crates/move/crates/move-docgen",
- "external-crates/move/crates/move-ir-compiler",
- "external-crates/move/crates/move-ir-compiler-transactional-tests",
- "external-crates/move/crates/move-ir-to-bytecode",
- "external-crates/move/crates/move-ir-to-bytecode-syntax",
- "external-crates/move/crates/move-ir-types",
- "external-crates/move/crates/move-model",
- "external-crates/move/crates/move-package",
- "external-crates/move/crates/move-proc-macros",
- "external-crates/move/crates/move-prover",
- "external-crates/move/crates/move-prover-test-utils",
- "external-crates/move/crates/move-stackless-bytecode",
- "external-crates/move/crates/move-stdlib",
- "external-crates/move/crates/move-stdlib-natives",
- "external-crates/move/crates/move-symbol-pool",
- "external-crates/move/crates/move-transactional-test-runner",
- "external-crates/move/crates/move-unit-test",
- "external-crates/move/crates/move-vm-config",
- "external-crates/move/crates/move-vm-integration-tests",
- "external-crates/move/crates/move-vm-profiler",
- "external-crates/move/crates/move-vm-runtime",
- "external-crates/move/crates/move-vm-test-utils",
- "external-crates/move/crates/move-vm-transactional-tests",
- "external-crates/move/crates/move-vm-types",
- "external-crates/move/crates/serializer-tests",
- "external-crates/move/crates/test-generation",
- "external-crates/move/move-execution/v0/crates/move-bytecode-verifier",
- "external-crates/move/move-execution/v0/crates/move-stdlib-natives",
- "external-crates/move/move-execution/v0/crates/move-vm-runtime",
- "external-crates/move/move-execution/v1/crates/move-bytecode-verifier",
- "external-crates/move/move-execution/v1/crates/move-stdlib-natives",
- "external-crates/move/move-execution/v1/crates/move-vm-runtime",
- "external-crates/move/move-execution/v2/crates/move-abstract-interpreter",
- "external-crates/move/move-execution/v2/crates/move-bytecode-verifier",
- "external-crates/move/move-execution/v2/crates/move-stdlib-natives",
- "external-crates/move/move-execution/v2/crates/move-vm-runtime",
- "sdk/move-bytecode-template",
+ "examples/tic-tac-toe/cli",
+ "external-crates/move/crates/bytecode-interpreter-crypto",
+ "external-crates/move/crates/bytecode-verifier-libfuzzer",
+ "external-crates/move/crates/bytecode-verifier-tests",
+ "external-crates/move/crates/bytecode-verifier-prop-tests",
+ "external-crates/move/crates/bytecode-verifier-transactional-tests",
+ "external-crates/move/crates/enum-compat-util",
+ "external-crates/move/crates/invalid-mutations",
+ "external-crates/move/crates/language-benchmarks",
+ "external-crates/move/crates/module-generation",
+ "external-crates/move/crates/move-abstract-interpreter",
+ "external-crates/move/crates/move-abstract-stack",
+ "external-crates/move/crates/move-analyzer",
+ "external-crates/move/crates/move-binary-format",
+ "external-crates/move/crates/move-borrow-graph",
+ "external-crates/move/crates/move-bytecode-source-map",
+ "external-crates/move/crates/move-bytecode-utils",
+ "external-crates/move/crates/move-bytecode-verifier",
+ "external-crates/move/crates/move-bytecode-verifier-meter",
+ "external-crates/move/crates/move-bytecode-viewer",
+ "external-crates/move/crates/move-cli",
+ "external-crates/move/crates/move-command-line-common",
+ "external-crates/move/crates/move-compiler",
+ "external-crates/move/crates/move-compiler-transactional-tests",
+ "external-crates/move/crates/move-core-types",
+ "external-crates/move/crates/move-coverage",
+ "external-crates/move/crates/move-disassembler",
+ "external-crates/move/crates/move-docgen",
+ "external-crates/move/crates/move-ir-compiler",
+ "external-crates/move/crates/move-ir-compiler-transactional-tests",
+ "external-crates/move/crates/move-ir-to-bytecode",
+ "external-crates/move/crates/move-ir-to-bytecode-syntax",
+ "external-crates/move/crates/move-ir-types",
+ "external-crates/move/crates/move-model",
+ "external-crates/move/crates/move-package",
+ "external-crates/move/crates/move-proc-macros",
+ "external-crates/move/crates/move-prover",
+ "external-crates/move/crates/move-prover-test-utils",
+ "external-crates/move/crates/move-stackless-bytecode",
+ "external-crates/move/crates/move-stdlib",
+ "external-crates/move/crates/move-stdlib-natives",
+ "external-crates/move/crates/move-symbol-pool",
+ "external-crates/move/crates/move-transactional-test-runner",
+ "external-crates/move/crates/move-unit-test",
+ "external-crates/move/crates/move-vm-config",
+ "external-crates/move/crates/move-vm-integration-tests",
+ "external-crates/move/crates/move-vm-profiler",
+ "external-crates/move/crates/move-vm-runtime",
+ "external-crates/move/crates/move-vm-test-utils",
+ "external-crates/move/crates/move-vm-transactional-tests",
+ "external-crates/move/crates/move-vm-types",
+ "external-crates/move/crates/serializer-tests",
+ "external-crates/move/crates/test-generation",
+ "external-crates/move/move-execution/v0/crates/move-bytecode-verifier",
+ "external-crates/move/move-execution/v0/crates/move-stdlib-natives",
+ "external-crates/move/move-execution/v0/crates/move-vm-runtime",
+ "external-crates/move/move-execution/v1/crates/move-bytecode-verifier",
+ "external-crates/move/move-execution/v1/crates/move-stdlib-natives",
+ "external-crates/move/move-execution/v1/crates/move-vm-runtime",
+ "external-crates/move/move-execution/v2/crates/move-abstract-interpreter",
+ "external-crates/move/move-execution/v2/crates/move-bytecode-verifier",
+ "external-crates/move/move-execution/v2/crates/move-stdlib-natives",
+ "external-crates/move/move-execution/v2/crates/move-vm-runtime",
+ "sdk/move-bytecode-template",
]
members = [
- "consensus/config",
- "consensus/core",
- "crates/anemo-benchmark",
- "crates/bin-version",
- "crates/mamoru-sui-sniffer",
- "crates/mysten-common",
- "crates/mysten-metrics",
- "crates/mysten-network",
- "crates/mysten-service",
- "crates/mysten-util-mem",
- "crates/mysten-util-mem-derive",
- "crates/prometheus-closure-metric",
- "crates/shared-crypto",
- "crates/simulacrum",
- "crates/sui",
- "crates/sui-adapter-transactional-tests",
- "crates/sui-analytics-indexer",
- "crates/sui-analytics-indexer-derive",
- "crates/sui-archival",
- "crates/sui-authority-aggregation",
- "crates/sui-aws-orchestrator",
- "crates/sui-benchmark",
- "crates/sui-bridge",
- "crates/sui-bridge-cli",
- "crates/sui-bridge-indexer",
- "crates/sui-cluster-test",
- "crates/sui-config",
- "crates/sui-core",
- "crates/sui-cost",
- "crates/sui-data-ingestion",
- "crates/sui-data-ingestion-core",
- "crates/sui-e2e-tests",
- "crates/sui-enum-compat-util",
- "crates/sui-faucet",
- "crates/sui-framework",
- "crates/sui-framework-snapshot",
- "crates/sui-framework-tests",
- "crates/sui-genesis-builder",
- "crates/sui-graphql-config",
- "crates/sui-graphql-e2e-tests",
- "crates/sui-graphql-rpc",
- "crates/sui-graphql-rpc-client",
- "crates/sui-graphql-rpc-headers",
- "crates/sui-indexer",
- "crates/sui-json",
- "crates/sui-json-rpc",
- "crates/sui-json-rpc-api",
- "crates/sui-json-rpc-tests",
- "crates/sui-json-rpc-types",
- "crates/sui-keys",
- "crates/sui-light-client",
- "crates/sui-macros",
- "crates/sui-metric-checker",
- "crates/sui-move",
- "crates/sui-move-build",
- "crates/sui-move-lsp",
- "crates/sui-network",
- "crates/sui-node",
- "crates/sui-open-rpc",
- "crates/sui-open-rpc-macros",
- "crates/sui-oracle",
- "crates/sui-package-management",
- "crates/sui-package-resolver",
- "crates/sui-proc-macros",
- "crates/sui-protocol-config",
- "crates/sui-protocol-config-macros",
- "crates/sui-proxy",
- "crates/sui-replay",
- "crates/sui-rest-api",
- "crates/sui-rosetta",
- "crates/sui-rpc-loadgen",
- "crates/sui-sdk",
- "crates/sui-security-watchdog",
- "crates/sui-simulator",
- "crates/sui-single-node-benchmark",
- "crates/sui-snapshot",
- "crates/sui-source-validation",
- "crates/sui-source-validation-service",
- "crates/sui-storage",
- "crates/sui-surfer",
- "crates/sui-swarm",
- "crates/sui-swarm-config",
- "crates/sui-telemetry",
- "crates/sui-test-transaction-builder",
- "crates/sui-test-validator",
- "crates/sui-tls",
- "crates/sui-tool",
- "crates/sui-transaction-builder",
- "crates/sui-transaction-checks",
- "crates/sui-transactional-test-runner",
- "crates/sui-types",
- "crates/sui-upgrade-compatibility-transactional-tests",
- "crates/sui-verifier-transactional-tests",
- "crates/suins-indexer",
- "crates/suiop-cli",
- "crates/telemetry-subscribers",
- "crates/test-cluster",
- "crates/transaction-fuzzer",
- "crates/typed-store",
- "crates/typed-store-derive",
- "crates/typed-store-error",
- "crates/typed-store-workspace-hack",
- "crates/x",
- "narwhal/config",
- "narwhal/crypto",
- "narwhal/executor",
- "narwhal/network",
- "narwhal/node",
- "narwhal/primary",
- "narwhal/storage",
- "narwhal/test-utils",
- "narwhal/types",
- "narwhal/worker",
- "sui-execution",
- "sui-execution/cut",
- "sui-execution/latest/sui-adapter",
- "sui-execution/latest/sui-move-natives",
- "sui-execution/latest/sui-verifier",
- "sui-execution/v0/sui-adapter",
- "sui-execution/v0/sui-move-natives",
- "sui-execution/v0/sui-verifier",
- "sui-execution/v1/sui-adapter",
- "sui-execution/v1/sui-move-natives",
- "sui-execution/v1/sui-verifier",
- "sui-execution/v2/sui-adapter",
- "sui-execution/v2/sui-move-natives",
- "sui-execution/v2/sui-verifier",
+ "consensus/config",
+ "consensus/core",
+ "crates/anemo-benchmark",
+ "crates/bin-version",
+ "crates/mysten-common",
+ "crates/mysten-metrics",
+ "crates/mysten-network",
+ "crates/mysten-service",
+ "crates/mysten-util-mem",
+ "crates/mysten-util-mem-derive",
+ "crates/prometheus-closure-metric",
+ "crates/shared-crypto",
+ "crates/simulacrum",
+ "crates/sui",
+ "crates/sui-adapter-transactional-tests",
+ "crates/sui-analytics-indexer",
+ "crates/sui-analytics-indexer-derive",
+ "crates/sui-archival",
+ "crates/sui-authority-aggregation",
+ "crates/sui-aws-orchestrator",
+ "crates/sui-benchmark",
+ "crates/sui-bridge",
+ "crates/sui-bridge-cli",
+ "crates/sui-bridge-indexer",
+ "crates/sui-cluster-test",
+ "crates/sui-config",
+ "crates/sui-core",
+ "crates/sui-cost",
+ "crates/sui-data-ingestion",
+ "crates/sui-data-ingestion-core",
+ "crates/sui-e2e-tests",
+ "crates/sui-enum-compat-util",
+ "crates/sui-faucet",
+ "crates/sui-framework",
+ "crates/sui-framework-snapshot",
+ "crates/sui-framework-tests",
+ "crates/sui-genesis-builder",
+ "crates/sui-graphql-config",
+ "crates/sui-graphql-e2e-tests",
+ "crates/sui-graphql-rpc",
+ "crates/sui-graphql-rpc-client",
+ "crates/sui-graphql-rpc-headers",
+ "crates/sui-indexer",
+ "crates/sui-indexer-builder",
+ "crates/sui-json",
+ "crates/sui-json-rpc",
+ "crates/sui-json-rpc-api",
+ "crates/sui-json-rpc-tests",
+ "crates/sui-json-rpc-types",
+ "crates/sui-keys",
+ "crates/sui-light-client",
+ "crates/sui-macros",
+ "crates/sui-metric-checker",
+ "crates/sui-move",
+ "crates/sui-move-build",
+ "crates/sui-move-lsp",
+ "crates/sui-network",
+ "crates/sui-node",
+ "crates/sui-open-rpc",
+ "crates/sui-open-rpc-macros",
+ "crates/sui-oracle",
+ "crates/sui-package-dump",
+ "crates/sui-package-management",
+ "crates/sui-package-resolver",
+ "crates/sui-proc-macros",
+ "crates/sui-protocol-config",
+ "crates/sui-protocol-config-macros",
+ "crates/sui-proxy",
+ "crates/sui-replay",
+ "crates/sui-rest-api",
+ "crates/sui-rosetta",
+ "crates/sui-rpc-loadgen",
+ "crates/sui-sdk",
+ "crates/sui-security-watchdog",
+ "crates/sui-simulator",
+ "crates/sui-single-node-benchmark",
+ "crates/sui-snapshot",
+ "crates/sui-source-validation",
+ "crates/sui-source-validation-service",
+ "crates/sui-storage",
+ "crates/sui-surfer",
+ "crates/sui-swarm",
+ "crates/sui-swarm-config",
+ "crates/sui-telemetry",
+ "crates/sui-test-transaction-builder",
+ "crates/sui-test-validator",
+ "crates/sui-tls",
+ "crates/sui-tool",
+ "crates/sui-transaction-builder",
+ "crates/sui-transaction-checks",
+ "crates/sui-transactional-test-runner",
+ "crates/sui-types",
+ "crates/sui-upgrade-compatibility-transactional-tests",
+ "crates/sui-verifier-transactional-tests",
+ "crates/suins-indexer",
+ "crates/suiop-cli",
+ "crates/telemetry-subscribers",
+ "crates/test-cluster",
+ "crates/transaction-fuzzer",
+ "crates/typed-store",
+ "crates/typed-store-derive",
+ "crates/typed-store-error",
+ "crates/typed-store-workspace-hack",
+ "crates/x",
+ "narwhal/config",
+ "narwhal/crypto",
+ "narwhal/executor",
+ "narwhal/network",
+ "narwhal/node",
+ "narwhal/primary",
+ "narwhal/storage",
+ "narwhal/test-utils",
+ "narwhal/types",
+ "narwhal/worker",
+ "sui-execution",
+ "sui-execution/cut",
+ "sui-execution/latest/sui-adapter",
+ "sui-execution/latest/sui-move-natives",
+ "sui-execution/latest/sui-verifier",
+ "sui-execution/v0/sui-adapter",
+ "sui-execution/v0/sui-move-natives",
+ "sui-execution/v0/sui-verifier",
+ "sui-execution/v1/sui-adapter",
+ "sui-execution/v1/sui-move-natives",
+ "sui-execution/v1/sui-verifier",
+ "sui-execution/v2/sui-adapter",
+ "sui-execution/v2/sui-move-natives",
+ "sui-execution/v2/sui-verifier",
]
[workspace.package]
# This version string will be inherited by sui-core, sui-faucet, sui-node, sui-tools, sui-sdk, sui-move-build, and sui crates.
-version = "1.31.1"
+version = "1.32.0"
[profile.release]
# debug = 1 means line charts only, which is minimum needed for good stack traces
@@ -236,6 +237,9 @@ overflow-checks = true
# opt-level 1 gives >5x speedup for simulator tests without slowing down build times very much.
opt-level = 1
+[workspace.lints.rust]
+unexpected_cfgs = { level = "warn", check-cfg = ['cfg(msim)', 'cfg(fail_points)'] }
+
# Dependencies that should be kept in sync through the whole workspace
[workspace.dependencies]
anyhow = "1.0.71"
@@ -256,26 +260,26 @@ aws-sdk-s3 = "0.29.0"
aws-smithy-http = "0.56"
aws-smithy-runtime-api = "0.56"
axum = { version = "0.7", default-features = false, features = [
- "tokio",
- "http1",
- "http2",
- "json",
- "matched-path",
- "original-uri",
- "form",
- "query",
- "ws",
+ "tokio",
+ "http1",
+ "http2",
+ "json",
+ "matched-path",
+ "original-uri",
+ "form",
+ "query",
+ "ws",
] }
axum-extra = { version = "0.9", features = ["typed-header"] }
axum-server = { git = "https://github.com/bmwill/axum-server.git", rev = "f44323e271afdd1365fd0c8b0a4c0bbdf4956cb7", version = "0.6", default-features = false, features = [
- "tls-rustls",
+ "tls-rustls",
] }
backoff = { version = "0.4.0", features = [
- "futures",
- "futures-core",
- "pin-project-lite",
- "tokio",
- "tokio_1",
+ "futures",
+ "futures-core",
+ "pin-project-lite",
+ "tokio",
+ "tokio_1",
] }
base64 = "0.21.2"
base64-url = "2"
@@ -299,12 +303,14 @@ console-subscriber = "0.2"
const-str = "0.5.3"
count-min-sketch = "0.1.7"
criterion = { version = "0.5.0", features = [
- "async",
- "async_tokio",
- "html_reports",
+ "async",
+ "async_tokio",
+ "html_reports",
] }
crossterm = "0.25.0"
csv = "1.2.1"
+cynic = { version = "3.7.3", features = ["http-reqwest"] }
+cynic-codegen = "= 3.7.3"
dashmap = "5.5.3"
# datatest-stable = "0.1.2"
datatest-stable = { git = "https://github.com/nextest-rs/datatest-stable.git", rev = "72db7f6d1bbe36a5407e96b9488a581f763e106f" }
@@ -313,11 +319,11 @@ derive-syn-parse = "0.1.5"
derive_builder = "0.12.0"
derive_more = "0.99.17"
diesel = { version = "2.1.0", features = [
- "chrono",
- "r2d2",
- "serde_json",
- "64-column-tables",
- "i-implement-a-third-party-backend-and-opt-into-breaking-changes",
+ "chrono",
+ "r2d2",
+ "serde_json",
+ "64-column-tables",
+ "i-implement-a-third-party-backend-and-opt-into-breaking-changes",
] }
diesel-derive-enum = { version = "2.0.1" }
diesel_migrations = { version = "2.0.0" }
@@ -342,7 +348,6 @@ hashbrown = "0.12"
hdrhistogram = "7.5.1"
hex = "0.4.3"
hex-literal = "0.3.4"
-highlight = "all"
http = "1"
http-body = "1"
humantime = "2.1.0"
@@ -360,30 +365,29 @@ ipnetwork = "0.20.0"
itertools = "0.10.5"
jemalloc-ctl = "^0.5"
jsonrpsee = { git = "https://github.com/wlmyng/jsonrpsee.git", rev = "b1b300784795f6a64d0fcdf8f03081a9bc38bde8", features = [
- "server",
- "macros",
- "ws-client",
- "http-client",
- "jsonrpsee-core",
+ "server",
+ "macros",
+ "ws-client",
+ "http-client",
+ "jsonrpsee-core",
] }
json_to_table = { git = "https://github.com/zhiburt/tabled/", rev = "e449317a1c02eb6b29e409ad6617e5d9eb7b3bd4" }
leb128 = "0.2.5"
lru = "0.10"
-markdown-gen = "1.2.1"
match_opt = "0.1.2"
miette = { version = "7", features = ["fancy"] }
mime = "0.3"
mockall = "0.11.4"
moka = { version = "0.12", default-features = false, features = [
- "sync",
- "atomic64",
+ "sync",
+ "atomic64",
] }
more-asserts = "0.3.1"
-msim = { git = "https://github.com/MystenLabs/mysten-sim.git", rev = "220f52a15804a768610ac0ae3b8da7de4a5c4d2b", package = "msim" }
-msim-macros = { git = "https://github.com/MystenLabs/mysten-sim.git", rev = "220f52a15804a768610ac0ae3b8da7de4a5c4d2b", package = "msim-macros" }
+msim = { git = "https://github.com/MystenLabs/mysten-sim.git", rev = "b320996d8dfb99b273fe31c0222c659332283c99", package = "msim" }
+msim-macros = { git = "https://github.com/MystenLabs/mysten-sim.git", rev = "b320996d8dfb99b273fe31c0222c659332283c99", package = "msim-macros" }
multiaddr = "0.17.0"
-nexlint = { git = "https://github.com/nextest-rs/nexlint.git", rev = "94da5c787636dad779c340affa65219134d127f5" }
-nexlint-lints = { git = "https://github.com/nextest-rs/nexlint.git", rev = "94da5c787636dad779c340affa65219134d127f5" }
+nexlint = { git = "https://github.com/nextest-rs/nexlint.git", rev = "7ce56bd591242a57660ed05f14ca2483c37d895b" }
+nexlint-lints = { git = "https://github.com/nextest-rs/nexlint.git", rev = "7ce56bd591242a57660ed05f14ca2483c37d895b" }
nonempty = "0.9.0"
notify = "6.1.1"
ntest = "0.9.0"
@@ -396,13 +400,13 @@ ouroboros = "0.17"
parking_lot = "0.12.1"
parquet = "52"
pkcs8 = { version = "0.9.0", features = ["std"] }
-pprof = { version = "0.11.0", features = ["cpp", "frame-pointer"] }
+pprof = { version = "0.13.0", features = ["cpp", "frame-pointer"] }
pretty_assertions = "1.3.0"
prettytable-rs = "0.10.0"
proc-macro2 = "1.0.47"
prometheus = "0.13.3"
-prometheus-http-query = { version = "0.8", default_features = false, features = [
- "rustls-tls",
+prometheus-http-query = { version = "0.8", default-features = false, features = [
+ "rustls-tls",
] }
prometheus-parse = { git = "https://github.com/asonnino/prometheus-parser.git", rev = "75334db" }
proptest = "1.1.0"
@@ -410,25 +414,25 @@ proptest-derive = "0.3.0"
prost = "0.13"
prost-build = "0.13"
protobuf = { version = "2.28", features = ["with-bytes"] }
-quinn-proto = "0.11"
+quinn-proto = "0.11.6"
quote = "1.0.23"
rand = "0.8.5"
rayon = "1.5.3"
rcgen = "0.13"
regex = "1.7.1"
-reqwest = { version = "0.12", default_features = false, features = [
- "http2",
- "json",
- "rustls-tls",
+reqwest = { version = "0.12", default-features = false, features = [
+ "http2",
+ "json",
+ "rustls-tls",
] }
-roaring = "=0.10.3"
+roaring = "0.10.6"
ron = "0.8.0"
rstest = "0.16.0"
-rusoto_core = { version = "0.48.0", default_features = false, features = [
- "rustls",
+rusoto_core = { version = "0.48.0", default-features = false, features = [
+ "rustls",
] }
-rusoto_kms = { version = "0.48.0", default_features = false, features = [
- "rustls",
+rusoto_kms = { version = "0.48.0", default-features = false, features = [
+ "rustls",
] }
russh = "0.38.0"
russh-keys = "0.38.0"
@@ -454,6 +458,7 @@ shell-words = "1.1.0"
shellexpand = "3.1.0"
signature = "1.6.0"
similar = "2.4.0"
+simple-server-timing-header = "0.1.1"
slip10_ed25519 = "0.1.3"
smallvec = "1.10.0"
snap = "1.1.0"
@@ -486,32 +491,32 @@ tonic = { version = "0.12", features = ["transport"] }
tonic-build = { version = "0.12", features = ["prost", "transport"] }
tonic-health = "0.12"
tower = { version = "0.4.12", features = [
- "full",
- "util",
- "timeout",
- "load-shed",
- "limit",
+ "full",
+ "util",
+ "timeout",
+ "load-shed",
+ "limit",
] }
tower-http = { version = "0.5", features = [
- "cors",
- "full",
- "trace",
- "set-header",
- "propagate-header",
+ "cors",
+ "full",
+ "trace",
+ "set-header",
+ "propagate-header",
] }
tower-layer = "0.3.2"
twox-hash = "1.6.3"
tracing = "0.1.37"
tracing-appender = "0.2.2"
tracing-subscriber = { version = "0.3.15", default-features = false, features = [
- "std",
- "smallvec",
- "fmt",
- "ansi",
- "time",
- "json",
- "registry",
- "env-filter",
+ "std",
+ "smallvec",
+ "fmt",
+ "ansi",
+ "time",
+ "json",
+ "registry",
+ "env-filter",
] }
ttl_cache = "0.5.1"
uint = "0.9.4"
@@ -520,8 +525,8 @@ ureq = "2.9.1"
url = "2.3.1"
uuid = { version = "1.1.2", features = ["v4", "fast-rng"] }
webpki = { version = "0.102", package = "rustls-webpki", features = [
- "alloc",
- "std",
+ "alloc",
+ "std",
] }
x509-parser = "0.14.0"
zstd = "0.12.3"
@@ -543,7 +548,7 @@ move-package = { path = "external-crates/move/crates/move-package" }
move-unit-test = { path = "external-crates/move/crates/move-unit-test" }
move-vm-config = { path = "external-crates/move/crates/move-vm-config" }
move-vm-test-utils = { path = "external-crates/move/crates/move-vm-test-utils/", features = [
- "tiered-gas",
+ "tiered-gas",
] }
move-vm-types = { path = "external-crates/move/crates/move-vm-types" }
move-vm-profiler = { path = "external-crates/move/crates/move-vm-profiler" }
@@ -562,7 +567,6 @@ mamoru-sui-types = { git = "https://github.com/Mamoru-Foundation/mamoru-core", r
#mamoru-sniffer = { path = "../mamoru-core/mamoru-sniffer" }
#mamoru-sui-types = { path = "../mamoru-core/blockchain-types/mamoru-sui-types" }
-
fastcrypto = { git = "https://github.com/MystenLabs/fastcrypto", rev = "5f2c63266a065996d53f98156f0412782b468597" }
fastcrypto-tbls = { git = "https://github.com/MystenLabs/fastcrypto", rev = "5f2c63266a065996d53f98156f0412782b468597" }
fastcrypto-zkp = { git = "https://github.com/MystenLabs/fastcrypto", rev = "5f2c63266a065996d53f98156f0412782b468597", package = "fastcrypto-zkp" }
@@ -580,7 +584,7 @@ anemo-cli = { git = "https://github.com/mystenlabs/anemo.git", rev = "dbb5a074c2
anemo-tower = { git = "https://github.com/mystenlabs/anemo.git", rev = "dbb5a074c2d25660525ab5d36d65ff0cb8051949" }
# core-types with json format for REST api
-sui-sdk2 = { package = "sui-sdk", git = "https://github.com/mystenlabs/sui-rust-sdk.git", rev = "9a125ed5764fb5bcc1acb6074064bc8f9ea85b38", features = ["hash", "serde", "schemars"] }
+sui-sdk2 = { package = "sui-sdk", git = "https://github.com/mystenlabs/sui-rust-sdk.git", rev = "bd233b6879b917fb95e17f21927c198e7a60c924", features = ["hash", "serde", "schemars"] }
### Workspace Members ###
anemo-benchmark = { path = "crates/anemo-benchmark" }
@@ -620,6 +624,7 @@ sui-graphql-rpc-client = { path = "crates/sui-graphql-rpc-client" }
sui-graphql-rpc-headers = { path = "crates/sui-graphql-rpc-headers" }
sui-genesis-builder = { path = "crates/sui-genesis-builder" }
sui-indexer = { path = "crates/sui-indexer" }
+sui-indexer-builder = { path = "crates/sui-indexer-builder" }
sui-json = { path = "crates/sui-json" }
sui-json-rpc = { path = "crates/sui-json-rpc" }
sui-json-rpc-api = { path = "crates/sui-json-rpc-api" }
@@ -634,6 +639,7 @@ sui-network = { path = "crates/sui-network" }
sui-node = { path = "crates/sui-node" }
sui-open-rpc = { path = "crates/sui-open-rpc" }
sui-open-rpc-macros = { path = "crates/sui-open-rpc-macros" }
+sui-package-dump = { path = "crates/sui-package-dump" }
sui-package-management = { path = "crates/sui-package-management" }
sui-package-resolver = { path = "crates/sui-package-resolver" }
sui-proc-macros = { path = "crates/sui-proc-macros" }
@@ -701,4 +707,3 @@ spinners = "4.1.0"
include_dir = "0.7.3"
[patch.crates-io]
-quinn-proto = { git = "https://github.com/quinn-rs/quinn.git", rev = "f0fa66f871b80b9d2d7075d76967c649aecc0b77" }
diff --git a/apps/wallet/src/ui/app/components/address-input/index.tsx b/apps/wallet/src/ui/app/components/address-input/index.tsx
index b4aa1cc01ed0d..115ee0195919a 100644
--- a/apps/wallet/src/ui/app/components/address-input/index.tsx
+++ b/apps/wallet/src/ui/app/components/address-input/index.tsx
@@ -72,7 +72,7 @@ export function AddressInput({
refetchInterval: false,
});
- const { isSubmitting, setFieldValue } = useFormikContext();
+ const { isSubmitting, setFieldValue, isValidating } = useFormikContext();
const suiAddressValidation = useSuiAddressValidation();
const disabled = forcedDisabled !== undefined ? forcedDisabled : isSubmitting;
@@ -92,7 +92,7 @@ export function AddressInput({
setFieldValue('to', '');
}, [setFieldValue]);
- const hasWarningOrError = meta.touched && (meta.error || warningData);
+ const hasWarningOrError = meta.touched && (meta.error || warningData) && !isValidating;
return (
<>
@@ -132,7 +132,7 @@ export function AddressInput({
- {meta.touched ? (
+ {meta.touched && !isValidating ? (
{warningData === RecipientWarningType.OBJECT ? (
diff --git a/apps/wallet/src/ui/app/components/address-input/validation.ts b/apps/wallet/src/ui/app/components/address-input/validation.ts
index 4c4a133a79d28..26b28ef6b9b30 100644
--- a/apps/wallet/src/ui/app/components/address-input/validation.ts
+++ b/apps/wallet/src/ui/app/components/address-input/validation.ts
@@ -8,9 +8,12 @@ import { isValidSuiAddress, isValidSuiNSName } from '@mysten/sui/utils';
import { useMemo } from 'react';
import * as Yup from 'yup';
+const CACHE_EXPIRY_TIME = 60 * 1000; // 1 minute in milliseconds
+
export function createSuiAddressValidation(client: SuiClient, suiNSEnabled: boolean) {
- const resolveCache = new Map();
+ const resolveCache = new Map();
+ const currentTime = Date.now();
return Yup.string()
.ensure()
.trim()
@@ -18,14 +21,22 @@ export function createSuiAddressValidation(client: SuiClient, suiNSEnabled: bool
.test('is-sui-address', 'Invalid address. Please check again.', async (value) => {
if (suiNSEnabled && isValidSuiNSName(value)) {
if (resolveCache.has(value)) {
- return resolveCache.get(value)!;
+ const cachedEntry = resolveCache.get(value)!;
+ if (currentTime < cachedEntry.expiry) {
+ return cachedEntry.valid;
+ } else {
+ resolveCache.delete(value); // Remove expired entry
+ }
}
const address = await client.resolveNameServiceAddress({
name: value,
});
- resolveCache.set(value, !!address);
+ resolveCache.set(value, {
+ valid: !!address,
+ expiry: currentTime + CACHE_EXPIRY_TIME,
+ });
return !!address;
}
diff --git a/apps/wallet/src/ui/app/pages/home/nfts/VisualAssets.tsx b/apps/wallet/src/ui/app/pages/home/nfts/VisualAssets.tsx
index d1327c728ac06..ccc3cba329863 100644
--- a/apps/wallet/src/ui/app/pages/home/nfts/VisualAssets.tsx
+++ b/apps/wallet/src/ui/app/pages/home/nfts/VisualAssets.tsx
@@ -65,7 +65,7 @@ export default function VisualAssets({ items }: { items: SuiObjectData[] }) {
item?.objectType === object.type)}
+ hideLabel
objectId={object.objectId}
size="lg"
animateHover
diff --git a/apps/wallet/vitest.config.ts b/apps/wallet/vitest.config.ts
index 9623017969816..22ecf350712f4 100644
--- a/apps/wallet/vitest.config.ts
+++ b/apps/wallet/vitest.config.ts
@@ -10,7 +10,6 @@ export default defineConfig({
exclude: [...configDefaults.exclude, 'tests/**'],
// TODO: Create custom extension environment.
environment: 'happy-dom',
- minThreads: 1,
setupFiles: ['./testSetup.ts'],
restoreMocks: true,
},
diff --git a/bridge/evm/.gitignore b/bridge/evm/.gitignore
index b03db232ccd9e..eede9111c4f1a 100644
--- a/bridge/evm/.gitignore
+++ b/bridge/evm/.gitignore
@@ -10,5 +10,4 @@ out*/
lcov.info
broadcast/**/31337
-lib/*
-
+dependencies
diff --git a/bridge/evm/README.md b/bridge/evm/README.md
index 97cbdb270a45c..94667326299ca 100644
--- a/bridge/evm/README.md
+++ b/bridge/evm/README.md
@@ -1,6 +1,6 @@
# 🏄♂️ Quick Start
-This project leverages [Foundry](https://github.com/foundry-rs/foundry) to manage dependencies, contract compilation, testing, deployment, and on chain interactions via Solidity scripting.
+This project leverages [Foundry](https://github.com/foundry-rs/foundry) to manage dependencies (via soldeer), contract compilation, testing, deployment, and on chain interactions via Solidity scripting.
#### Environment configuration
@@ -14,7 +14,7 @@ Duplicate rename the `.env.example` file to `.env`. You'll need accounts and api
To install the project dependencies, run:
```bash
-forge install https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable@v5.0.1 https://github.com/foundry-rs/forge-std@v1.3.0 https://github.com/OpenZeppelin/openzeppelin-foundry-upgrades --no-git --no-commit
+forge soldeer update
```
#### Compilation
@@ -28,8 +28,7 @@ forge compile
#### Testing
```bash
-forge clean
-forge test --ffi
+forge test
```
#### Coverage
@@ -45,15 +44,13 @@ forge coverage
> The file should be named `.json` and should have the same fields and in the same order (alphabetical) as the `example.json`.
```bash
-forge clean
-forge script script/deploy_bridge.s.sol --rpc-url <> --broadcast --verify --ffi
+forge script script/deploy_bridge.s.sol --rpc-url <> --broadcast --verify
```
**Local deployment**
```bash
-forge clean
-forge script script/deploy_bridge.s.sol --fork-url anvil --broadcast --ffi
+forge script script/deploy_bridge.s.sol --fork-url anvil --broadcast
```
All deployments are saved in the `broadcast` directory.
diff --git a/bridge/evm/foundry.toml b/bridge/evm/foundry.toml
index b2a3ebfec2a6d..ba31fcbba8e08 100644
--- a/bridge/evm/foundry.toml
+++ b/bridge/evm/foundry.toml
@@ -3,20 +3,31 @@ src = 'contracts'
test = 'test'
no_match_test = "testSkip"
out = 'out'
-libs = ['lib']
+libs = ['dependencies']
solc = "0.8.20"
build_info = true
extra_output = ["storageLayout"]
fs_permissions = [{ access = "read", path = "/"}]
gas_reports = ["SuiBridge"]
+ffi = true
+
[fmt]
line_length = 100
+
[fuzz]
runs = 1000
+
[rpc_endpoints]
mainnet = "${MAINNET_RPC_URL}"
sepolia = "${SEPOLIA_RPC_URL}"
anvil = "http://localhost:8545"
+
[etherscan]
sepolia = { key = "${ETHERSCAN_API_KEY}" }
-mainnet = { key = "${ETHERSCAN_API_KEY}" }
\ No newline at end of file
+mainnet = { key = "${ETHERSCAN_API_KEY}" }
+
+[dependencies]
+forge-std = "1.9.2"
+openzeppelin-foundry-upgrades = "0.3.1"
+"@openzeppelin-contracts-upgradeable" = "5.0.1"
+"@openzeppelin-contracts" = "5.0.1"
\ No newline at end of file
diff --git a/bridge/evm/remappings.txt b/bridge/evm/remappings.txt
index 5279b569511f7..c680ee33d8dd9 100644
--- a/bridge/evm/remappings.txt
+++ b/bridge/evm/remappings.txt
@@ -1,5 +1,8 @@
-@openzeppelin/contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/
-@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/
-@openzeppelin/openzeppelin-foundry-upgrades/=lib/openzeppelin-foundry-upgrades/src/
-ds-test/=lib/forge-std/lib/ds-test/src/
-forge-std/=lib/openzeppelin-foundry-upgrades/lib/forge-std/src/
\ No newline at end of file
+@forge-std=dependencies/forge-std-1.9.2/src
+@openzeppelin/foundry-upgrades=dependencies/openzeppelin-foundry-upgrades-0.3.1/src
+@openzeppelin/contracts=dependencies/@openzeppelin-contracts-5.0.1
+@openzeppelin/contracts-upgradeable=dependencies/@openzeppelin-contracts-upgradeable-5.0.1
+@forge-std-1.9.2=dependencies/forge-std-1.9.2
+@openzeppelin-foundry-upgrades-0.3.1=dependencies/openzeppelin-foundry-upgrades-0.3.1
+@openzeppelin-contracts-upgradeable-5.0.1=dependencies/@openzeppelin-contracts-upgradeable-5.0.1
+@openzeppelin-contracts-5.0.1=dependencies/@openzeppelin-contracts-5.0.1
\ No newline at end of file
diff --git a/bridge/evm/script/deploy_bridge.s.sol b/bridge/evm/script/deploy_bridge.s.sol
index 4df43f5384a52..dfb5c6609c15a 100644
--- a/bridge/evm/script/deploy_bridge.s.sol
+++ b/bridge/evm/script/deploy_bridge.s.sol
@@ -44,6 +44,8 @@ contract DeployBridge is Script {
MockWBTC wBTC = new MockWBTC();
MockUSDC USDC = new MockUSDC();
MockUSDT USDT = new MockUSDT();
+ MockKA KA = new MockKA();
+ console.log("[Deployed] KA:", address(KA));
// update deployConfig with mock addresses
deployConfig.supportedTokens = new address[](5);
diff --git a/bridge/evm/soldeer.lock b/bridge/evm/soldeer.lock
new file mode 100644
index 0000000000000..20bd2407a347b
--- /dev/null
+++ b/bridge/evm/soldeer.lock
@@ -0,0 +1,24 @@
+
+[[dependencies]]
+name = "forge-std"
+version = "1.9.2"
+source = "https://soldeer-revisions.s3.amazonaws.com/forge-std/1_9_2_06-08-2024_17:31:25_forge-std-1.9.2.zip"
+checksum = "20fd008c7c69b6c737cc0284469d1c76497107bc3e004d8381f6d8781cb27980"
+
+[[dependencies]]
+name = "openzeppelin-foundry-upgrades"
+version = "0.3.1"
+source = "https://soldeer-revisions.s3.amazonaws.com/openzeppelin-foundry-upgrades/0_3_1_25-06-2024_18:12:33_openzeppelin-foundry-upgrades.zip"
+checksum = "16a43c67b7c62e4a638b669b35f7b19c98a37278811fe910750b62b6e6fdffa7"
+
+[[dependencies]]
+name = "@openzeppelin-contracts-upgradeable"
+version = "5.0.1"
+source = "https://soldeer-revisions.s3.amazonaws.com/@openzeppelin-contracts-upgradeable/5_0_1_22-01-2024_13:15:10_contracts-upgradeable.zip"
+checksum = "cca37ad1d376a5c3954d1c2a8d2675339f182eee535caa7ba7ebf8d589a2c19a"
+
+[[dependencies]]
+name = "@openzeppelin-contracts"
+version = "5.0.1"
+source = "https://soldeer-revisions.s3.amazonaws.com/@openzeppelin-contracts/5_0_1_22-01-2024_13:14:01_contracts.zip"
+checksum = "c256cbf6f5f38d3b65c7528bbffb530d0bdb818a20c9d5b61235a829202d7df7"
diff --git a/bridge/evm/test/mocks/MockTokens.sol b/bridge/evm/test/mocks/MockTokens.sol
index 3a1bfbd059f39..05f463b36781e 100644
--- a/bridge/evm/test/mocks/MockTokens.sol
+++ b/bridge/evm/test/mocks/MockTokens.sol
@@ -57,6 +57,24 @@ contract MockUSDT is ERC20 {
function testSkip() public {}
}
+contract MockKA is ERC20 {
+ constructor() ERC20("Ka Coin", "KA") {}
+
+ function mint(address to, uint256 amount) public virtual {
+ _mint(to, amount);
+ }
+
+ function burn(address form, uint256 amount) public virtual {
+ _burn(form, amount);
+ }
+
+ function decimals() public view virtual override returns (uint8) {
+ return 9;
+ }
+
+ function testSkip() public {}
+}
+
contract WETH {
string public name = "Wrapped Ether";
string public symbol = "WETH";
diff --git a/chocolatey/sui.nuspec b/chocolatey/sui.nuspec
index 6d649bbe60e09..843f5bf90f3c9 100644
--- a/chocolatey/sui.nuspec
+++ b/chocolatey/sui.nuspec
@@ -5,7 +5,7 @@ enclosed in quotation marks, you should use an editor that supports UTF-8, not t
sui
$version$
- sui
+ Sui Foundation
Main Sui Binary
sui
https://sui.io/
@@ -15,12 +15,12 @@ enclosed in quotation marks, you should use an editor that supports UTF-8, not t
https://github.com/MystenLabs/sui/issues
sui
https://community.chocolatey.org/packages/sui.portable
- Run a local sui binary
+ Sui delivers the benefits of Web3 with the ease of Web2
Sui is the first internet-scale programmable blockchain platform
- https://github.com/MystenLabs/sui/releases/tag/mainnet-v$version$
+ See https://github.com/MystenLabs/sui/releases/tag/testnet-v$version$
-
+
diff --git a/consensus/config/Cargo.toml b/consensus/config/Cargo.toml
index aeb3978f12301..48697e2f7e91b 100644
--- a/consensus/config/Cargo.toml
+++ b/consensus/config/Cargo.toml
@@ -6,6 +6,9 @@ authors = ["Mysten Labs "]
edition = "2021"
publish = false
+[lints]
+workspace = true
+
[dependencies]
fastcrypto.workspace = true
mysten-network.workspace = true
diff --git a/consensus/config/src/parameters.rs b/consensus/config/src/parameters.rs
index 4b3a85906c19a..6df7da3cb21e0 100644
--- a/consensus/config/src/parameters.rs
+++ b/consensus/config/src/parameters.rs
@@ -57,8 +57,8 @@ pub struct Parameters {
#[serde(default = "Parameters::default_commit_sync_batch_size")]
pub commit_sync_batch_size: u32,
- // Maximum number of commit batches being fetched, before throttling
- // of outgoing commit fetches starts.
+ // This affects the maximum number of commit batches being fetched, and those fetched but not
+ // processed as consensus output, before throttling of outgoing commit fetches starts.
#[serde(default = "Parameters::default_commit_sync_batches_ahead")]
pub commit_sync_batches_ahead: usize,
@@ -73,8 +73,8 @@ pub struct Parameters {
/// Time to wait during node start up until the node has synced the last proposed block via the
/// network peers. When set to `0` the sync mechanism is disabled. This property is meant to be
/// used for amnesia recovery.
- #[serde(default = "Parameters::default_sync_last_proposed_block_timeout")]
- pub sync_last_proposed_block_timeout: Duration,
+ #[serde(default = "Parameters::default_sync_last_known_own_block_timeout")]
+ pub sync_last_known_own_block_timeout: Duration,
}
impl Parameters {
@@ -129,15 +129,19 @@ impl Parameters {
}
pub(crate) fn default_commit_sync_batches_ahead() -> usize {
- 200
+ // This is set to be a multiple of default commit_sync_parallel_fetches to allow fetching ahead,
+ // while keeping the total number of inflight fetches and unprocessed fetched commits limited.
+ 80
}
- pub(crate) fn default_sync_last_proposed_block_timeout() -> Duration {
- Duration::ZERO
- }
-
- pub fn is_sync_last_proposed_block_enabled(&self) -> bool {
- !self.sync_last_proposed_block_timeout.is_zero()
+ pub(crate) fn default_sync_last_known_own_block_timeout() -> Duration {
+ if cfg!(msim) {
+ Duration::from_millis(500)
+ } else {
+ // Here we prioritise liveness over the complete de-risking of block equivocation. 5 seconds
+ // in the majority of cases should be good enough for this given a healthy network.
+ Duration::from_secs(5)
+ }
}
}
@@ -150,8 +154,8 @@ impl Default for Parameters {
max_forward_time_drift: Parameters::default_max_forward_time_drift(),
dag_state_cached_rounds: Parameters::default_dag_state_cached_rounds(),
max_blocks_per_fetch: Parameters::default_max_blocks_per_fetch(),
- sync_last_proposed_block_timeout: Parameters::default_sync_last_proposed_block_timeout(
- ),
+ sync_last_known_own_block_timeout:
+ Parameters::default_sync_last_known_own_block_timeout(),
commit_sync_parallel_fetches: Parameters::default_commit_sync_parallel_fetches(),
commit_sync_batch_size: Parameters::default_commit_sync_batch_size(),
commit_sync_batches_ahead: Parameters::default_commit_sync_batches_ahead(),
diff --git a/consensus/config/tests/snapshots/parameters_test__parameters.snap b/consensus/config/tests/snapshots/parameters_test__parameters.snap
index b764571ffe0a2..60ed151ba6303 100644
--- a/consensus/config/tests/snapshots/parameters_test__parameters.snap
+++ b/consensus/config/tests/snapshots/parameters_test__parameters.snap
@@ -15,7 +15,7 @@ max_blocks_per_fetch: 1000
dag_state_cached_rounds: 500
commit_sync_parallel_fetches: 20
commit_sync_batch_size: 100
-commit_sync_batches_ahead: 200
+commit_sync_batches_ahead: 80
anemo:
excessive_message_size: 8388608
tonic:
@@ -25,6 +25,6 @@ tonic:
connection_buffer_size: 33554432
excessive_message_size: 16777216
message_size_limit: 67108864
-sync_last_proposed_block_timeout:
- secs: 0
+sync_last_known_own_block_timeout:
+ secs: 5
nanos: 0
diff --git a/consensus/core/Cargo.toml b/consensus/core/Cargo.toml
index 067901f002a16..2cb277834c9b2 100644
--- a/consensus/core/Cargo.toml
+++ b/consensus/core/Cargo.toml
@@ -6,6 +6,9 @@ authors = ["Mysten Labs "]
edition = "2021"
publish = false
+[lints]
+workspace = true
+
[dependencies]
anemo.workspace = true
anemo-tower.workspace = true
diff --git a/consensus/core/src/authority_node.rs b/consensus/core/src/authority_node.rs
index 06e57b10c0846..f896dc1a0bd89 100644
--- a/consensus/core/src/authority_node.rs
+++ b/consensus/core/src/authority_node.rs
@@ -7,7 +7,7 @@ use consensus_config::{AuthorityIndex, Committee, NetworkKeyPair, Parameters, Pr
use parking_lot::RwLock;
use prometheus::Registry;
use sui_protocol_config::{ConsensusNetwork, ProtocolConfig};
-use tracing::info;
+use tracing::{info, warn};
use crate::{
authority_service::AuthorityService,
@@ -15,7 +15,8 @@ use crate::{
block_verifier::SignedBlockVerifier,
broadcaster::Broadcaster,
commit_observer::CommitObserver,
- commit_syncer::{CommitSyncer, CommitVoteMonitor},
+ commit_syncer::{CommitSyncer, CommitSyncerHandle},
+ commit_vote_monitor::CommitVoteMonitor,
context::{Clock, Context},
core::{Core, CoreSignals},
core_thread::{ChannelCoreThreadDispatcher, CoreThreadHandle},
@@ -54,6 +55,11 @@ impl ConsensusAuthority {
transaction_verifier: Arc,
commit_consumer: CommitConsumer,
registry: Registry,
+ // A counter that keeps track of how many times the authority node has been booted while the binary
+ // or the component that is calling the `ConsensusAuthority` has been running. It's mostly useful to
+ // make decisions on whether amnesia recovery should run or not. When `boot_counter` is 0, then `ConsensusAuthority`
+ // will initiate the process of amnesia recovery if that's enabled in the parameters.
+ boot_counter: u64,
) -> Self {
match network_type {
ConsensusNetwork::Anemo => {
@@ -67,6 +73,7 @@ impl ConsensusAuthority {
transaction_verifier,
commit_consumer,
registry,
+ boot_counter,
)
.await;
Self::WithAnemo(authority)
@@ -82,6 +89,7 @@ impl ConsensusAuthority {
transaction_verifier,
commit_consumer,
registry,
+ boot_counter,
)
.await;
Self::WithTonic(authority)
@@ -110,6 +118,14 @@ impl ConsensusAuthority {
Self::WithTonic(authority) => &authority.context,
}
}
+
+ #[allow(unused)]
+ fn sync_last_known_own_block_enabled(&self) -> bool {
+ match self {
+ Self::WithAnemo(authority) => authority.sync_last_known_own_block,
+ Self::WithTonic(authority) => authority.sync_last_known_own_block,
+ }
+ }
}
pub(crate) struct AuthorityNode
@@ -120,7 +136,7 @@ where
start_time: Instant,
transaction_client: Arc,
synchronizer: Arc,
- commit_syncer: CommitSyncer,
+ commit_syncer_handle: CommitSyncerHandle,
leader_timeout_handle: LeaderTimeoutTaskHandle,
core_thread_handle: CoreThreadHandle,
// Only one of broadcaster and subscriber gets created, depending on
@@ -128,6 +144,7 @@ where
broadcaster: Option,
subscriber: Option>>,
network_manager: N,
+ sync_last_known_own_block: bool,
}
impl AuthorityNode
@@ -146,10 +163,11 @@ where
transaction_verifier: Arc,
commit_consumer: CommitConsumer,
registry: Registry,
+ boot_counter: u64,
) -> Self {
info!(
- "Starting consensus authority {}\n{:#?}\n{:#?}\n{:?}",
- own_index, committee, parameters, protocol_config.version
+ "Starting consensus authority {}\n{:#?}\n{:#?}\n{:?}\nBoot counter: {}",
+ own_index, committee, parameters, protocol_config.version, boot_counter
);
assert!(committee.is_valid_index(own_index));
let context = Arc::new(Context::new(
@@ -163,7 +181,7 @@ where
let start_time = Instant::now();
let (tx_client, tx_receiver) = TransactionClient::new(context.clone());
- let tx_consumer = TransactionConsumer::new(tx_receiver, context.clone(), None);
+ let tx_consumer = TransactionConsumer::new(tx_receiver, context.clone());
let (core_signals, signals_receivers) = CoreSignals::new(context.clone());
@@ -185,6 +203,13 @@ where
let store_path = context.parameters.db_path.as_path().to_str().unwrap();
let store = Arc::new(RocksDBStore::new(store_path));
let dag_state = Arc::new(RwLock::new(DagState::new(context.clone(), store.clone())));
+ let sync_last_known_own_block = boot_counter == 0
+ && dag_state.read().highest_accepted_round() == 0
+ && !context
+ .parameters
+ .sync_last_known_own_block_timeout
+ .is_zero();
+ info!("Sync last known own block: {sync_last_known_own_block}");
let block_verifier = Arc::new(SignedBlockVerifier::new(
context.clone(),
@@ -209,6 +234,7 @@ where
))
};
+ let commit_consumer_monitor = commit_consumer.monitor();
let commit_observer = CommitObserver::new(
context.clone(),
commit_consumer,
@@ -229,6 +255,7 @@ where
core_signals,
protocol_keypair,
dag_state.clone(),
+ sync_last_known_own_block,
);
let (core_dispatcher, core_thread_handle) =
@@ -238,6 +265,7 @@ where
LeaderTimeoutTask::start(core_dispatcher.clone(), &signals_receivers, context.clone());
let commit_vote_monitor = Arc::new(CommitVoteMonitor::new(context.clone()));
+
let synchronizer = Synchronizer::start(
network_client.clone(),
context.clone(),
@@ -245,16 +273,19 @@ where
commit_vote_monitor.clone(),
block_verifier.clone(),
dag_state.clone(),
+ sync_last_known_own_block,
);
- let commit_syncer = CommitSyncer::new(
+ let commit_syncer_handle = CommitSyncer::new(
context.clone(),
core_dispatcher.clone(),
commit_vote_monitor.clone(),
+ commit_consumer_monitor,
network_client.clone(),
block_verifier.clone(),
dag_state.clone(),
- );
+ )
+ .start();
let network_service = Arc::new(AuthorityService::new(
context.clone(),
@@ -296,12 +327,13 @@ where
start_time,
transaction_client: Arc::new(tx_client),
synchronizer,
- commit_syncer,
+ commit_syncer_handle,
leader_timeout_handle,
core_thread_handle,
broadcaster,
subscriber,
network_manager,
+ sync_last_known_own_block,
}
}
@@ -312,8 +344,16 @@ where
);
// First shutdown components calling into Core.
- self.synchronizer.stop().await.ok();
- self.commit_syncer.stop().await;
+ if let Err(e) = self.synchronizer.stop().await {
+ if e.is_panic() {
+ std::panic::resume_unwind(e.into_panic());
+ }
+ warn!(
+ "Failed to stop synchronizer when shutting down consensus: {:?}",
+ e
+ );
+ };
+ self.commit_syncer_handle.stop().await;
self.leader_timeout_handle.stop().await;
// Shutdown Core to stop block productions and broadcast.
// When using streaming, all subscribers to broadcasted blocks stop after this.
@@ -343,7 +383,7 @@ where
mod tests {
#![allow(non_snake_case)]
- use std::sync::Mutex;
+ use std::collections::BTreeMap;
use std::{collections::BTreeSet, sync::Arc, time::Duration};
use consensus_config::{local_committee_and_keys, Parameters};
@@ -352,10 +392,11 @@ mod tests {
use rstest::rstest;
use sui_protocol_config::ProtocolConfig;
use tempfile::TempDir;
- use tokio::time::sleep;
+ use tokio::time::{sleep, timeout};
use typed_store::DBMetrics;
use super::*;
+ use crate::block::GENESIS_ROUND;
use crate::{block::BlockAPI as _, transaction::NoopTransactionVerifier, CommittedSubDag};
#[rstest]
@@ -378,7 +419,7 @@ mod tests {
let network_keypair = keypairs[own_index].0.clone();
let (sender, _receiver) = unbounded_channel("consensus_output");
- let commit_consumer = CommitConsumer::new(sender, 0, 0);
+ let commit_consumer = CommitConsumer::new(sender, 0);
let authority = ConsensusAuthority::start(
network_type,
@@ -391,6 +432,7 @@ mod tests {
Arc::new(txn_verifier),
commit_consumer,
registry,
+ 0,
)
.await;
@@ -410,11 +452,15 @@ mod tests {
let db_registry = Registry::new();
DBMetrics::init(&db_registry);
- let (committee, keypairs) = local_committee_and_keys(0, vec![1, 1, 1, 1]);
- let temp_dirs = (0..4).map(|_| TempDir::new().unwrap()).collect::>();
+ const NUM_OF_AUTHORITIES: usize = 4;
+ let (committee, keypairs) = local_committee_and_keys(0, [1; NUM_OF_AUTHORITIES].to_vec());
+ let temp_dirs = (0..NUM_OF_AUTHORITIES)
+ .map(|_| TempDir::new().unwrap())
+ .collect::>();
let mut output_receivers = Vec::with_capacity(committee.size());
let mut authorities = Vec::with_capacity(committee.size());
+ let mut boot_counters = [0; NUM_OF_AUTHORITIES];
for (index, _authority_info) in committee.authorities() {
let (authority, receiver) = make_authority(
@@ -423,8 +469,10 @@ mod tests {
committee.clone(),
keypairs.clone(),
network_type,
+ boot_counters[index],
)
.await;
+ boot_counters[index] += 1;
output_receivers.push(receiver);
authorities.push(authority);
}
@@ -468,7 +516,7 @@ mod tests {
// Stop authority 1.
let index = committee.to_authority_index(1).unwrap();
authorities.remove(index.value()).stop().await;
- sleep(Duration::from_secs(15)).await;
+ sleep(Duration::from_secs(10)).await;
// Restart authority 1 and let it run.
let (authority, receiver) = make_authority(
@@ -477,11 +525,13 @@ mod tests {
committee.clone(),
keypairs.clone(),
network_type,
+ boot_counters[index],
)
.await;
+ boot_counters[index] += 1;
output_receivers[index] = receiver;
authorities.insert(index.value(), authority);
- sleep(Duration::from_secs(15)).await;
+ sleep(Duration::from_secs(10)).await;
// Stop all authorities and exit.
for authority in authorities {
@@ -491,166 +541,120 @@ mod tests {
#[rstest]
#[tokio::test(flavor = "current_thread")]
- async fn test_amnesia_success(
+ async fn test_amnesia_recovery_success(
#[values(ConsensusNetwork::Anemo, ConsensusNetwork::Tonic)] network_type: ConsensusNetwork,
) {
telemetry_subscribers::init_for_testing();
let db_registry = Registry::new();
DBMetrics::init(&db_registry);
- let (committee, keypairs) = local_committee_and_keys(0, vec![1, 1, 1, 1]);
+ const NUM_OF_AUTHORITIES: usize = 4;
+ let (committee, keypairs) = local_committee_and_keys(0, [1; NUM_OF_AUTHORITIES].to_vec());
let mut output_receivers = vec![];
- let mut authorities = vec![];
+ let mut authorities = BTreeMap::new();
+ let mut temp_dirs = BTreeMap::new();
+ let mut boot_counters = [0; NUM_OF_AUTHORITIES];
for (index, _authority_info) in committee.authorities() {
+ let dir = TempDir::new().unwrap();
let (authority, receiver) = make_authority(
index,
- &TempDir::new().unwrap(),
+ &dir,
committee.clone(),
keypairs.clone(),
network_type,
+ boot_counters[index],
)
.await;
+ assert!(authority.sync_last_known_own_block_enabled(), "Expected syncing of last known own block to be enabled as all authorities are of empty db and boot for first time.");
+ boot_counters[index] += 1;
output_receivers.push(receiver);
- authorities.push(authority);
+ authorities.insert(index, authority);
+ temp_dirs.insert(index, dir);
}
- const NUM_TRANSACTIONS: u8 = 15;
- let mut submitted_transactions = BTreeSet::>::new();
- for i in 0..NUM_TRANSACTIONS {
- let txn = vec![i; 16];
- submitted_transactions.insert(txn.clone());
- authorities[i as usize % authorities.len()]
- .transaction_client()
- .submit(vec![txn])
+ // Now we take the receiver of authority 1 and we wait until we see at least one block committed from this authority
+ // We wait until we see at least one committed block authored from this authority. That way we'll be 100% sure that
+ // at least one block has been proposed and successfully received by a quorum of nodes.
+ let index_1 = committee.to_authority_index(1).unwrap();
+ 'outer: while let Some(result) =
+ timeout(Duration::from_secs(10), output_receivers[index_1].recv())
.await
- .unwrap();
- }
-
- for receiver in &mut output_receivers {
- let mut expected_transactions = submitted_transactions.clone();
- loop {
- let committed_subdag =
- tokio::time::timeout(Duration::from_secs(1), receiver.recv())
- .await
- .unwrap()
- .unwrap();
- for b in committed_subdag.blocks {
- for txn in b.transactions().iter().map(|t| t.data().to_vec()) {
- assert!(
- expected_transactions.remove(&txn),
- "Transaction not submitted or already seen: {:?}",
- txn
- );
- }
- }
- assert_eq!(committed_subdag.reputation_scores_desc, vec![]);
- if expected_transactions.is_empty() {
- break;
+ .expect("Timed out while waiting for at least one committed block from authority 1")
+ {
+ for block in result.blocks {
+ if block.round() > GENESIS_ROUND && block.author() == index_1 {
+ break 'outer;
}
}
}
- // Stop authority 1.
- let index = committee.to_authority_index(1).unwrap();
- authorities.remove(index.value()).stop().await;
+ // Stop authority 1 & 2.
+ // * Authority 1 will be used to wipe out their DB and practically "force" the amnesia recovery.
+ // * Authority 2 is stopped in order to simulate less than f+1 availability which will
+ // make authority 1 retry during amnesia recovery until it has finally managed to successfully get back f+1 responses.
+ // once authority 2 is up and running again.
+ authorities.remove(&index_1).unwrap().stop().await;
+ let index_2 = committee.to_authority_index(2).unwrap();
+ authorities.remove(&index_2).unwrap().stop().await;
sleep(Duration::from_secs(5)).await;
- // now create a new directory to simulate amnesia. The node will start having participated previously
- // to consensus but now will attempt to synchronize the last own block and recover from there.
+ // Authority 1: create a new directory to simulate amnesia. The node will start having participated previously
+ // to consensus but now will attempt to synchronize the last own block and recover from there. It won't be able
+ // to do that successfully as authority 2 is still down.
+ let dir = TempDir::new().unwrap();
+ // We do reset the boot counter for this one to simulate a "binary" restart
+ boot_counters[index_1] = 0;
let (authority, mut receiver) = make_authority(
- index,
- &TempDir::new().unwrap(),
+ index_1,
+ &dir,
+ committee.clone(),
+ keypairs.clone(),
+ network_type,
+ boot_counters[index_1],
+ )
+ .await;
+ assert!(
+ authority.sync_last_known_own_block_enabled(),
+ "Authority should have the sync of last own block enabled"
+ );
+ boot_counters[index_1] += 1;
+ authorities.insert(index_1, authority);
+ temp_dirs.insert(index_1, dir);
+ sleep(Duration::from_secs(5)).await;
+
+ // Now spin up authority 2 using its earlier directly - so no amnesia recovery should be forced here.
+ // Authority 1 should be able to recover from amnesia successfully.
+ let (authority, _receiver) = make_authority(
+ index_2,
+ &temp_dirs[&index_2],
committee.clone(),
keypairs,
network_type,
+ boot_counters[index_2],
)
.await;
- authorities.insert(index.value(), authority);
+ assert!(
+ !authority.sync_last_known_own_block_enabled(),
+ "Authority should not have attempted to sync the last own block"
+ );
+ boot_counters[index_2] += 1;
+ authorities.insert(index_2, authority);
sleep(Duration::from_secs(5)).await;
// We wait until we see at least one committed block authored from this authority
'outer: while let Some(result) = receiver.recv().await {
for block in result.blocks {
- if block.author() == index {
+ if block.round() > GENESIS_ROUND && block.author() == index_1 {
break 'outer;
}
}
}
// Stop all authorities and exit.
- for authority in authorities {
- authority.stop().await;
- }
- }
-
- #[rstest]
- #[tokio::test]
- async fn test_amnesia_failure(
- #[values(ConsensusNetwork::Anemo, ConsensusNetwork::Tonic)] network_type: ConsensusNetwork,
- ) {
- telemetry_subscribers::init_for_testing();
-
- let occurred_panic = Arc::new(Mutex::new(None));
- let occurred_panic_cloned = occurred_panic.clone();
-
- let default_panic_handler = std::panic::take_hook();
- std::panic::set_hook(Box::new(move |panic| {
- let mut l = occurred_panic_cloned.lock().unwrap();
- *l = Some(panic.to_string());
- default_panic_handler(panic);
- }));
-
- let db_registry = Registry::new();
- DBMetrics::init(&db_registry);
-
- let (committee, keypairs) = local_committee_and_keys(0, vec![1, 1, 1, 1]);
- let mut output_receivers = vec![];
- let mut authorities = vec![];
-
- for (index, _authority_info) in committee.authorities() {
- let (authority, receiver) = make_authority(
- index,
- &TempDir::new().unwrap(),
- committee.clone(),
- keypairs.clone(),
- network_type,
- )
- .await;
- output_receivers.push(receiver);
- authorities.push(authority);
- }
-
- // Let the network run for a few seconds
- sleep(Duration::from_secs(5)).await;
-
- // Stop all authorities
- while let Some(authority) = authorities.pop() {
+ for (_, authority) in authorities {
authority.stop().await;
}
-
- sleep(Duration::from_secs(2)).await;
-
- let index = AuthorityIndex::new_for_test(0);
- let (_authority, _receiver) = make_authority(
- index,
- &TempDir::new().unwrap(),
- committee,
- keypairs,
- network_type,
- )
- .await;
- sleep(Duration::from_secs(5)).await;
-
- // Now reset the panic hook
- let _default_panic_handler = std::panic::take_hook();
-
- // We expect this test to panic as all the other peers are down and the node that tries to
- // recover its last produced block fails.
- let panic_info = occurred_panic.lock().unwrap().take().unwrap();
- assert!(panic_info.contains(
- "No peer has returned any acceptable result, can not safely update min round"
- ));
}
// TODO: create a fixture
@@ -660,6 +664,7 @@ mod tests {
committee: Committee,
keypairs: Vec<(NetworkKeyPair, ProtocolKeyPair)>,
network_type: ConsensusNetwork,
+ boot_counter: u64,
) -> (ConsensusAuthority, UnboundedReceiver) {
let registry = Registry::new();
@@ -669,7 +674,7 @@ mod tests {
dag_state_cached_rounds: 5,
commit_sync_parallel_fetches: 3,
commit_sync_batch_size: 3,
- sync_last_proposed_block_timeout: Duration::from_millis(2_000),
+ sync_last_known_own_block_timeout: Duration::from_millis(2_000),
..Default::default()
};
let txn_verifier = NoopTransactionVerifier {};
@@ -678,7 +683,7 @@ mod tests {
let network_keypair = keypairs[index].0.clone();
let (sender, receiver) = unbounded_channel("consensus_output");
- let commit_consumer = CommitConsumer::new(sender, 0, 0);
+ let commit_consumer = CommitConsumer::new(sender, 0);
let authority = ConsensusAuthority::start(
network_type,
@@ -691,8 +696,10 @@ mod tests {
Arc::new(txn_verifier),
commit_consumer,
registry,
+ boot_counter,
)
.await;
+
(authority, receiver)
}
}
diff --git a/consensus/core/src/authority_service.rs b/consensus/core/src/authority_service.rs
index feac2741570cc..94fa311e01a6b 100644
--- a/consensus/core/src/authority_service.rs
+++ b/consensus/core/src/authority_service.rs
@@ -17,7 +17,7 @@ use crate::{
block::{BlockAPI as _, BlockRef, SignedBlock, VerifiedBlock, GENESIS_ROUND},
block_verifier::BlockVerifier,
commit::{CommitAPI as _, CommitRange, TrustedCommit},
- commit_syncer::CommitVoteMonitor,
+ commit_vote_monitor::CommitVoteMonitor,
context::Context,
core_thread::CoreThreadDispatcher,
dag_state::DagState,
@@ -133,7 +133,7 @@ impl NetworkService for AuthorityService {
.metrics
.node_metrics
.rejected_future_blocks
- .with_label_values(&[&peer_hostname])
+ .with_label_values(&[peer_hostname])
.inc();
debug!(
"Block {:?} timestamp ({} > {}) is too far in the future, rejected.",
@@ -157,7 +157,7 @@ impl NetworkService for AuthorityService {
.metrics
.node_metrics
.block_timestamp_drift_wait_ms
- .with_label_values(&[peer_hostname, &"handle_send_block"])
+ .with_label_values(&[peer_hostname, "handle_send_block"])
.inc_by(forward_time_drift.as_millis() as u64);
debug!(
"Block {:?} timestamp ({} > {}) is in the future, waiting for {}ms",
@@ -171,7 +171,7 @@ impl NetworkService for AuthorityService {
// Observe the block for the commit votes. When local commit is lagging too much,
// commit sync loop will trigger fetching.
- self.commit_vote_monitor.observe(&verified_block);
+ self.commit_vote_monitor.observe_block(&verified_block);
// Reject blocks when local commit index is lagging too far from quorum commit index.
//
@@ -192,7 +192,7 @@ impl NetworkService for AuthorityService {
.metrics
.node_metrics
.rejected_blocks
- .with_label_values(&[&"commit_lagging"])
+ .with_label_values(&["commit_lagging"])
.inc();
debug!(
"Block {:?} is rejected because last commit index is lagging quorum commit index too much ({} < {})",
@@ -213,7 +213,7 @@ impl NetworkService for AuthorityService {
.metrics
.node_metrics
.verified_blocks
- .with_label_values(&[&peer_hostname])
+ .with_label_values(&[peer_hostname])
.inc();
let missing_ancestors = self
@@ -567,7 +567,7 @@ mod tests {
authority_service::AuthorityService,
block::BlockAPI,
block::{BlockRef, SignedBlock, TestBlock, VerifiedBlock},
- commit_syncer::CommitVoteMonitor,
+ commit_vote_monitor::CommitVoteMonitor,
context::Context,
core_thread::{CoreError, CoreThreadDispatcher},
dag_state::DagState,
@@ -689,24 +689,25 @@ mod tests {
let (context, _keys) = Context::new_for_test(4);
let context = Arc::new(context);
let block_verifier = Arc::new(crate::block_verifier::NoopBlockVerifier {});
+ let commit_vote_monitor = Arc::new(CommitVoteMonitor::new(context.clone()));
let core_dispatcher = Arc::new(FakeCoreThreadDispatcher::new());
let (_tx_block_broadcast, rx_block_broadcast) = broadcast::channel(100);
let network_client = Arc::new(FakeNetworkClient::default());
let store = Arc::new(MemStore::new());
let dag_state = Arc::new(RwLock::new(DagState::new(context.clone(), store.clone())));
- let commit_vote_monitor = Arc::new(CommitVoteMonitor::new(context.clone()));
let synchronizer = Synchronizer::start(
network_client,
context.clone(),
core_dispatcher.clone(),
- commit_vote_monitor,
+ commit_vote_monitor.clone(),
block_verifier.clone(),
dag_state.clone(),
+ false,
);
let authority_service = Arc::new(AuthorityService::new(
context.clone(),
block_verifier,
- Arc::new(CommitVoteMonitor::new(context.clone())),
+ commit_vote_monitor,
synchronizer,
core_dispatcher.clone(),
rx_block_broadcast,
@@ -747,24 +748,25 @@ mod tests {
let (context, _keys) = Context::new_for_test(4);
let context = Arc::new(context);
let block_verifier = Arc::new(crate::block_verifier::NoopBlockVerifier {});
+ let commit_vote_monitor = Arc::new(CommitVoteMonitor::new(context.clone()));
let core_dispatcher = Arc::new(FakeCoreThreadDispatcher::new());
let (_tx_block_broadcast, rx_block_broadcast) = broadcast::channel(100);
let network_client = Arc::new(FakeNetworkClient::default());
let store = Arc::new(MemStore::new());
let dag_state = Arc::new(RwLock::new(DagState::new(context.clone(), store.clone())));
- let commit_vote_monitor = Arc::new(CommitVoteMonitor::new(context.clone()));
let synchronizer = Synchronizer::start(
network_client,
context.clone(),
core_dispatcher.clone(),
- commit_vote_monitor,
+ commit_vote_monitor.clone(),
block_verifier.clone(),
dag_state.clone(),
+ true,
);
let authority_service = Arc::new(AuthorityService::new(
context.clone(),
block_verifier,
- Arc::new(CommitVoteMonitor::new(context.clone())),
+ commit_vote_monitor,
synchronizer,
core_dispatcher.clone(),
rx_block_broadcast,
diff --git a/consensus/core/src/block_verifier.rs b/consensus/core/src/block_verifier.rs
index 7c04605ddb0f5..2e876e9130f0b 100644
--- a/consensus/core/src/block_verifier.rs
+++ b/consensus/core/src/block_verifier.rs
@@ -142,8 +142,43 @@ impl BlockVerifier for SignedBlockVerifier {
});
}
- // TODO: check transaction size, total size and count.
let batch: Vec<_> = block.transactions().iter().map(|t| t.data()).collect();
+
+ let max_transaction_size_limit =
+ self.context
+ .protocol_config
+ .consensus_max_transaction_size_bytes() as usize;
+ for t in &batch {
+ if t.len() > max_transaction_size_limit && max_transaction_size_limit > 0 {
+ return Err(ConsensusError::TransactionTooLarge {
+ size: t.len(),
+ limit: max_transaction_size_limit,
+ });
+ }
+ }
+
+ let max_num_transactions_limit =
+ self.context.protocol_config.max_num_transactions_in_block() as usize;
+ if batch.len() > max_num_transactions_limit && max_num_transactions_limit > 0 {
+ return Err(ConsensusError::TooManyTransactions {
+ count: batch.len(),
+ limit: max_num_transactions_limit,
+ });
+ }
+
+ let total_transactions_size_limit =
+ self.context
+ .protocol_config
+ .consensus_max_transactions_in_block_bytes() as usize;
+ if batch.iter().map(|t| t.len()).sum::() > total_transactions_size_limit
+ && total_transactions_size_limit > 0
+ {
+ return Err(ConsensusError::TooManyTransactionBytes {
+ size: batch.len(),
+ limit: total_transactions_size_limit,
+ });
+ }
+
self.transaction_verifier
.verify_batch(&self.context.protocol_config, &batch)
.map_err(|e| ConsensusError::InvalidTransaction(format!("{e:?}")))
@@ -171,6 +206,7 @@ impl BlockVerifier for SignedBlockVerifier {
}
}
+#[allow(unused)]
pub(crate) struct NoopBlockVerifier;
impl BlockVerifier for NoopBlockVerifier {
@@ -445,6 +481,49 @@ mod test {
Err(ConsensusError::InvalidTransaction(_))
));
}
+
+ // Block with transaction too large.
+ {
+ let block = test_block
+ .clone()
+ .set_transactions(vec![Transaction::new(vec![4; 257 * 1024])])
+ .build();
+ let signed_block = SignedBlock::new(block, authority_2_protocol_keypair).unwrap();
+ assert!(matches!(
+ verifier.verify(&signed_block),
+ Err(ConsensusError::TransactionTooLarge { size: _, limit: _ })
+ ));
+ }
+
+ // Block with too many transactions.
+ {
+ let block = test_block
+ .clone()
+ .set_transactions((0..1000).map(|_| Transaction::new(vec![4; 8])).collect())
+ .build();
+ let signed_block = SignedBlock::new(block, authority_2_protocol_keypair).unwrap();
+ assert!(matches!(
+ verifier.verify(&signed_block),
+ Err(ConsensusError::TooManyTransactions { count: _, limit: _ })
+ ));
+ }
+
+ // Block with too many transaction bytes.
+ {
+ let block = test_block
+ .clone()
+ .set_transactions(
+ (0..100)
+ .map(|_| Transaction::new(vec![4; 8 * 1024]))
+ .collect(),
+ )
+ .build();
+ let signed_block = SignedBlock::new(block, authority_2_protocol_keypair).unwrap();
+ assert!(matches!(
+ verifier.verify(&signed_block),
+ Err(ConsensusError::TooManyTransactionBytes { size: _, limit: _ })
+ ));
+ }
}
#[tokio::test]
diff --git a/consensus/core/src/commit.rs b/consensus/core/src/commit.rs
index 810fd9eb43b9d..f50d5ba469b89 100644
--- a/consensus/core/src/commit.rs
+++ b/consensus/core/src/commit.rs
@@ -13,7 +13,6 @@ use bytes::Bytes;
use consensus_config::{AuthorityIndex, DefaultHashFunction, DIGEST_LENGTH};
use enum_dispatch::enum_dispatch;
use fastcrypto::hash::{Digest, HashFunction as _};
-use mysten_metrics::monitored_mpsc::UnboundedSender;
use serde::{Deserialize, Serialize};
use crate::{
@@ -398,32 +397,6 @@ pub fn load_committed_subdag_from_store(
)
}
-pub struct CommitConsumer {
- // A channel to send the committed sub dags through
- pub sender: UnboundedSender,
- // Leader round of the last commit that the consumer has processed.
- pub last_processed_commit_round: Round,
- // Index of the last commit that the consumer has processed. This is useful for
- // crash/recovery so mysticeti can replay the commits from the next index.
- // First commit in the replayed sequence will have index last_processed_commit_index + 1.
- // Set 0 to replay from the start (as generated commit sequence starts at index = 1).
- pub last_processed_commit_index: CommitIndex,
-}
-
-impl CommitConsumer {
- pub fn new(
- sender: UnboundedSender,
- last_processed_commit_round: Round,
- last_processed_commit_index: CommitIndex,
- ) -> Self {
- Self {
- sender,
- last_processed_commit_round,
- last_processed_commit_index,
- }
- }
-}
-
#[derive(Debug, Clone, Copy, Eq, PartialEq)]
pub(crate) enum Decision {
Direct,
diff --git a/consensus/core/src/commit_consumer.rs b/consensus/core/src/commit_consumer.rs
new file mode 100644
index 0000000000000..47a96d80f0e2a
--- /dev/null
+++ b/consensus/core/src/commit_consumer.rs
@@ -0,0 +1,74 @@
+// Copyright (c) Mysten Labs, Inc.
+// SPDX-License-Identifier: Apache-2.0
+
+use std::sync::{atomic::AtomicU32, Arc};
+
+use mysten_metrics::monitored_mpsc::UnboundedSender;
+
+use crate::{CommitIndex, CommittedSubDag};
+
+pub struct CommitConsumer {
+ // A channel to send the committed sub dags through
+ pub(crate) sender: UnboundedSender,
+ // Index of the last commit that the consumer has processed. This is useful for
+ // crash/recovery so mysticeti can replay the commits from the next index.
+ // First commit in the replayed sequence will have index last_processed_commit_index + 1.
+ // Set 0 to replay from the start (as generated commit sequence starts at index = 1).
+ pub(crate) last_processed_commit_index: CommitIndex,
+ // Allows the commit consumer to report its progress.
+ monitor: Arc,
+}
+
+impl CommitConsumer {
+ pub fn new(
+ sender: UnboundedSender,
+ last_processed_commit_index: CommitIndex,
+ ) -> Self {
+ let monitor = Arc::new(CommitConsumerMonitor::new(last_processed_commit_index));
+ Self {
+ sender,
+ last_processed_commit_index,
+ monitor,
+ }
+ }
+
+ pub fn monitor(&self) -> Arc {
+ self.monitor.clone()
+ }
+}
+
+pub struct CommitConsumerMonitor {
+ highest_handled_commit: AtomicU32,
+}
+
+impl CommitConsumerMonitor {
+ pub(crate) fn new(last_handled_commit: CommitIndex) -> Self {
+ Self {
+ highest_handled_commit: AtomicU32::new(last_handled_commit),
+ }
+ }
+
+ pub(crate) fn highest_handled_commit(&self) -> CommitIndex {
+ self.highest_handled_commit
+ .load(std::sync::atomic::Ordering::Acquire)
+ }
+
+ pub fn set_highest_handled_commit(&self, highest_handled_commit: CommitIndex) {
+ self.highest_handled_commit
+ .store(highest_handled_commit, std::sync::atomic::Ordering::Release);
+ }
+}
+
+#[cfg(test)]
+mod test {
+ use crate::CommitConsumerMonitor;
+
+ #[test]
+ fn test_commit_consumer_monitor() {
+ let monitor = CommitConsumerMonitor::new(10);
+ assert_eq!(monitor.highest_handled_commit(), 10);
+
+ monitor.set_highest_handled_commit(100);
+ assert_eq!(monitor.highest_handled_commit(), 100);
+ }
+}
diff --git a/consensus/core/src/commit_observer.rs b/consensus/core/src/commit_observer.rs
index 34cf4871234f0..a25113de387fb 100644
--- a/consensus/core/src/commit_observer.rs
+++ b/consensus/core/src/commit_observer.rs
@@ -23,14 +23,16 @@ use crate::{
/// Role of CommitObserver
/// - Called by core when try_commit() returns newly committed leaders.
/// - The newly committed leaders are sent to commit observer and then commit observer
-/// gets subdags for each leader via the commit interpreter (linearizer)
+/// gets subdags for each leader via the commit interpreter (linearizer)
/// - The committed subdags are sent as consensus output via an unbounded tokio channel.
+///
/// No back pressure mechanism is needed as backpressure is handled as input into
/// consenus.
+///
/// - Commit metadata including index is persisted in store, before the CommittedSubDag
-/// is sent to the consumer.
+/// is sent to the consumer.
/// - When CommitObserver is initialized a last processed commit index can be used
-/// to ensure any missing commits are re-sent.
+/// to ensure any missing commits are re-sent.
pub(crate) struct CommitObserver {
context: Arc,
/// Component to deterministically collect subdags for committed leaders.
@@ -210,11 +212,7 @@ mod tests {
use super::*;
use crate::{
- block::{BlockRef, Round},
- commit::DEFAULT_WAVE_LENGTH,
- context::Context,
- dag_state::DagState,
- storage::mem_store::MemStore,
+ block::BlockRef, context::Context, dag_state::DagState, storage::mem_store::MemStore,
test_dag_builder::DagBuilder,
};
@@ -228,7 +226,6 @@ mod tests {
context.clone(),
mem_store.clone(),
)));
- let last_processed_commit_round = 0;
let last_processed_commit_index = 0;
let (sender, mut receiver) = unbounded_channel("consensus_output");
@@ -239,11 +236,7 @@ mod tests {
let mut observer = CommitObserver::new(
context.clone(),
- CommitConsumer::new(
- sender,
- last_processed_commit_round,
- last_processed_commit_index,
- ),
+ CommitConsumer::new(sender, last_processed_commit_index),
dag_state.clone(),
mem_store.clone(),
leader_schedule,
@@ -332,7 +325,6 @@ mod tests {
context.clone(),
mem_store.clone(),
)));
- let last_processed_commit_round = 0;
let last_processed_commit_index = 0;
let (sender, mut receiver) = unbounded_channel("consensus_output");
@@ -343,11 +335,7 @@ mod tests {
let mut observer = CommitObserver::new(
context.clone(),
- CommitConsumer::new(
- sender.clone(),
- last_processed_commit_round,
- last_processed_commit_index,
- ),
+ CommitConsumer::new(sender.clone(), last_processed_commit_index),
dag_state.clone(),
mem_store.clone(),
leader_schedule.clone(),
@@ -370,8 +358,6 @@ mod tests {
// Commit first batch of leaders (2) and "receive" the subdags as the
// consumer of the consensus output channel.
let expected_last_processed_index: usize = 2;
- let expected_last_processed_round =
- expected_last_processed_index as u32 * DEFAULT_WAVE_LENGTH;
let mut commits = observer
.handle_commit(
leaders
@@ -443,11 +429,7 @@ mod tests {
// last processed index from the consumer over consensus output channel
let _observer = CommitObserver::new(
context.clone(),
- CommitConsumer::new(
- sender,
- expected_last_processed_round as Round,
- expected_last_processed_index as CommitIndex,
- ),
+ CommitConsumer::new(sender, expected_last_processed_index as CommitIndex),
dag_state.clone(),
mem_store.clone(),
leader_schedule,
@@ -480,7 +462,6 @@ mod tests {
context.clone(),
mem_store.clone(),
)));
- let last_processed_commit_round = 0;
let last_processed_commit_index = 0;
let (sender, mut receiver) = unbounded_channel("consensus_output");
@@ -491,11 +472,7 @@ mod tests {
let mut observer = CommitObserver::new(
context.clone(),
- CommitConsumer::new(
- sender.clone(),
- last_processed_commit_round,
- last_processed_commit_index,
- ),
+ CommitConsumer::new(sender.clone(), last_processed_commit_index),
dag_state.clone(),
mem_store.clone(),
leader_schedule.clone(),
@@ -518,8 +495,6 @@ mod tests {
// Commit all of the leaders and "receive" the subdags as the consumer of
// the consensus output channel.
let expected_last_processed_index: usize = 10;
- let expected_last_processed_round =
- expected_last_processed_index as u32 * DEFAULT_WAVE_LENGTH;
let commits = observer.handle_commit(leaders.clone()).unwrap();
// Check commits sent over consensus output channel is accurate
@@ -548,11 +523,7 @@ mod tests {
// last processed index from the consumer over consensus output channel
let _observer = CommitObserver::new(
context.clone(),
- CommitConsumer::new(
- sender,
- expected_last_processed_round as Round,
- expected_last_processed_index as CommitIndex,
- ),
+ CommitConsumer::new(sender, expected_last_processed_index as CommitIndex),
dag_state.clone(),
mem_store.clone(),
leader_schedule,
diff --git a/consensus/core/src/commit_syncer.rs b/consensus/core/src/commit_syncer.rs
index 6737561786168..f4ecf4fa2f951 100644
--- a/consensus/core/src/commit_syncer.rs
+++ b/consensus/core/src/commit_syncer.rs
@@ -47,23 +47,60 @@ use tracing::{debug, info, warn};
use crate::{
block::{BlockAPI, BlockRef, SignedBlock, VerifiedBlock},
block_verifier::BlockVerifier,
- commit::{
- Commit, CommitAPI as _, CommitDigest, CommitRange, CommitRef, TrustedCommit,
- GENESIS_COMMIT_INDEX,
- },
+ commit::{Commit, CommitAPI as _, CommitDigest, CommitRange, CommitRef, TrustedCommit},
+ commit_vote_monitor::CommitVoteMonitor,
context::Context,
core_thread::CoreThreadDispatcher,
dag_state::DagState,
error::{ConsensusError, ConsensusResult},
network::NetworkClient,
stake_aggregator::{QuorumThreshold, StakeAggregator},
- CommitIndex,
+ CommitConsumerMonitor, CommitIndex,
};
-pub(crate) struct CommitSyncer {
+// Handle to stop the CommitSyncer loop.
+pub(crate) struct CommitSyncerHandle {
schedule_task: JoinHandle<()>,
tx_shutdown: oneshot::Sender<()>,
- _phantom: std::marker::PhantomData,
+}
+
+impl CommitSyncerHandle {
+ pub(crate) async fn stop(self) {
+ let _ = self.tx_shutdown.send(());
+ // Do not abort schedule task, which waits for fetches to shut down.
+ if let Err(e) = self.schedule_task.await {
+ if e.is_panic() {
+ std::panic::resume_unwind(e.into_panic());
+ }
+ }
+ }
+}
+
+pub(crate) struct CommitSyncer {
+ // States shared by scheduler and fetch tasks.
+
+ // Shared components wrapper.
+ inner: Arc>,
+ // State of peers shared by fetch tasks, to determine the next peer to fetch against.
+ peer_state: Arc>,
+
+ // States only used by the scheduler.
+
+ // Inflight requests to fetch commits from different authorities.
+ inflight_fetches: JoinSet<(u32, Vec, Vec)>,
+ // Additional ranges of commits to fetch.
+ pending_fetches: BTreeSet,
+ // Fetched commits and blocks by commit range.
+ fetched_ranges: BTreeMap>,
+ // Highest commit index among inflight and pending fetches.
+ // Used to determine the start of new ranges to be fetched.
+ highest_scheduled_index: Option,
+ // Highest index among fetched commits, after commits and blocks are verified.
+ // Used for metrics.
+ highest_fetched_commit_index: CommitIndex,
+ // The commit index that is the max of highest local commit index and commit index inflight to Core.
+ // Used to determine if fetched blocks can be sent to Core without gaps.
+ synced_commit_index: CommitIndex,
}
impl CommitSyncer {
@@ -71,219 +108,269 @@ impl CommitSyncer {
context: Arc,
core_thread_dispatcher: Arc,
commit_vote_monitor: Arc,
+ commit_consumer_monitor: Arc,
network_client: Arc,
block_verifier: Arc,
dag_state: Arc>,
) -> Self {
- let fetch_state = Arc::new(Mutex::new(FetchState::new(&context)));
+ let peer_state = Arc::new(Mutex::new(PeerState::new(&context)));
let inner = Arc::new(Inner {
context,
core_thread_dispatcher,
commit_vote_monitor,
+ commit_consumer_monitor,
network_client,
block_verifier,
dag_state,
});
- let (tx_shutdown, rx_shutdown) = oneshot::channel();
- let schedule_task =
- spawn_logged_monitored_task!(Self::schedule_loop(inner, fetch_state, rx_shutdown));
+ let synced_commit_index = inner.dag_state.read().last_commit_index();
CommitSyncer {
- schedule_task,
- tx_shutdown,
- _phantom: Default::default(),
+ inner,
+ peer_state,
+ inflight_fetches: JoinSet::new(),
+ pending_fetches: BTreeSet::new(),
+ fetched_ranges: BTreeMap::new(),
+ highest_scheduled_index: None,
+ highest_fetched_commit_index: 0,
+ synced_commit_index,
}
}
- pub(crate) async fn stop(self) {
- let _ = self.tx_shutdown.send(());
- // Do not abort schedule task, which waits for fetches to shut down.
- let _ = self.schedule_task.await;
+ pub(crate) fn start(self) -> CommitSyncerHandle {
+ let (tx_shutdown, rx_shutdown) = oneshot::channel();
+ let schedule_task = spawn_logged_monitored_task!(self.schedule_loop(rx_shutdown,));
+ CommitSyncerHandle {
+ schedule_task,
+ tx_shutdown,
+ }
}
- async fn schedule_loop(
- inner: Arc>,
- fetch_state: Arc>,
- mut rx_shutdown: oneshot::Receiver<()>,
- ) {
+ async fn schedule_loop(mut self, mut rx_shutdown: oneshot::Receiver<()>) {
let mut interval = tokio::time::interval(Duration::from_secs(2));
interval.set_missed_tick_behavior(MissedTickBehavior::Skip);
- // Inflight requests to fetch commits from different authorities.
- let mut inflight_fetches = JoinSet::new();
- // Additional ranges (inclusive start and end) of commits to fetch.
- let mut pending_fetches = BTreeSet::::new();
- // Fetched commits and blocks by commit indices.
- let mut fetched_blocks = BTreeMap::>::new();
- // Highest end index among inflight and pending fetches.
- // Used to determine if and which new ranges to fetch.
- let mut highest_scheduled_index = Option::::None;
- // The commit index that is the max of local last commit index and highest commit index of blocks sent to Core.
- // Used to determine if fetched blocks can be sent to Core without gaps.
- let mut synced_commit_index = inner.dag_state.read().last_commit_index();
- let mut highest_fetched_commit_index = 0;
loop {
tokio::select! {
// Periodically, schedule new fetches if the node is falling behind.
_ = interval.tick() => {
- let quorum_commit_index = inner.commit_vote_monitor.quorum_commit_index();
- let local_commit_index = inner.dag_state.read().last_commit_index();
- let metrics = &inner.context.metrics.node_metrics;
- metrics.commit_sync_quorum_index.set(quorum_commit_index as i64);
- metrics.commit_sync_local_index.set(local_commit_index as i64);
- // Update synced_commit_index periodically to make sure it is not smaller than
- // local commit index.
- synced_commit_index = synced_commit_index.max(local_commit_index);
- info!(
- "Checking to schedule fetches: synced_commit_index={}, highest_scheduled_index={}, quorum_commit_index={}",
- synced_commit_index, highest_scheduled_index.unwrap_or(0), quorum_commit_index,
- );
- // TODO: pause commit sync when execution of commits is lagging behind, maybe through Core.
- // TODO: cleanup inflight fetches that are no longer needed.
- let fetch_after_index = synced_commit_index.max(highest_scheduled_index.unwrap_or(0));
- // When the node is falling behind, schedule pending fetches which will be executed on later.
- 'pending: for prev_end in (fetch_after_index..=quorum_commit_index).step_by(inner.context.parameters.commit_sync_batch_size as usize) {
- // Create range with inclusive start and end.
- let range_start = prev_end + 1;
- let range_end = prev_end + inner.context.parameters.commit_sync_batch_size;
- // When the condition below is true, [range_start, range_end] contains less number of commits
- // than the target batch size. Not creating the smaller batch is intentional, to avoid the
- // cost of processing more and smaller batches.
- // Block broadcast, subscription and synchronization will help the node catchup.
- if range_end > quorum_commit_index {
- break 'pending;
- }
- pending_fetches.insert((range_start..=range_end).into());
- // quorum_commit_index should be non-decreasing, so highest_scheduled_index should not
- // decrease either.
- highest_scheduled_index = Some(range_end);
- }
+ self.try_schedule_once();
}
-
- // Processed fetched blocks.
- Some(result) = inflight_fetches.join_next(), if !inflight_fetches.is_empty() => {
+ // Handles results from fetch tasks.
+ Some(result) = self.inflight_fetches.join_next(), if !self.inflight_fetches.is_empty() => {
if let Err(e) = result {
- warn!("Fetch cancelled or panicked, CommitSyncer shutting down: {}", e);
+ if e.is_panic() {
+ std::panic::resume_unwind(e.into_panic());
+ }
+ warn!("Fetch cancelled. CommitSyncer shutting down: {}", e);
// If any fetch is cancelled or panicked, try to shutdown and exit the loop.
- inflight_fetches.shutdown().await;
+ self.inflight_fetches.shutdown().await;
return;
}
- let (target_end, commits, blocks): (CommitIndex, Vec, Vec) = result.unwrap();
- assert!(!commits.is_empty());
- let metrics = &inner.context.metrics.node_metrics;
- metrics.commit_sync_fetched_commits.inc_by(commits.len() as u64);
- metrics.commit_sync_fetched_blocks.inc_by(blocks.len() as u64);
- metrics.commit_sync_total_fetched_blocks_size.inc_by(
- blocks.iter().map(|b| b.serialized().len() as u64).sum::()
- );
-
- let (commit_start, commit_end) = (commits.first().unwrap().index(), commits.last().unwrap().index());
-
- highest_fetched_commit_index = highest_fetched_commit_index.max(commit_end);
- metrics.commit_sync_highest_fetched_index.set(highest_fetched_commit_index.into());
-
- // Allow returning partial results, and try fetching the rest separately.
- if commit_end < target_end {
- pending_fetches.insert((commit_end + 1..=target_end).into());
- }
- // Make sure synced_commit_index is up to date.
- synced_commit_index = synced_commit_index.max(inner.dag_state.read().last_commit_index());
- // Only add new blocks if at least some of them are not already synced.
- if synced_commit_index < commit_end {
- fetched_blocks.insert((commit_start..=commit_end).into(), blocks);
- }
- // Try to process as many fetched blocks as possible.
- 'fetched: while let Some((fetched_commit_range, _blocks)) = fetched_blocks.first_key_value() {
- // Only pop fetched_blocks if there is no gap with blocks already synced.
- // Note: start, end and synced_commit_index are all inclusive.
- let (fetched_commit_range, blocks) = if fetched_commit_range.start() <= synced_commit_index + 1 {
- fetched_blocks.pop_first().unwrap()
- } else {
- // Found gap between earliest fetched block and latest synced block,
- // so not sending additional blocks to Core.
- metrics.commit_sync_gap_on_processing.inc();
- break 'fetched;
- };
- // Avoid sending to Core a whole batch of already synced blocks.
- if fetched_commit_range.end() <= synced_commit_index {
- continue 'fetched;
- }
- debug!(
- "Fetched certified blocks: {}",
- blocks
- .iter()
- .map(|b| b.reference().to_string())
- .join(","),
- );
- // If core thread cannot handle the incoming blocks, it is ok to block here.
- // Also it is possible to have missing ancestors because an equivocating validator
- // may produce blocks that are not included in commits but are ancestors to other blocks.
- // Synchronizer is needed to fill in the missing ancestors in this case.
- match inner.core_thread_dispatcher.add_blocks(blocks).await {
- Ok(missing) => {
- if !missing.is_empty() {
- warn!("Fetched blocks have missing ancestors: {:?}", missing);
- }
- }
- Err(e) => {
- info!("Failed to add blocks, shutting down: {}", e);
- return;
- }
- };
- // Once commits and blocks are sent to Core, ratchet up synced_commit_index
- synced_commit_index = synced_commit_index.max(fetched_commit_range.end());
- }
+ let (target_end, commits, blocks) = result.unwrap();
+ self.handle_fetch_result(target_end, commits, blocks).await;
}
-
_ = &mut rx_shutdown => {
// Shutdown requested.
info!("CommitSyncer shutting down ...");
- inflight_fetches.shutdown().await;
+ self.inflight_fetches.shutdown().await;
return;
}
}
- // Cap parallel fetches based on configured limit and committee size, to avoid overloading the network.
- // Also when there are too many fetched blocks that cannot be sent to Core before an earlier fetch
- // has not finished, reduce parallelism so the earlier fetch can retry on a better host and succeed.
- let target_parallel_fetches = inner
- .context
- .parameters
- .commit_sync_parallel_fetches
- .min(inner.context.committee.size() * 2 / 3)
- .min(
- inner
- .context
- .parameters
- .commit_sync_batches_ahead
- .saturating_sub(fetched_blocks.len()),
- )
- .max(1);
- // Start new fetches if there are pending batches and available slots.
- loop {
- if inflight_fetches.len() >= target_parallel_fetches {
- break;
- }
- let Some(commit_range) = pending_fetches.pop_first() else {
+ self.try_start_fetches();
+ }
+ }
+
+ fn try_schedule_once(&mut self) {
+ let quorum_commit_index = self.inner.commit_vote_monitor.quorum_commit_index();
+ let local_commit_index = self.inner.dag_state.read().last_commit_index();
+ let metrics = &self.inner.context.metrics.node_metrics;
+ metrics
+ .commit_sync_quorum_index
+ .set(quorum_commit_index as i64);
+ metrics
+ .commit_sync_local_index
+ .set(local_commit_index as i64);
+ let highest_handled_index = self.inner.commit_consumer_monitor.highest_handled_commit();
+ let highest_scheduled_index = self.highest_scheduled_index.unwrap_or(0);
+ // Update synced_commit_index periodically to make sure it is no smaller than
+ // local commit index.
+ self.synced_commit_index = self.synced_commit_index.max(local_commit_index);
+ let unhandled_commits_threshold = self.unhandled_commits_threshold();
+ info!(
+ "Checking to schedule fetches: synced_commit_index={}, highest_handled_index={}, highest_scheduled_index={}, quorum_commit_index={}, unhandled_commits_threshold={}",
+ self.synced_commit_index, highest_handled_index, highest_scheduled_index, quorum_commit_index, unhandled_commits_threshold,
+ );
+
+ // TODO: cleanup inflight fetches that are no longer needed.
+ let fetch_after_index = self
+ .synced_commit_index
+ .max(self.highest_scheduled_index.unwrap_or(0));
+ // When the node is falling behind, schedule pending fetches which will be executed on later.
+ for prev_end in (fetch_after_index..=quorum_commit_index)
+ .step_by(self.inner.context.parameters.commit_sync_batch_size as usize)
+ {
+ // Create range with inclusive start and end.
+ let range_start = prev_end + 1;
+ let range_end = prev_end + self.inner.context.parameters.commit_sync_batch_size;
+ // Commit range is not fetched when [range_start, range_end] contains less number of commits
+ // than the target batch size. This is to avoid the cost of processing more and smaller batches.
+ // Block broadcast, subscription and synchronization will help the node catchup.
+ if quorum_commit_index < range_end {
+ break;
+ }
+ // Pause scheduling new fetches when handling of commits is lagging.
+ if highest_handled_index + unhandled_commits_threshold < range_end {
+ warn!("Skip scheduling new commit fetches: consensus handler is lagging. highest_handled_index={}, highest_scheduled_index={}", highest_handled_index, highest_scheduled_index);
+ break;
+ }
+ self.pending_fetches
+ .insert((range_start..=range_end).into());
+ // quorum_commit_index should be non-decreasing, so highest_scheduled_index should not
+ // decrease either.
+ self.highest_scheduled_index = Some(range_end);
+ }
+ }
+
+ async fn handle_fetch_result(
+ &mut self,
+ target_end: CommitIndex,
+ commits: Vec,
+ blocks: Vec,
+ ) {
+ assert!(!commits.is_empty());
+ let metrics = &self.inner.context.metrics.node_metrics;
+ metrics
+ .commit_sync_fetched_commits
+ .inc_by(commits.len() as u64);
+ metrics
+ .commit_sync_fetched_blocks
+ .inc_by(blocks.len() as u64);
+ metrics.commit_sync_total_fetched_blocks_size.inc_by(
+ blocks
+ .iter()
+ .map(|b| b.serialized().len() as u64)
+ .sum::(),
+ );
+
+ let (commit_start, commit_end) = (
+ commits.first().unwrap().index(),
+ commits.last().unwrap().index(),
+ );
+ self.highest_fetched_commit_index = self.highest_fetched_commit_index.max(commit_end);
+ metrics
+ .commit_sync_highest_fetched_index
+ .set(self.highest_fetched_commit_index as i64);
+
+ // Allow returning partial results, and try fetching the rest separately.
+ if commit_end < target_end {
+ self.pending_fetches
+ .insert((commit_end + 1..=target_end).into());
+ }
+ // Make sure synced_commit_index is up to date.
+ self.synced_commit_index = self
+ .synced_commit_index
+ .max(self.inner.dag_state.read().last_commit_index());
+ // Only add new blocks if at least some of them are not already synced.
+ if self.synced_commit_index < commit_end {
+ self.fetched_ranges
+ .insert((commit_start..=commit_end).into(), blocks);
+ }
+ // Try to process as many fetched blocks as possible.
+ while let Some((fetched_commit_range, _blocks)) = self.fetched_ranges.first_key_value() {
+ // Only pop fetched_ranges if there is no gap with blocks already synced.
+ // Note: start, end and synced_commit_index are all inclusive.
+ let (fetched_commit_range, blocks) =
+ if fetched_commit_range.start() <= self.synced_commit_index + 1 {
+ self.fetched_ranges.pop_first().unwrap()
+ } else {
+ // Found gap between earliest fetched block and latest synced block,
+ // so not sending additional blocks to Core.
+ metrics.commit_sync_gap_on_processing.inc();
break;
};
- inflight_fetches.spawn(Self::fetch_loop(
- inner.clone(),
- fetch_state.clone(),
- commit_range,
- ));
+ // Avoid sending to Core a whole batch of already synced blocks.
+ if fetched_commit_range.end() <= self.synced_commit_index {
+ continue;
}
- let metrics = &inner.context.metrics.node_metrics;
- metrics
- .commit_sync_inflight_fetches
- .set(inflight_fetches.len() as i64);
- metrics
- .commit_sync_pending_fetches
- .set(pending_fetches.len() as i64);
- metrics
- .commit_sync_highest_synced_index
- .set(synced_commit_index as i64);
+ debug!(
+ "Fetched certified blocks: {}",
+ blocks.iter().map(|b| b.reference().to_string()).join(","),
+ );
+ // If core thread cannot handle the incoming blocks, it is ok to block here.
+ // Also it is possible to have missing ancestors because an equivocating validator
+ // may produce blocks that are not included in commits but are ancestors to other blocks.
+ // Synchronizer is needed to fill in the missing ancestors in this case.
+ match self.inner.core_thread_dispatcher.add_blocks(blocks).await {
+ Ok(missing) => {
+ if !missing.is_empty() {
+ warn!("Fetched blocks have missing ancestors: {:?}", missing);
+ }
+ }
+ Err(e) => {
+ info!("Failed to add blocks, shutting down: {}", e);
+ return;
+ }
+ };
+ // Once commits and blocks are sent to Core, ratchet up synced_commit_index
+ self.synced_commit_index = self.synced_commit_index.max(fetched_commit_range.end());
+ }
+
+ metrics
+ .commit_sync_inflight_fetches
+ .set(self.inflight_fetches.len() as i64);
+ metrics
+ .commit_sync_pending_fetches
+ .set(self.pending_fetches.len() as i64);
+ metrics
+ .commit_sync_highest_synced_index
+ .set(self.synced_commit_index as i64);
+ }
+
+ fn try_start_fetches(&mut self) {
+ // Cap parallel fetches based on configured limit and committee size, to avoid overloading the network.
+ // Also when there are too many fetched blocks that cannot be sent to Core before an earlier fetch
+ // has not finished, reduce parallelism so the earlier fetch can retry on a better host and succeed.
+ let target_parallel_fetches = self
+ .inner
+ .context
+ .parameters
+ .commit_sync_parallel_fetches
+ .min(self.inner.context.committee.size() * 2 / 3)
+ .min(
+ self.inner
+ .context
+ .parameters
+ .commit_sync_batches_ahead
+ .saturating_sub(self.fetched_ranges.len()),
+ )
+ .max(1);
+ // Start new fetches if there are pending batches and available slots.
+ loop {
+ if self.inflight_fetches.len() >= target_parallel_fetches {
+ break;
+ }
+ let Some(commit_range) = self.pending_fetches.pop_first() else {
+ break;
+ };
+ self.inflight_fetches.spawn(Self::fetch_loop(
+ self.inner.clone(),
+ self.peer_state.clone(),
+ commit_range,
+ ));
}
+
+ let metrics = &self.inner.context.metrics.node_metrics;
+ metrics
+ .commit_sync_inflight_fetches
+ .set(self.inflight_fetches.len() as i64);
+ metrics
+ .commit_sync_pending_fetches
+ .set(self.pending_fetches.len() as i64);
+ metrics
+ .commit_sync_highest_synced_index
+ .set(self.synced_commit_index as i64);
}
// Retries fetching commits and blocks from available authorities, until a request succeeds
@@ -291,7 +378,7 @@ impl CommitSyncer {
// Returns the fetched commits and blocks referenced by the commits.
async fn fetch_loop(
inner: Arc>,
- fetch_state: Arc>,
+ peer_state: Arc>,
commit_range: CommitRange,
) -> (CommitIndex, Vec, Vec) {
let _timer = inner
@@ -302,7 +389,7 @@ impl CommitSyncer {
.start_timer();
info!("Starting to fetch commits in {commit_range:?} ...",);
loop {
- match Self::fetch_once(inner.clone(), fetch_state.clone(), commit_range.clone()).await {
+ match Self::fetch_once(inner.clone(), peer_state.clone(), commit_range.clone()).await {
Ok((commits, blocks)) => {
info!("Finished fetching commits in {commit_range:?}",);
return (commit_range.end(), commits, blocks);
@@ -327,7 +414,7 @@ impl CommitSyncer {
// and sent to Core for processing.
async fn fetch_once(
inner: Arc>,
- fetch_state: Arc>,
+ peer_state: Arc>,
commit_range: CommitRange,
) -> ConsensusResult<(Vec, Vec)> {
const FETCH_COMMITS_TIMEOUT: Duration = Duration::from_secs(30);
@@ -346,7 +433,7 @@ impl CommitSyncer {
// 1. Find an available authority to fetch commits and blocks from, and wait
// if it is not yet ready.
let Some((available_time, retries, target_authority)) =
- fetch_state.lock().available_authorities.pop_first()
+ peer_state.lock().available_authorities.pop_first()
else {
sleep(MAX_RETRY_INTERVAL).await;
return Err(ConsensusError::NoAvailableAuthorityToFetchCommits);
@@ -367,17 +454,17 @@ impl CommitSyncer {
.await
{
Ok(result) => {
- let mut fetch_state = fetch_state.lock();
+ let mut peer_state = peer_state.lock();
let now = Instant::now();
- fetch_state
+ peer_state
.available_authorities
.insert((now, 0, target_authority));
result
}
Err(e) => {
- let mut fetch_state = fetch_state.lock();
+ let mut peer_state = peer_state.lock();
let now = Instant::now();
- fetch_state.available_authorities.insert((
+ peer_state.available_authorities.insert((
now + FETCH_RETRY_BASE_INTERVAL * retries.min(FETCH_RETRY_INTERVAL_LIMIT),
retries.saturating_add(1),
target_authority,
@@ -480,7 +567,7 @@ impl CommitSyncer {
.metrics
.node_metrics
.block_timestamp_drift_wait_ms
- .with_label_values(&[peer_hostname, &"commit_syncer"])
+ .with_label_values(&[peer_hostname, "commit_syncer"])
.inc_by(forward_drift);
let forward_drift = Duration::from_millis(forward_drift);
if forward_drift >= inner.context.parameters.max_forward_time_drift {
@@ -495,56 +582,35 @@ impl CommitSyncer {
Ok((commits, fetched_blocks))
}
-}
-/// Monitors commit votes from received and verified blocks,
-/// and keeps track of the highest commit voted by each authority and certified by a quorum.
-pub(crate) struct CommitVoteMonitor {
- context: Arc,
- // Highest commit index voted by each authority.
- highest_voted_commits: Mutex>,
-}
+ fn unhandled_commits_threshold(&self) -> CommitIndex {
+ self.inner.context.parameters.commit_sync_batch_size
+ * (self.inner.context.parameters.commit_sync_batches_ahead as u32)
+ }
-impl CommitVoteMonitor {
- pub(crate) fn new(context: Arc) -> Self {
- let highest_voted_commits = Mutex::new(vec![0; context.committee.size()]);
- Self {
- context,
- highest_voted_commits,
- }
+ #[cfg(test)]
+ fn pending_fetches(&self) -> BTreeSet {
+ self.pending_fetches.clone()
}
- // Records the highest commit index voted in each block.
- pub(crate) fn observe(&self, block: &VerifiedBlock) {
- let mut highest_voted_commits = self.highest_voted_commits.lock();
- for vote in block.commit_votes() {
- if vote.index > highest_voted_commits[block.author()] {
- highest_voted_commits[block.author()] = vote.index;
- }
- }
+ #[cfg(test)]
+ fn fetched_ranges(&self) -> BTreeMap> {
+ self.fetched_ranges.clone()
}
- // Finds the highest commit index certified by a quorum.
- // When an authority votes for commit index S, it is also voting for all commit indices 1 <= i < S.
- // So the quorum commit index is the smallest index S such that the sum of stakes of authorities
- // voting for commit indices >= S passes the quorum threshold.
- pub(crate) fn quorum_commit_index(&self) -> CommitIndex {
- let highest_voted_commits = self.highest_voted_commits.lock();
- let mut highest_voted_commits = highest_voted_commits
- .iter()
- .zip(self.context.committee.authorities())
- .map(|(commit_index, (_, a))| (*commit_index, a.stake))
- .collect::>();
- // Sort by commit index then stake, in descending order.
- highest_voted_commits.sort_by(|a, b| a.cmp(b).reverse());
- let mut total_stake = 0;
- for (commit_index, stake) in highest_voted_commits {
- total_stake += stake;
- if total_stake >= self.context.committee.quorum_threshold() {
- return commit_index;
- }
- }
- GENESIS_COMMIT_INDEX
+ #[cfg(test)]
+ fn highest_scheduled_index(&self) -> Option {
+ self.highest_scheduled_index
+ }
+
+ #[cfg(test)]
+ fn highest_fetched_commit_index(&self) -> CommitIndex {
+ self.highest_fetched_commit_index
+ }
+
+ #[cfg(test)]
+ fn synced_commit_index(&self) -> CommitIndex {
+ self.synced_commit_index
}
}
@@ -552,6 +618,7 @@ struct Inner {
context: Arc,
core_thread_dispatcher: Arc,
commit_vote_monitor: Arc,
+ commit_consumer_monitor: Arc,
network_client: Arc,
block_verifier: Arc,
dag_state: Arc>,
@@ -636,7 +703,7 @@ impl Inner {
}
}
-struct FetchState {
+struct PeerState {
// The value is a tuple of
// - the next available time for the authority to fetch from,
// - count of current consecutive failures fetching from the authority, reset on success,
@@ -646,7 +713,7 @@ struct FetchState {
available_authorities: BTreeSet<(Instant, u32, AuthorityIndex)>,
}
-impl FetchState {
+impl PeerState {
fn new(context: &Context) -> Self {
// Randomize the initial order of authorities.
let mut shuffled_authority_indices: Vec<_> = context
@@ -670,58 +737,174 @@ impl FetchState {
}
}
-// TODO: add more unit and integration tests.
#[cfg(test)]
-mod test {
- use std::sync::Arc;
+mod tests {
+ use std::{sync::Arc, time::Duration};
+
+ use bytes::Bytes;
+ use consensus_config::{AuthorityIndex, Parameters};
+ use parking_lot::RwLock;
- use super::CommitVoteMonitor;
use crate::{
- block::{TestBlock, VerifiedBlock},
- commit::{CommitDigest, CommitRef},
+ block::{BlockRef, TestBlock, VerifiedBlock},
+ block_verifier::NoopBlockVerifier,
+ commit::CommitRange,
+ commit_syncer::CommitSyncer,
+ commit_vote_monitor::CommitVoteMonitor,
context::Context,
+ core_thread::MockCoreThreadDispatcher,
+ dag_state::DagState,
+ error::ConsensusResult,
+ network::{BlockStream, NetworkClient},
+ storage::mem_store::MemStore,
+ CommitConsumerMonitor, CommitDigest, CommitRef, Round,
};
- #[tokio::test]
- async fn test_commit_vote_monitor() {
- let context = Arc::new(Context::new_for_test(4).0);
- let monitor = CommitVoteMonitor::new(context.clone());
-
- // Observe commit votes for indices 5, 6, 7, 8 from blocks.
- let blocks = (0..4)
- .map(|i| {
- VerifiedBlock::new_for_test(
- TestBlock::new(10, i)
- .set_commit_votes(vec![CommitRef::new(5 + i, CommitDigest::MIN)])
- .build(),
- )
- })
- .collect::>();
- for b in blocks {
- monitor.observe(&b);
+ #[derive(Default)]
+ struct FakeNetworkClient {}
+
+ #[async_trait::async_trait]
+ impl NetworkClient for FakeNetworkClient {
+ const SUPPORT_STREAMING: bool = true;
+
+ async fn send_block(
+ &self,
+ _peer: AuthorityIndex,
+ _serialized_block: &VerifiedBlock,
+ _timeout: Duration,
+ ) -> ConsensusResult<()> {
+ unimplemented!("Unimplemented")
}
- // CommitIndex 6 is the highest index supported by a quorum.
- assert_eq!(monitor.quorum_commit_index(), 6);
-
- // Observe new blocks with new votes from authority 0 and 1.
- let blocks = (0..2)
- .map(|i| {
- VerifiedBlock::new_for_test(
- TestBlock::new(11, i)
- .set_commit_votes(vec![
- CommitRef::new(6 + i, CommitDigest::MIN),
- CommitRef::new(7 + i, CommitDigest::MIN),
- ])
- .build(),
- )
- })
- .collect::>();
- for b in blocks {
- monitor.observe(&b);
+ async fn subscribe_blocks(
+ &self,
+ _peer: AuthorityIndex,
+ _last_received: Round,
+ _timeout: Duration,
+ ) -> ConsensusResult {
+ unimplemented!("Unimplemented")
}
- // Highest commit index per authority should be 7, 8, 7, 8 now.
- assert_eq!(monitor.quorum_commit_index(), 7);
+ async fn fetch_blocks(
+ &self,
+ _peer: AuthorityIndex,
+ _block_refs: Vec,
+ _highest_accepted_rounds: Vec,
+ _timeout: Duration,
+ ) -> ConsensusResult> {
+ unimplemented!("Unimplemented")
+ }
+
+ async fn fetch_commits(
+ &self,
+ _peer: AuthorityIndex,
+ _commit_range: CommitRange,
+ _timeout: Duration,
+ ) -> ConsensusResult<(Vec, Vec)> {
+ unimplemented!("Unimplemented")
+ }
+
+ async fn fetch_latest_blocks(
+ &self,
+ _peer: AuthorityIndex,
+ _authorities: Vec,
+ _timeout: Duration,
+ ) -> ConsensusResult> {
+ unimplemented!("Unimplemented")
+ }
+ }
+
+ #[tokio::test(flavor = "current_thread", start_paused = true)]
+ async fn commit_syncer_start_and_pause_scheduling() {
+ // SETUP
+ let (context, _) = Context::new_for_test(4);
+ // Use smaller batches and fetch limits for testing.
+ let context = Context {
+ own_index: AuthorityIndex::new_for_test(3),
+ parameters: Parameters {
+ commit_sync_batch_size: 5,
+ commit_sync_batches_ahead: 5,
+ commit_sync_parallel_fetches: 5,
+ max_blocks_per_fetch: 5,
+ ..context.parameters
+ },
+ ..context
+ };
+ let context = Arc::new(context);
+ let block_verifier = Arc::new(NoopBlockVerifier {});
+ let core_thread_dispatcher = Arc::new(MockCoreThreadDispatcher::default());
+ let network_client = Arc::new(FakeNetworkClient::default());
+ let store = Arc::new(MemStore::new());
+ let dag_state = Arc::new(RwLock::new(DagState::new(context.clone(), store)));
+ let commit_vote_monitor = Arc::new(CommitVoteMonitor::new(context.clone()));
+ let commit_consumer_monitor = Arc::new(CommitConsumerMonitor::new(0));
+ let mut commit_syncer = CommitSyncer::new(
+ context,
+ core_thread_dispatcher,
+ commit_vote_monitor.clone(),
+ commit_consumer_monitor.clone(),
+ network_client,
+ block_verifier,
+ dag_state,
+ );
+
+ // Check initial state.
+ assert!(commit_syncer.pending_fetches().is_empty());
+ assert!(commit_syncer.fetched_ranges().is_empty());
+ assert!(commit_syncer.highest_scheduled_index().is_none());
+ assert_eq!(commit_syncer.highest_fetched_commit_index(), 0);
+ assert_eq!(commit_syncer.synced_commit_index(), 0);
+
+ // Observe round 15 blocks voting for commit 10 from authorities 0 to 2 in CommitVoteMonitor
+ for i in 0..3 {
+ let test_block = TestBlock::new(15, i)
+ .set_commit_votes(vec![CommitRef::new(10, CommitDigest::MIN)])
+ .build();
+ let block = VerifiedBlock::new_for_test(test_block);
+ commit_vote_monitor.observe_block(&block);
+ }
+
+ // Fetches should be scheduled after seeing progress of other validators.
+ commit_syncer.try_schedule_once();
+
+ // Verify state.
+ assert_eq!(commit_syncer.pending_fetches().len(), 2);
+ assert!(commit_syncer.fetched_ranges().is_empty());
+ assert_eq!(commit_syncer.highest_scheduled_index(), Some(10));
+ assert_eq!(commit_syncer.highest_fetched_commit_index(), 0);
+ assert_eq!(commit_syncer.synced_commit_index(), 0);
+
+ // Observe round 40 blocks voting for commit 35 from authorities 0 to 2 in CommitVoteMonitor
+ for i in 0..3 {
+ let test_block = TestBlock::new(40, i)
+ .set_commit_votes(vec![CommitRef::new(35, CommitDigest::MIN)])
+ .build();
+ let block = VerifiedBlock::new_for_test(test_block);
+ commit_vote_monitor.observe_block(&block);
+ }
+
+ // Fetches should be scheduled until the unhandled commits threshold.
+ commit_syncer.try_schedule_once();
+
+ // Verify commit syncer is paused after scheduling 15 commits to index 25.
+ assert_eq!(commit_syncer.unhandled_commits_threshold(), 25);
+ assert_eq!(commit_syncer.highest_scheduled_index(), Some(25));
+ let pending_fetches = commit_syncer.pending_fetches();
+ assert_eq!(pending_fetches.len(), 5);
+
+ // Indicate commit index 25 is consumed, and try to schedule again.
+ commit_consumer_monitor.set_highest_handled_commit(25);
+ commit_syncer.try_schedule_once();
+
+ // Verify commit syncer schedules fetches up to index 35.
+ assert_eq!(commit_syncer.highest_scheduled_index(), Some(35));
+ let pending_fetches = commit_syncer.pending_fetches();
+ assert_eq!(pending_fetches.len(), 7);
+
+ // Verify contiguous ranges are scheduled.
+ for (range, start) in pending_fetches.iter().zip((1..35).step_by(5)) {
+ assert_eq!(range.start(), start);
+ assert_eq!(range.end(), start + 4);
+ }
}
}
diff --git a/consensus/core/src/commit_vote_monitor.rs b/consensus/core/src/commit_vote_monitor.rs
new file mode 100644
index 0000000000000..654260661da4f
--- /dev/null
+++ b/consensus/core/src/commit_vote_monitor.rs
@@ -0,0 +1,118 @@
+// Copyright (c) Mysten Labs, Inc.
+// SPDX-License-Identifier: Apache-2.0
+
+use std::sync::Arc;
+
+use parking_lot::Mutex;
+
+use crate::{
+ block::{BlockAPI as _, VerifiedBlock},
+ commit::GENESIS_COMMIT_INDEX,
+ context::Context,
+ CommitIndex,
+};
+
+/// Monitors the progress of consensus commits across the network.
+pub(crate) struct CommitVoteMonitor {
+ context: Arc,
+ // Highest commit index voted by each authority.
+ highest_voted_commits: Mutex>,
+}
+
+impl CommitVoteMonitor {
+ pub(crate) fn new(context: Arc) -> Self {
+ let highest_voted_commits = Mutex::new(vec![0; context.committee.size()]);
+ Self {
+ context,
+ highest_voted_commits,
+ }
+ }
+
+ /// Keeps track of the highest commit voted by each authority.
+ pub(crate) fn observe_block(&self, block: &VerifiedBlock) {
+ let mut highest_voted_commits = self.highest_voted_commits.lock();
+ for vote in block.commit_votes() {
+ if vote.index > highest_voted_commits[block.author()] {
+ highest_voted_commits[block.author()] = vote.index;
+ }
+ }
+ }
+
+ // Finds the highest commit index certified by a quorum.
+ // When an authority votes for commit index S, it is also voting for all commit indices 1 <= i < S.
+ // So the quorum commit index is the smallest index S such that the sum of stakes of authorities
+ // voting for commit indices >= S passes the quorum threshold.
+ pub(crate) fn quorum_commit_index(&self) -> CommitIndex {
+ let highest_voted_commits = self.highest_voted_commits.lock();
+ let mut highest_voted_commits = highest_voted_commits
+ .iter()
+ .zip(self.context.committee.authorities())
+ .map(|(commit_index, (_, a))| (*commit_index, a.stake))
+ .collect::>();
+ // Sort by commit index then stake, in descending order.
+ highest_voted_commits.sort_by(|a, b| a.cmp(b).reverse());
+ let mut total_stake = 0;
+ for (commit_index, stake) in highest_voted_commits {
+ total_stake += stake;
+ if total_stake >= self.context.committee.quorum_threshold() {
+ return commit_index;
+ }
+ }
+ GENESIS_COMMIT_INDEX
+ }
+}
+
+#[cfg(test)]
+mod test {
+ use std::sync::Arc;
+
+ use super::CommitVoteMonitor;
+ use crate::{
+ block::{TestBlock, VerifiedBlock},
+ commit::{CommitDigest, CommitRef},
+ context::Context,
+ };
+
+ #[tokio::test]
+ async fn test_commit_vote_monitor() {
+ let context = Arc::new(Context::new_for_test(4).0);
+ let monitor = CommitVoteMonitor::new(context.clone());
+
+ // Observe commit votes for indices 5, 6, 7, 8 from blocks.
+ let blocks = (0..4)
+ .map(|i| {
+ VerifiedBlock::new_for_test(
+ TestBlock::new(10, i)
+ .set_commit_votes(vec![CommitRef::new(5 + i, CommitDigest::MIN)])
+ .build(),
+ )
+ })
+ .collect::>();
+ for b in blocks {
+ monitor.observe_block(&b);
+ }
+
+ // CommitIndex 6 is the highest index supported by a quorum.
+ assert_eq!(monitor.quorum_commit_index(), 6);
+
+ // Observe new blocks with new votes from authority 0 and 1.
+ let blocks = (0..2)
+ .map(|i| {
+ VerifiedBlock::new_for_test(
+ TestBlock::new(11, i)
+ .set_commit_votes(vec![
+ CommitRef::new(6 + i, CommitDigest::MIN),
+ CommitRef::new(7 + i, CommitDigest::MIN),
+ ])
+ .build(),
+ )
+ })
+ .collect::>();
+ for b in blocks {
+ monitor.observe_block(&b);
+ }
+
+ // Highest commit index per authority should be 7, 8, 7, 8 now.
+ assert_eq!(monitor.quorum_commit_index(), 7);
+ }
+}
diff --git a/consensus/core/src/context.rs b/consensus/core/src/context.rs
index 64467cf72ca73..440a63a9b1e75 100644
--- a/consensus/core/src/context.rs
+++ b/consensus/core/src/context.rs
@@ -96,34 +96,50 @@ impl Context {
}
}
-/// A clock that allows to derive the current UNIX system timestamp while guaranteeing that
-/// timestamp will be monotonically incremented having tolerance to ntp and system clock changes and corrections.
+/// A clock that allows to derive the current UNIX system timestamp while guaranteeing that timestamp
+/// will be monotonically incremented, tolerating ntp and system clock changes and corrections.
/// Explicitly avoid to make `[Clock]` cloneable to ensure that a single instance is shared behind an `[Arc]`
/// wherever is needed in order to make sure that consecutive calls to receive the system timestamp
/// will remain monotonically increasing.
pub(crate) struct Clock {
- unix_epoch_instant: Instant,
+ initial_instant: Instant,
+ initial_system_time: SystemTime,
}
impl Clock {
pub fn new() -> Self {
- let now = Instant::now();
- let duration_since_unix_epoch =
- match SystemTime::now().duration_since(SystemTime::UNIX_EPOCH) {
- Ok(d) => d,
- Err(e) => panic!("SystemTime before UNIX EPOCH! {e}"),
- };
- let unix_epoch_instant = now.checked_sub(duration_since_unix_epoch).unwrap();
-
- Self { unix_epoch_instant }
+ Self {
+ initial_instant: Instant::now(),
+ initial_system_time: SystemTime::now(),
+ }
}
// Returns the current time expressed as UNIX timestamp in milliseconds.
- // Calculated with Rust Instant to ensure monotonicity.
+ // Calculated with Tokio Instant to ensure monotonicity,
+ // and to allow testing with tokio clock.
pub(crate) fn timestamp_utc_ms(&self) -> BlockTimestampMs {
- Instant::now()
- .checked_duration_since(self.unix_epoch_instant)
- .unwrap()
+ let now: Instant = Instant::now();
+ let monotonic_system_time = self
+ .initial_system_time
+ .checked_add(
+ now.checked_duration_since(self.initial_instant)
+ .unwrap_or_else(|| {
+ panic!(
+ "current instant ({:?}) < initial instant ({:?})",
+ now, self.initial_instant
+ )
+ }),
+ )
+ .expect("Computing system time should not overflow");
+ monotonic_system_time
+ .duration_since(SystemTime::UNIX_EPOCH)
+ .unwrap_or_else(|_| {
+ panic!(
+ "system time ({:?}) < UNIX_EPOCH ({:?})",
+ monotonic_system_time,
+ SystemTime::UNIX_EPOCH,
+ )
+ })
.as_millis() as BlockTimestampMs
}
}
diff --git a/consensus/core/src/core.rs b/consensus/core/src/core.rs
index c9593548d20a6..f9d5f2041b0aa 100644
--- a/consensus/core/src/core.rs
+++ b/consensus/core/src/core.rs
@@ -100,6 +100,7 @@ impl Core {
signals: CoreSignals,
block_signer: ProtocolKeyPair,
dag_state: Arc>,
+ sync_last_known_own_block: bool,
) -> Self {
let last_decided_leader = dag_state.read().last_commit_leader();
let number_of_leaders = context
@@ -133,7 +134,7 @@ impl Core {
last_included_ancestors[ancestor.author] = Some(*ancestor);
}
- let min_propose_round = if context.parameters.is_sync_last_proposed_block_enabled() {
+ let min_propose_round = if sync_last_known_own_block {
None
} else {
// if the sync is disabled then we practically don't want to impose any restriction.
@@ -305,16 +306,9 @@ impl Core {
/// `> last_known_proposed_round`. At the moment is allowed to call the method only once leading to a panic
/// if attempt to do multiple times.
pub(crate) fn set_last_known_proposed_round(&mut self, round: Round) {
- assert!(
- self.context
- .parameters
- .is_sync_last_proposed_block_enabled(),
- "Should not attempt to set the last known proposed round if that has been already set"
- );
- assert!(
- self.last_known_proposed_round.is_none(),
- "Attempted to set the last known proposed round more than once"
- );
+ if self.last_known_proposed_round.is_some() {
+ panic!("Should not attempt to set the last known proposed round if that has been already set");
+ }
self.last_known_proposed_round = Some(round);
info!("Set last known proposed round to {round}");
}
@@ -868,7 +862,7 @@ impl CoreTextFixture {
.with_num_commits_per_schedule(10),
);
let (_transaction_client, tx_receiver) = TransactionClient::new(context.clone());
- let transaction_consumer = TransactionConsumer::new(tx_receiver, context.clone(), None);
+ let transaction_consumer = TransactionConsumer::new(tx_receiver, context.clone());
let (signals, signal_receivers) = CoreSignals::new(context.clone());
// Need at least one subscriber to the block broadcast channel.
let block_receiver = signal_receivers.block_broadcast_receiver();
@@ -876,7 +870,7 @@ impl CoreTextFixture {
let (commit_sender, commit_receiver) = unbounded_channel("consensus_output");
let commit_observer = CommitObserver::new(
context.clone(),
- CommitConsumer::new(commit_sender.clone(), 0, 0),
+ CommitConsumer::new(commit_sender.clone(), 0),
dag_state.clone(),
store.clone(),
leader_schedule.clone(),
@@ -894,6 +888,7 @@ impl CoreTextFixture {
signals,
block_signer,
dag_state,
+ false,
);
Self {
@@ -935,7 +930,7 @@ mod test {
let context = Arc::new(context);
let store = Arc::new(MemStore::new());
let (_transaction_client, tx_receiver) = TransactionClient::new(context.clone());
- let transaction_consumer = TransactionConsumer::new(tx_receiver, context.clone(), None);
+ let transaction_consumer = TransactionConsumer::new(tx_receiver, context.clone());
// Create test blocks for all the authorities for 4 rounds and populate them in store
let mut last_round_blocks = genesis_blocks(context.clone());
@@ -974,7 +969,7 @@ mod test {
let (sender, _receiver) = unbounded_channel("consensus_output");
let commit_observer = CommitObserver::new(
context.clone(),
- CommitConsumer::new(sender.clone(), 0, 0),
+ CommitConsumer::new(sender.clone(), 0),
dag_state.clone(),
store.clone(),
leader_schedule.clone(),
@@ -999,6 +994,7 @@ mod test {
signals,
key_pairs.remove(context.own_index.value()).1,
dag_state.clone(),
+ false,
);
// New round should be 5
@@ -1045,7 +1041,7 @@ mod test {
let context = Arc::new(context);
let store = Arc::new(MemStore::new());
let (_transaction_client, tx_receiver) = TransactionClient::new(context.clone());
- let transaction_consumer = TransactionConsumer::new(tx_receiver, context.clone(), None);
+ let transaction_consumer = TransactionConsumer::new(tx_receiver, context.clone());
// Create test blocks for all authorities except our's (index = 0).
let mut last_round_blocks = genesis_blocks(context.clone());
@@ -1091,7 +1087,7 @@ mod test {
let (sender, _receiver) = unbounded_channel("consensus_output");
let commit_observer = CommitObserver::new(
context.clone(),
- CommitConsumer::new(sender.clone(), 0, 0),
+ CommitConsumer::new(sender.clone(), 0),
dag_state.clone(),
store.clone(),
leader_schedule.clone(),
@@ -1116,6 +1112,7 @@ mod test {
signals,
key_pairs.remove(context.own_index.value()).1,
dag_state.clone(),
+ false,
);
// New round should be 4
@@ -1175,7 +1172,7 @@ mod test {
Arc::new(NoopBlockVerifier),
);
let (transaction_client, tx_receiver) = TransactionClient::new(context.clone());
- let transaction_consumer = TransactionConsumer::new(tx_receiver, context.clone(), None);
+ let transaction_consumer = TransactionConsumer::new(tx_receiver, context.clone());
let (signals, signal_receivers) = CoreSignals::new(context.clone());
// Need at least one subscriber to the block broadcast channel.
let mut block_receiver = signal_receivers.block_broadcast_receiver();
@@ -1187,7 +1184,7 @@ mod test {
let (sender, _receiver) = unbounded_channel("consensus_output");
let commit_observer = CommitObserver::new(
context.clone(),
- CommitConsumer::new(sender.clone(), 0, 0),
+ CommitConsumer::new(sender.clone(), 0),
dag_state.clone(),
store.clone(),
leader_schedule.clone(),
@@ -1203,6 +1200,7 @@ mod test {
signals,
key_pairs.remove(context.own_index.value()).1,
dag_state.clone(),
+ false,
);
// Send some transactions
@@ -1288,7 +1286,7 @@ mod test {
));
let (_transaction_client, tx_receiver) = TransactionClient::new(context.clone());
- let transaction_consumer = TransactionConsumer::new(tx_receiver, context.clone(), None);
+ let transaction_consumer = TransactionConsumer::new(tx_receiver, context.clone());
let (signals, signal_receivers) = CoreSignals::new(context.clone());
// Need at least one subscriber to the block broadcast channel.
let _block_receiver = signal_receivers.block_broadcast_receiver();
@@ -1296,7 +1294,7 @@ mod test {
let (sender, _receiver) = unbounded_channel("consensus_output");
let commit_observer = CommitObserver::new(
context.clone(),
- CommitConsumer::new(sender.clone(), 0, 0),
+ CommitConsumer::new(sender.clone(), 0),
dag_state.clone(),
store.clone(),
leader_schedule.clone(),
@@ -1312,6 +1310,7 @@ mod test {
signals,
key_pairs.remove(context.own_index.value()).1,
dag_state.clone(),
+ false,
);
let mut expected_ancestors = BTreeSet::new();
@@ -1358,7 +1357,7 @@ mod test {
telemetry_subscribers::init_for_testing();
let (context, mut key_pairs) = Context::new_for_test(4);
let context = Arc::new(context.with_parameters(Parameters {
- sync_last_proposed_block_timeout: Duration::from_millis(2_000),
+ sync_last_known_own_block_timeout: Duration::from_millis(2_000),
..Default::default()
}));
@@ -1376,7 +1375,7 @@ mod test {
));
let (_transaction_client, tx_receiver) = TransactionClient::new(context.clone());
- let transaction_consumer = TransactionConsumer::new(tx_receiver, context.clone(), None);
+ let transaction_consumer = TransactionConsumer::new(tx_receiver, context.clone());
let (signals, signal_receivers) = CoreSignals::new(context.clone());
// Need at least one subscriber to the block broadcast channel.
let _block_receiver = signal_receivers.block_broadcast_receiver();
@@ -1384,7 +1383,7 @@ mod test {
let (sender, _receiver) = unbounded_channel("consensus_output");
let commit_observer = CommitObserver::new(
context.clone(),
- CommitConsumer::new(sender.clone(), 0, 0),
+ CommitConsumer::new(sender.clone(), 0),
dag_state.clone(),
store.clone(),
leader_schedule.clone(),
@@ -1400,6 +1399,7 @@ mod test {
signals,
key_pairs.remove(context.own_index.value()).1,
dag_state.clone(),
+ true,
);
// No new block should have been produced
@@ -1563,7 +1563,7 @@ mod test {
));
let (_transaction_client, tx_receiver) = TransactionClient::new(context.clone());
- let transaction_consumer = TransactionConsumer::new(tx_receiver, context.clone(), None);
+ let transaction_consumer = TransactionConsumer::new(tx_receiver, context.clone());
let (signals, signal_receivers) = CoreSignals::new(context.clone());
// Need at least one subscriber to the block broadcast channel.
let _block_receiver = signal_receivers.block_broadcast_receiver();
@@ -1571,7 +1571,7 @@ mod test {
let (sender, _receiver) = unbounded_channel("consensus_output");
let commit_observer = CommitObserver::new(
context.clone(),
- CommitConsumer::new(sender.clone(), 0, 0),
+ CommitConsumer::new(sender.clone(), 0),
dag_state.clone(),
store.clone(),
leader_schedule.clone(),
@@ -1587,6 +1587,7 @@ mod test {
signals,
key_pairs.remove(context.own_index.value()).1,
dag_state.clone(),
+ false,
);
// No proposal during recovery.
diff --git a/consensus/core/src/core_thread.rs b/consensus/core/src/core_thread.rs
index fca3406dd8d64..8c39d6059746f 100644
--- a/consensus/core/src/core_thread.rs
+++ b/consensus/core/src/core_thread.rs
@@ -8,6 +8,7 @@ use mysten_metrics::{
monitored_mpsc::{channel, Receiver, Sender, WeakSender},
monitored_scope, spawn_logged_monitored_task,
};
+use parking_lot::Mutex;
use thiserror::Error;
use tokio::sync::{oneshot, watch};
use tracing::warn;
@@ -231,6 +232,67 @@ impl CoreThreadDispatcher for ChannelCoreThreadDispatcher {
}
}
+// TODO: complete the Mock for thread dispatcher to be used from several tests
+#[derive(Default)]
+pub(crate) struct MockCoreThreadDispatcher {
+ add_blocks: Mutex>,
+ missing_blocks: Mutex>,
+ last_known_proposed_round: Mutex>,
+}
+
+impl MockCoreThreadDispatcher {
+ #[cfg(test)]
+ pub(crate) async fn get_add_blocks(&self) -> Vec {
+ let mut add_blocks = self.add_blocks.lock();
+ add_blocks.drain(0..).collect()
+ }
+
+ #[cfg(test)]
+ pub(crate) async fn stub_missing_blocks(&self, block_refs: BTreeSet) {
+ let mut missing_blocks = self.missing_blocks.lock();
+ missing_blocks.extend(block_refs);
+ }
+
+ #[cfg(test)]
+ pub(crate) async fn get_last_own_proposed_round(&self) -> Vec {
+ let last_known_proposed_round = self.last_known_proposed_round.lock();
+ last_known_proposed_round.clone()
+ }
+}
+
+#[async_trait]
+impl CoreThreadDispatcher for MockCoreThreadDispatcher {
+ async fn add_blocks(
+ &self,
+ blocks: Vec,
+ ) -> Result, CoreError> {
+ let mut add_blocks = self.add_blocks.lock();
+ add_blocks.extend(blocks);
+ Ok(BTreeSet::new())
+ }
+
+ async fn new_block(&self, _round: Round, _force: bool) -> Result<(), CoreError> {
+ Ok(())
+ }
+
+ async fn get_missing_blocks(&self) -> Result, CoreError> {
+ let mut missing_blocks = self.missing_blocks.lock();
+ let result = missing_blocks.clone();
+ missing_blocks.clear();
+ Ok(result)
+ }
+
+ fn set_consumer_availability(&self, _available: bool) -> Result<(), CoreError> {
+ todo!()
+ }
+
+ fn set_last_known_proposed_round(&self, round: Round) -> Result<(), CoreError> {
+ let mut last_known_proposed_round = self.last_known_proposed_round.lock();
+ last_known_proposed_round.push(round);
+ Ok(())
+ }
+}
+
#[cfg(test)]
mod test {
use mysten_metrics::monitored_mpsc::unbounded_channel;
@@ -263,7 +325,7 @@ mod test {
Arc::new(NoopBlockVerifier),
);
let (_transaction_client, tx_receiver) = TransactionClient::new(context.clone());
- let transaction_consumer = TransactionConsumer::new(tx_receiver, context.clone(), None);
+ let transaction_consumer = TransactionConsumer::new(tx_receiver, context.clone());
let (signals, signal_receivers) = CoreSignals::new(context.clone());
let _block_receiver = signal_receivers.block_broadcast_receiver();
let (sender, _receiver) = unbounded_channel("consensus_output");
@@ -273,7 +335,7 @@ mod test {
));
let commit_observer = CommitObserver::new(
context.clone(),
- CommitConsumer::new(sender.clone(), 0, 0),
+ CommitConsumer::new(sender.clone(), 0),
dag_state.clone(),
store,
leader_schedule.clone(),
@@ -292,6 +354,7 @@ mod test {
signals,
key_pairs.remove(context.own_index.value()).1,
dag_state,
+ false,
);
let (core_dispatcher, handle) = ChannelCoreThreadDispatcher::start(core, context);
diff --git a/consensus/core/src/dag_state.rs b/consensus/core/src/dag_state.rs
index 5ebac04a585a1..aa7f3ca718f28 100644
--- a/consensus/core/src/dag_state.rs
+++ b/consensus/core/src/dag_state.rs
@@ -307,7 +307,7 @@ impl DagState {
.metrics
.node_metrics
.dag_state_store_read_count
- .with_label_values(&[&"get_blocks"])
+ .with_label_values(&["get_blocks"])
.inc();
for ((index, _), result) in missing.into_iter().zip(store_results.into_iter()) {
@@ -556,7 +556,7 @@ impl DagState {
.metrics
.node_metrics
.dag_state_store_read_count
- .with_label_values(&[&"contains_blocks"])
+ .with_label_values(&["contains_blocks"])
.inc();
for ((index, _), result) in missing.into_iter().zip(store_results.into_iter()) {
diff --git a/consensus/core/src/error.rs b/consensus/core/src/error.rs
index d9fdb99e37ed0..9dadc6c84da06 100644
--- a/consensus/core/src/error.rs
+++ b/consensus/core/src/error.rs
@@ -24,6 +24,15 @@ pub(crate) enum ConsensusError {
#[error("Error serializing: {0}")]
SerializationFailure(bcs::Error),
+ #[error("Block contains a transaction that is too large: {size} > {limit}")]
+ TransactionTooLarge { size: usize, limit: usize },
+
+ #[error("Block contains too many transactions: {count} > {limit}")]
+ TooManyTransactions { count: usize, limit: usize },
+
+ #[error("Block contains too many transaction bytes: {size} > {limit}")]
+ TooManyTransactionBytes { size: usize, limit: usize },
+
#[error("Unexpected block authority {0} from peer {1}")]
UnexpectedAuthority(AuthorityIndex, AuthorityIndex),
diff --git a/consensus/core/src/leader_scoring.rs b/consensus/core/src/leader_scoring.rs
index eaafbcc439e00..380003debd37d 100644
--- a/consensus/core/src/leader_scoring.rs
+++ b/consensus/core/src/leader_scoring.rs
@@ -41,7 +41,7 @@ pub(crate) struct ReputationScoreCalculator<'a> {
impl<'a> ReputationScoreCalculator<'a> {
pub(crate) fn new(
context: Arc,
- unscored_subdags: &Vec,
+ unscored_subdags: &[CommittedSubDag],
scoring_strategy: &'a dyn ScoringStrategy,
) -> Self {
let num_authorities = context.committee.size();
diff --git a/consensus/core/src/leader_scoring_strategy.rs b/consensus/core/src/leader_scoring_strategy.rs
index b635f5f474cd0..640e3667cd71c 100644
--- a/consensus/core/src/leader_scoring_strategy.rs
+++ b/consensus/core/src/leader_scoring_strategy.rs
@@ -10,6 +10,7 @@ use crate::{
stake_aggregator::{QuorumThreshold, StakeAggregator},
};
+#[allow(unused)]
pub(crate) trait ScoringStrategy: Send + Sync {
fn calculate_scores_for_leader(&self, subdag: &UnscoredSubdag, leader_slot: Slot) -> Vec;
diff --git a/consensus/core/src/lib.rs b/consensus/core/src/lib.rs
index ba428b1eb7bc4..729fe63c18153 100644
--- a/consensus/core/src/lib.rs
+++ b/consensus/core/src/lib.rs
@@ -31,6 +31,8 @@ mod threshold_clock;
mod transaction;
mod universal_committer;
+mod commit_consumer;
+mod commit_vote_monitor;
#[cfg(test)]
mod test_dag;
#[cfg(test)]
@@ -40,8 +42,9 @@ mod test_dag_parser;
pub use authority_node::ConsensusAuthority;
pub use block::{BlockAPI, Round};
-pub use commit::{CommitConsumer, CommitDigest, CommitIndex, CommitRef, CommittedSubDag};
-pub use transaction::{TransactionClient, TransactionVerifier, ValidationError};
+pub use commit::{CommitDigest, CommitIndex, CommitRef, CommittedSubDag};
+pub use commit_consumer::{CommitConsumer, CommitConsumerMonitor};
+pub use transaction::{ClientError, TransactionClient, TransactionVerifier, ValidationError};
#[cfg(test)]
#[path = "tests/randomized_tests.rs"]
diff --git a/consensus/core/src/metrics.rs b/consensus/core/src/metrics.rs
index 897607c00452b..8d9f60b179b6b 100644
--- a/consensus/core/src/metrics.rs
+++ b/consensus/core/src/metrics.rs
@@ -134,6 +134,7 @@ pub(crate) struct NodeMetrics {
pub(crate) last_committed_leader_round: IntGauge,
pub(crate) last_commit_index: IntGauge,
pub(crate) last_known_own_block_round: IntGauge,
+ pub(crate) sync_last_known_own_block_retries: IntCounter,
pub(crate) commit_round_advancement_interval: Histogram,
pub(crate) last_decided_leader_round: IntGauge,
pub(crate) leader_timeout_total: IntCounterVec,
@@ -334,6 +335,11 @@ impl NodeMetrics {
"The highest round of our own block as this has been synced from peers during an amnesia recovery",
registry,
).unwrap(),
+ sync_last_known_own_block_retries: register_int_counter_with_registry!(
+ "sync_last_known_own_block_retries",
+ "Number of times this node tried to fetch the last own block from peers",
+ registry,
+ ).unwrap(),
// TODO: add a short status label.
invalid_blocks: register_int_counter_vec_with_registry!(
"invalid_blocks",
diff --git a/consensus/core/src/network/network_tests.rs b/consensus/core/src/network/network_tests.rs
index d8113befb6b3a..cef1ff8530c54 100644
--- a/consensus/core/src/network/network_tests.rs
+++ b/consensus/core/src/network/network_tests.rs
@@ -31,7 +31,11 @@ trait ManagerBuilder {
struct AnemoManagerBuilder {}
impl ManagerBuilder for AnemoManagerBuilder {
- fn build(&self, context: Arc, network_keypair: NetworkKeyPair) -> AnemoManager {
+ fn build(
+ &self,
+ context: Arc,
+ network_keypair: NetworkKeyPair,
+ ) -> impl NetworkManager> {
AnemoManager::new(context, network_keypair)
}
}
@@ -39,7 +43,11 @@ impl ManagerBuilder for AnemoManagerBuilder {
struct TonicManagerBuilder {}
impl ManagerBuilder for TonicManagerBuilder {
- fn build(&self, context: Arc, network_keypair: NetworkKeyPair) -> TonicManager {
+ fn build(
+ &self,
+ context: Arc,
+ network_keypair: NetworkKeyPair,
+ ) -> impl NetworkManager> {
TonicManager::new(context, network_keypair)
}
}
diff --git a/consensus/core/src/stake_aggregator.rs b/consensus/core/src/stake_aggregator.rs
index 7e907dee1fcb8..11501319e64e9 100644
--- a/consensus/core/src/stake_aggregator.rs
+++ b/consensus/core/src/stake_aggregator.rs
@@ -11,6 +11,7 @@ pub(crate) trait CommitteeThreshold {
pub(crate) struct QuorumThreshold;
+#[allow(unused)]
pub(crate) struct ValidityThreshold;
impl CommitteeThreshold for QuorumThreshold {
diff --git a/consensus/core/src/storage/mem_store.rs b/consensus/core/src/storage/mem_store.rs
index 2a88fc5bd71ad..ad23cd3652cee 100644
--- a/consensus/core/src/storage/mem_store.rs
+++ b/consensus/core/src/storage/mem_store.rs
@@ -20,10 +20,12 @@ use crate::{
};
/// In-memory storage for testing.
+#[allow(unused)]
pub(crate) struct MemStore {
inner: RwLock,
}
+#[allow(unused)]
struct Inner {
blocks: BTreeMap<(Round, AuthorityIndex, BlockDigest), VerifiedBlock>,
digests_by_authorities: BTreeSet<(AuthorityIndex, Round, BlockDigest)>,
diff --git a/consensus/core/src/storage/mod.rs b/consensus/core/src/storage/mod.rs
index 5c524be30318e..38258c87e8420 100644
--- a/consensus/core/src/storage/mod.rs
+++ b/consensus/core/src/storage/mod.rs
@@ -17,6 +17,7 @@ use crate::{
};
/// A common interface for consensus storage.
+#[allow(unused)]
pub(crate) trait Store: Send + Sync {
/// Writes blocks, consensus commits and other data to store atomically.
fn write(&self, write_batch: WriteBatch) -> ConsensusResult<()>;
diff --git a/consensus/core/src/subscriber.rs b/consensus/core/src/subscriber.rs
index bce04247c7a1d..7b350debf313c 100644
--- a/consensus/core/src/subscriber.rs
+++ b/consensus/core/src/subscriber.rs
@@ -152,7 +152,7 @@ impl Subscriber {
.metrics
.node_metrics
.subscriber_connection_attempts
- .with_label_values(&[&peer_hostname, "success"])
+ .with_label_values(&[peer_hostname, "success"])
.inc();
blocks
}
@@ -162,7 +162,7 @@ impl Subscriber {
.metrics
.node_metrics
.subscriber_connection_attempts
- .with_label_values(&[&peer_hostname, "failure"])
+ .with_label_values(&[peer_hostname, "failure"])
.inc();
continue 'subscription;
}
@@ -184,7 +184,7 @@ impl Subscriber {
.metrics
.node_metrics
.subscribed_blocks
- .with_label_values(&[&peer_hostname])
+ .with_label_values(&[peer_hostname])
.inc();
let result = authority_service
.handle_send_block(peer, block.clone())
diff --git a/consensus/core/src/synchronizer.rs b/consensus/core/src/synchronizer.rs
index 504cd63249b6e..09193b7d06742 100644
--- a/consensus/core/src/synchronizer.rs
+++ b/consensus/core/src/synchronizer.rs
@@ -27,13 +27,12 @@ use tokio::{
};
use tracing::{debug, error, info, trace, warn};
-use crate::authority_service::COMMIT_LAG_MULTIPLIER;
-use crate::commit_syncer::CommitVoteMonitor;
+use crate::{authority_service::COMMIT_LAG_MULTIPLIER, core_thread::CoreThreadDispatcher};
use crate::{
block::{BlockRef, SignedBlock, VerifiedBlock},
block_verifier::BlockVerifier,
+ commit_vote_monitor::CommitVoteMonitor,
context::Context,
- core_thread::CoreThreadDispatcher,
dag_state::DagState,
error::{ConsensusError, ConsensusResult},
network::NetworkClient,
@@ -245,6 +244,7 @@ impl Synchronizer,
block_verifier: Arc,
dag_state: Arc>,
+ sync_last_known_own_block: bool,
) -> Arc {
let (commands_sender, commands_receiver) =
channel("consensus_synchronizer_commands", 1_000);
@@ -259,29 +259,24 @@ impl Synchronizer Synchronizer Synchronizer Synchronizer,
block_verifier: Arc,
+ commit_vote_monitor: Arc,
context: Arc,
core_dispatcher: Arc,
dag_state: Arc>,
@@ -453,6 +449,7 @@ impl Synchronizer Synchronizer,
block_verifier: Arc,
+ commit_vote_monitor: Arc,
context: Arc,
commands_sender: Sender,
sync_method: &str,
@@ -530,17 +528,22 @@ impl Synchronizer Synchronizer Synchronizer, authority_index: AuthorityIndex| -> ConsensusResult> {
let mut result = Vec::new();
for serialized_block in blocks {
@@ -749,50 +739,80 @@ impl Synchronizer {
- let Some((result, authority_index)) = result else {
- break;
- };
- match result {
- Ok(result) => {
- match process_blocks(result, authority_index) {
- Ok(blocks) => {
- let max_round = blocks.into_iter().map(|b|b.round()).max().unwrap_or(0);
- highest_round = highest_round.max(max_round);
-
- total_stake += context.committee.stake(authority_index);
- },
- Err(err) => {
- warn!("Invalid result returned from {authority_index} while fetching last own block: {err}");
+ // Get the highest of all the results. Retry until at least `f+1` results have been gathered.
+ let mut total_stake;
+ let mut highest_round;
+ let mut retries = 0;
+ let mut retry_delay_step = Duration::from_millis(500);
+ 'main:loop {
+ total_stake = 0;
+ highest_round = 0;
+
+ // Ask all the other peers about our last block
+ let mut results = FuturesUnordered::new();
+
+ for (authority_index, _authority) in context.committee.authorities() {
+ if authority_index != context.own_index {
+ results.push(fetch_own_block(authority_index, Duration::from_millis(0)));
+ }
+ }
+
+ // Gather the results but wait to timeout as well
+ let timer = sleep_until(Instant::now() + context.parameters.sync_last_known_own_block_timeout);
+ tokio::pin!(timer);
+
+ 'inner: loop {
+ tokio::select! {
+ result = results.next() => {
+ let Some((result, authority_index)) = result else {
+ break 'inner;
+ };
+ match result {
+ Ok(result) => {
+ match process_blocks(result, authority_index) {
+ Ok(blocks) => {
+ let max_round = blocks.into_iter().map(|b|b.round()).max().unwrap_or(0);
+ highest_round = highest_round.max(max_round);
+
+ total_stake += context.committee.stake(authority_index);
+ },
+ Err(err) => {
+ warn!("Invalid result returned from {authority_index} while fetching last own block: {err}");
+ }
}
+ },
+ Err(err) => {
+ warn!("Error {err} while fetching our own block from peer {authority_index}. Will retry.");
+ results.push(fetch_own_block(authority_index, FETCH_OWN_BLOCK_RETRY_DELAY));
}
- },
- Err(err) => {
- warn!("Error {err} while fetching our own block from peer {authority_index}. Will retry.");
- results.push(fetch_own_block(authority_index, FETCH_OWN_BLOCK_RETRY_DELAY));
}
+ },
+ () = &mut timer => {
+ info!("Timeout while trying to sync our own last block from peers");
+ break 'inner;
}
- },
- () = &mut timer => {
- info!("Timeout while trying to sync our own last block from peers");
- break;
}
}
- }
- // Update the Core with the highest detected round
- if total_stake == 0 {
- panic!("No peer has returned any acceptable result, can not safely update min round");
+ // Request at least f+1 stake to have replied back.
+ if context.committee.reached_validity(total_stake) {
+ info!("{} out of {} total stake returned acceptable results for our own last block with highest round {}, with {retries} retries.", total_stake, context.committee.total_stake(), highest_round);
+ break 'main;
+ } else {
+ retries += 1;
+ context.metrics.node_metrics.sync_last_known_own_block_retries.inc();
+ warn!("Not enough stake: {} out of {} total stake returned acceptable results for our own last block with highest round {}. Will now retry {retries}.", total_stake, context.committee.total_stake(), highest_round);
+
+ sleep(retry_delay_step).await;
+
+ retry_delay_step = Duration::from_secs_f64(retry_delay_step.as_secs_f64() * 1.5);
+ retry_delay_step = retry_delay_step.min(MAX_RETRY_DELAY_STEP);
+ }
}
+ // Update the Core with the highest detected round
context.metrics.node_metrics.last_known_own_block_round.set(highest_round as i64);
- info!("{} out of {} total stake returned acceptable results for our own last block with highest round {}", total_stake, context.committee.total_stake(), highest_round);
if let Err(err) = core_dispatcher.set_last_known_proposed_round(highest_round) {
warn!("Error received while calling dispatcher, probably dispatcher is shutting down, will now exit: {err:?}");
}
@@ -826,6 +846,7 @@ impl Synchronizer Synchronizer>,
- missing_blocks: Mutex>,
- last_known_proposed_round: parking_lot::Mutex>,
- }
-
- impl MockCoreThreadDispatcher {
- async fn get_add_blocks(&self) -> Vec {
- let mut lock = self.add_blocks.lock().await;
- lock.drain(0..).collect()
- }
-
- async fn stub_missing_blocks(&self, block_refs: BTreeSet) {
- let mut lock = self.missing_blocks.lock().await;
- lock.extend(block_refs);
- }
-
- async fn get_last_own_proposed_round(&self) -> Vec {
- let lock = self.last_known_proposed_round.lock();
- lock.clone()
- }
- }
-
- #[async_trait]
- impl CoreThreadDispatcher for MockCoreThreadDispatcher {
- async fn add_blocks(
- &self,
- blocks: Vec,
- ) -> Result, CoreError> {
- let mut lock = self.add_blocks.lock().await;
- lock.extend(blocks);
- Ok(BTreeSet::new())
- }
-
- async fn new_block(&self, _round: Round, _force: bool) -> Result<(), CoreError> {
- Ok(())
- }
-
- async fn get_missing_blocks(&self) -> Result, CoreError> {
- let mut lock = self.missing_blocks.lock().await;
- let result = lock.clone();
- lock.clear();
- Ok(result)
- }
-
- fn set_consumer_availability(&self, _available: bool) -> Result<(), CoreError> {
- todo!()
- }
-
- fn set_last_known_proposed_round(&self, round: Round) -> Result<(), CoreError> {
- let mut lock = self.last_known_proposed_round.lock();
- lock.push(round);
- Ok(())
- }
- }
-
type FetchRequestKey = (Vec, AuthorityIndex);
type FetchRequestResponse = (Vec, Option);
type FetchLatestBlockKey = (AuthorityIndex, Vec);
@@ -1082,7 +1045,7 @@ mod tests {
struct MockNetworkClient {
fetch_blocks_requests: Mutex>,
fetch_latest_blocks_requests:
- Mutex>,
+ Mutex>>,
}
impl MockNetworkClient {
@@ -1108,7 +1071,14 @@ mod tests {
latency: Option,
) {
let mut lock = self.fetch_latest_blocks_requests.lock().await;
- lock.insert((peer, authorities), (blocks, latency));
+ lock.entry((peer, authorities))
+ .or_default()
+ .push((blocks, latency));
+ }
+
+ async fn fetch_latest_blocks_pending_calls(&self) -> usize {
+ let lock = self.fetch_latest_blocks_requests.lock().await;
+ lock.len()
}
}
@@ -1177,22 +1147,27 @@ mod tests {
_timeout: Duration,
) -> ConsensusResult> {
let mut lock = self.fetch_latest_blocks_requests.lock().await;
- let response = lock
- .remove(&(peer, authorities))
+ let mut responses = lock
+ .remove(&(peer, authorities.clone()))
.expect("Unexpected fetch blocks request made");
+ let response = responses.remove(0);
let serialised = response
.0
.into_iter()
.map(|block| block.serialized().clone())
.collect::>();
- if let Some(latency) = response.1 {
- sleep(latency).await;
+ if !responses.is_empty() {
+ lock.insert((peer, authorities), responses);
}
drop(lock);
+ if let Some(latency) = response.1 {
+ sleep(latency).await;
+ }
+
Ok(serialised)
}
}
@@ -1272,10 +1247,10 @@ mod tests {
let context = Arc::new(context);
let block_verifier = Arc::new(NoopBlockVerifier {});
let core_dispatcher = Arc::new(MockCoreThreadDispatcher::default());
+ let commit_vote_monitor = Arc::new(CommitVoteMonitor::new(context.clone()));
let network_client = Arc::new(MockNetworkClient::default());
let store = Arc::new(MemStore::new());
let dag_state = Arc::new(RwLock::new(DagState::new(context.clone(), store)));
- let commit_vote_monitor = Arc::new(CommitVoteMonitor::new(context.clone()));
let handle = Synchronizer::start(
network_client.clone(),
@@ -1284,6 +1259,7 @@ mod tests {
commit_vote_monitor,
block_verifier,
dag_state,
+ false,
);
// Create some test blocks
@@ -1318,11 +1294,11 @@ mod tests {
let (context, _) = Context::new_for_test(4);
let context = Arc::new(context);
let block_verifier = Arc::new(NoopBlockVerifier {});
+ let commit_vote_monitor = Arc::new(CommitVoteMonitor::new(context.clone()));
let core_dispatcher = Arc::new(MockCoreThreadDispatcher::default());
let network_client = Arc::new(MockNetworkClient::default());
let store = Arc::new(MemStore::new());
let dag_state = Arc::new(RwLock::new(DagState::new(context.clone(), store)));
- let commit_vote_monitor = Arc::new(CommitVoteMonitor::new(context.clone()));
let handle = Synchronizer::start(
network_client.clone(),
@@ -1331,6 +1307,7 @@ mod tests {
commit_vote_monitor,
block_verifier,
dag_state,
+ false,
);
// Create some test blocks
@@ -1376,11 +1353,11 @@ mod tests {
let (context, _) = Context::new_for_test(4);
let context = Arc::new(context);
let block_verifier = Arc::new(NoopBlockVerifier {});
+ let commit_vote_monitor = Arc::new(CommitVoteMonitor::new(context.clone()));
let core_dispatcher = Arc::new(MockCoreThreadDispatcher::default());
let network_client = Arc::new(MockNetworkClient::default());
let store = Arc::new(MemStore::new());
let dag_state = Arc::new(RwLock::new(DagState::new(context.clone(), store)));
- let commit_vote_monitor = Arc::new(CommitVoteMonitor::new(context.clone()));
// Create some test blocks
let expected_blocks = (0..10)
@@ -1422,6 +1399,7 @@ mod tests {
commit_vote_monitor,
block_verifier,
dag_state,
+ false,
);
sleep(2 * FETCH_REQUEST_TIMEOUT).await;
@@ -1497,7 +1475,7 @@ mod tests {
// Pass them through the commit vote monitor - so now there will be a big commit lag to prevent
// the scheduled synchronizer from running
for block in blocks {
- commit_vote_monitor.observe(&block);
+ commit_vote_monitor.observe_block(&block);
}
// WHEN start the synchronizer and wait for a couple of seconds where normally the synchronizer should have kicked in.
@@ -1508,6 +1486,7 @@ mod tests {
commit_vote_monitor.clone(),
block_verifier,
dag_state.clone(),
+ false,
);
sleep(4 * FETCH_REQUEST_TIMEOUT).await;
@@ -1546,7 +1525,7 @@ mod tests {
// GIVEN
let (context, _) = Context::new_for_test(4);
let context = Arc::new(context.with_parameters(Parameters {
- sync_last_proposed_block_timeout: Duration::from_millis(2_000),
+ sync_last_known_own_block_timeout: Duration::from_millis(2_000),
..Default::default()
}));
let block_verifier = Arc::new(NoopBlockVerifier {});
@@ -1564,9 +1543,18 @@ mod tests {
// Now set different latest blocks for the peers
// For peer 1 we give the block of round 10 (highest)
+ let block_1 = expected_blocks.pop().unwrap();
network_client
.stub_fetch_latest_blocks(
- vec![expected_blocks.pop().unwrap()],
+ vec![block_1.clone()],
+ AuthorityIndex::new_for_test(1),
+ vec![our_index],
+ None,
+ )
+ .await;
+ network_client
+ .stub_fetch_latest_blocks(
+ vec![block_1],
AuthorityIndex::new_for_test(1),
vec![our_index],
None,
@@ -1574,9 +1562,18 @@ mod tests {
.await;
// For peer 2 we give the block of round 9
+ let block_2 = expected_blocks.pop().unwrap();
network_client
.stub_fetch_latest_blocks(
- vec![expected_blocks.pop().unwrap()],
+ vec![block_2.clone()],
+ AuthorityIndex::new_for_test(2),
+ vec![our_index],
+ Some(Duration::from_secs(10)),
+ )
+ .await;
+ network_client
+ .stub_fetch_latest_blocks(
+ vec![block_2],
AuthorityIndex::new_for_test(2),
vec![our_index],
None,
@@ -1584,6 +1581,14 @@ mod tests {
.await;
// For peer 3 we don't give any block - and it should return an empty vector
+ network_client
+ .stub_fetch_latest_blocks(
+ vec![],
+ AuthorityIndex::new_for_test(3),
+ vec![our_index],
+ Some(Duration::from_secs(10)),
+ )
+ .await;
network_client
.stub_fetch_latest_blocks(
vec![],
@@ -1601,10 +1606,11 @@ mod tests {
commit_vote_monitor,
block_verifier,
dag_state,
+ true,
);
// Wait at least for the timeout time
- sleep(context.parameters.sync_last_proposed_block_timeout * 2).await;
+ sleep(context.parameters.sync_last_known_own_block_timeout * 2).await;
// Assert that core has been called to set the min propose round
assert_eq!(
@@ -1612,6 +1618,19 @@ mod tests {
vec![10]
);
+ // Ensure that all the requests have been called
+ assert_eq!(network_client.fetch_latest_blocks_pending_calls().await, 0);
+
+ // And we got one retry
+ assert_eq!(
+ context
+ .metrics
+ .node_metrics
+ .sync_last_known_own_block_retries
+ .get(),
+ 1
+ );
+
// Ensure that no panic occurred
if let Err(err) = handle.stop().await {
if err.is_panic() {
diff --git a/consensus/core/src/test_dag_parser.rs b/consensus/core/src/test_dag_parser.rs
index 721766f7d4f1e..8ceda4b8e6d13 100644
--- a/consensus/core/src/test_dag_parser.rs
+++ b/consensus/core/src/test_dag_parser.rs
@@ -425,7 +425,7 @@ mod tests {
let (_, (round, connections)) = result.unwrap();
let skipped_slot = Slot::new_for_test(0, 0); // A0
- let mut expected_references = vec![
+ let mut expected_references = [
dag_builder.last_ancestors.clone(),
dag_builder.last_ancestors.clone(),
dag_builder
diff --git a/consensus/core/src/transaction.rs b/consensus/core/src/transaction.rs
index 8ae6eb1c4caba..590e922e5eca0 100644
--- a/consensus/core/src/transaction.rs
+++ b/consensus/core/src/transaction.rs
@@ -18,10 +18,6 @@ use crate::{
/// The maximum number of transactions pending to the queue to be pulled for block proposal
const MAX_PENDING_TRANSACTIONS: usize = 2_000;
-/// Assume 20_000 TPS * 5% max stake per validator / (minimum) 4 blocks per round = 250 transactions per block maximum
-/// Using a higher limit that is 250 * 2 = 500, to account for bursty traffic and system transactions.
-const MAX_CONSUMED_TRANSACTIONS_PER_REQUEST: u64 = 500;
-
/// The guard acts as an acknowledgment mechanism for the inclusion of the transactions to a block.
/// When its last transaction is included to a block then `included_in_block_ack` will be signalled.
/// If the guard is dropped without getting acknowledged that means the transactions have not been
@@ -45,18 +41,15 @@ pub(crate) struct TransactionConsumer {
}
impl TransactionConsumer {
- pub(crate) fn new(
- tx_receiver: Receiver,
- context: Arc,
- max_consumed_transactions_per_request: Option,
- ) -> Self {
+ pub(crate) fn new(tx_receiver: Receiver, context: Arc) -> Self {
Self {
tx_receiver,
max_consumed_bytes_per_request: context
.protocol_config
.consensus_max_transactions_in_block_bytes(),
- max_consumed_transactions_per_request: max_consumed_transactions_per_request
- .unwrap_or(MAX_CONSUMED_TRANSACTIONS_PER_REQUEST),
+ max_consumed_transactions_per_request: context
+ .protocol_config
+ .max_num_transactions_in_block(),
pending_transactions: None,
}
}
@@ -74,7 +67,6 @@ impl TransactionConsumer {
// Handle one batch of incoming transactions from TransactionGuard.
// Returns the remaining txs as a new TransactionGuard, if the batch breaks any limit.
let mut handle_txs = |t: TransactionsGuard| -> Option {
- // Here we assume that a transaction can always fit in `max_fetched_bytes_per_request`
let remaining_txs: Vec<_> = t
.transactions
.into_iter()
@@ -237,6 +229,7 @@ pub enum ValidationError {
}
/// `NoopTransactionVerifier` accepts all transactions.
+#[allow(unused)]
pub(crate) struct NoopTransactionVerifier;
impl TransactionVerifier for NoopTransactionVerifier {
@@ -273,7 +266,7 @@ mod tests {
let context = Arc::new(Context::new_for_test(4).0);
let (client, tx_receiver) = TransactionClient::new(context.clone());
- let mut consumer = TransactionConsumer::new(tx_receiver, context.clone(), None);
+ let mut consumer = TransactionConsumer::new(tx_receiver, context.clone());
// submit asynchronously the transactions and keep the waiters
let mut included_in_block_waiters = FuturesUnordered::new();
@@ -325,7 +318,7 @@ mod tests {
let context = Arc::new(Context::new_for_test(4).0);
let (client, tx_receiver) = TransactionClient::new(context.clone());
- let mut consumer = TransactionConsumer::new(tx_receiver, context.clone(), None);
+ let mut consumer = TransactionConsumer::new(tx_receiver, context.clone());
// submit some transactions
for i in 0..10 {
@@ -393,7 +386,7 @@ mod tests {
let context = Arc::new(Context::new_for_test(4).0);
let (client, tx_receiver) = TransactionClient::new(context.clone());
- let mut consumer = TransactionConsumer::new(tx_receiver, context.clone(), None);
+ let mut consumer = TransactionConsumer::new(tx_receiver, context.clone());
let mut all_receivers = Vec::new();
// submit a few transactions individually.
for i in 0..10 {
diff --git a/crates/mysten-metrics/Cargo.toml b/crates/mysten-metrics/Cargo.toml
index 2a26c989a9451..26045107d68c7 100644
--- a/crates/mysten-metrics/Cargo.toml
+++ b/crates/mysten-metrics/Cargo.toml
@@ -6,6 +6,9 @@ license = "Apache-2.0"
publish = false
edition = "2021"
+[lints]
+workspace = true
+
[dependencies]
axum.workspace = true
tracing.workspace = true
@@ -20,3 +23,4 @@ parking_lot.workspace = true
futures.workspace = true
async-trait.workspace = true
prometheus-closure-metric.workspace = true
+simple-server-timing-header.workspace = true
diff --git a/crates/mysten-metrics/src/lib.rs b/crates/mysten-metrics/src/lib.rs
index ae45b80f98e4f..a55e36632af7f 100644
--- a/crates/mysten-metrics/src/lib.rs
+++ b/crates/mysten-metrics/src/lib.rs
@@ -3,6 +3,8 @@
use axum::{extract::Extension, http::StatusCode, routing::get, Router};
use dashmap::DashMap;
+use parking_lot::Mutex;
+use simple_server_timing_header::Timer;
use std::future::Future;
use std::net::SocketAddr;
use std::pin::Pin;
@@ -132,6 +134,60 @@ pub fn get_metrics() -> Option<&'static Metrics> {
METRICS.get()
}
+tokio::task_local! {
+ static SERVER_TIMING: Arc>;
+}
+
+/// Create a new task-local ServerTiming context and run the provided future within it.
+/// Should be used at the top-most level of a request handler. Can be added to an axum router
+/// as a layer by using mysten_service::server_timing_middleware.
+pub async fn with_new_server_timing(fut: impl Future