From 5c54d4963bff717d6d302e01499f083dff3cfe8a Mon Sep 17 00:00:00 2001 From: jfldde <168934971+jfldde@users.noreply.github.com> Date: Thu, 3 Oct 2024 08:57:12 +0100 Subject: [PATCH 1/4] Pin reqwest in line with citrea --- Cargo.toml | 4 ++-- src/lib.rs | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1f98be2..a3b3921 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2021" resolver = "2" -[dependencies] +[dev-dependencies] anyhow = { version = "1.0.68", default-features = false, features = ["std"] } async-trait = "0.1.71" bitcoin = { version = "0.32.2", features = ["serde", "rand"] } @@ -23,7 +23,7 @@ which = "6.0.3" # Eth client dependencies alloy = { version = "0.2.1", features = ["hyper", "consensus", "rpc-types-eth", "provider-http", "signers", "signer-local"] } jsonrpsee = { version = "0.24.2", features = ["http-client", "ws-client"] } -reqwest = { version = "0.12.5", features = ["rustls-tls", "json", "http2"], default-features = false } +reqwest = { version = "=0.12.5", features = ["rustls-tls", "json", "http2"], default-features = false } reth-primitives = { git = "https://github.com/paradigmxyz/reth", rev = "a206eb3690e5a51d3c797fed2a6ed722e36863eb", default-features = false } reth-rpc-eth-types = { git = "https://github.com/paradigmxyz/reth", rev = "a206eb3690e5a51d3c797fed2a6ed722e36863eb", default-features = false } reth-rpc-types = { git = "https://github.com/paradigmxyz/reth", rev = "a206eb3690e5a51d3c797fed2a6ed722e36863eb", default-features = false, features = ["jsonrpsee-types"] } diff --git a/src/lib.rs b/src/lib.rs index 86aaa53..1409b8d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg(test)] + mod bitcoin; pub mod client; pub mod config; From 0c1dc8db36b0e8cabfa53f8c55b97ad501c9d80a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ceyhun=20=C5=9Een?= Date: Thu, 3 Oct 2024 10:57:52 +0300 Subject: [PATCH 2/4] workflow: Add code checks. (#12) --- .github/workflows/code_checks.yml | 48 +++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/code_checks.yml diff --git a/.github/workflows/code_checks.yml b/.github/workflows/code_checks.yml new file mode 100644 index 0000000..9d92293 --- /dev/null +++ b/.github/workflows/code_checks.yml @@ -0,0 +1,48 @@ +name: Code Checks + +on: [push] + +env: + CARGO_TERM_COLOR: always + CARGO_TERM_VERBOSE: true + CARGOFLAGS: --workspace --all-targets --all-features + RUST_LOG: trace + RISC0_DEV_MODE: 1 + +jobs: + formatting: + name: Check formatting + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Run Cargo fmt + run: cargo fmt --check + + linting: + name: Check linting + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Run Cargo clippy + run: cargo clippy --no-deps --all-targets -- -Dwarnings + + udeps: + name: Check unused dependencies + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly-2024-07-27 + override: true + - name: Run cargo-udeps + env: + RUSTFLAGS: -A warnings + uses: aig787/cargo-udeps-action@v1 + with: + version: "latest" + args: "--workspace --all-features --all-targets" From 113a73d9714df51c4149fc869659dfdb21268f63 Mon Sep 17 00:00:00 2001 From: jfldde <168934971+jfldde@users.noreply.github.com> Date: Thu, 3 Oct 2024 14:50:00 +0100 Subject: [PATCH 3/4] Remove test gate --- Cargo.toml | 4 ++-- src/lib.rs | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a3b3921..6897360 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2021" resolver = "2" -[dev-dependencies] +[dependencies] anyhow = { version = "1.0.68", default-features = false, features = ["std"] } async-trait = "0.1.71" bitcoin = { version = "0.32.2", features = ["serde", "rand"] } @@ -21,7 +21,7 @@ toml = "0.8.0" which = "6.0.3" # Eth client dependencies -alloy = { version = "0.2.1", features = ["hyper", "consensus", "rpc-types-eth", "provider-http", "signers", "signer-local"] } +alloy = { version = "0.2.1", features = ["hyper", "rpc-types-eth", "provider-http", "signers", "signer-local"] } jsonrpsee = { version = "0.24.2", features = ["http-client", "ws-client"] } reqwest = { version = "=0.12.5", features = ["rustls-tls", "json", "http2"], default-features = false } reth-primitives = { git = "https://github.com/paradigmxyz/reth", rev = "a206eb3690e5a51d3c797fed2a6ed722e36863eb", default-features = false } diff --git a/src/lib.rs b/src/lib.rs index 1409b8d..86aaa53 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg(test)] - mod bitcoin; pub mod client; pub mod config; From 727237b30c12e65474f3b69c1115db75d179a80e Mon Sep 17 00:00:00 2001 From: jfldde <168934971+jfldde@users.noreply.github.com> Date: Thu, 3 Oct 2024 17:25:21 +0100 Subject: [PATCH 4/4] Pin citrea dependencies --- Cargo.toml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6897360..1eadc77 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ serde_json = { version = "1.0", default-features = false } tempfile = "3.8" tokio = { version = "1.39", features = ["full"] } toml = "0.8.0" -which = "6.0.3" +which = "6.0.1" # Eth client dependencies alloy = { version = "0.2.1", features = ["hyper", "rpc-types-eth", "provider-http", "signers", "signer-local"] } @@ -29,12 +29,12 @@ reth-rpc-eth-types = { git = "https://github.com/paradigmxyz/reth", rev = "a206e reth-rpc-types = { git = "https://github.com/paradigmxyz/reth", rev = "a206eb3690e5a51d3c797fed2a6ed722e36863eb", default-features = false, features = ["jsonrpsee-types"] } # Citrea dependencies -bitcoin-da = { git = "https://github.com/chainwayxyz/citrea", features = ["native"] } -citrea-primitives = { git = "https://github.com/chainwayxyz/citrea" } -citrea-sequencer = { git = "https://github.com/chainwayxyz/citrea" } -sov-ledger-rpc = { git = "https://github.com/chainwayxyz/citrea", features = ["client"] } -sov-rollup-interface = { git = "https://github.com/chainwayxyz/citrea" } -sov-stf-runner = { git = "https://github.com/chainwayxyz/citrea", features = ["native"] } +bitcoin-da = { git = "https://github.com/chainwayxyz/citrea", rev = "82bf52d", features = ["native"] } +citrea-primitives = { git = "https://github.com/chainwayxyz/citrea", rev = "82bf52d" } +citrea-sequencer = { git = "https://github.com/chainwayxyz/citrea", rev = "82bf52d" } +sov-ledger-rpc = { git = "https://github.com/chainwayxyz/citrea", rev = "82bf52d", features = ["client"] } +sov-rollup-interface = { git = "https://github.com/chainwayxyz/citrea", rev = "82bf52d" } +sov-stf-runner = { git = "https://github.com/chainwayxyz/citrea", rev = "82bf52d", features = ["native"] } [patch.crates-io] bitcoincore-rpc = { version = "0.18.0", git = "https://github.com/chainwayxyz/rust-bitcoincore-rpc.git", rev = "0ae498d" }