Skip to content

Commit f000ac1

Browse files
committed
nodebench first draft
1 parent e0a6843 commit f000ac1

File tree

5 files changed

+255
-64
lines changed

5 files changed

+255
-64
lines changed

Cargo.toml

Lines changed: 44 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
[workspace]
44
members = [
5-
"bin/loom", "bin/keys", "bin/loom_anvil", "bin/gasbench",
5+
"bin/loom", "bin/keys", "bin/loom_anvil", "bin/gasbench", "bin/nodebench",
66
"crates/defi-abi", "crates/defi-actors", "crates/defi-entities", "crates/defi-events", "crates/defi-pools", "crates/multicaller", "crates/topology", "crates/types", "crates/utils", "crates/flashbots", "crates/debug-provider", "bin/gasbench", "bin/nodebench"]
7-
default-members = ["bin/loom", "bin/keys", "bin/loom_anvil", "bin/gasbench"]
7+
default-members = ["bin/loom", "bin/keys", "bin/loom_anvil", "bin/gasbench", "bin/nodebench"]
88
resolver = "2"
99

1010
[workspace.package]
@@ -59,6 +59,14 @@ thiserror = "^1.0.61"
5959
colored = "2.0.4"
6060

6161

62+
63+
#alloy = { git = "https://github.com/alloy-rs/alloy.git", package = "alloy", rev = "61921bc", default-features = false, features = ["pubsub",
64+
# "sol-types", "dyn-abi", "json-abi", "contract", "providers", "provider-ws", "provider-ipc", "provider-http", "consensus", "genesis", "reqwest", "hyper", "serde",
65+
# "signers", "signer-local", "transports", "transport-http", "transport-ipc", "transport-ws",
66+
# "network", "node-bindings", "rpc-client", "json-rpc", "rpc-types", "rpc-types-trace", "rpc-types-admin", "rpc-types-txpool", "rpc-types-anvil", "rpc-types-json"] }
67+
68+
alloy = { git = "https://github.com/alloy-rs/alloy.git", package = "alloy", rev = "61921bc", features = ["full"] }
69+
6270
revm = { version = "9.0.0", features = [
6371
"std",
6472
"secp256k1",
@@ -67,6 +75,7 @@ revm = { version = "9.0.0", features = [
6775
revm-primitives = { version = "4.0.0", features = ["std", ], default-features = false }
6876
revm-inspectors = { git = "https://github.com/paradigmxyz/evm-inspectors", rev = "4fe17f0" }
6977

78+
7079
alloy-core = "0.7.6"
7180
alloy-chains = "0.1.15"
7281
alloy-primitives = "0.7.6"
@@ -78,36 +87,32 @@ alloy-rlp = "0.3.5"
7887
alloy-trie = "0.4.1"
7988

8089

81-
alloy = { git = "https://github.com/alloy-rs/alloy.git", package = "alloy", rev = "1ee31cf", features = [
82-
"sol-types", "contract", "pubsub", "providers", "provider-ws", "provider-ipc", "provider-http",
83-
"signers", "signer-local", "transports", "transport-http", "transport-ipc", "transport-ws",
84-
"network", "node-bindings", "rpc", "rpc-client", "json-rpc", "rpc-types", "rpc-types-trace", "rpc-types-txpool", "rpc-types-anvil"] }
8590

8691

87-
alloy-contract = { git = "https://github.com/alloy-rs/alloy", rev = "1ee31cf" }
88-
alloy-rpc-client = { git = "https://github.com/alloy-rs/alloy.git", features = ["ws", "reqwest", "pubsub"], rev = "1ee31cf" }
89-
alloy-rpc-types = { git = "https://github.com/alloy-rs/alloy", rev = "1ee31cf" }
90-
alloy-rpc-types-eth = { git = "https://github.com/alloy-rs/alloy", rev = "1ee31cf" }
91-
alloy-rpc-types-beacon = { git = "https://github.com/alloy-rs/alloy", rev = "1ee31cf" }
92-
alloy-rpc-types-anvil = { git = "https://github.com/alloy-rs/alloy", rev = "1ee31cf" }
93-
alloy-rpc-types-trace = { git = "https://github.com/alloy-rs/alloy", rev = "1ee31cf" }
94-
alloy-rpc-types-engine = { git = "https://github.com/alloy-rs/alloy", rev = "1ee31cf" }
95-
alloy-genesis = { git = "https://github.com/alloy-rs/alloy", rev = "1ee31cf" }
96-
alloy-node-bindings = { git = "https://github.com/alloy-rs/alloy", rev = "1ee31cf" }
97-
alloy-provider = { git = "https://github.com/alloy-rs/alloy", rev = "1ee31cf", default-features = false, features = [
92+
alloy-contract = { git = "https://github.com/alloy-rs/alloy", rev = "61921bc" }
93+
alloy-rpc-client = { git = "https://github.com/alloy-rs/alloy.git", features = ["ws", "reqwest", "pubsub"], rev = "61921bc" }
94+
alloy-rpc-types = { git = "https://github.com/alloy-rs/alloy", rev = "61921bc" }
95+
alloy-rpc-types-eth = { git = "https://github.com/alloy-rs/alloy", rev = "61921bc" }
96+
alloy-rpc-types-beacon = { git = "https://github.com/alloy-rs/alloy", rev = "61921bc" }
97+
alloy-rpc-types-anvil = { git = "https://github.com/alloy-rs/alloy", rev = "61921bc" }
98+
alloy-rpc-types-trace = { git = "https://github.com/alloy-rs/alloy", rev = "61921bc" }
99+
alloy-rpc-types-engine = { git = "https://github.com/alloy-rs/alloy", rev = "61921bc" }
100+
alloy-genesis = { git = "https://github.com/alloy-rs/alloy", rev = "61921bc" }
101+
alloy-node-bindings = { git = "https://github.com/alloy-rs/alloy", rev = "61921bc" }
102+
alloy-provider = { git = "https://github.com/alloy-rs/alloy", rev = "61921bc", default-features = false, features = [
98103
"reqwest", "pubsub", "ws", "ipc", "debug-api", "anvil-node", "anvil-api"
99104
] }
100-
alloy-eips = { git = "https://github.com/alloy-rs/alloy", rev = "1ee31cf" }
101-
alloy-signer = { git = "https://github.com/alloy-rs/alloy", rev = "1ee31cf" }
102-
alloy-signer-local = { git = "https://github.com/alloy-rs/alloy", rev = "1ee31cf" }
103-
alloy-network = { git = "https://github.com/alloy-rs/alloy", rev = "1ee31cf" }
104-
alloy-consensus = { git = "https://github.com/alloy-rs/alloy", rev = "1ee31cf" }
105-
alloy-transport = { git = "https://github.com/alloy-rs/alloy", rev = "1ee31cf" }
106-
alloy-pubsub = { git = "https://github.com/alloy-rs/alloy.git", rev = "1ee31cf" }
107-
alloy-transport-ws = { git = "https://github.com/alloy-rs/alloy", rev = "1ee31cf" }
108-
alloy-transport-ipc = { git = "https://github.com/alloy-rs/alloy", rev = "1ee31cf" }
109-
alloy-transport-http = { git = "https://github.com/alloy-rs/alloy", rev = "1ee31cf" }
110-
alloy-json-rpc = { git = "https://github.com/alloy-rs/alloy.git", rev = "1ee31cf" }
105+
alloy-eips = { git = "https://github.com/alloy-rs/alloy", rev = "61921bc" }
106+
alloy-signer = { git = "https://github.com/alloy-rs/alloy", rev = "61921bc" }
107+
alloy-signer-local = { git = "https://github.com/alloy-rs/alloy", rev = "61921bc" }
108+
alloy-network = { git = "https://github.com/alloy-rs/alloy", rev = "61921bc" }
109+
alloy-consensus = { git = "https://github.com/alloy-rs/alloy", rev = "61921bc" }
110+
alloy-transport = { git = "https://github.com/alloy-rs/alloy", rev = "61921bc" }
111+
alloy-pubsub = { git = "https://github.com/alloy-rs/alloy.git", rev = "61921bc" }
112+
alloy-transport-ws = { git = "https://github.com/alloy-rs/alloy", rev = "61921bc" }
113+
alloy-transport-ipc = { git = "https://github.com/alloy-rs/alloy", rev = "61921bc" }
114+
alloy-transport-http = { git = "https://github.com/alloy-rs/alloy", rev = "61921bc" }
115+
alloy-json-rpc = { git = "https://github.com/alloy-rs/alloy.git", rev = "61921bc" }
111116

112117
reth-db = { git = "https://github.com/paradigmxyz/reth", rev = "87d6bcd" }
113118
reth-chainspec = { git = "https://github.com/paradigmxyz/reth", rev = "87d6bcd" }
@@ -128,17 +133,18 @@ revm-interpreter = { git = "https://github.com/bluealloy/revm", rev = "41e2f7f"
128133
revm-precompile = { git = "https://github.com/bluealloy/revm", rev = "41e2f7f" }
129134
revm-primitives = { git = "https://github.com/bluealloy/revm", rev = "41e2f7f" }
130135

131-
alloy-eips = { git = "https://github.com/alloy-rs/alloy", rev = "1ee31cf" }
132-
alloy-genesis = { git = "https://github.com/alloy-rs/alloy", rev = "1ee31cf" }
136+
alloy-eips = { git = "https://github.com/alloy-rs/alloy", rev = "61921bc" }
137+
alloy-genesis = { git = "https://github.com/alloy-rs/alloy", rev = "61921bc" }
138+
139+
alloy = { git = "https://github.com/alloy-rs/alloy.git", package = "alloy", rev = "61921bc", features = ["full"] }
133140

134-
alloy = { git = "https://github.com/alloy-rs/alloy", rev = "1ee31cf" }
135141

136-
alloy-rpc-types = { git = "https://github.com/alloy-rs/alloy", rev = "1ee31cf" }
137-
alloy-rpc-types-eth = { git = "https://github.com/alloy-rs/alloy", rev = "1ee31cf" }
138-
alloy-rpc-types-anvil = { git = "https://github.com/alloy-rs/alloy", rev = "1ee31cf" }
139-
alloy-rpc-types-trace = { git = "https://github.com/alloy-rs/alloy", rev = "1ee31cf" }
140-
alloy-rpc-types-engine = { git = "https://github.com/alloy-rs/alloy", rev = "1ee31cf" }
141-
alloy-rpc-types-beacon = { git = "https://github.com/alloy-rs/alloy", rev = "1ee31cf" }
142-
alloy-consensus = { git = "https://github.com/alloy-rs/alloy", rev = "1ee31cf" }
142+
alloy-rpc-types = { git = "https://github.com/alloy-rs/alloy", rev = "61921bc" }
143+
alloy-rpc-types-eth = { git = "https://github.com/alloy-rs/alloy", rev = "61921bc" }
144+
alloy-rpc-types-anvil = { git = "https://github.com/alloy-rs/alloy", rev = "61921bc" }
145+
alloy-rpc-types-trace = { git = "https://github.com/alloy-rs/alloy", rev = "61921bc" }
146+
alloy-rpc-types-engine = { git = "https://github.com/alloy-rs/alloy", rev = "61921bc" }
147+
alloy-rpc-types-beacon = { git = "https://github.com/alloy-rs/alloy", rev = "61921bc" }
148+
alloy-consensus = { git = "https://github.com/alloy-rs/alloy", rev = "61921bc" }
143149

144150

bin/gasbench/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ serde_json.workspace = true
1919
clap.workspace = true
2020
colored.workspace = true
2121

22-
23-
alloy.workspace = true
2422
alloy-primitives.workspace = true
2523
alloy-rpc-types.workspace = true
2624
alloy-provider.workspace = true
@@ -41,3 +39,6 @@ defi-events.workspace = true
4139

4240
defi-abi.workspace = true
4341

42+
[dependencies.alloy]
43+
workspace = true
44+
features = ["full"]

bin/nodebench/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,7 @@ eyre.workspace = true
1515
chrono.workspace = true
1616
futures.workspace = true
1717

18-
alloy.workspace = true
18+
[dependencies.alloy]
19+
workspace = true
20+
features = ["full"]
1921

bin/nodebench/README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# NodeBench utility
2+
3+
Helps to understand and compare node performance
4+
5+
```
6+
./nodebench ws://node1 ws://node2
7+
```
8+
9+
10+
Stat result for [Reth/Geth], started on Reth instance
11+
12+
```
13+
Hello, nodebench!
14+
Ping time 0 : PT0.000338227S
15+
Ping time 1 : PT0.008380913S
16+
Warmign up 1 : 20155409 block received 0x3e57dcd2379aa6dc65ce52ef388a5d54a20842c2c869be6e68e816b0ee84f871
17+
Warmign up 0 : 20155409 block received
18+
...
19+
0x0c60a1ad5f5dc51d71e38196659d74a4ae52efacc74bb1dbc3a1405a8e44ef45 2024-06-23 15:54:00.698031960 +00:00
20+
0 : 20155412 block received 0x0c60a1ad5f5dc51d71e38196659d74a4ae52efacc74bb1dbc3a1405a8e44ef45 2024-06-23 15:54:00.993692266 +00:00
21+
...
22+
23+
24+
blocks abs first [0, 10] avg ms [389, 0]
25+
blocks rel first [0, 10] avg ms [397, 0]
26+
txs total : 1688 received by nodes [1121, 1122] total 1138, outdated [9, 0]
27+
txs abs first [1028, 110] delays avg ms [53, 18]
28+
txs rel first [729, 409] delays avg ms [14, 25]
29+
30+
```
31+
32+
blocks abs first - counter of blocks received by node before other nodes
33+
avg ms - average delay in milliseconds
34+
blocks rel first - counter of blocks received by node before other nodes corrected by ping time
35+
36+
txs total - total transactions in observed blocks,
37+
received by nodes - number of block transactions those went through node's mempool
38+
total - number of transactions covered by all mempools
39+
outdated - transactions those are recevied with the large delay, not couunted
40+
41+
txs abs first - txes receved from the node before others
42+
delays avg - averate delay when transaction doesn't come first in milliseconds
43+
44+
txs rel first - txes receved from the node before others corrected by ping time
45+
delays avg - averate delay when transaction doesn't come first in milliseconds corrected by ping time.
46+
47+
48+

0 commit comments

Comments
 (0)