Skip to content

Commit c5de5a5

Browse files
authored
refactor: create separate binary crates and move TrinConfig to trin crate (#1614)
1 parent 1a684e9 commit c5de5a5

38 files changed

+409
-1695
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 17 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,6 @@
1-
[package]
2-
name = "trin"
3-
default-run = "trin"
4-
description = "A Rust implementation of the Ethereum Portal Network"
5-
authors.workspace = true
6-
categories.workspace = true
7-
edition.workspace = true
8-
keywords.workspace = true
9-
license.workspace = true
10-
readme.workspace = true
11-
repository.workspace = true
12-
rust-version.workspace = true
13-
version.workspace = true
14-
15-
[dependencies]
16-
alloy = { workspace = true, features = ["eips", "provider-ipc", "provider-ws", "pubsub", "reqwest", "rpc-types"] }
17-
anyhow.workspace = true
18-
clap.workspace = true
19-
dirs = "5.0.1"
20-
discv5.workspace = true
21-
e2store.workspace = true
22-
ethereum_ssz.workspace = true
23-
ethportal-api.workspace = true
24-
futures.workspace = true
25-
jsonrpsee.workspace = true
26-
lazy_static.workspace = true
27-
parking_lot.workspace = true
28-
portal-bridge.workspace = true
29-
portalnet.workspace = true
30-
prometheus_exporter.workspace = true
31-
rand.workspace = true
32-
regex = "1.10.2"
33-
reqwest.workspace = true
34-
reth-ipc.workspace = true
35-
rpc.workspace = true
36-
serde_json = { workspace = true, features = ["preserve_order"]}
37-
sha3.workspace = true
38-
tempfile.workspace = true
39-
tokio.workspace = true
40-
tracing.workspace = true
41-
tracing-subscriber.workspace = true
42-
tree_hash.workspace = true
43-
trin-beacon.workspace = true
44-
trin-history.workspace = true
45-
trin-state.workspace = true
46-
trin-storage.workspace = true
47-
trin-utils.workspace = true
48-
trin-validation.workspace = true
49-
url.workspace = true
50-
utp-rs.workspace = true
51-
52-
[dev-dependencies]
53-
ethportal-peertest = { path = "ethportal-peertest" }
54-
serde_yaml.workspace = true
55-
serial_test.workspace = true
56-
ureq.workspace = true
57-
581
[workspace]
592
members = [
3+
"bin/trin",
604
"ethportal-api",
615
"ethportal-peertest",
626
"e2store",
@@ -75,6 +19,9 @@ members = [
7519
"utp-testing",
7620
]
7721

22+
default-members = ["bin/trin"]
23+
resolver = "2"
24+
7825
[workspace.package]
7926
authors = ["https://github.com/ethereum/trin/graphs/contributors"]
8027
categories = ["cryptography::cryptocurrencies"]
@@ -97,12 +44,10 @@ clap = { version = "4.2.1", features = ["derive"] }
9744
delay_map = "0.4.0"
9845
directories = "3.0"
9946
discv5 = { version = "0.4.1", features = ["serde"] }
100-
e2store = { path = "e2store" }
10147
env_logger = "0.9.0"
10248
eth_trie = "0.5.0"
10349
ethereum_ssz = "0.7.1"
10450
ethereum_ssz_derive = "0.7.1"
105-
ethportal-api = { path = "ethportal-api" }
10651
futures = "0.3.23"
10752
futures-util = "0.3.23"
10853
hex = "0.4.3"
@@ -111,10 +56,7 @@ itertools = "0.13.0"
11156
jsonrpsee = "0.24.4"
11257
keccak-hash = "0.10.0"
11358
lazy_static = "1.4.0"
114-
light-client = { path = "light-client" }
11559
parking_lot = "0.11.2"
116-
portal-bridge = { path = "portal-bridge" }
117-
portalnet = { path = "portalnet" }
11860
prometheus_exporter = "0.8.4"
11961
quickcheck = "1.0.3"
12062
r2d2 = "0.8.9"
@@ -124,7 +66,6 @@ reqwest = { version = "0.12.7", features = ["native-tls-vendored", "json"] }
12466
reth-ipc = { tag = "v1.0.8", git = "https://github.com/paradigmxyz/reth.git"}
12567
revm = { version = "14.0.3", default-features = false, features = ["std", "secp256k1", "serde-json", "c-kzg"] }
12668
revm-primitives = { version = "10.0.0", default-features = false, features = ["std", "serde"] }
127-
rpc = { path = "rpc"}
12869
rstest = "0.18.2"
12970
rusqlite = { version = "0.31.0", features = ["bundled"] }
13071
scraper = "0.18.1"
@@ -147,6 +88,19 @@ tracing-subscriber = "0.3.15"
14788
tracing-test = "0.1"
14889
tree_hash = "0.8.0"
14990
tree_hash_derive = "0.8.0"
91+
uds_windows = "1.0.1"
92+
ureq = { version = "2.5.0", features = ["json"] }
93+
url = "2.3.1"
94+
utp-rs = { tag = "v0.1.0-alpha.14", git = "https://github.com/ethereum/utp" }
95+
96+
# Trin workspace crates
97+
e2store = { path = "e2store" }
98+
ethportal-api = { path = "ethportal-api" }
99+
light-client = { path = "light-client" }
100+
portal-bridge = { path = "portal-bridge" }
101+
portalnet = { path = "portalnet" }
102+
rpc = { path = "rpc"}
103+
trin = { path = "bin/trin"}
150104
trin-beacon = { path = "trin-beacon" }
151105
trin-evm = { path = "trin-evm" }
152106
trin-execution = { path = "trin-execution" }
@@ -156,7 +110,3 @@ trin-state = { path = "trin-state" }
156110
trin-storage = { path = "trin-storage" }
157111
trin-utils = { path = "trin-utils" }
158112
trin-validation = { path = "trin-validation" }
159-
uds_windows = "1.0.1"
160-
ureq = { version = "2.5.0", features = ["json"] }
161-
url = "2.3.1"
162-
utp-rs = { tag = "v0.1.0-alpha.14", git = "https://github.com/ethereum/utp" }

bin/trin/Cargo.toml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
[package]
2+
name = "trin"
3+
description = "A Rust implementation of the Ethereum Portal Network"
4+
authors.workspace = true
5+
categories.workspace = true
6+
edition.workspace = true
7+
keywords.workspace = true
8+
license.workspace = true
9+
readme.workspace = true
10+
repository.workspace = true
11+
rust-version.workspace = true
12+
version.workspace = true
13+
14+
[dependencies]
15+
alloy = { workspace = true, features = ["eips", "provider-ipc", "provider-ws", "pubsub", "reqwest", "rpc-types"] }
16+
anyhow.workspace = true
17+
clap.workspace = true
18+
discv5.workspace = true
19+
ethportal-api.workspace = true
20+
portalnet.workspace = true
21+
prometheus_exporter.workspace = true
22+
rpc.workspace = true
23+
tokio.workspace = true
24+
tracing.workspace = true
25+
tree_hash.workspace = true
26+
trin-beacon.workspace = true
27+
trin-history.workspace = true
28+
trin-state.workspace = true
29+
trin-storage.workspace = true
30+
trin-utils.workspace = true
31+
trin-validation.workspace = true
32+
utp-rs.workspace = true
33+
url.workspace = true
34+
35+
[dev-dependencies]
36+
test-log.workspace = true
37+
rstest.workspace = true

0 commit comments

Comments
 (0)