Skip to content

Commit 42a11fe

Browse files
joshieDoclaude
andauthored
refactor: move stress tool to relay-tools package (#1242)
## Summary - Move the stress testing binary from the main relay package to the relay-tools package for better organization - Update build configurations to reference the new location ## Changes - Moved `src/bin/stress.rs` to `tools/relay-tools/src/bin/stress/main.rs` - Updated `Cargo.toml` to remove the stress binary definition - Updated `tools/relay-tools/Cargo.toml` to include the stress binary and required dependencies - Updated `Dockerfile.stress` to build from the relay-tools package ## Test Plan - [x] Verified both binaries build successfully: - `cargo build --bin relay` ✅ - `cargo build -p relay-tools --bin stress` ✅ 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <[email protected]>
1 parent ec98ae5 commit 42a11fe

File tree

5 files changed

+28
-4
lines changed

5 files changed

+28
-4
lines changed

Cargo.lock

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ publish = false
88
path = "src/bin/relay.rs"
99
name = "relay"
1010

11-
[[bin]]
12-
path = "src/bin/stress.rs"
13-
name = "stress"
1411

1512

1613
[dependencies]

Dockerfile.stress

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ RUN cargo chef cook --profile $BUILD_PROFILE --recipe-path recipe.json
2929
COPY . .
3030

3131
# Build application
32-
RUN cargo build --profile $BUILD_PROFILE --features "$FEATURES" --locked --bin stress
32+
RUN cargo build --profile $BUILD_PROFILE --features "$FEATURES" --locked -p relay-tools --bin stress
3333

3434
# ARG is not resolved in COPY so we have to hack around it by copying the
3535
# binary to a temporary location

tools/relay-tools/Cargo.toml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ publish = false
99
name = "chainwalker"
1010
path = "src/bin/chainwalker/main.rs"
1111

12+
[[bin]]
13+
name = "stress"
14+
path = "src/bin/stress/main.rs"
15+
1216
[dependencies]
1317
alloy = { version = "1.0.24", features = [
1418
"std",
@@ -20,11 +24,31 @@ alloy = { version = "1.0.24", features = [
2024
"serde",
2125
"signers",
2226
"transports",
27+
"provider-ws",
28+
"essentials",
29+
"getrandom",
30+
"dyn-abi",
31+
"eip712",
32+
"eips",
33+
"k256",
34+
"provider-debug-api",
35+
"rlp",
36+
"rpc",
37+
"rpc-types-trace",
38+
"signer-local",
39+
"sol-types",
40+
"network",
41+
"signer-mnemonic",
42+
"signer-aws",
43+
"rand",
2344
], default-features = false }
2445
alloy-chains = "0.2.8"
2546
clap = { version = "4.0", features = ["derive", "env"] }
2647
eyre = "0.6"
48+
futures = "0.3"
49+
futures-util = "0.3"
2750
jsonrpsee = { version = "0.26", features = ["client", "client-core", "http-client"] }
51+
rand = "0.9"
2852
relay = { path = "../.." }
2953
serde = { version = "1.0", features = ["derive"] }
3054
serde_json = "1.0"
File renamed without changes.

0 commit comments

Comments
 (0)