-
Notifications
You must be signed in to change notification settings - Fork 107
/
Cargo.toml
208 lines (163 loc) · 6.91 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
[package]
# Crate metadata
name = "zebrad"
authors = ["Zcash Foundation <[email protected]>"]
license = "MIT OR Apache-2.0"
version = "1.0.0-rc.6"
repository = "https://github.com/ZcashFoundation/zebra"
# Settings that impact compilation
edition = "2021"
# Zebra is only supported on the latest stable Rust version. Some earlier versions might work.
# Zebra's code uses features introduced in Rust 1.68, or any later stable release.
rust-version = "1.68"
# Settings that impact runtime behaviour
# make `cargo run` use `zebrad` by default
# when run in the workspace directory
default-run = "zebrad"
[features]
# In release builds, don't compile debug logging code, to improve performance.
default = ["release_max_level_info"]
# Production features that activate extra dependencies, or extra features in dependencies
# Experimental mining RPC support
getblocktemplate-rpcs = [
"zebra-rpc/getblocktemplate-rpcs",
"zebra-consensus/getblocktemplate-rpcs",
"zebra-state/getblocktemplate-rpcs",
"zebra-node-services/getblocktemplate-rpcs",
"zebra-chain/getblocktemplate-rpcs",
]
elasticsearch = [
"zebra-state/elasticsearch",
]
sentry = ["dep:sentry"]
flamegraph = ["tracing-flame", "inferno"]
journald = ["tracing-journald"]
filter-reload = ["hyper"]
prometheus = ["metrics-exporter-prometheus"]
# Production features that modify dependency behaviour
# Enable additional error debugging in release builds
error-debug = ["color-eyre/track-caller", "color-eyre/capture-spantrace"]
# Remove verbose logging at compile-time in release or all builds.
#
# Release builds are defined as "cfg(not(debug_assertions))".
# https://docs.rs/tracing/latest/tracing/level_filters/index.html#compile-time-filters
release_max_level_warn = ["tracing/release_max_level_warn", "log/release_max_level_warn"]
release_max_level_info = ["tracing/release_max_level_info", "log/release_max_level_info"]
release_max_level_debug = ["tracing/release_max_level_debug", "log/release_max_level_debug"]
max_level_warn = ["tracing/max_level_warn", "log/max_level_warn"]
max_level_info = ["tracing/max_level_info", "log/max_level_info"]
max_level_debug = ["tracing/max_level_debug", "log/max_level_debug"]
# Testing features that activate extra dependencies
proptest-impl = [
"proptest",
"proptest-derive",
"zebra-consensus/proptest-impl",
"zebra-state/proptest-impl",
"zebra-network/proptest-impl",
"zebra-chain/proptest-impl",
]
# The gRPC tests also need an installed lightwalletd binary
lightwalletd-grpc-tests = ["tonic-build"]
# tokio-console support
#
# To activate this feature, run:
# ```sh
# RUSTFLAGS="--cfg tokio_unstable" cargo build --no-default-features --features="tokio-console" --bin zebrad
# ```
#
# The console-subscriber is incompatible with the tracing/max_level_* features.
#
# For more details, see:
# https://github.com/tokio-rs/console/blob/main/console-subscriber/README.md#enabling-tokio-instrumentation
tokio-console = ["console-subscriber"]
# TODO: replace with environmental variables that skip the tests when not set (part of #2995)
test_sync_to_mandatory_checkpoint_mainnet = []
test_sync_to_mandatory_checkpoint_testnet = []
test_sync_past_mandatory_checkpoint_mainnet = []
test_sync_past_mandatory_checkpoint_testnet = []
[dependencies]
zebra-chain = { path = "../zebra-chain" }
zebra-consensus = { path = "../zebra-consensus" }
zebra-network = { path = "../zebra-network" }
zebra-node-services = { path = "../zebra-node-services" }
zebra-rpc = { path = "../zebra-rpc" }
zebra-state = { path = "../zebra-state" }
abscissa_core = "0.5"
gumdrop = { version = "0.7", features = ["default_expr"]}
chrono = { version = "0.4.24", default-features = false, features = ["clock", "std"] }
humantime-serde = "1.1.1"
indexmap = "1.9.3"
lazy_static = "1.4.0"
serde = { version = "1.0.159", features = ["serde_derive"] }
toml = "0.7.3"
futures = "0.3.27"
rayon = "1.7.0"
tokio = { version = "1.27.0", features = ["time", "rt-multi-thread", "macros", "tracing", "signal"] }
tower = { version = "0.4.13", features = ["hedge", "limit"] }
pin-project = "1.0.12"
color-eyre = { version = "0.6.2", default_features = false, features = ["issue-url"] }
# This is a transitive dependency via color-eyre.
# Enable a feature that makes tinyvec compile much faster.
tinyvec = { version = "1.6.0", features = ["rustc_1_55"] }
thiserror = "1.0.40"
tracing-subscriber = { version = "0.3.16", features = ["env-filter"] }
tracing-appender = "0.2.2"
tracing-error = "0.2.0"
tracing-futures = "0.2.5"
tracing = "0.1.37"
metrics = "0.20.1"
dirs = "5.0.0"
atty = "0.2.14"
num-integer = "0.1.45"
rand = { version = "0.8.5", package = "rand" }
# prod feature sentry
sentry = { version = "0.30.0", default-features = false, features = ["backtrace", "contexts", "reqwest", "rustls", "tracing"], optional = true }
# prod feature flamegraph
tracing-flame = { version = "0.2.0", optional = true }
inferno = { version = "0.11.15", default-features = false, optional = true }
# prod feature journald
tracing-journald = { version = "0.3.0", optional = true }
# prod feature filter-reload
hyper = { version = "0.14.25", features = ["http1", "http2", "server"], optional = true }
# prod feature prometheus
metrics-exporter-prometheus = { version = "0.11.0", default-features = false, features = ["http-listener"], optional = true }
# prod feature release_max_level_info
#
# zebrad uses tracing for logging,
# we only use `log` to set and print the static log levels in transitive dependencies
log = "0.4.17"
# test feature proptest-impl
proptest = { version = "1.1.0", optional = true }
proptest-derive = { version = "0.3.0", optional = true }
# test feature tokio-console
console-subscriber = { version = "0.1.8", optional = true }
[build-dependencies]
vergen = { version = "7.5.1", default-features = false, features = ["cargo", "git"] }
# test feature lightwalletd-grpc-tests
tonic-build = { version = "0.8.0", optional = true }
[dev-dependencies]
abscissa_core = { version = "0.5", features = ["testing"] }
hex = "0.4.3"
jsonrpc-core = "18.0.0"
once_cell = "1.17.1"
regex = "1.7.3"
semver = "1.0.17"
# zebra-rpc needs the preserve_order feature, it also makes test results more stable
serde_json = { version = "1.0.95", features = ["preserve_order"] }
tempfile = "3.5.0"
hyper = { version = "0.14.25", features = ["http1", "http2", "server"]}
reqwest = "0.11.16"
tokio = { version = "1.27.0", features = ["full", "tracing", "test-util"] }
tokio-stream = "0.1.12"
# test feature lightwalletd-grpc-tests
prost = "0.11.8"
tonic = "0.8.0"
proptest = "1.1.0"
proptest-derive = "0.3.0"
# enable span traces and track caller in tests
color-eyre = { version = "0.6.2", features = ["issue-url"] }
zebra-chain = { path = "../zebra-chain", features = ["proptest-impl"] }
zebra-consensus = { path = "../zebra-consensus", features = ["proptest-impl"] }
zebra-network = { path = "../zebra-network", features = ["proptest-impl"] }
zebra-state = { path = "../zebra-state", features = ["proptest-impl"] }
zebra-test = { path = "../zebra-test" }