forked from EspressoSystems/HotShot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCargo.toml
287 lines (262 loc) · 8.81 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
[package]
authors = ["Espresso Systems <[email protected]>"]
description = "HotShot consesus module"
edition = "2021"
name = "hotshot"
readme = "README.md"
version = "0.3.3"
rust-version = "1.65.0"
[workspace.package]
version = "0.3.3" # same as `hotshot`, but workspace subcrate can also release its own version
authors = ["Espresso Systems <[email protected]>"]
edition = "2021"
rust-version = "1.65.0"
homepage = "https://github.com/EspressoSystems/HotShot"
documentation = "https://hotshot.docs.espressosys.com"
repository = "https://github.com/EspressoSystems/HotShot"
[features]
default = ["demo", "docs", "doc-images"]
# Enable demo/testing logic
demo = ["dep:blake3", "hotshot-types/demo", "libp2p/rsa", "dep:derivative"]
# Features required for binaries
bin-orchestrator = ["toml", "clap"]
# Build the extended documentation
docs = []
doc-images = []
full-ci = [
"async-std-executor",
"demo",
"docs",
"doc-images",
"hotshot-testing",
"channel-async-std",
]
tokio-ci = [
"tokio-executor",
"demo",
"docs",
"doc-images",
"hotshot-testing",
"channel-tokio",
]
profiling = ["async-compatibility-layer/profiling"]
hotshot-testing = []
async-std-executor = [
"dep:async-std",
"hotshot-consensus/async-std-executor",
"hotshot-types/async-std-executor",
"hotshot-task/async-std-executor",
"hotshot-task-impls/async-std-executor",
"async-compatibility-layer/async-std-executor",
"libp2p-networking/async-std-executor",
]
tokio-executor = [
"dep:tokio",
"hotshot-consensus/tokio-executor",
"hotshot-types/tokio-executor",
"hotshot-task/tokio-executor",
"hotshot-task-impls/tokio-executor",
"async-compatibility-layer/tokio-executor",
"libp2p-networking/tokio-executor",
]
channel-flume = [
"hotshot-web-server/channel-flume",
"hotshot-consensus/channel-flume",
"hotshot-types/channel-flume",
"hotshot-task/channel-flume",
"hotshot-task-impls/channel-flume",
"async-compatibility-layer/channel-flume",
]
channel-tokio = [
"hotshot-web-server/channel-tokio",
"hotshot-consensus/channel-tokio",
"hotshot-types/channel-tokio",
"hotshot-task/channel-tokio",
"hotshot-task-impls/channel-tokio",
"async-compatibility-layer/channel-tokio",
]
channel-async-std = [
"hotshot-web-server/channel-async-std",
"hotshot-consensus/channel-async-std",
"hotshot-types/channel-async-std",
"hotshot-task/channel-async-std",
"hotshot-task-impls/channel-async-std",
"async-compatibility-layer/channel-async-std",
]
# [[example]]
# name = "libp2p-validator"
# required-features = ["demo", "libp2p/rsa"]
# path = "examples/libp2p/validator.rs"
#
# [[example]]
# name = "libp2p-orchestrator"
# required-features = ["demo", "libp2p/rsa"]
# path = "examples/libp2p/orchestrator.rs"
#
# [[example]]
# name = "web-server-orchestrator"
# required-features = ["demo", "libp2p/rsa"]
# path = "examples/web-server/orchestrator.rs"
#
# [[example]]
# name = "web-server-validator"
# required-features = ["demo", "libp2p/rsa"]
# path = "examples/web-server/validator.rs"
[[example]]
name = "web-server"
required-features = ["demo", "libp2p/rsa"]
path = "examples/web-server-da/web-server.rs"
[[example]]
name = "web-server-da-orchestrator"
required-features = ["demo", "libp2p/rsa"]
path = "examples/web-server-da/orchestrator.rs"
[[example]]
name = "web-server-da-validator"
required-features = ["demo", "libp2p/rsa"]
path = "examples/web-server-da/validator.rs"
[[example]]
name = "multi-validator"
required-features = ["demo", "libp2p/rsa"]
path = "examples/web-server-da/multi-validator.rs"
[[example]]
name = "multi-web-server"
required-features = ["demo", "libp2p/rsa"]
path = "examples/web-server-da/multi-web-server.rs"
[dependencies]
ark-ec = { version = "0.3.0" }
ark-bls12-381 = { version = "0.3.0" }
# TODO ED We should upgrade other ark libraries accordingly with the one below
ark-ed-on-bls12-381 = "0.4.0"
ark-serialize = { version = "0.3.0", features = ["derive"] }
ark-std = { version = "0.4.0" }
async-compatibility-layer = { git = "https://github.com/EspressoSystems/async-compatibility-layer.git", tag = "1.3.0", default-features = false, features = [ "logging-utils" ] }
async-lock = "2.8"
async-std = { version = "1.12", optional = true }
async-trait = "0.1.73"
bimap = "0.6.3"
bincode = "1.3.3"
blake3 = { version = "1.4.1", optional = true, features = ["traits-preview"] }
clap = { version = "4.3", features = ["derive", "env"], optional = true }
commit = { git = "https://github.com/EspressoSystems/commit", tag = "0.2.2" }
custom_debug = "0.5"
dashmap = "5.5.0"
derivative = { version = "2.2.0", optional = true }
digest = "0.10.7"
either = { version = "1.8.1", features = [ "serde" ] }
embed-doc-image = "0.1.4"
espresso-systems-common = { git = "https://github.com/espressosystems/espresso-systems-common", tag = "0.4.1" }
futures = "0.3.28"
hotshot-web-server = { version = "0.1.1", path = "web_server", default-features = false }
hotshot-consensus = { path = "./consensus", version = "0.1.0", default-features = false }
hotshot-orchestrator = { version = "0.1.1", path = "orchestrator", default-features = false }
hotshot-types = { path = "./types", version = "0.1.0", default-features = false }
hotshot-utils = { path = "./utils" }
hotshot-task = { path = "./task", version = "0.1.0", default-features = false }
hotshot-task-impls = { path = "./task-impls", version = "0.1.0", default-features = false }
itertools = "0.11"
hotshot-primitives = { git = "https://github.com/EspressoSystems/hotshot-primitives", branch = 'hotshot-compat'} # rev = "4aee90c" for 'hotshot-compat'
jf-primitives = { git = "https://github.com/EspressoSystems/jellyfish", branch = 'hotshot-compat'} # rev = "470a833" for branch = 'hotshot-compat'
libp2p-swarm-derive = { version = "=0.33.0" }
libp2p-networking = { path = "./libp2p-networking", version = "0.1.0", default-features = false }
libp2p-identity = "0.2.0"
libp2p = { version = "0.52.2", default-features = false, features = [
"macros",
"autonat",
"deflate",
"floodsub",
"identify",
"kad",
"gossipsub",
"noise",
"ping",
"plaintext",
"pnet",
"relay",
"request-response",
"rendezvous",
"secp256k1",
"serde",
"uds",
"wasm-ext",
"websocket",
"yamux",
] }
nll = { git = "https://github.com/EspressoSystems/nll.git" }
num = "0.4.1"
rand = "0.8.5"
rand_chacha = "0.3.1"
serde = { version = "1.0.183", features = ["derive", "rc"] }
snafu = "0.7.5"
surf-disco = { git = "https://github.com/EspressoSystems/surf-disco.git", branch = "main" }
time = "0.3.23"
toml = { version = "0.7.6", optional = true }
tokio = { version = "1", optional = true, features = [
"fs",
"io-util",
"io-std",
"macros",
"net",
"parking_lot",
"process",
"rt",
"rt-multi-thread",
"signal",
"sync",
"time",
"tracing",
] }
tracing = "0.1.37"
[dev-dependencies]
async-std = { version = "1.12.0", features = ["attributes"] }
clap = { version = "4.3", features = ["derive", "env"] }
serde_json = "1.0.105"
sha2 = { version = "0.10.7" }
toml = "0.7.6"
### Profiles
###
### Note: these only apply to example executables or tests built from within this crate. They have
### no effect on crates that depend on this crate.
## Apply some optimizations to test dependencies in debug/test builds
# Generally optimize dependencies a little
[profile.dev.package."*"]
opt-level = 1
[package.metadata.docs.rs]
# docs.rs uses a nightly compiler, so by instructing it to use our `doc-images` feature we
# ensure that it will render any images that we may have in inner attribute documentation.
features = ["doc-images"]
# The default release profile without LTO.
[profile.release]
debug = 1
# Disable LTO to decrease the linking time.
lto = "off"
incremental = true
# The release profile with LTO.
# CI uses this profile. To run it locally, add `--profile=release-lto` to `cargo build` or `cargo
# test`.
[profile.release-lto]
inherits = "release"
# Enable "thin" LTO to optimize performance.
lto = "thin"
## LTO doesn't work with careful
## explicitly specifying features in case releases features change
[profile.careful]
debug = 1
inherits = "release"
lto = "off"
incremental = true
### Workspace
# The hotshot-types crate needs to be a seperate crate, as to not create a circular dependency
# when implementing traits externally
[workspace]
members = [
"consensus",
"libp2p-networking",
"testing",
"types",
"utils",
# "testing-macros",
"task",
"task-impls",
"crates/hotshot-qc",
"crates/hotshot-stake-table"
]