diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ebaaf091f..a2cde78cf 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -20,7 +20,7 @@ jobs: uses: dtolnay/rust-toolchain@stable with: components: clippy - toolchain: 1.83.0 + toolchain: 1.85.0 - name: Install toolchain (nightly) run: rustup toolchain add nightly --component rustfmt --profile minimal - uses: Swatinem/rust-cache@v2 diff --git a/.github/workflows/docker-release.yaml b/.github/workflows/docker-release.yaml index b7f48ec72..b133ec5a7 100644 --- a/.github/workflows/docker-release.yaml +++ b/.github/workflows/docker-release.yaml @@ -31,7 +31,7 @@ jobs: uses: dtolnay/rust-toolchain@stable with: components: clippy - toolchain: 1.83.0 + toolchain: 1.85.0 - name: Install toolchain (nightly) run: rustup toolchain add nightly --component rustfmt --profile minimal diff --git a/Cargo.lock b/Cargo.lock index bb70b2838..31b3486f4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -65,7 +65,7 @@ dependencies = [ "alloy-eips", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.7.3", + "alloy-serde", "alloy-trie", "auto_impl", "c-kzg", @@ -83,7 +83,7 @@ dependencies = [ "alloy-eips", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.7.3", + "alloy-serde", "serde", ] @@ -158,7 +158,7 @@ dependencies = [ "alloy-eip7702", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.7.3", + "alloy-serde", "c-kzg", "derive_more 1.0.0", "once_cell", @@ -166,17 +166,6 @@ dependencies = [ "sha2", ] -[[package]] -name = "alloy-genesis" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8429cf4554eed9b40feec7f4451113e76596086447550275e3def933faf47ce3" -dependencies = [ - "alloy-primitives", - "alloy-serde 0.4.2", - "serde", -] - [[package]] name = "alloy-genesis" version = "0.7.3" @@ -184,7 +173,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aeec8e6eab6e52b7c9f918748c9b811e87dbef7312a2e3a2ca1729a92966a6af" dependencies = [ "alloy-primitives", - "alloy-serde 0.7.3", + "alloy-serde", "alloy-trie", "serde", ] @@ -229,7 +218,7 @@ dependencies = [ "alloy-primitives", "alloy-rpc-types-any", "alloy-rpc-types-eth", - "alloy-serde 0.7.3", + "alloy-serde", "alloy-signer", "alloy-sol-types", "async-trait", @@ -249,34 +238,17 @@ dependencies = [ "alloy-consensus", "alloy-eips", "alloy-primitives", - "alloy-serde 0.7.3", + "alloy-serde", "serde", ] -[[package]] -name = "alloy-node-bindings" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f1334a738aa1710cb8227441b3fcc319202ce78e967ef37406940242df4a454" -dependencies = [ - "alloy-genesis 0.4.2", - "alloy-primitives", - "k256", - "rand", - "serde_json", - "tempfile", - "thiserror 1.0.69", - "tracing", - "url", -] - [[package]] name = "alloy-node-bindings" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bffcf33dd319f21cd6f066d81cbdef0326d4bdaaf7cfe91110bc090707858e9f" dependencies = [ - "alloy-genesis 0.7.3", + "alloy-genesis", "alloy-primitives", "k256", "rand", @@ -328,7 +300,7 @@ dependencies = [ "alloy-json-rpc", "alloy-network", "alloy-network-primitives", - "alloy-node-bindings 0.7.3", + "alloy-node-bindings", "alloy-primitives", "alloy-rpc-client", "alloy-rpc-types-anvil", @@ -412,7 +384,7 @@ checksum = "d33bc190844626c08e21897736dbd7956ab323c09e6f141b118d1c8b7aff689e" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", - "alloy-serde 0.7.3", + "alloy-serde", "serde", ] @@ -424,7 +396,7 @@ checksum = "200661999b6e235d9840be5d60a6e8ae2f0af9eb2a256dd378786744660e36ec" dependencies = [ "alloy-consensus-any", "alloy-rpc-types-eth", - "alloy-serde 0.7.3", + "alloy-serde", ] [[package]] @@ -449,7 +421,7 @@ dependencies = [ "alloy-network-primitives", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.7.3", + "alloy-serde", "alloy-sol-types", "derive_more 1.0.0", "itertools 0.13.0", @@ -465,23 +437,12 @@ checksum = "4e073ab0e67429c60be281e181731132fd07d82e091c10c29ace6935101034bb" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", - "alloy-serde 0.7.3", + "alloy-serde", "serde", "serde_json", "thiserror 2.0.8", ] -[[package]] -name = "alloy-serde" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dff0ab1cdd43ca001e324dc27ee0e8606bd2161d6623c63e0e0b8c4dfc13600" -dependencies = [ - "alloy-primitives", - "serde", - "serde_json", -] - [[package]] name = "alloy-serde" version = "0.7.3" @@ -1086,32 +1047,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "aws-lc-rs" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f409eb70b561706bf8abba8ca9c112729c481595893fd06a2dd9af8ed8441148" -dependencies = [ - "aws-lc-sys", - "paste", - "zeroize", -] - -[[package]] -name = "aws-lc-sys" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8478a5c29ead3f3be14aff8a202ad965cf7da6856860041bfca271becf8ba48b" -dependencies = [ - "bindgen 0.69.5", - "cc", - "cmake", - "dunce", - "fs_extra", - "libc", - "paste", -] - [[package]] name = "aws-runtime" version = "1.5.1" @@ -1510,29 +1445,6 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" -[[package]] -name = "bindgen" -version = "0.69.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" -dependencies = [ - "bitflags", - "cexpr", - "clang-sys", - "itertools 0.12.1", - "lazy_static", - "lazycell", - "log", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "rustc-hash 1.1.0", - "shlex", - "syn 2.0.90", - "which", -] - [[package]] name = "bindgen" version = "0.70.1" @@ -1675,12 +1587,6 @@ dependencies = [ "serde", ] -[[package]] -name = "cargo-husky" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b02b629252fe8ef6460461409564e2c21d0c8e77e0944f3d189ff06c4e932ad" - [[package]] name = "cc" version = "1.2.4" @@ -1791,15 +1697,6 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" -[[package]] -name = "cmake" -version = "0.1.52" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c682c223677e0e5b6b7f63a64b9351844c3f1b1678a68b7ee617e30fb082620e" -dependencies = [ - "cc", -] - [[package]] name = "colorchoice" version = "1.0.3" @@ -1907,12 +1804,6 @@ dependencies = [ "unicode-xid", ] -[[package]] -name = "constcat" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4938185353434999ef52c81753c8cca8955ed38042fc29913db3751916f3b7ab" - [[package]] name = "convert_case" version = "0.4.0" @@ -2189,10 +2080,10 @@ dependencies = [ ] [[package]] -name = "dotenv" -version = "0.15.0" +name = "dotenvy" +version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" +checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] name = "downcast" @@ -2404,12 +2295,6 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" -[[package]] -name = "fs_extra" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" - [[package]] name = "funty" version = "2.0.0" @@ -2768,15 +2653,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "home" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" -dependencies = [ - "windows-sys 0.59.0", -] - [[package]] name = "http" version = "0.2.12" @@ -3188,15 +3064,6 @@ dependencies = [ "either", ] -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.13.0" @@ -3480,12 +3347,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - [[package]] name = "libc" version = "0.2.168" @@ -3514,7 +3375,7 @@ version = "0.14.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e78a09b56be5adbcad5aa1197371688dc6bb249a26da3bca2011ee2fb987ebfb" dependencies = [ - "bindgen 0.70.1", + "bindgen", "errno", "libc", ] @@ -4844,7 +4705,7 @@ checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" [[package]] name = "rundler" -version = "0.5.0" +version = "0.6.0" dependencies = [ "alloy-primitives", "anyhow", @@ -4853,7 +4714,7 @@ dependencies = [ "aws-sdk-s3", "clap", "config", - "dotenv", + "dotenvy", "go-parse-duration", "http 1.2.0", "itertools 0.13.0", @@ -4883,8 +4744,6 @@ dependencies = [ "strum", "tokio", "tokio-metrics", - "tokio-rustls 0.26.1", - "tokio-util", "tonic", "tracing", "tracing-appender", @@ -4895,15 +4754,15 @@ dependencies = [ [[package]] name = "rundler-bindings-fastlz" -version = "0.5.0" +version = "0.6.0" dependencies = [ - "bindgen 0.70.1", + "bindgen", "cc", ] [[package]] name = "rundler-bls" -version = "0.5.0" +version = "0.6.0" dependencies = [ "alloy-primitives", "async-trait", @@ -4913,7 +4772,7 @@ dependencies = [ [[package]] name = "rundler-builder" -version = "0.5.0" +version = "0.6.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -4927,20 +4786,15 @@ dependencies = [ "aws-sdk-kms", "enum_dispatch", "futures", - "futures-timer", "futures-util", "jsonrpsee", "linked-hash-map", "metrics", "metrics-derive", "mockall", - "num-traits", - "parse-display", - "pin-project", "prost", "reqwest", "rslock", - "ruint", "rundler-provider", "rundler-sim", "rundler-task", @@ -4951,7 +4805,6 @@ dependencies = [ "strum", "thiserror 1.0.69", "tokio", - "tokio-util", "tonic", "tonic-build", "tonic-health", @@ -4961,7 +4814,7 @@ dependencies = [ [[package]] name = "rundler-contracts" -version = "0.5.0" +version = "0.6.0" dependencies = [ "alloy-contract", "alloy-primitives", @@ -4973,7 +4826,7 @@ dependencies = [ [[package]] name = "rundler-pbh" -version = "0.5.0" +version = "0.6.0" dependencies = [ "alloy-primitives", "alloy-sol-types", @@ -4985,7 +4838,7 @@ dependencies = [ [[package]] name = "rundler-pool" -version = "0.5.0" +version = "0.6.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -5011,30 +4864,24 @@ dependencies = [ "rundler-task", "rundler-types", "rundler-utils", - "serde", "serde_json", - "strum", - "thiserror 1.0.69", "tokio", "tokio-stream", - "tokio-util", "tonic", "tonic-build", "tonic-health", "tonic-reflection", "tracing", - "url", ] [[package]] name = "rundler-provider" -version = "0.5.0" +version = "0.6.0" dependencies = [ "alloy-consensus", "alloy-contract", "alloy-eips", "alloy-json-rpc", - "alloy-node-bindings 0.4.2", "alloy-primitives", "alloy-provider", "alloy-rlp", @@ -5057,7 +4904,6 @@ dependencies = [ "reth-tasks", "rundler-bindings-fastlz", "rundler-contracts", - "rundler-provider", "rundler-types", "rundler-utils", "thiserror 1.0.69", @@ -5070,12 +4916,11 @@ dependencies = [ [[package]] name = "rundler-rpc" -version = "0.5.0" +version = "0.6.0" dependencies = [ "alloy-consensus", "alloy-contract", "alloy-json-rpc", - "alloy-network", "alloy-primitives", "alloy-sol-types", "anyhow", @@ -5097,19 +4942,16 @@ dependencies = [ "strum", "thiserror 1.0.69", "tokio", - "tokio-util", "tonic", "tower 0.4.13", "tower-http", "tracing", - "url", ] [[package]] name = "rundler-sim" -version = "0.5.0" +version = "0.6.0" dependencies = [ - "alloy-eips", "alloy-primitives", "alloy-sol-types", "anyhow", @@ -5117,35 +4959,27 @@ dependencies = [ "async-trait", "auto_impl", "futures-util", - "indexmap 2.7.0", "mockall", - "parse-display", "rand", - "reqwest", "rundler-contracts", "rundler-provider", - "rundler-sim", "rundler-types", "rundler-utils", "serde", "serde_json", "serde_with", - "strum", "thiserror 1.0.69", "tokio", "tracing", - "url", ] [[package]] name = "rundler-task" -version = "0.5.0" +version = "0.6.0" dependencies = [ "alloy-primitives", "anyhow", "async-trait", - "futures", - "metrics", "pin-project", "reth-tasks", "rundler-provider", @@ -5153,7 +4987,6 @@ dependencies = [ "rundler-utils", "thiserror 1.0.69", "tokio", - "tokio-util", "tonic", "tower 0.4.13", "tracing", @@ -5161,7 +4994,7 @@ dependencies = [ [[package]] name = "rundler-types" -version = "0.5.0" +version = "0.6.0" dependencies = [ "alloy-eips", "alloy-primitives", @@ -5169,19 +5002,14 @@ dependencies = [ "anyhow", "async-trait", "auto_impl", - "cargo-husky", "chrono", - "const-hex", - "constcat", "futures-util", "metrics", "metrics-derive", "mockall", "num_enum", "parse-display", - "rand", "rundler-contracts", - "rundler-types", "rundler-utils", "serde", "serde_json", @@ -5191,20 +5019,18 @@ dependencies = [ [[package]] name = "rundler-utils" -version = "0.5.0" +version = "0.6.0" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", "anyhow", "derive_more 0.99.18", - "futures", "itertools 0.13.0", "metrics", "rand", "schnellru", "tokio", "tracing", - "url", ] [[package]] @@ -5293,7 +5119,6 @@ version = "0.23.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b" dependencies = [ - "aws-lc-rs", "log", "once_cell", "ring", @@ -5398,7 +5223,6 @@ version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ - "aws-lc-rs", "ring", "rustls-pki-types", "untrusted", @@ -6739,18 +6563,6 @@ dependencies = [ "rustls-pki-types", ] -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix", -] - [[package]] name = "winapi" version = "0.3.9" diff --git a/Cargo.toml b/Cargo.toml index 607a49c99..302b7a573 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,9 +17,9 @@ default-members = ["bin/rundler"] resolver = "2" [workspace.package] -version = "0.5.0" +version = "0.6.0" edition = "2021" -rust-version = "1.83" +rust-version = "1.85" license = "LGPL-3.0-only" repository = "https://github.com/alchemyplatform/rundler" diff --git a/Dockerfile b/Dockerfile index d6af40f0d..95faf5395 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # Adapted from https://github.com/paradigmxyz/reth/blob/main/Dockerfile # syntax=docker/dockerfile:1.4 -FROM rust:1.83.0 AS chef-builder +FROM rust:1.85.0 AS chef-builder # Install system dependencies RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list diff --git a/bin/rundler/Cargo.toml b/bin/rundler/Cargo.toml index 808e1cbfc..84255a60f 100644 --- a/bin/rundler/Cargo.toml +++ b/bin/rundler/Cargo.toml @@ -30,7 +30,7 @@ aws-config.workspace = true aws-sdk-s3 = { version = "1.52", default-features = false } clap = { version = "4.5.16", features = ["derive", "env"] } config = "0.14.0" -dotenv = "0.15.0" +dotenvy = "0.15.7" go-parse-duration = "0.1" http.workspace = true itertools.workspace = true @@ -50,8 +50,6 @@ sscanf = "0.4.2" strum = { workspace = true, features = ["derive"] } tokio = { workspace = true, features = ["macros", "rt-multi-thread", "signal", "sync"] } tokio-metrics = "0.4.0" -tokio-rustls = "0.26.0" -tokio-util.workspace = true tonic.workspace = true tracing.workspace = true tracing-appender = "0.2.3" diff --git a/bin/rundler/src/main.rs b/bin/rundler/src/main.rs index 16d45b43d..05e0abe9f 100644 --- a/bin/rundler/src/main.rs +++ b/bin/rundler/src/main.rs @@ -11,7 +11,15 @@ // You should have received a copy of the GNU General Public License along with Rundler. // If not, see https://www.gnu.org/licenses/. -use dotenv::dotenv; +#![warn(missing_docs, unused_crate_dependencies)] +#![deny(unused_must_use, rust_2018_idioms)] +#![doc(test( + no_crate_inject, + attr(deny(warnings, rust_2018_idioms), allow(dead_code, unused_variables)) +))] +//! Main CLI entry point for Rundler + +use dotenvy::dotenv; mod cli; #[tokio::main] diff --git a/crates/aggregators/bls/src/lib.rs b/crates/aggregators/bls/src/lib.rs index b81204248..5bd1affa3 100644 --- a/crates/aggregators/bls/src/lib.rs +++ b/crates/aggregators/bls/src/lib.rs @@ -11,7 +11,7 @@ // You should have received a copy of the GNU General Public License along with Rundler. // If not, see https://www.gnu.org/licenses/. -#![warn(missing_docs, unreachable_pub)] +#![warn(missing_docs, unreachable_pub, unused_crate_dependencies)] #![deny(unused_must_use, rust_2018_idioms)] #![doc(test( no_crate_inject, diff --git a/crates/aggregators/pbh/src/lib.rs b/crates/aggregators/pbh/src/lib.rs index ab2293f8d..c165a556e 100644 --- a/crates/aggregators/pbh/src/lib.rs +++ b/crates/aggregators/pbh/src/lib.rs @@ -11,7 +11,7 @@ // You should have received a copy of the GNU General Public License along with Rundler. // If not, see https://www.gnu.org/licenses/. -#![warn(missing_docs, unreachable_pub)] +#![warn(missing_docs, unreachable_pub, unused_crate_dependencies)] #![deny(unused_must_use, rust_2018_idioms)] #![doc(test( no_crate_inject, diff --git a/crates/bindings/fastlz/src/lib.rs b/crates/bindings/fastlz/src/lib.rs index 0de4539ed..9ac133163 100644 --- a/crates/bindings/fastlz/src/lib.rs +++ b/crates/bindings/fastlz/src/lib.rs @@ -15,6 +15,13 @@ // Credit to https://github.com/mvertescher/fastlz-rs/blob/master/src/lib.rs +#![warn(unused_crate_dependencies)] +#![deny(unused_must_use, rust_2018_idioms)] +#![doc(test( + no_crate_inject, + attr(deny(warnings, rust_2018_idioms), allow(dead_code, unused_variables)) +))] + use core::ffi::c_void; // This is a generated binding of the fastlz C library at commit diff --git a/crates/builder/Cargo.toml b/crates/builder/Cargo.toml index 1f0039f6c..b9e71e385 100644 --- a/crates/builder/Cargo.toml +++ b/crates/builder/Cargo.toml @@ -27,32 +27,24 @@ aws-config.workspace = true aws-sdk-kms = { version = "1.44", default-features = false } enum_dispatch = "0.3.13" futures.workspace = true -futures-timer = "3.0.3" futures-util.workspace = true jsonrpsee = { workspace = true, features = [ "http-client" ] } linked-hash-map = "0.5.6" metrics.workspace = true metrics-derive.workspace = true -num-traits = "0.2.19" -parse-display.workspace = true -pin-project.workspace = true prost.workspace = true reqwest = { workspace = true, default-features = false, features = ["json"] } rslock = "0.4.0" -ruint = { version = "1.12.3", features = ["num-traits"] } serde.workspace = true serde_json.workspace = true strum.workspace = true thiserror.workspace = true tokio.workspace = true -tokio-util.workspace = true tonic.workspace = true tonic-health.workspace = true tonic-reflection.workspace = true tracing.workspace = true -mockall = { workspace = true, optional = true } - [dev-dependencies] mockall.workspace = true rundler-provider = { workspace = true, features = ["test-utils"] } diff --git a/crates/builder/src/bundle_proposer.rs b/crates/builder/src/bundle_proposer.rs index 6c9e4d835..62543884b 100644 --- a/crates/builder/src/bundle_proposer.rs +++ b/crates/builder/src/bundle_proposer.rs @@ -1013,7 +1013,7 @@ where .simulation .entity_infos .factory - .map_or(false, |f| f.is_staked), + .is_some_and(|f| f.is_staked), ) .await; } @@ -1032,7 +1032,7 @@ where .simulation .entity_infos .paymaster - .map_or(false, |p| p.is_staked), + .is_some_and(|p| p.is_staked), ) .await; } @@ -1593,7 +1593,7 @@ impl ProposalContext { // In accordance with [EREP-015]/[EREP-020]/[EREP-030], responsibility for failures lies with the staked factory or account. // Paymasters should not be held accountable, so the paymaster's `opsSeen` count should be decremented accordingly. - let is_staked_factory = entity_infos.factory.map_or(false, |f| f.is_staked); + let is_staked_factory = entity_infos.factory.is_some_and(|f| f.is_staked); let is_staked_sender = entity_infos.sender.is_staked; if is_staked_factory || is_staked_sender { if let Some(paymaster) = entity_infos.paymaster { diff --git a/crates/builder/src/lib.rs b/crates/builder/src/lib.rs index b6a6b8fb6..200d0b959 100644 --- a/crates/builder/src/lib.rs +++ b/crates/builder/src/lib.rs @@ -11,7 +11,7 @@ // You should have received a copy of the GNU General Public License along with Rundler. // If not, see https://www.gnu.org/licenses/. -#![warn(missing_docs, unreachable_pub)] +#![warn(missing_docs, unreachable_pub, unused_crate_dependencies)] #![deny(unused_must_use, rust_2018_idioms)] #![doc(test( no_crate_inject, diff --git a/crates/contracts/src/v0_6.rs b/crates/contracts/src/v0_6.rs index 9bd318663..c42dddc0e 100644 --- a/crates/contracts/src/v0_6.rs +++ b/crates/contracts/src/v0_6.rs @@ -161,10 +161,10 @@ sol!( ); // https://etherscan.io/address/0x5ff137d4b0fdcd49dca30c7cf57e578a026d2789#code -const __ENTRY_POINT_V0_6_DEPLOYED_BYTECODE_HEX: &[u8] = include_bytes!( +static __ENTRY_POINT_V0_6_DEPLOYED_BYTECODE_HEX: &[u8] = include_bytes!( "../contracts/bytecode/entrypoint/0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789_deployed.txt" ); -const __ENTRY_POINT_V0_6_DEPLOYED_BYTECODE: [u8; 23689] = { +static __ENTRY_POINT_V0_6_DEPLOYED_BYTECODE: [u8; 23689] = { match const_hex::const_decode_to_array(__ENTRY_POINT_V0_6_DEPLOYED_BYTECODE_HEX) { Ok(a) => a, Err(_) => panic!("Failed to decode entrypoint hex"), diff --git a/crates/contracts/src/v0_7.rs b/crates/contracts/src/v0_7.rs index dc217c350..78ccec4e3 100644 --- a/crates/contracts/src/v0_7.rs +++ b/crates/contracts/src/v0_7.rs @@ -244,11 +244,11 @@ sol!( ); // EntryPointSimulations deployed bytecode -const __ENTRY_POINT_SIMULATIONS_V0_7_DEPLOYED_BYTECODE_HEX: &[u8] = include_bytes!( +static __ENTRY_POINT_SIMULATIONS_V0_7_DEPLOYED_BYTECODE_HEX: &[u8] = include_bytes!( "../contracts/out/v0_7/EntryPointSimulations.sol/EntryPointSimulations_deployedBytecode.txt" ); -const __ENTRY_POINT_SIMULATIONS_V0_7_DEPLOYED_BYTECODE: [u8; 16893] = { +static __ENTRY_POINT_SIMULATIONS_V0_7_DEPLOYED_BYTECODE: [u8; 16893] = { match const_hex::const_decode_to_array(__ENTRY_POINT_SIMULATIONS_V0_7_DEPLOYED_BYTECODE_HEX) { Ok(a) => a, Err(_) => panic!("Failed to decode entry point simulations hex"), @@ -259,11 +259,11 @@ pub static ENTRY_POINT_SIMULATIONS_V0_7_DEPLOYED_BYTECODE: Bytes = Bytes::from_static(&__ENTRY_POINT_SIMULATIONS_V0_7_DEPLOYED_BYTECODE); // CallGasEstimationProxy deployed bytecode -const __CALL_GAS_ESTIMATION_PROXY_V0_7_DEPLOYED_BYTECODE_HEX: &[u8] = include_bytes!( +static __CALL_GAS_ESTIMATION_PROXY_V0_7_DEPLOYED_BYTECODE_HEX: &[u8] = include_bytes!( "../contracts/out/v0_7/CallGasEstimationProxy.sol/CallGasEstimationProxy_deployedBytecode.txt" ); -const __CALL_GAS_ESTIMATION_PROXY_V0_7_DEPLOYED_BYTECODE: [u8; 3558] = { +static __CALL_GAS_ESTIMATION_PROXY_V0_7_DEPLOYED_BYTECODE: [u8; 3558] = { match const_hex::const_decode_to_array(__CALL_GAS_ESTIMATION_PROXY_V0_7_DEPLOYED_BYTECODE_HEX) { Ok(a) => a, Err(_) => panic!("Failed to decode call gas estimation proxy hex"), diff --git a/crates/pool/Cargo.toml b/crates/pool/Cargo.toml index d8eb49d9c..20524842b 100644 --- a/crates/pool/Cargo.toml +++ b/crates/pool/Cargo.toml @@ -8,7 +8,6 @@ repository.workspace = true publish = false [dependencies] -alloy-consensus.workspace = true rundler-contracts.workspace = true rundler-provider.workspace = true rundler-sim.workspace = true @@ -29,21 +28,15 @@ metrics.workspace = true metrics-derive.workspace = true parking_lot = "0.12.3" prost.workspace = true -serde.workspace = true -strum.workspace = true -thiserror.workspace = true tokio.workspace = true tokio-stream = { version = "0.1.12", features = ["sync"] } -tokio-util.workspace = true tonic.workspace = true tonic-health.workspace = true tonic-reflection.workspace = true tracing.workspace = true -url.workspace = true - -mockall = { workspace = true, optional = true } [dev-dependencies] +alloy-consensus.workspace = true alloy-eips.workspace = true alloy-signer.workspace = true alloy-signer-local.workspace = true diff --git a/crates/pool/src/lib.rs b/crates/pool/src/lib.rs index 3bb75ce62..36a85b7e8 100644 --- a/crates/pool/src/lib.rs +++ b/crates/pool/src/lib.rs @@ -11,7 +11,7 @@ // You should have received a copy of the GNU General Public License along with Rundler. // If not, see https://www.gnu.org/licenses/. -#![warn(missing_docs, unreachable_pub)] +#![warn(missing_docs, unreachable_pub, unused_crate_dependencies)] #![deny(unused_must_use, rust_2018_idioms)] #![doc(test( no_crate_inject, diff --git a/crates/pool/src/mempool/uo_pool.rs b/crates/pool/src/mempool/uo_pool.rs index 84d6fb400..309c6da3b 100644 --- a/crates/pool/src/mempool/uo_pool.rs +++ b/crates/pool/src/mempool/uo_pool.rs @@ -846,7 +846,6 @@ where || (sender_num % U256::from(num_shards) == U256::from(shard_index))) }) .take(max) - .map(Into::into) .collect()) } diff --git a/crates/provider/Cargo.toml b/crates/provider/Cargo.toml index 99d45978e..a958eb7bf 100644 --- a/crates/provider/Cargo.toml +++ b/crates/provider/Cargo.toml @@ -49,9 +49,7 @@ mockall = { workspace = true, optional = true } test-utils = ["mockall"] [dev-dependencies] -alloy-node-bindings = "0.4.2" alloy-provider = { workspace = true, features = ["debug-api", "anvil-node"] } alloy-sol-macro.workspace = true -rundler-provider = { workspace = true, features = ["test-utils"] } tiny_http.workspace = true tokio.workspace = true diff --git a/crates/provider/src/alloy/provider_timeout.rs b/crates/provider/src/alloy/provider_timeout.rs index 2d9db2e3e..9739d1665 100644 --- a/crates/provider/src/alloy/provider_timeout.rs +++ b/crates/provider/src/alloy/provider_timeout.rs @@ -84,10 +84,7 @@ where type Future = ResponseFuture; fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll> { - match self.service.poll_ready(cx) { - Poll::Pending => Poll::Pending, - Poll::Ready(r) => Poll::Ready(r.map_err(Into::into)), - } + self.service.poll_ready(cx) } fn call(&mut self, request: RequestPacket) -> Self::Future { @@ -123,7 +120,7 @@ where // First, try polling the future match this.response.poll(cx) { - Poll::Ready(v) => return Poll::Ready(v.map_err(Into::into)), + Poll::Ready(v) => return Poll::Ready(v), Poll::Pending => {} } // Now check the sleep diff --git a/crates/provider/src/lib.rs b/crates/provider/src/lib.rs index afc623789..599296155 100644 --- a/crates/provider/src/lib.rs +++ b/crates/provider/src/lib.rs @@ -11,7 +11,7 @@ // You should have received a copy of the GNU General Public License along with Rundler. // If not, see https://www.gnu.org/licenses/. -#![warn(missing_docs, unreachable_pub)] +#![warn(missing_docs, unreachable_pub, unused_crate_dependencies)] #![deny(unused_must_use, rust_2018_idioms)] #![doc(test( no_crate_inject, diff --git a/crates/rpc/Cargo.toml b/crates/rpc/Cargo.toml index c6ef68ba8..ad6471992 100644 --- a/crates/rpc/Cargo.toml +++ b/crates/rpc/Cargo.toml @@ -32,18 +32,15 @@ metrics-derive.workspace = true serde.workspace = true strum.workspace = true thiserror.workspace = true -tokio.workspace = true -tokio-util.workspace = true tonic.workspace = true tower.workspace = true tower-http = { workspace = true, features = ["cors"] } tracing.workspace = true -url.workspace = true [dev-dependencies] alloy-consensus.workspace = true -alloy-network.workspace = true mockall.workspace = true rundler-provider = { workspace = true, features = ["test-utils"] } rundler-sim = { workspace = true, features = ["test-utils"] } rundler-types = { workspace = true, features = ["test-utils"] } +tokio.workspace = true diff --git a/crates/rpc/src/lib.rs b/crates/rpc/src/lib.rs index 350e1c84e..196609032 100644 --- a/crates/rpc/src/lib.rs +++ b/crates/rpc/src/lib.rs @@ -11,7 +11,7 @@ // You should have received a copy of the GNU General Public License along with Rundler. // If not, see https://www.gnu.org/licenses/. -#![warn(missing_docs, unreachable_pub)] +#![warn(missing_docs, unreachable_pub, unused_crate_dependencies)] #![deny(unused_must_use, rust_2018_idioms)] #![doc(test( no_crate_inject, diff --git a/crates/sim/Cargo.toml b/crates/sim/Cargo.toml index 82ed466be..468983ecb 100644 --- a/crates/sim/Cargo.toml +++ b/crates/sim/Cargo.toml @@ -13,7 +13,6 @@ rundler-provider.workspace = true rundler-types.workspace = true rundler-utils.workspace = true -alloy-eips.workspace = true alloy-primitives.workspace = true alloy-sol-types.workspace = true @@ -22,18 +21,12 @@ arrayvec = "0.7.6" async-trait.workspace = true auto_impl.workspace = true futures-util.workspace = true -indexmap = "2.4.0" -parse-display.workspace = true rand.workspace = true -reqwest.workspace = true serde.workspace = true -serde_json.workspace = true serde_with = "3.9.0" -strum.workspace = true thiserror.workspace = true tokio = { workspace = true, features = ["macros"] } tracing.workspace = true -url.workspace = true mockall = { workspace = true, optional = true } @@ -41,8 +34,8 @@ mockall = { workspace = true, optional = true } alloy-primitives = { workspace = true, features = ["rand"] } mockall.workspace = true rundler-provider = { workspace = true, features = ["test-utils"] } -rundler-sim = { workspace = true, features = ["test-utils"] } rundler-types = { workspace = true, features = ["test-utils"] } +serde_json.workspace = true [features] test-utils = ["mockall"] diff --git a/crates/sim/src/lib.rs b/crates/sim/src/lib.rs index f38d544f7..fb39a2925 100644 --- a/crates/sim/src/lib.rs +++ b/crates/sim/src/lib.rs @@ -11,7 +11,7 @@ // You should have received a copy of the GNU General Public License along with Rundler. // If not, see https://www.gnu.org/licenses/. -#![warn(missing_docs, unreachable_pub)] +#![warn(missing_docs, unreachable_pub, unused_crate_dependencies)] #![deny(unused_must_use, rust_2018_idioms)] #![doc(test( no_crate_inject, diff --git a/crates/task/Cargo.toml b/crates/task/Cargo.toml index 958f0d43c..040c8b6a5 100644 --- a/crates/task/Cargo.toml +++ b/crates/task/Cargo.toml @@ -16,13 +16,10 @@ alloy-primitives.workspace = true anyhow.workspace = true async-trait.workspace = true -futures.workspace = true -metrics.workspace = true pin-project.workspace = true reth-tasks.workspace = true thiserror.workspace = true tokio.workspace = true -tokio-util.workspace = true tonic.workspace = true tower.workspace = true tracing.workspace = true diff --git a/crates/task/src/lib.rs b/crates/task/src/lib.rs index e156eb532..08941b031 100644 --- a/crates/task/src/lib.rs +++ b/crates/task/src/lib.rs @@ -11,7 +11,7 @@ // You should have received a copy of the GNU General Public License along with Rundler. // If not, see https://www.gnu.org/licenses/. -#![warn(missing_docs, unreachable_pub)] +#![warn(missing_docs, unreachable_pub, unused_crate_dependencies)] #![deny(unused_must_use, rust_2018_idioms)] #![doc(test( no_crate_inject, diff --git a/crates/types/Cargo.toml b/crates/types/Cargo.toml index d12660b23..c18b72e74 100644 --- a/crates/types/Cargo.toml +++ b/crates/types/Cargo.toml @@ -19,16 +19,12 @@ anyhow.workspace = true async-trait.workspace = true auto_impl.workspace = true chrono = "0.4.38" -const-hex.workspace = true -constcat = "0.5.0" futures-util.workspace = true metrics.workspace = true metrics-derive.workspace = true num_enum = "0.7.3" parse-display.workspace = true -rand.workspace = true serde.workspace = true -serde_json.workspace = true strum.workspace = true thiserror.workspace = true @@ -36,8 +32,7 @@ mockall = { workspace = true, optional = true } [dev-dependencies] alloy-primitives = { workspace = true, features = ["rand"] } -cargo-husky.workspace = true -rundler-types = { workspace = true, features = ["test-utils"] } +serde_json.workspace = true [features] test-utils = ["mockall"] diff --git a/crates/types/src/lib.rs b/crates/types/src/lib.rs index 808f9fcb3..425a40e9a 100644 --- a/crates/types/src/lib.rs +++ b/crates/types/src/lib.rs @@ -11,7 +11,7 @@ // You should have received a copy of the GNU General Public License along with Rundler. // If not, see https://www.gnu.org/licenses/. -#![warn(missing_docs, unreachable_pub)] +#![warn(missing_docs, unreachable_pub, unused_crate_dependencies)] #![deny(unused_must_use, rust_2018_idioms)] #![doc(test( no_crate_inject, diff --git a/crates/utils/Cargo.toml b/crates/utils/Cargo.toml index 2bc2caef2..cf87dbeca 100644 --- a/crates/utils/Cargo.toml +++ b/crates/utils/Cargo.toml @@ -13,11 +13,9 @@ alloy-rpc-types-eth.workspace = true anyhow.workspace = true derive_more = "0.99.18" -futures.workspace = true itertools.workspace = true metrics.workspace = true rand.workspace = true schnellru = "0.2.1" tokio.workspace = true tracing.workspace = true -url.workspace = true diff --git a/crates/utils/src/lib.rs b/crates/utils/src/lib.rs index d3e36b95e..404d75ffb 100644 --- a/crates/utils/src/lib.rs +++ b/crates/utils/src/lib.rs @@ -11,7 +11,7 @@ // You should have received a copy of the GNU General Public License along with Rundler. // If not, see https://www.gnu.org/licenses/. -#![warn(missing_docs, unreachable_pub)] +#![warn(missing_docs, unreachable_pub, unused_crate_dependencies)] #![deny(unused_must_use, rust_2018_idioms)] #![doc(test( no_crate_inject, diff --git a/deny.toml b/deny.toml index e75539062..df3869e90 100644 --- a/deny.toml +++ b/deny.toml @@ -14,7 +14,7 @@ deny = [ [bans.workspace-dependencies] duplicates = 'deny' include-path-dependencies = true -unused = 'deny' +unused = 'allow' [licenses] version = 2 @@ -30,16 +30,13 @@ allow = [ "ISC", "MPL-2.0", "Unicode-3.0", - "Unicode-DFS-2016", "Unlicense", "Zlib", ] exceptions = [ { allow = ["CC0-1.0"], name = "tiny-keccak" }, - { allow = ["Unicode-DFS-2016"], name = "unicode-ident" }, { allow = ["OpenSSL"], name = "ring" }, - { allow = ["OpenSSL"], name = "aws-lc-sys" } ] [[licenses.clarify]] diff --git a/docs/developing.md b/docs/developing.md index 2dc9ddd69..847029f1d 100644 --- a/docs/developing.md +++ b/docs/developing.md @@ -12,7 +12,7 @@ git submodule update --init --recursive 2. Install prerequisites -* [Rust/Cargo](https://www.rust-lang.org/tools/install): 1.83 or higher with nightly +* [Rust/Cargo](https://www.rust-lang.org/tools/install): 1.85 or higher with nightly * [Cocogitto](https://github.com/cocogitto/cocogitto): Commit linting * [Docker](https://docs.docker.com/engine/install/): Run spec tests * [PDM](https://pdm.fming.dev/latest/#installation): Run spec tests diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 942a8e859..213f3f910 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.83" +channel = "1.85" components = [ "rustfmt", "clippy" ]