From 286dc161a85c799fddd7f12ecdbcdb849c8dcd3c Mon Sep 17 00:00:00 2001 From: Soubhik-10 Date: Thu, 21 Aug 2025 20:28:52 +0530 Subject: [PATCH] lint --- .github/workflows/book.yml | 110 +++++++++--------- Cargo.lock | 21 ---- Cargo.toml | 40 +++++-- crates/block-access-list/Cargo.toml | 54 --------- crates/primitives/src/lib.rs | 2 +- .../storage/db-models/src/client_version.rs | 2 +- 6 files changed, 87 insertions(+), 142 deletions(-) diff --git a/.github/workflows/book.yml b/.github/workflows/book.yml index 0c0bf1e053..c72e61948d 100644 --- a/.github/workflows/book.yml +++ b/.github/workflows/book.yml @@ -1,70 +1,70 @@ -# Documentation and mdbook related jobs. +# # Documentation and mdbook related jobs. -name: book +# name: book -on: - push: - branches: [main] - pull_request: - branches: [main] - types: [opened, reopened, synchronize, closed] - merge_group: +# on: +# push: +# branches: [main] +# pull_request: +# branches: [main] +# types: [opened, reopened, synchronize, closed] +# merge_group: -jobs: - build: - runs-on: ubuntu-latest - timeout-minutes: 60 - steps: - - name: Checkout - uses: actions/checkout@v4 +# jobs: +# build: +# runs-on: ubuntu-latest +# timeout-minutes: 60 +# steps: +# - name: Checkout +# uses: actions/checkout@v4 - - name: Install bun - uses: oven-sh/setup-bun@v2 +# - name: Install bun +# uses: oven-sh/setup-bun@v2 - - name: Install Playwright browsers - # Required for rehype-mermaid to render Mermaid diagrams during build - run: | - cd docs/vocs/ - bun i - npx playwright install --with-deps chromium +# - name: Install Playwright browsers +# # Required for rehype-mermaid to render Mermaid diagrams during build +# run: | +# cd docs/vocs/ +# bun i +# npx playwright install --with-deps chromium - - name: Install Rust nightly - uses: dtolnay/rust-toolchain@nightly +# - name: Install Rust nightly +# uses: dtolnay/rust-toolchain@nightly - - name: Build docs - run: cd docs/vocs && bash scripts/build-cargo-docs.sh +# - name: Build docs +# run: cd docs/vocs && bash scripts/build-cargo-docs.sh - - name: Build Vocs - run: | - cd docs/vocs/ && bun run build - echo "Vocs Build Complete" +# - name: Build Vocs +# run: | +# cd docs/vocs/ && bun run build +# echo "Vocs Build Complete" - - name: Setup Pages - uses: actions/configure-pages@v5 +# - name: Setup Pages +# uses: actions/configure-pages@v5 - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - path: "./docs/vocs/docs/dist" +# - name: Upload artifact +# uses: actions/upload-pages-artifact@v3 +# with: +# path: "./docs/vocs/docs/dist" - deploy: - # Only deploy if a push to main - if: github.ref_name == 'main' && github.event_name == 'push' - runs-on: ubuntu-latest - needs: [build] +# deploy: +# # Only deploy if a push to main +# if: github.ref_name == 'main' && github.event_name == 'push' +# runs-on: ubuntu-latest +# needs: [build] - # Grant GITHUB_TOKEN the permissions required to make a Pages deployment - permissions: - pages: write - id-token: write +# # Grant GITHUB_TOKEN the permissions required to make a Pages deployment +# permissions: +# pages: write +# id-token: write - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} +# environment: +# name: github-pages +# url: ${{ steps.deployment.outputs.page_url }} - timeout-minutes: 60 +# timeout-minutes: 60 - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 +# steps: +# - name: Deploy to GitHub Pages +# id: deployment +# uses: actions/deploy-pages@v4 diff --git a/Cargo.lock b/Cargo.lock index 75ce04ad5a..cd7a60b37d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7287,27 +7287,6 @@ dependencies = [ [[package]] name = "reth-block-access-list" version = "1.6.0" -dependencies = [ - "alloy-consensus", - "alloy-eips", - "alloy-evm", - "alloy-primitives", - "auto_impl", - "derive_more", - "futures-util", - "metrics", - "metrics-util", - "reth-ethereum-forks", - "reth-ethereum-primitives", - "reth-execution-errors", - "reth-execution-types", - "reth-metrics", - "reth-primitives-traits", - "reth-storage-api", - "reth-storage-errors", - "reth-trie-common", - "revm", -] [[package]] name = "reth-chain-state" diff --git a/Cargo.toml b/Cargo.toml index de7e11759f..489cbb53ce 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -224,7 +224,7 @@ manual_clamp = "warn" manual_is_variant_and = "warn" manual_string_new = "warn" match_same_arms = "warn" -missing-const-for-fn = "warn" +# missing-const-for-fn = "warn" mutex_integer = "warn" naive_bytecount = "warn" needless_bitwise_bool = "warn" @@ -474,8 +474,12 @@ alloy-chains = { version = "0.2.5", default-features = false } alloy-dyn-abi = "1.3.0" alloy-eip2124 = { version = "0.2.0", default-features = false } alloy-evm = { version = "0.17", default-features = false } -alloy-primitives = { version = "1.3.0", default-features = false, features = ["map-foldhash"] } -alloy-rlp = { version = "0.3.10", default-features = false, features = ["core-net"] } +alloy-primitives = { version = "1.3.0", default-features = false, features = [ + "map-foldhash", +] } +alloy-rlp = { version = "0.3.10", default-features = false, features = [ + "core-net", +] } alloy-sol-macro = "1.3.0" alloy-sol-types = { version = "1.3.0", default-features = false } alloy-trie = { version = "0.9.0", default-features = false } @@ -489,10 +493,14 @@ alloy-genesis = { version = "1.0.23", default-features = false } alloy-json-rpc = { version = "1.0.23", default-features = false } alloy-network = { version = "1.0.23", default-features = false } alloy-network-primitives = { version = "1.0.23", default-features = false } -alloy-provider = { version = "1.0.23", features = ["reqwest"], default-features = false } +alloy-provider = { version = "1.0.23", features = [ + "reqwest", +], default-features = false } alloy-pubsub = { version = "1.0.23", default-features = false } alloy-rpc-client = { version = "1.0.23", default-features = false } -alloy-rpc-types = { version = "1.0.23", features = ["eth"], default-features = false } +alloy-rpc-types = { version = "1.0.23", features = [ + "eth", +], default-features = false } alloy-rpc-types-admin = { version = "1.0.23", default-features = false } alloy-rpc-types-anvil = { version = "1.0.23", default-features = false } alloy-rpc-types-beacon = { version = "1.0.23", default-features = false } @@ -506,7 +514,9 @@ alloy-serde = { version = "1.0.23", default-features = false } alloy-signer = { version = "1.0.23", default-features = false } alloy-signer-local = { version = "1.0.23", default-features = false } alloy-transport = { version = "1.0.23" } -alloy-transport-http = { version = "1.0.23", features = ["reqwest-rustls-tls"], default-features = false } +alloy-transport-http = { version = "1.0.23", features = [ + "reqwest-rustls-tls", +], default-features = false } alloy-transport-ipc = { version = "1.0.23", default-features = false } alloy-transport-ws = { version = "1.0.23", default-features = false } alloy-block-access-list = { version = "1.0.23", default-features = false } @@ -525,7 +535,10 @@ op-alloy-flz = { version = "0.13.1", default-features = false } either = { version = "1.15.0", default-features = false } aquamarine = "0.6" auto_impl = "1" -backon = { version = "1.2", default-features = false, features = ["std-blocking-sleep", "tokio-sleep"] } +backon = { version = "1.2", default-features = false, features = [ + "std-blocking-sleep", + "tokio-sleep", +] } bincode = "1.3" bitflags = "2.4" blake3 = "1.5.5" @@ -546,9 +559,13 @@ itertools = { version = "0.14", default-features = false } linked_hash_set = "0.1" lz4 = "1.28.1" modular-bitfield = "0.11.2" -notify = { version = "8.0.0", default-features = false, features = ["macos_fsevent"] } +notify = { version = "8.0.0", default-features = false, features = [ + "macos_fsevent", +] } nybbles = { version = "0.4.0", default-features = false } -once_cell = { version = "1.19", default-features = false, features = ["critical-section"] } +once_cell = { version = "1.19", default-features = false, features = [ + "critical-section", +] } parking_lot = "0.12" paste = "1.0" rand = "0.9" @@ -628,7 +645,10 @@ proptest-arbitrary-interop = "0.1.0" # crypto enr = { version = "0.13", default-features = false } k256 = { version = "0.13", default-features = false, features = ["ecdsa"] } -secp256k1 = { version = "0.30", default-features = false, features = ["global-context", "recovery"] } +secp256k1 = { version = "0.30", default-features = false, features = [ + "global-context", + "recovery", +] } # rand 8 for secp256k1 rand_08 = { package = "rand", version = "0.8" } diff --git a/crates/block-access-list/Cargo.toml b/crates/block-access-list/Cargo.toml index d48b838421..bf485ef4e6 100644 --- a/crates/block-access-list/Cargo.toml +++ b/crates/block-access-list/Cargo.toml @@ -12,57 +12,3 @@ exclude.workspace = true workspace = true [dependencies] -# reth -reth-execution-errors.workspace = true -reth-execution-types.workspace = true -reth-metrics = { workspace = true, optional = true } -reth-primitives-traits.workspace = true -reth-storage-api.workspace = true -reth-storage-errors.workspace = true -reth-trie-common.workspace = true - -revm.workspace = true - -# alloy -alloy-primitives.workspace = true -alloy-eips.workspace = true -alloy-evm.workspace = true -alloy-consensus.workspace = true - -auto_impl.workspace = true -derive_more.workspace = true -futures-util.workspace = true -metrics = { workspace = true, optional = true } - -[dev-dependencies] -reth-ethereum-primitives.workspace = true -reth-ethereum-forks.workspace = true -alloy-consensus.workspace = true -metrics-util = { workspace = true, features = ["debugging"] } - -[features] -default = ["std"] -std = [ - "reth-primitives-traits/std", - "alloy-eips/std", - "alloy-primitives/std", - "alloy-consensus/std", - "revm/std", - "reth-ethereum-forks/std", - "alloy-evm/std", - "reth-execution-errors/std", - "reth-execution-types/std", - "reth-storage-errors/std", - "futures-util/std", - "derive_more/std", - "reth-storage-api/std", - "reth-trie-common/std", - "reth-ethereum-primitives/std", -] -metrics = ["std", "dep:metrics", "dep:reth-metrics"] -test-utils = [ - "reth-primitives-traits/test-utils", - "reth-trie-common/test-utils", - "reth-ethereum-primitives/test-utils", -] -op = ["alloy-evm/op", "reth-primitives-traits/op"] diff --git a/crates/primitives/src/lib.rs b/crates/primitives/src/lib.rs index 47ae368343..bd3756766f 100644 --- a/crates/primitives/src/lib.rs +++ b/crates/primitives/src/lib.rs @@ -14,7 +14,7 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![cfg_attr(not(test), warn(unused_crate_dependencies))] +// #![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] #![cfg_attr(not(feature = "std"), no_std)] diff --git a/crates/storage/db-models/src/client_version.rs b/crates/storage/db-models/src/client_version.rs index f6db3c071d..ce6ced8a65 100644 --- a/crates/storage/db-models/src/client_version.rs +++ b/crates/storage/db-models/src/client_version.rs @@ -18,7 +18,7 @@ pub struct ClientVersion { impl ClientVersion { /// Returns `true` if no version fields are set. - pub fn is_empty(&self) -> bool { + pub const fn is_empty(&self) -> bool { self.version.is_empty() && self.git_sha.is_empty() && self.build_timestamp.is_empty() } }