Skip to content

Commit 53b2557

Browse files
jxsmichaelsproul
andcommitted
Move dependencies to workspace (#4650)
## Issue Addressed Synchronize dependencies and edition on the workspace `Cargo.toml` ## Proposed Changes with rust-lang/cargo#8415 merged it's now possible to synchronize details on the workspace `Cargo.toml` like the metadata and dependencies. By only having dependencies that are shared between multiple crates aligned on the workspace `Cargo.toml` it's easier to not miss duplicate versions of the same dependency and therefore ease on the compile times. ## Additional Info this PR also removes the no longer required direct dependency of the `serde_derive` crate. should be reviewed after #4639 get's merged. closes #4651 Co-authored-by: Michael Sproul <[email protected]> Co-authored-by: Michael Sproul <[email protected]>
1 parent 2441a24 commit 53b2557

File tree

87 files changed

+1530
-1628
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+1530
-1628
lines changed

Cargo.lock

+260-478
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+132-4
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,138 @@ members = [
8989
]
9090
resolver = "2"
9191

92-
[patch]
93-
[patch.crates-io]
94-
# TODO: remove when 0.3.6 get's released.
95-
warp = { git = "https://github.com/seanmonstar/warp.git", rev="149913fe" }
92+
[workspace.package]
93+
edition = "2021"
94+
95+
[workspace.dependencies]
96+
arbitrary = { version = "1", features = ["derive"] }
97+
bincode = "1"
98+
bitvec = "1"
99+
byteorder = "1"
100+
bytes = "1"
101+
clap = "2"
102+
compare_fields_derive = { path = "common/compare_fields_derive" }
103+
criterion = "0.3"
104+
delay_map = "0.3"
105+
derivative = "2"
106+
dirs = "3"
107+
discv5 = { version = "0.3", features = ["libp2p"] }
108+
env_logger = "0.9"
109+
error-chain = "0.12"
110+
ethereum-types = "0.14"
111+
ethereum_hashing = "1.0.0-beta.2"
112+
ethereum_serde_utils = "0.5"
113+
ethereum_ssz = "0.5"
114+
ethereum_ssz_derive = "0.5"
115+
ethers-core = "1"
116+
ethers-providers = { version = "1", default-features = false }
117+
exit-future = "0.2"
118+
fnv = "1"
119+
fs2 = "0.4"
120+
futures = "0.3"
121+
hex = "0.4"
122+
hyper = "0.14"
123+
itertools = "0.10"
124+
lazy_static = "1"
125+
libsecp256k1 = "0.7"
126+
log = "0.4"
127+
lru = "0.7"
128+
maplit = "1"
129+
num_cpus = "1"
130+
parking_lot = "0.12"
131+
paste = "1"
132+
quickcheck = "1"
133+
quickcheck_macros = "1"
134+
quote = "1"
135+
r2d2 = "0.8"
136+
rand = "0.8"
137+
rayon = "1.7"
138+
regex = "1"
139+
reqwest = { version = "0.11", default-features = false, features = ["blocking", "json", "stream", "rustls-tls"] }
140+
ring = "0.16"
141+
rusqlite = { version = "0.28", features = ["bundled"] }
142+
serde = { version = "1", features = ["derive"] }
143+
serde_json = "1"
144+
serde_repr = "0.1"
145+
serde_yaml = "0.8"
146+
sha2 = "0.9"
147+
slog = { version = "2", features = ["max_level_trace", "release_max_level_trace"] }
148+
slog-async = "2"
149+
slog-term = "2"
150+
sloggers = { version = "2", features = ["json"] }
151+
smallvec = "1"
152+
snap = "1"
153+
ssz_types = "0.5"
154+
strum = { version = "0.24", features = ["derive"] }
155+
superstruct = "0.6"
156+
syn = "1"
157+
sysinfo = "0.26"
158+
tempfile = "3"
159+
tokio = { version = "1", features = ["rt-multi-thread", "sync"] }
160+
tokio-stream = { version = "0.1", features = ["sync"] }
161+
tokio-util = { version = "0.6", features = ["codec", "compat", "time"] }
162+
tree_hash = "0.5"
163+
tree_hash_derive = "0.5"
164+
url = "2"
165+
uuid = { version = "0.8", features = ["serde", "v4"] }
166+
# TODO update to warp 0.3.6 after released.
167+
warp = { git = "https://github.com/seanmonstar/warp.git", default-features = false, features = ["tls"] }
168+
zeroize = { version = "1", features = ["zeroize_derive"] }
169+
zip = "0.6"
170+
171+
# Local crates.
172+
account_utils = { path = "common/account_utils" }
173+
beacon_chain = { path = "beacon_node/beacon_chain" }
174+
beacon_node = { path = "beacon_node" }
175+
beacon_processor = { path = "beacon_node/beacon_processor" }
176+
bls = { path = "crypto/bls" }
177+
cached_tree_hash = { path = "consensus/cached_tree_hash" }
178+
clap_utils = { path = "common/clap_utils" }
179+
compare_fields = { path = "common/compare_fields" }
180+
deposit_contract = { path = "common/deposit_contract" }
181+
directory = { path = "common/directory" }
182+
environment = { path = "lighthouse/environment" }
183+
eth1 = { path = "beacon_node/eth1" }
184+
eth1_test_rig = { path = "testing/eth1_test_rig" }
185+
eth2 = { path = "common/eth2" }
186+
eth2_config = { path = "common/eth2_config" }
187+
eth2_key_derivation = { path = "crypto/eth2_key_derivation" }
188+
eth2_keystore = { path = "crypto/eth2_keystore" }
189+
eth2_network_config = { path = "common/eth2_network_config" }
190+
eth2_wallet = { path = "crypto/eth2_wallet" }
191+
execution_layer = { path = "beacon_node/execution_layer" }
192+
filesystem = { path = "common/filesystem" }
193+
fork_choice = { path = "consensus/fork_choice" }
194+
genesis = { path = "beacon_node/genesis" }
195+
http_api = { path = "beacon_node/http_api" }
196+
int_to_bytes = { path = "consensus/int_to_bytes" }
197+
lighthouse_metrics = { path = "common/lighthouse_metrics" }
198+
lighthouse_network = { path = "beacon_node/lighthouse_network" }
199+
lighthouse_version = { path = "common/lighthouse_version" }
200+
lockfile = { path = "common/lockfile" }
201+
logging = { path = "common/logging" }
202+
lru_cache = { path = "common/lru_cache" }
203+
malloc_utils = { path = "common/malloc_utils" }
204+
merkle_proof = { path = "consensus/merkle_proof" }
205+
monitoring_api = { path = "common/monitoring_api" }
206+
network = { path = "beacon_node/network" }
207+
operation_pool = { path = "beacon_node/operation_pool" }
208+
pretty_reqwest_error = { path = "common/pretty_reqwest_error" }
209+
proto_array = { path = "consensus/proto_array" }
210+
safe_arith = {path = "consensus/safe_arith"}
211+
sensitive_url = { path = "common/sensitive_url" }
212+
slasher = { path = "slasher" }
213+
slashing_protection = { path = "validator_client/slashing_protection" }
214+
slot_clock = { path = "common/slot_clock" }
215+
state_processing = { path = "consensus/state_processing" }
216+
store = { path = "beacon_node/store" }
217+
swap_or_not_shuffle = { path = "consensus/swap_or_not_shuffle" }
218+
task_executor = { path = "common/task_executor" }
219+
types = { path = "consensus/types" }
220+
unused_port = { path = "common/unused_port" }
221+
validator_client = { path = "validator_client/" }
222+
validator_dir = { path = "common/validator_dir" }
223+
warp_utils = { path = "common/warp_utils" }
96224

97225
[profile.maxperf]
98226
inherits = "release"

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ arbitrary-fuzz:
207207
# Runs cargo audit (Audit Cargo.lock files for crates with security vulnerabilities reported to the RustSec Advisory Database)
208208
audit:
209209
cargo install --force cargo-audit
210-
cargo audit --ignore RUSTSEC-2023-0052
210+
cargo audit
211211

212212
# Runs `cargo vendor` to make sure dependencies can be vendored for packaging, reproducibility and archival purpose.
213213
vendor:

account_manager/Cargo.toml

+23-23
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,31 @@ authors = [
55
"Paul Hauner <[email protected]>",
66
"Luke Anderson <[email protected]>",
77
]
8-
edition = "2021"
8+
edition = { workspace = true }
99

1010
[dependencies]
11-
bls = { path = "../crypto/bls" }
12-
clap = "2.33.3"
13-
types = { path = "../consensus/types" }
14-
environment = { path = "../lighthouse/environment" }
15-
eth2_network_config = { path = "../common/eth2_network_config" }
16-
clap_utils = { path = "../common/clap_utils" }
17-
directory = { path = "../common/directory" }
18-
eth2_wallet = { path = "../crypto/eth2_wallet" }
11+
bls = { workspace = true }
12+
clap = { workspace = true }
13+
types = { workspace = true }
14+
environment = { workspace = true }
15+
eth2_network_config = { workspace = true }
16+
clap_utils = { workspace = true }
17+
directory = { workspace = true }
18+
eth2_wallet = { workspace = true }
1919
eth2_wallet_manager = { path = "../common/eth2_wallet_manager" }
20-
validator_dir = { path = "../common/validator_dir" }
21-
tokio = { version = "1.14.0", features = ["full"] }
22-
eth2_keystore = { path = "../crypto/eth2_keystore" }
23-
account_utils = { path = "../common/account_utils" }
24-
slashing_protection = { path = "../validator_client/slashing_protection" }
25-
eth2 = { path = "../common/eth2" }
26-
safe_arith = { path = "../consensus/safe_arith" }
27-
slot_clock = { path = "../common/slot_clock" }
28-
filesystem = { path = "../common/filesystem" }
29-
sensitive_url = { path = "../common/sensitive_url" }
30-
serde = { version = "1.0.116", features = ["derive"] }
31-
serde_json = "1.0.58"
32-
slog = { version = "2.5.2" }
20+
validator_dir = { workspace = true }
21+
tokio = { workspace = true }
22+
eth2_keystore = { workspace = true }
23+
account_utils = { workspace = true }
24+
slashing_protection = { workspace = true }
25+
eth2 = { workspace = true }
26+
safe_arith = { workspace = true }
27+
slot_clock = { workspace = true }
28+
filesystem = { workspace = true }
29+
sensitive_url = { workspace = true }
30+
serde = { workspace = true }
31+
serde_json = { workspace = true }
32+
slog = { workspace = true }
3333

3434
[dev-dependencies]
35-
tempfile = "3.1.0"
35+
tempfile = { workspace = true }

beacon_node/Cargo.toml

+27-30
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ authors = [
55
"Paul Hauner <[email protected]>",
66
"Age Manning <[email protected]",
77
]
8-
edition = "2021"
8+
edition = { workspace = true }
99

1010
[lib]
1111
name = "beacon_node"
@@ -20,33 +20,30 @@ write_ssz_files = [
2020
] # Writes debugging .ssz files to /tmp during block processing.
2121

2222
[dependencies]
23-
eth2_config = { path = "../common/eth2_config" }
24-
beacon_chain = { path = "beacon_chain" }
25-
types = { path = "../consensus/types" }
26-
store = { path = "./store" }
23+
eth2_config = { workspace = true }
24+
beacon_chain = { workspace = true }
25+
types = { workspace = true }
26+
store = { workspace = true }
2727
client = { path = "client" }
28-
clap = "2.33.3"
29-
slog = { version = "2.5.2", features = [
30-
"max_level_trace",
31-
"release_max_level_trace",
32-
] }
33-
dirs = "3.0.1"
34-
directory = { path = "../common/directory" }
35-
futures = "0.3.7"
36-
environment = { path = "../lighthouse/environment" }
37-
task_executor = { path = "../common/task_executor" }
38-
genesis = { path = "genesis" }
39-
eth2_network_config = { path = "../common/eth2_network_config" }
40-
execution_layer = { path = "execution_layer" }
41-
lighthouse_network = { path = "./lighthouse_network" }
42-
serde = "1.0.116"
43-
clap_utils = { path = "../common/clap_utils" }
44-
hyper = "0.14.4"
45-
lighthouse_version = { path = "../common/lighthouse_version" }
46-
hex = "0.4.2"
47-
slasher = { path = "../slasher" }
48-
monitoring_api = { path = "../common/monitoring_api" }
49-
sensitive_url = { path = "../common/sensitive_url" }
50-
http_api = { path = "http_api" }
51-
unused_port = { path = "../common/unused_port" }
52-
strum = "0.24.1"
28+
clap = { workspace = true }
29+
slog = { workspace = true }
30+
dirs = { workspace = true }
31+
directory = { workspace = true }
32+
futures = { workspace = true }
33+
environment = { workspace = true }
34+
task_executor = { workspace = true }
35+
genesis = { workspace = true }
36+
eth2_network_config = { workspace = true }
37+
execution_layer = { workspace = true }
38+
lighthouse_network = { workspace = true }
39+
serde = { workspace = true }
40+
clap_utils = { workspace = true }
41+
hyper = { workspace = true }
42+
lighthouse_version = { workspace = true }
43+
hex = { workspace = true }
44+
slasher = { workspace = true }
45+
monitoring_api = { workspace = true }
46+
sensitive_url = { workspace = true }
47+
http_api = { workspace = true }
48+
unused_port = { workspace = true }
49+
strum = { workspace = true }

beacon_node/beacon_chain/Cargo.toml

+52-53
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "beacon_chain"
33
version = "0.2.0"
44
authors = ["Paul Hauner <[email protected]>", "Age Manning <[email protected]>"]
5-
edition = "2021"
5+
edition = { workspace = true }
66
autotests = false # using a single test binary compiles faster
77

88
[features]
@@ -12,60 +12,59 @@ participation_metrics = [] # Exposes validator participation metrics to Prometh
1212
fork_from_env = [] # Initialise the harness chain spec from the FORK_NAME env variable
1313

1414
[dev-dependencies]
15-
maplit = "1.0.2"
16-
environment = { path = "../../lighthouse/environment" }
17-
serde_json = "1.0.58"
15+
maplit = { workspace = true }
16+
environment = { workspace = true }
17+
serde_json = { workspace = true }
1818

1919
[dependencies]
20-
merkle_proof = { path = "../../consensus/merkle_proof" }
21-
store = { path = "../store" }
22-
parking_lot = "0.12.0"
23-
lazy_static = "1.4.0"
24-
smallvec = "1.6.1"
25-
lighthouse_metrics = { path = "../../common/lighthouse_metrics" }
26-
operation_pool = { path = "../operation_pool" }
27-
rayon = "1.4.1"
28-
serde = "1.0.116"
29-
serde_derive = "1.0.116"
30-
ethereum_serde_utils = "0.5.0"
31-
slog = { version = "2.5.2", features = ["max_level_trace"] }
32-
sloggers = { version = "2.1.1", features = ["json"] }
33-
slot_clock = { path = "../../common/slot_clock" }
34-
ethereum_hashing = "1.0.0-beta.2"
35-
ethereum_ssz = "0.5.0"
36-
ssz_types = "0.5.3"
37-
ethereum_ssz_derive = "0.5.0"
38-
state_processing = { path = "../../consensus/state_processing" }
39-
tree_hash_derive = "0.5.0"
40-
tree_hash = "0.5.0"
41-
types = { path = "../../consensus/types" }
42-
tokio = "1.14.0"
43-
tokio-stream = "0.1.3"
44-
eth1 = { path = "../eth1" }
45-
futures = "0.3.7"
46-
genesis = { path = "../genesis" }
47-
int_to_bytes = { path = "../../consensus/int_to_bytes" }
48-
rand = "0.8.5"
49-
proto_array = { path = "../../consensus/proto_array" }
50-
lru = "0.7.1"
51-
tempfile = "3.1.0"
52-
bitvec = "0.20.4"
53-
bls = { path = "../../crypto/bls" }
54-
safe_arith = { path = "../../consensus/safe_arith" }
55-
fork_choice = { path = "../../consensus/fork_choice" }
56-
task_executor = { path = "../../common/task_executor" }
57-
derivative = "2.1.1"
58-
itertools = "0.10.0"
59-
slasher = { path = "../../slasher" }
60-
eth2 = { path = "../../common/eth2" }
61-
strum = { version = "0.24.0", features = ["derive"] }
62-
logging = { path = "../../common/logging" }
63-
execution_layer = { path = "../execution_layer" }
64-
sensitive_url = { path = "../../common/sensitive_url" }
65-
superstruct = "0.5.0"
66-
hex = "0.4.2"
67-
exit-future = "0.2.0"
68-
oneshot_broadcast = { path = "../../common/oneshot_broadcast" }
20+
merkle_proof = { workspace = true }
21+
store = { workspace = true }
22+
parking_lot = { workspace = true }
23+
lazy_static = { workspace = true }
24+
smallvec = { workspace = true }
25+
lighthouse_metrics = { workspace = true }
26+
operation_pool = { workspace = true }
27+
rayon = { workspace = true }
28+
serde = { workspace = true }
29+
ethereum_serde_utils = { workspace = true }
30+
slog = { workspace = true }
31+
sloggers = { workspace = true }
32+
slot_clock = { workspace = true }
33+
ethereum_hashing = { workspace = true }
34+
ethereum_ssz = { workspace = true }
35+
ssz_types = { workspace = true }
36+
ethereum_ssz_derive = { workspace = true }
37+
state_processing = { workspace = true }
38+
tree_hash_derive = { workspace = true }
39+
tree_hash = { workspace = true }
40+
types = { workspace = true }
41+
tokio = { workspace = true }
42+
tokio-stream = { workspace = true }
43+
eth1 = { workspace = true }
44+
futures = { workspace = true }
45+
genesis = { workspace = true }
46+
int_to_bytes = { workspace = true }
47+
rand = { workspace = true }
48+
proto_array = { workspace = true }
49+
lru = { workspace = true }
50+
tempfile = { workspace = true }
51+
bitvec = { workspace = true }
52+
bls = { workspace = true }
53+
safe_arith = { workspace = true }
54+
fork_choice = { workspace = true }
55+
task_executor = { workspace = true }
56+
derivative = { workspace = true }
57+
itertools = { workspace = true }
58+
slasher = { workspace = true }
59+
eth2 = { workspace = true }
60+
strum = { workspace = true }
61+
logging = { workspace = true }
62+
execution_layer = { workspace = true }
63+
sensitive_url = { workspace = true }
64+
superstruct = { workspace = true }
65+
hex = { workspace = true }
66+
exit-future = { workspace = true }
67+
oneshot_broadcast = { path = "../../common/oneshot_broadcast/" }
6968

7069
[[test]]
7170
name = "beacon_chain_tests"

0 commit comments

Comments
 (0)