-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCargo.toml
More file actions
395 lines (355 loc) · 9.84 KB
/
Copy pathCargo.toml
File metadata and controls
395 lines (355 loc) · 9.84 KB
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
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
[workspace]
members = [
"zakurad",
"zakura-chain",
"zakura-network",
"zakura-state",
"zakura-script",
"zakura-consensus",
"zakura-rpc",
"zakura-node-services",
"zakura-test",
"zakura-utils",
"tower-batch-control",
"tower-fallback",
"deploy/zakura-watchdog",
"xtask",
"zakura-jsonl-trace",
]
# Use the edition 2021 dependency resolver in the workspace, to match the crates
resolver = "2"
[workspace.package]
authors = ["Zakura contributors"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/zakura-core/zakura"
homepage = "https://github.com/zakura-core/zakura"
keywords = ["zakura", "zcash"]
rust-version = "1.91"
edition = "2021"
# `cargo release` settings
[workspace.dependencies]
incrementalmerkletree = { version = "0.8.2", features = ["legacy-api"] }
orchard = "0.15.0"
sapling-crypto = "0.7"
zcash_address = "0.13.0"
zcash_encoding = "0.4"
zcash_history = "0.5.0"
zcash_keys = "0.15.0"
zcash_primitives = "0.29.0"
zcash_proofs = "0.29.0"
zcash_transparent = "0.9.0"
zcash_protocol = "0.10.0"
zip32 = "0.2"
abscissa_core = "0.7"
base64 = "0.22.1"
bech32 = "0.11.0"
bellman = "0.14"
bincode = "1.3"
bitflags = "2.9"
bitflags-serde-legacy = "0.1.1"
bitvec = "1.0"
blake2b_simd = "1.0"
blake2s_simd = "1.0"
bls12_381 = "0.8"
bs58 = "0.5"
byteorder = "1.5"
bytes = "1.10"
chrono = { version = "0.4.40", default-features = false }
clap = "4.5"
color-eyre = { version = "0.6.3", default-features = false }
console-subscriber = "0.5"
criterion = "0.5"
crossbeam-channel = "0.5.14"
derive-getters = "0.5"
derive-new = "0.5"
dirs = "6.0"
ed25519-zebra = "4.2"
elasticsearch = { version = "8.17.0-alpha.1", default-features = false }
equihash = "0.3"
ff = "0.13"
futures = "0.3.31"
futures-core = "0.3.31"
futures-util = "0.3.31"
group = "0.13"
halo2 = "0.3"
hex = "0.4.3"
hex-literal = "0.4"
howudoin = "0.1"
http-body = "1.0.1"
http-body-util = "0.1.3"
human_bytes = { version = "0.4", default-features = false }
humantime = "2.2"
humantime-serde = "1.1"
hyper = "1.6"
hyper-util = "0.1.11"
iroh = { version = "=0.92.0", default-features = false }
indexmap = "2.8"
indicatif = "0.17"
inferno = { version = "0.12", default-features = false }
insta = "1.42"
itertools = "0.14"
jsonrpc = "0.18"
jsonrpsee = "0.24.8"
jsonrpsee-proc-macros = "0.24.9"
jsonrpsee-types = "0.24.9"
jubjub = "0.10"
lazy_static = "1.4"
libzcash_script = "0.1"
log = "0.4.27"
metrics = "0.24"
metrics-exporter-prometheus = { version = "0.16", default-features = false }
mset = "0.1"
nix = "0.31"
num-integer = "0.1.46"
once_cell = "1.21"
openrpsee = "0.1.0"
ordered-map = "0.4.2"
owo-colors = "4.2.0"
phf = "0.12"
pin-project = "1.1.10"
primitive-types = "0.12"
proptest = "1.6"
proptest-derive = "0.5"
prost = "0.14"
quote = "1.0.40"
rand = "0.8.5"
rand_chacha = "0.3"
rand_core = "0.6"
rayon = "1.10"
reddsa = "0.5"
redjubjub = "0.8"
regex = "1.11"
reqwest = { version = "0.12", default-features = false }
ripemd = "0.1"
rlimit = "0.10"
rocksdb = { version = "0.22", default-features = false }
secp256k1 = "0.29"
semver = "1.0.26"
sentry = { version = "0.47", default-features = false }
serde = "1.0.219"
serde-big-array = "0.5"
serde_json = "1.0.140"
serde_with = "3.12"
serde_yml = "0.0"
sha2 = "0.10"
schemars = "1"
spandoc = "0.2"
static_assertions = "1.1"
structopt = "0.3"
anyhow = "1.0"
strum = "0.27"
strum_macros = "0.27"
syn = "2.0.100"
subtle = { version = "2.6", default-features = false }
tempfile = "3.20"
thiserror = "2.0"
thread-priority = "1.2"
tinyvec = "1.9"
tokio = "1.44"
tokio-stream = "0.1.17"
tokio-test = "0.4"
tokio-util = "0.7.14"
toml = "1.0"
tonic = "0.14"
tonic-prost = "0.14"
tonic-prost-build = "0.14"
tonic-reflection = "0.14"
tower = "0.4.13"
tower-test = "0.4"
tracing = "0.1.41"
tracing-appender = "0.2"
tracing-error = "0.2"
tracing-flame = "0.2"
tracing-futures = "0.2.5"
tracing-journald = "0.3"
tracing-subscriber = "0.3.19"
tracing-test = "0.2.4"
tracing-opentelemetry = "0.32"
opentelemetry = "0.31"
opentelemetry_sdk = "0.31"
opentelemetry-otlp = "0.31"
uint = "0.10"
vergen-git2 = { version = "9", default-features = false }
x25519-dalek = "2.0.1"
zcash_note_encryption = "0.4.1"
zcash_script = "0.4.5"
config = { version = "0.15.14", features = ["toml"] }
which = "8.0.0"
[workspace.metadata.release]
# We always do releases from the main branch
allow-branch = ["main"]
# Compilation settings
[profile.dev]
# panic = "unwind" (NOT "abort") is REQUIRED for Zakura peer-pipe panic
# containment: a panicking peer task must be caught and disconnect only that
# peer, never abort the whole node (a trivial remote DoS otherwise). Because we
# now unwind, every shared/consensus-state critical section must stay panic-free
# (no `.await`/`.expect()`/`.unwrap()`/indexing under a lock) — a panic mid-
# mutation would unwind through it instead of aborting. zakura-network enforces
# unwind with a `#[cfg(panic = "abort")] compile_error!`. See
# security_requirements.md SR-1 and SR-2.
panic = "unwind"
# Speed up tests by optimizing performance-critical crates. The parameters
# values are the ones from the `release` profile
# (https://doc.rust-lang.org/cargo/reference/profiles.html#release)
# Cryptographic crates
[profile.dev.package.blake2b_simd]
opt-level = 3
debug-assertions = false
overflow-checks = false
incremental = false
codegen-units = 16
[profile.dev.package.ff]
opt-level = 3
debug-assertions = false
overflow-checks = false
incremental = false
codegen-units = 16
[profile.dev.package.group]
opt-level = 3
debug-assertions = false
overflow-checks = false
incremental = false
codegen-units = 16
[profile.dev.package.pasta_curves]
opt-level = 3
debug-assertions = false
overflow-checks = false
incremental = false
codegen-units = 16
[profile.dev.package.halo2_proofs]
opt-level = 3
debug-assertions = false
overflow-checks = false
incremental = false
codegen-units = 16
[profile.dev.package.halo2_gadgets]
opt-level = 3
debug-assertions = false
overflow-checks = false
incremental = false
codegen-units = 16
[profile.dev.package.bls12_381]
opt-level = 3
debug-assertions = false
overflow-checks = false
incremental = false
codegen-units = 16
[profile.dev.package.byteorder]
opt-level = 3
debug-assertions = false
overflow-checks = false
incremental = false
codegen-units = 16
[profile.dev.package.equihash]
opt-level = 3
debug-assertions = false
overflow-checks = false
incremental = false
codegen-units = 16
[profile.dev.package.zcash_proofs]
opt-level = 3
debug-assertions = false
overflow-checks = false
incremental = false
codegen-units = 16
[profile.dev.package.ring]
opt-level = 3
debug-assertions = false
overflow-checks = false
incremental = false
codegen-units = 16
[profile.dev.package.spin]
opt-level = 3
debug-assertions = false
overflow-checks = false
incremental = false
codegen-units = 16
[profile.dev.package.untrusted]
opt-level = 3
debug-assertions = false
overflow-checks = false
incremental = false
codegen-units = 16
[profile.dev.package.bitvec]
opt-level = 3
debug-assertions = false
overflow-checks = false
incremental = false
codegen-units = 16
# The advisory
# https://github.com/ZcashFoundation/zebra/security/advisories/GHSA-gq4h-3grw-2rhv
# only reproduces reliably when the bundled libzcash_script C++ code is compiled
# in release mode since it relies on a buffer to not be zeroed out (arrays in
# C++ are usually zeroed out when allocated in debug mode). To reliably test
# against that issue, and to also better simulate real-world usage of
# libzcash_script, we enable optimizations for it in dev builds.
[profile.dev.package.libzcash_script]
opt-level = 3
debug-assertions = false
overflow-checks = false
incremental = false
codegen-units = 16
[profile.release]
# See [profile.dev]: panic = "unwind" is required for peer-pipe panic containment
# (security_requirements.md SR-1); do not set "abort". Enforced by a
# compile_error guard in zakura-network.
panic = "unwind"
# Speed up release builds and sync tests using link-time optimization.
# Some of Zakura's code is CPU-intensive, and needs extra optimizations for peak performance.
#
# TODO:
# - add "-Clinker-plugin-lto" in .cargo/config.toml to speed up release builds
# - add "-Clinker=clang -Clink-arg=-fuse-ld=lld" in .cargo/config.toml
# - also use LTO on C/C++ code:
# - use clang to compile all C/C++ code
# - add "-flto=thin" to all C/C++ code builds
# - see https://doc.rust-lang.org/rustc/linker-plugin-lto.html#cc-code-as-a-dependency-in-rust
lto = "thin"
# Enable line numbers in stack traces. Note that we re-disable it for dependencies below.
debug = "line-tables-only"
[profile.release.package."*"]
# Disable debug info for dependencies to reduce binary size.
debug = false
[workspace.lints.rust]
# The linter should ignore these expected config flags/values
unexpected_cfgs = { level = "warn", check-cfg = [
'cfg(tokio_unstable)', # Used by tokio-console
'cfg(zcash_unstable, values("zfuture", "nu6.1", "nu7"))', # Used in Zakura and librustzcash
] }
# High-risk code
unsafe_code = "deny"
non_ascii_idents = "deny"
# Compatibility
rust_2021_compatibility = { level = "warn", priority = -1 }
nonstandard_style = { level = "warn", priority = -1 }
future_incompatible = { level = "warn", priority = -1 }
# Documentation
missing_docs = "warn"
[workspace.lints.clippy]
# Async code
await_holding_lock = "warn"
await_holding_refcell_ref = "warn"
# Pointers
cast_ptr_alignment = "warn"
fn_to_numeric_cast_any = "warn"
# Integers
checked_conversions = "warn"
implicit_saturating_sub = "warn"
invalid_upcast_comparisons = "warn"
range_minus_one = "warn"
range_plus_one = "warn"
unnecessary_cast = "warn"
# Incomplete code
dbg_macro = "warn"
todo = "warn"
# Manual debugging output — use tracing::trace!() or tracing::debug!() instead
print_stdout = "warn"
print_stderr = "warn"
# Code styles we want to accept
try_err = "allow"
# Panics
fallible_impl_from = "warn"
unwrap_in_result = "warn"
# TODOs: fix this lint eventually
result_large_err = "allow"