forked from paritytech/polkadot-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
323 lines (310 loc) · 12.1 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
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
[workspace.package]
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"
repository = "https://github.com/paritytech/polkadot-sdk.git"
license = "GPL-3.0-only"
[workspace]
resolver = "2"
members = [
"patches/ahash",
"substrate/bin/minimal/node",
"substrate/bin/minimal/runtime",
"substrate/bin/node-template/node",
"substrate/bin/node-template/pallets/template",
"substrate/bin/node-template/runtime",
"substrate/bin/node/bench",
"substrate/bin/node/cli",
"substrate/bin/node/inspect",
"substrate/bin/node/primitives",
"substrate/bin/node/rpc",
"substrate/bin/node/runtime",
"substrate/bin/node/testing",
"substrate/bin/utils/chain-spec-builder",
"substrate/bin/utils/subkey",
"substrate/client/allocator",
"substrate/client/api",
"substrate/client/authority-discovery",
"substrate/client/basic-authorship",
"substrate/client/block-builder",
"substrate/client/chain-spec",
"substrate/client/chain-spec/derive",
"substrate/client/cli",
"substrate/client/consensus/aura",
"substrate/client/consensus/babe",
"substrate/client/consensus/babe/rpc",
"substrate/client/consensus/common",
"substrate/client/consensus/epochs",
"substrate/client/consensus/grandpa",
"substrate/client/consensus/grandpa/rpc",
"substrate/client/consensus/slots",
"substrate/client/db",
"substrate/client/executor",
"substrate/client/executor/common",
"substrate/client/executor/runtime-test",
"substrate/client/executor/wasmtime",
"substrate/client/informant",
"substrate/client/keystore",
"substrate/client/mixnet",
"substrate/client/network",
"substrate/client/network-gossip",
"substrate/client/network/common",
"substrate/client/network/light",
"substrate/client/network/sync",
"substrate/client/network/test",
"substrate/client/network/transactions",
"substrate/client/offchain",
"substrate/client/proposer-metrics",
"substrate/client/rpc",
"substrate/client/rpc-api",
"substrate/client/rpc-servers",
"substrate/client/rpc-spec-v2",
"substrate/client/service",
"substrate/client/service/test",
"substrate/client/state-db",
"substrate/client/storage-monitor",
"substrate/client/sync-state-rpc",
"substrate/client/sysinfo",
"substrate/client/telemetry",
"substrate/client/tracing",
"substrate/client/tracing/proc-macro",
"substrate/client/transaction-pool",
"substrate/client/transaction-pool/api",
"substrate/client/utils",
"substrate/deprecated/hashing",
"substrate/deprecated/hashing/proc-macro",
"substrate/frame",
"substrate/frame/asset-conversion",
"substrate/frame/assets",
"substrate/frame/aura",
"substrate/frame/authorship",
"substrate/frame/babe",
"substrate/frame/bags-list",
"substrate/frame/bags-list/fuzzer",
"substrate/frame/bags-list/remote-tests",
"substrate/frame/balances",
"substrate/frame/benchmarking",
"substrate/frame/election-provider-support",
"substrate/frame/election-provider-support/benchmarking",
"substrate/frame/election-provider-support/solution-type",
"substrate/frame/election-provider-support/solution-type/fuzzer",
"substrate/frame/executive",
"substrate/frame/glutton",
"substrate/frame/grandpa",
"substrate/frame/im-online",
"substrate/frame/mixnet",
"substrate/frame/offences",
"substrate/frame/offences/benchmarking",
"substrate/frame/preimage",
"substrate/frame/remark",
"substrate/frame/root-testing",
"substrate/frame/safe-mode",
"substrate/frame/scheduler",
"substrate/frame/session",
"substrate/frame/session/benchmarking",
"substrate/frame/staking",
"substrate/frame/staking/reward-curve",
"substrate/frame/staking/reward-fn",
"substrate/frame/staking/runtime-api",
"substrate/frame/state-trie-migration",
"substrate/frame/sudo",
"substrate/frame/support",
"substrate/frame/support/procedural",
"substrate/frame/support/procedural/tools",
"substrate/frame/support/procedural/tools/derive",
"substrate/frame/support/test",
"substrate/frame/support/test/compile_pass",
"substrate/frame/support/test/pallet",
"substrate/frame/support/test/stg_frame_crate",
"substrate/frame/system",
"substrate/frame/system/benchmarking",
"substrate/frame/system/rpc/runtime-api",
"substrate/frame/timestamp",
"substrate/frame/transaction-payment",
"substrate/frame/transaction-payment/asset-conversion-tx-payment",
"substrate/frame/transaction-payment/asset-tx-payment",
"substrate/frame/transaction-payment/rpc",
"substrate/frame/transaction-payment/rpc/runtime-api",
"substrate/frame/transaction-payment/skip-feeless-payment",
"substrate/frame/try-runtime",
"substrate/frame/tx-pause",
"substrate/frame/uniques",
"substrate/frame/utility",
"substrate/primitives/api",
"substrate/primitives/api/proc-macro",
"substrate/primitives/api/test",
"substrate/primitives/application-crypto",
"substrate/primitives/application-crypto/test",
"substrate/primitives/arithmetic",
"substrate/primitives/arithmetic/fuzzer",
"substrate/primitives/authority-discovery",
"substrate/primitives/block-builder",
"substrate/primitives/blockchain",
"substrate/primitives/consensus/aura",
"substrate/primitives/consensus/babe",
"substrate/primitives/consensus/common",
"substrate/primitives/consensus/grandpa",
"substrate/primitives/consensus/sassafras",
"substrate/primitives/consensus/slots",
"substrate/primitives/core",
"substrate/primitives/core/fuzz",
"substrate/primitives/crypto/ec-utils",
"substrate/primitives/crypto/hashing",
"substrate/primitives/crypto/hashing/proc-macro",
"substrate/primitives/database",
"substrate/primitives/debug-derive",
"substrate/primitives/externalities",
"substrate/primitives/genesis-builder",
"substrate/primitives/inherents",
"substrate/primitives/io",
"substrate/primitives/keyring",
"substrate/primitives/keystore",
"substrate/primitives/maybe-compressed-blob",
"substrate/primitives/metadata-ir",
"substrate/primitives/mixnet",
"substrate/primitives/npos-elections",
"substrate/primitives/npos-elections/fuzzer",
"substrate/primitives/offchain",
"substrate/primitives/panic-handler",
"substrate/primitives/rpc",
"substrate/primitives/runtime",
"substrate/primitives/runtime-interface",
"substrate/primitives/runtime-interface/proc-macro",
"substrate/primitives/runtime-interface/test",
"substrate/primitives/runtime-interface/test-wasm",
"substrate/primitives/runtime-interface/test-wasm-deprecated",
"substrate/primitives/session",
"substrate/primitives/staking",
"substrate/primitives/state-machine",
"substrate/primitives/std",
"substrate/primitives/storage",
"substrate/primitives/test-primitives",
"substrate/primitives/timestamp",
"substrate/primitives/tracing",
"substrate/primitives/transaction-pool",
"substrate/primitives/trie",
"substrate/primitives/version",
"substrate/primitives/version/proc-macro",
"substrate/primitives/wasm-interface",
"substrate/primitives/weights",
"substrate/scripts/ci/node-template-release",
"substrate/test-utils",
"substrate/test-utils/cli",
"substrate/test-utils/client",
"substrate/test-utils/runtime",
"substrate/test-utils/runtime/client",
"substrate/test-utils/runtime/transaction-pool",
"substrate/utils/build-script-utils",
"substrate/utils/fork-tree",
"substrate/utils/frame/benchmarking-cli",
"substrate/utils/frame/frame-utilities-cli",
"substrate/utils/frame/generate-bags",
"substrate/utils/frame/generate-bags/node-runtime",
"substrate/utils/frame/remote-externalities",
"substrate/utils/frame/rpc/client",
"substrate/utils/frame/rpc/state-trie-migration-rpc",
"substrate/utils/frame/rpc/support",
"substrate/utils/frame/rpc/system",
"substrate/utils/frame/try-runtime/cli",
"substrate/utils/prometheus",
"substrate/utils/wasm-builder",
]
default-members = ["substrate/bin/node/cli"]
[workspace.lints.rust]
suspicious_double_ref_op = { level = "allow", priority = 2 }
[workspace.lints.clippy]
all = { level = "allow", priority = 0 }
correctness = { level = "warn", priority = 1 }
complexity = { level = "warn", priority = 1 }
if-same-then-else = { level = "allow", priority = 2 }
zero-prefixed-literal = { level = "allow", priority = 2 } # 00_1000_000
type_complexity = { level = "allow", priority = 2 } # raison d'etre
nonminimal-bool = { level = "allow", priority = 2 } # maybe
borrowed-box = { level = "allow", priority = 2 } # Reasonable to fix this one
too-many-arguments = { level = "allow", priority = 2 } # (Turning this on would lead to)
needless-lifetimes = { level = "allow", priority = 2 } # generated code
unnecessary_cast = { level = "allow", priority = 2 } # Types may change
identity-op = { level = "allow", priority = 2 } # One case where we do 0 +
useless_conversion = { level = "allow", priority = 2 } # Types may change
unit_arg = { level = "allow", priority = 2 } # stylistic
option-map-unit-fn = { level = "allow", priority = 2 } # stylistic
bind_instead_of_map = { level = "allow", priority = 2 } # stylistic
erasing_op = { level = "allow", priority = 2 } # E.g. 0 * DOLLARS
eq_op = { level = "allow", priority = 2 } # In tests we test equality.
while_immutable_condition = { level = "allow", priority = 2 } # false positives
needless_option_as_deref = { level = "allow", priority = 2 } # false positives
derivable_impls = { level = "allow", priority = 2 } # false positives
stable_sort_primitive = { level = "allow", priority = 2 } # prefer stable sort
extra-unused-type-parameters = { level = "allow", priority = 2 } # stylistic
default_constructed_unit_structs = { level = "allow", priority = 2 } # stylistic
[profile.release]
# Polkadot runtime requires unwinding.
panic = "unwind"
opt-level = 3
# make sure dev builds with backtrace do not slow us down
[profile.dev.package.backtrace]
inherits = "release"
[profile.production]
inherits = "release"
lto = true
codegen-units = 1
[profile.testnet]
inherits = "release"
debug = 1 # debug symbols are useful for profilers
debug-assertions = true
overflow-checks = true
# The list of dependencies below (which can be both direct and indirect dependencies) are crates
# that are suspected to be CPU-intensive, and that are unlikely to require debugging (as some of
# their debug info might be missing) or to require to be frequently recompiled. We compile these
# dependencies with `opt-level=3` even in "dev" mode in order to make "dev" mode more usable.
# The majority of these crates are cryptographic libraries.
#
# If you see an error mentioning "profile package spec ... did not match any packages", it
# probably concerns this list.
#
# This list is ordered alphabetically.
[profile.dev.package]
blake2 = { opt-level = 3 }
blake2b_simd = { opt-level = 3 }
chacha20poly1305 = { opt-level = 3 }
cranelift-codegen = { opt-level = 3 }
cranelift-wasm = { opt-level = 3 }
crc32fast = { opt-level = 3 }
crossbeam-deque = { opt-level = 3 }
crypto-mac = { opt-level = 3 }
curve25519-dalek = { opt-level = 3 }
flate2 = { opt-level = 3 }
futures-channel = { opt-level = 3 }
hash-db = { opt-level = 3 }
hashbrown = { opt-level = 3 }
httparse = { opt-level = 3 }
integer-sqrt = { opt-level = 3 }
keccak = { opt-level = 3 }
librocksdb-sys = { opt-level = 3 }
libz-sys = { opt-level = 3 }
mio = { opt-level = 3 }
nalgebra = { opt-level = 3 }
num-bigint = { opt-level = 3 }
parking_lot = { opt-level = 3 }
parking_lot_core = { opt-level = 3 }
percent-encoding = { opt-level = 3 }
primitive-types = { opt-level = 3 }
ring = { opt-level = 3 }
rustls = { opt-level = 3 }
sha2 = { opt-level = 3 }
sha3 = { opt-level = 3 }
smallvec = { opt-level = 3 }
snow = { opt-level = 3 }
bip39 = { opt-level = 3 }
twox-hash = { opt-level = 3 }
uint = { opt-level = 3 }
x25519-dalek = { opt-level = 3 }
yamux = { opt-level = 3 }
zeroize = { opt-level = 3 }
[patch.crates-io]
# https://github.com/rust-lang-nursery/lazy-static.rs/issues/201
lazy_static = { git = "https://github.com/rust-lang-nursery/lazy-static.rs", rev = "5735630d46572f1e5377c8f2ba0f79d18f53b10c" }
ahash = { path = "patches/ahash" }
# The external arkworks-substrate repo refers back to the polkadot-sdk repo,
# hence patching it to point to the path
[patch."https://github.com/paritytech/polkadot-sdk"]
sp-crypto-ec-utils = { path = "substrate/primitives/crypto/ec-utils" }