Skip to content

Commit

Permalink
refactor: sort, merge, cleanup dependencies (#677)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xaatif authored Sep 30, 2024
1 parent 18e5bd4 commit 41f5744
Show file tree
Hide file tree
Showing 14 changed files with 213 additions and 231 deletions.
13 changes: 13 additions & 0 deletions .github/actions/rust/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: "Rust"
description: |
Common steps for CI
See <https://docs.github.com/en/actions/sharing-automations/creating-actions/creating-a-composite-action>
runs:
using: composite
steps:
- uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: cargo-bins/[email protected]
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
30 changes: 0 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,33 +175,3 @@ jobs:

- name: Run the script
run: ./scripts/prove_stdio.sh artifacts/witness_b3_b6.json

lints:
name: Rustdoc, Formatting and Clippy
runs-on: ubuntu-latest
timeout-minutes: 10
if: ${{ ! contains(toJSON(github.event.commits.*.message), '[skip-ci]') }}
steps:
- name: Checkout sources
uses: actions/checkout@v4

- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt, clippy

- name: Set up rust cache
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true

- name: Run cargo fmt
run: cargo fmt --all --check

- name: Run cargo clippy
run: cargo clippy --all-targets -- -D warnings -A incomplete-features

- name: Run cargo clippy (with `cdk_erigon` flag)
run: cargo clippy --package zero --all-targets --no-default-features --features cdk_erigon -- -D warnings -A incomplete-features

- name: Rustdoc
run: cargo doc --all
52 changes: 52 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: lint

on:
push:
branches: [develop, main]
pull_request:
branches:
- "**"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always
BINSTALL_NO_CONFIRM: true

jobs:
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/rust
- run: cargo clippy --all-targets -- -D warnings
- run: cargo clippy --all-targets --no-default-features --features cdk_erigon -- -D warnings
udeps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/rust
- run: cargo binstall cargo-udeps
- run: cargo udeps --quiet
- run: cargo udeps --quiet --tests --benches --examples
rustdoc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/rust
- run: cargo doc --all
cargo-fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/rust
- run: cargo fmt --check
taplo-fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/rust
- run: cargo binstall taplo-cli
- run: taplo fmt --check
51 changes: 1 addition & 50 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 5 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,25 +76,29 @@ paste = "1.0.15"
pest = "2.7.10"
pest_derive = "2.7.10"
pretty_env_logger = "0.5.0"
proc-macro2 = "1.0"
quote = "1.0"
rand = "0.8.5"
rand_chacha = "0.3.1"
ripemd = "0.1.3"
rlp = "0.5.2"
rlp-derive = "0.1.0"
ruint = "1.12.3"
serde = "1.0.203"
serde-big-array = "0.5.1"
serde_json = "1.0.118"
serde_path_to_error = "0.1.16"
serde-big-array = "0.5.1"
sha2 = "0.10.8"
static_assertions = "1.1.0"
syn = "2.0"
thiserror = "1.0.61"
tiny-keccak = "2.0.2"
tokio = { version = "1.38.0", features = ["full"] }
toml = "0.8.14"
tower = "0.4"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
trybuild = "1.0"
u4 = "0.1.0"
uint = "0.9.5"
url = "2.5.2"
Expand All @@ -115,11 +119,5 @@ plonky2_maybe_rayon = "0.2.0"
plonky2_util = { git = "https://github.com/0xPolygonZero/plonky2.git", rev = "dc77c77f2b06500e16ad4d7f1c2b057903602eed" }
starky = { git = "https://github.com/0xPolygonZero/plonky2.git", rev = "dc77c77f2b06500e16ad4d7f1c2b057903602eed" }

# proc macro related dependencies
proc-macro2 = "1.0"
quote = "1.0"
syn = "2.0"
trybuild = "1.0"

[workspace.lints.clippy]
too_long_first_doc_paragraph = "allow"
8 changes: 4 additions & 4 deletions common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ keywords.workspace = true
categories.workspace = true

[dependencies]
ethereum-types = { workspace = true }
keccak-hash = { workspace = true }
ethereum-types.workspace = true

[dev-dependencies]
bytes = { workspace = true }
rlp = { workspace = true }
bytes.workspace = true
keccak-hash.workspace = true
rlp.workspace = true
4 changes: 2 additions & 2 deletions compat/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ keywords.workspace = true
categories.workspace = true

[dependencies]
alloy = { workspace = true }
__compat_primitive_types = { workspace = true }
__compat_primitive_types.workspace = true
alloy.workspace = true
68 changes: 33 additions & 35 deletions evm_arithmetization/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,47 +15,45 @@ homepage.workspace = true
keywords.workspace = true

[dependencies]
anyhow = { workspace = true }
bytes = { workspace = true }
env_logger = { workspace = true }
ethereum-types = { workspace = true }
anyhow.workspace = true
bytes.workspace = true
env_logger.workspace = true
ethereum-types.workspace = true
hashbrown.workspace = true
hex = { workspace = true, optional = true }
hex-literal = { workspace = true }
itertools = { workspace = true }
keccak-hash = { workspace = true }
log = { workspace = true }
plonky2_maybe_rayon = { workspace = true, features = ["parallel"] }
num = { workspace = true }
num-bigint = { workspace = true }
once_cell = { workspace = true }
pest = { workspace = true }
pest_derive = { workspace = true }
hex-literal.workspace = true
itertools.workspace = true
keccak-hash.workspace = true
log.workspace = true
mpt_trie.workspace = true
num.workspace = true
num-bigint.workspace = true
once_cell.workspace = true
pest.workspace = true
pest_derive.workspace = true
plonky2 = { workspace = true, features = ["parallel"] }
plonky2_util = { workspace = true }
starky = { workspace = true, features = ["parallel"] }
rand = { workspace = true }
rand_chacha = { workspace = true }
rlp = { workspace = true }
rlp-derive = { workspace = true }
plonky2_maybe_rayon = { workspace = true, features = ["parallel"] }
plonky2_util.workspace = true
rand.workspace = true
rand_chacha.workspace = true
rlp.workspace = true
rlp-derive.workspace = true
serde = { workspace = true, features = ["derive"] }
sha2 = { workspace = true }
static_assertions = { workspace = true }
hashbrown = { workspace = true }
thiserror = { workspace = true }
tiny-keccak = { workspace = true }
serde_json = { workspace = true }
serde-big-array = { workspace = true }

# Local dependencies
mpt_trie = { workspace = true }
serde-big-array.workspace = true
serde_json.workspace = true
sha2.workspace = true
smt_trie = { workspace = true, optional = true }
zk_evm_common = { workspace = true }
zk_evm_proc_macro = { workspace = true }
starky = { workspace = true, features = ["parallel"] }
static_assertions.workspace = true
thiserror.workspace = true
tiny-keccak.workspace = true
zk_evm_common.workspace = true
zk_evm_proc_macro.workspace = true

[dev-dependencies]
criterion = { workspace = true }
hex = { workspace = true }
ripemd = { workspace = true }
criterion.workspace = true
hex.workspace = true
ripemd.workspace = true

[features]
default = ["eth_mainnet"]
Expand Down
Loading

0 comments on commit 41f5744

Please sign in to comment.