Enforce consistent and correct toml formatting (#2518)

Using taplo, fixes all our broken and inconsistent toml formatting and
adds CI to keep them tidy.

If people want we can customise the format rules as described here
https://taplo.tamasfe.dev/configuration/formatter-options.html

@ggwpez, I suggest zepter is used only for checking features are
propagated, and leave formatting for taplo to avoid duplicate work and
conflicts.

TODO
- [x] Use `exclude = [...]` syntax in taplo file to ignore zombienet
tests instead of deleting the dir

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Bastian Köcher <git@kchr.de>
This commit is contained in:
Liam Aharon
2023-12-01 11:38:02 +04:00
committed by GitHub
parent 52132636d9
commit 4a293bc5a2
364 changed files with 2325 additions and 2287 deletions
+2 -2
View File
@@ -28,10 +28,10 @@ sc-utils = { path = "../utils" }
sp-api = { path = "../../primitives/api" }
sp-blockchain = { path = "../../primitives/blockchain" }
sp-consensus = { path = "../../primitives/consensus/common" }
sp-core = { path = "../../primitives/core", default-features = false}
sp-core = { path = "../../primitives/core", default-features = false }
sp-database = { path = "../../primitives/database" }
sp-externalities = { path = "../../primitives/externalities" }
sp-runtime = { path = "../../primitives/runtime", default-features = false}
sp-runtime = { path = "../../primitives/runtime", default-features = false }
sp-state-machine = { path = "../../primitives/state-machine" }
sp-statement-store = { path = "../../primitives/statement-store" }
sp-storage = { path = "../../primitives/storage" }
@@ -21,8 +21,8 @@ codec = { package = "parity-scale-codec", version = "3.6.1", default-features =
futures = "0.3.21"
futures-timer = "3.0.1"
ip_network = "0.4.1"
libp2p = { version = "0.51.3", features = ["kad", "ed25519"] }
multihash = { version = "0.17.0", default-features = false, features = ["std", "sha2"] }
libp2p = { version = "0.51.3", features = ["ed25519", "kad"] }
multihash = { version = "0.17.0", default-features = false, features = ["sha2", "std"] }
log = "0.4.17"
prost = "0.11"
rand = "0.8.5"
+1 -1
View File
@@ -35,5 +35,5 @@ docify = "0.2.0"
[dev-dependencies]
substrate-test-runtime = { path = "../../test-utils/runtime" }
sp-keyring = { path = "../../primitives/keyring" }
sp-application-crypto = { default-features = false, path = "../../primitives/application-crypto", features = ["serde"] }
sp-application-crypto = { default-features = false, path = "../../primitives/application-crypto", features = ["serde"] }
sp-consensus-babe = { default-features = false, path = "../../primitives/consensus/babe", features = ["serde"] }
+6 -6
View File
@@ -19,7 +19,7 @@ clap = { version = "4.4.10", features = ["derive", "string", "wrap_help"] }
fdlimit = "0.3.0"
futures = "0.3.21"
itertools = "0.10.3"
libp2p-identity = { version = "0.1.3", features = ["peerid", "ed25519"]}
libp2p-identity = { version = "0.1.3", features = ["ed25519", "peerid"] }
log = "0.4.17"
names = { version = "0.13.0", default-features = false }
parity-scale-codec = "3.6.1"
@@ -30,13 +30,13 @@ serde = "1.0.193"
serde_json = "1.0.108"
thiserror = "1.0.48"
bip39 = "2.0.0"
tokio = { version = "1.22.0", features = ["signal", "rt-multi-thread", "parking_lot"] }
tokio = { version = "1.22.0", features = ["parking_lot", "rt-multi-thread", "signal"] }
sc-client-api = { path = "../api" }
sc-client-db = { path = "../db", default-features = false}
sc-client-db = { path = "../db", default-features = false }
sc-keystore = { path = "../keystore" }
sc-mixnet = { path = "../mixnet" }
sc-network = { path = "../network" }
sc-service = { path = "../service", default-features = false}
sc-service = { path = "../service", default-features = false }
sc-telemetry = { path = "../telemetry" }
sc-tracing = { path = "../tracing" }
sc-utils = { path = "../utils" }
@@ -54,5 +54,5 @@ futures-timer = "3.0.1"
sp-tracing = { path = "../../primitives/tracing" }
[features]
default = [ "rocksdb" ]
rocksdb = [ "sc-client-db/rocksdb" ]
default = ["rocksdb"]
rocksdb = ["sc-client-db/rocksdb"]
@@ -13,7 +13,7 @@ readme = "README.md"
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
jsonrpsee = { version = "0.16.2", features = ["client-core", "server", "macros"] }
jsonrpsee = { version = "0.16.2", features = ["client-core", "macros", "server"] }
futures = "0.3.21"
serde = { version = "1.0.193", features = ["derive"] }
thiserror = "1.0"
@@ -11,7 +11,7 @@ homepage = "https://substrate.io"
[dependencies]
codec = { package = "parity-scale-codec", version = "3.6.1", features = ["derive"] }
futures = "0.3.21"
jsonrpsee = { version = "0.16.2", features = ["client-core", "server", "macros"] }
jsonrpsee = { version = "0.16.2", features = ["client-core", "macros", "server"] }
log = "0.4"
parking_lot = "0.12.1"
serde = { version = "1.0.193", features = ["derive"] }
@@ -24,6 +24,6 @@ sp-runtime = { path = "../../../../primitives/runtime" }
[dev-dependencies]
serde_json = "1.0.108"
sc-rpc = { path = "../../../rpc", features = ["test-helpers"]}
sc-rpc = { path = "../../../rpc", features = ["test-helpers"] }
substrate-test-runtime-client = { path = "../../../../test-utils/runtime/client" }
tokio = { version = "1.22.0", features = ["macros"] }
+1 -1
View File
@@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"]
async-trait = "0.1.57"
futures = { version = "0.3.21", features = ["thread-pool"] }
futures-timer = "3.0.1"
libp2p-identity = { version = "0.1.3", features = ["peerid", "ed25519"] }
libp2p-identity = { version = "0.1.3", features = ["ed25519", "peerid"] }
log = "0.4.17"
mockall = "0.11.3"
parking_lot = "0.12.1"
@@ -12,7 +12,7 @@ homepage = "https://substrate.io"
[dependencies]
finality-grandpa = { version = "0.16.2", features = ["derive-codec"] }
futures = "0.3.16"
jsonrpsee = { version = "0.16.2", features = ["client-core", "server", "macros"] }
jsonrpsee = { version = "0.16.2", features = ["client-core", "macros", "server"] }
log = "0.4.8"
parity-scale-codec = { version = "3.6.1", features = ["derive"] }
serde = { version = "1.0.193", features = ["derive"] }
@@ -26,7 +26,7 @@ sp-runtime = { path = "../../../../primitives/runtime" }
[dev-dependencies]
sc-block-builder = { path = "../../../block-builder" }
sc-rpc = { path = "../../../rpc", features = ["test-helpers"]}
sc-rpc = { path = "../../../rpc", features = ["test-helpers"] }
sp-core = { path = "../../../../primitives/core" }
sp-consensus-grandpa = { path = "../../../../primitives/consensus/grandpa" }
sp-keyring = { path = "../../../../primitives/keyring" }
@@ -13,7 +13,7 @@ readme = "README.md"
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
jsonrpsee = { version = "0.16.2", features = ["client-core", "server", "macros"] }
jsonrpsee = { version = "0.16.2", features = ["client-core", "macros", "server"] }
assert_matches = "1.3.0"
async-trait = "0.1.57"
codec = { package = "parity-scale-codec", version = "3.6.1" }
@@ -43,7 +43,7 @@ sp-runtime = { path = "../../../primitives/runtime" }
sp-timestamp = { path = "../../../primitives/timestamp" }
[dev-dependencies]
tokio = { version = "1.22.0", features = ["rt-multi-thread", "macros"] }
tokio = { version = "1.22.0", features = ["macros", "rt-multi-thread"] }
sc-basic-authorship = { path = "../../basic-authorship" }
substrate-test-runtime-client = { path = "../../../test-utils/runtime/client" }
substrate-test-runtime-transaction-pool = { path = "../../../test-utils/runtime/transaction-pool" }
+1 -1
View File
@@ -53,7 +53,7 @@ runtime-benchmarks = [
"kitchensink-runtime/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]
rocksdb = [ "kvdb-rocksdb" ]
rocksdb = ["kvdb-rocksdb"]
[[bench]]
name = "state_access"
+1 -1
View File
@@ -55,7 +55,7 @@ name = "bench"
harness = false
[features]
default = [ "std" ]
default = ["std"]
# This crate does not have `no_std` support, we just require this for tests
std = [
"sc-runtime-test/std",
@@ -13,17 +13,17 @@ repository.workspace = true
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
sp-core = { path = "../../../primitives/core", default-features = false}
sp-io = { path = "../../../primitives/io", default-features = false, features = ["improved_panic_error_reporting"]}
sp-runtime = { path = "../../../primitives/runtime", default-features = false}
sp-runtime-interface = { path = "../../../primitives/runtime-interface", default-features = false}
sp-std = { path = "../../../primitives/std", default-features = false}
sp-core = { path = "../../../primitives/core", default-features = false }
sp-io = { path = "../../../primitives/io", default-features = false, features = ["improved_panic_error_reporting"] }
sp-runtime = { path = "../../../primitives/runtime", default-features = false }
sp-runtime-interface = { path = "../../../primitives/runtime-interface", default-features = false }
sp-std = { path = "../../../primitives/std", default-features = false }
[build-dependencies]
substrate-wasm-builder = { path = "../../../utils/wasm-builder", optional = true }
[features]
default = [ "std" ]
default = ["std"]
std = [
"sp-core/std",
"sp-io/std",
@@ -25,7 +25,7 @@ wasmtime = { version = "8.0.1", default-features = false, features = [
"cranelift",
"jitdump",
"parallel-compilation",
"pooling-allocator"
"pooling-allocator",
] }
anyhow = "1.0.68"
sc-allocator = { path = "../../allocator" }
@@ -39,7 +39,7 @@ sp-wasm-interface = { path = "../../../primitives/wasm-interface", features = ["
# By default rustix directly calls the appropriate syscalls completely bypassing libc;
# this doesn't have any actual benefits for us besides making it harder to debug memory
# problems (since then `mmap` etc. cannot be easily hooked into).
rustix = { version = "0.36.7", default-features = false, features = ["std", "mm", "fs", "param", "use-libc"] }
rustix = { version = "0.36.7", default-features = false, features = ["fs", "mm", "param", "std", "use-libc"] }
[dev-dependencies]
wat = "1.0"
@@ -13,7 +13,7 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
codec = { package = "parity-scale-codec", version = "3.6.1" }
jsonrpsee = { version = "0.16.2", features = ["client-core", "server", "macros"] }
jsonrpsee = { version = "0.16.2", features = ["client-core", "macros", "server"] }
serde = { version = "1.0.193", features = ["derive"] }
sp-api = { path = "../../../primitives/api" }
sp-blockchain = { path = "../../../primitives/blockchain" }
+1 -1
View File
@@ -30,6 +30,6 @@ sp-runtime = { path = "../../primitives/runtime" }
[dev-dependencies]
tokio = "1.22.0"
async-trait = "0.1.73"
codec = { package = "parity-scale-codec", version = "3.0.0", features = [ "derive" ] }
codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"] }
quickcheck = { version = "1.0.3", default-features = false }
substrate-test-runtime-client = { path = "../../test-utils/runtime/client" }
+2 -2
View File
@@ -25,7 +25,7 @@ fnv = "1.0.6"
futures = "0.3.21"
futures-timer = "3.0.2"
ip_network = "0.4.1"
libp2p = { version = "0.51.3", features = ["dns", "identify", "kad", "macros", "mdns", "noise", "ping", "tcp", "tokio", "yamux", "websocket", "request-response"] }
libp2p = { version = "0.51.3", features = ["dns", "identify", "kad", "macros", "mdns", "noise", "ping", "request-response", "tcp", "tokio", "websocket", "yamux"] }
linked_hash_set = "0.1.3"
log = "0.4.17"
mockall = "0.11.3"
@@ -39,7 +39,7 @@ smallvec = "1.11.0"
thiserror = "1.0"
tokio = { version = "1.22.0", features = ["macros", "sync"] }
tokio-stream = "0.1.7"
unsigned-varint = { version = "0.7.1", features = ["futures", "asynchronous_codec"] }
unsigned-varint = { version = "0.7.1", features = ["asynchronous_codec", "futures"] }
zeroize = "1.4.3"
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../utils/prometheus" }
sc-client-api = { path = "../api" }
+1 -1
View File
@@ -23,7 +23,7 @@ libp2p-identity = { version = "0.1.3", features = ["peerid"] }
log = "0.4.17"
prost = "0.11"
thiserror = "1.0"
unsigned-varint = { version = "0.7.1", features = ["futures", "asynchronous_codec"] }
unsigned-varint = { version = "0.7.1", features = ["asynchronous_codec", "futures"] }
sc-client-api = { path = "../../api" }
sc-network = { path = ".." }
sp-blockchain = { path = "../../../primitives/blockchain" }
+1 -1
View File
@@ -19,7 +19,7 @@ prost-build = "0.11"
async-channel = "1.8.0"
array-bytes = "6.1"
codec = { package = "parity-scale-codec", version = "3.6.1", features = [
"derive",
"derive",
] }
futures = "0.3.21"
libp2p-identity = { version = "0.1.3", features = ["peerid"] }
+1 -1
View File
@@ -30,7 +30,7 @@ schnellru = "0.2.1"
smallvec = "1.11.0"
thiserror = "1.0"
tokio-stream = "0.1.14"
tokio = { version = "1.32.0", features = ["time", "macros"] }
tokio = { version = "1.32.0", features = ["macros", "time"] }
fork-tree = { path = "../../../utils/fork-tree" }
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../../utils/prometheus" }
sc-client-api = { path = "../../api" }
+1 -1
View File
@@ -29,7 +29,7 @@ sc-network-common = { path = "../common" }
sc-utils = { path = "../../utils" }
sc-network-light = { path = "../light" }
sc-network-sync = { path = "../sync" }
sc-service = { path = "../../service", default-features = false, features = ["test-helpers"]}
sc-service = { path = "../../service", default-features = false, features = ["test-helpers"] }
sp-blockchain = { path = "../../../primitives/blockchain" }
sp-consensus = { path = "../../../primitives/consensus/common" }
sp-core = { path = "../../../primitives/core" }
+2 -2
View File
@@ -19,7 +19,7 @@ codec = { package = "parity-scale-codec", version = "3.6.1", features = ["derive
fnv = "1.0.6"
futures = "0.3.21"
futures-timer = "3.0.2"
hyper = { version = "0.14.16", features = ["stream", "http2"] }
hyper = { version = "0.14.16", features = ["http2", "stream"] }
hyper-rustls = { version = "0.24.0", features = ["http2"] }
libp2p = "0.51.3"
num_cpus = "1.13"
@@ -45,7 +45,7 @@ log = "0.4.17"
lazy_static = "1.4.0"
tokio = "1.22.0"
sc-block-builder = { path = "../block-builder" }
sc-client-db = { path = "../db", default-features = true}
sc-client-db = { path = "../db", default-features = true }
sc-transaction-pool = { path = "../transaction-pool" }
sc-transaction-pool-api = { path = "../transaction-pool/api" }
sp-consensus = { path = "../../primitives/consensus/common" }
+1 -1
View File
@@ -25,4 +25,4 @@ sp-core = { path = "../../primitives/core" }
sp-rpc = { path = "../../primitives/rpc" }
sp-runtime = { path = "../../primitives/runtime" }
sp-version = { path = "../../primitives/version" }
jsonrpsee = { version = "0.16.2", features = ["server", "client-core", "macros"] }
jsonrpsee = { version = "0.16.2", features = ["client-core", "macros", "server"] }
+2 -2
View File
@@ -13,7 +13,7 @@ readme = "README.md"
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
jsonrpsee = { version = "0.16.2", features = ["client-core", "server", "macros"] }
jsonrpsee = { version = "0.16.2", features = ["client-core", "macros", "server"] }
# Internal chain structures for "chain_spec".
sc-chain-spec = { path = "../chain-spec" }
# Pool for submitting extrinsics required by "transaction"
@@ -47,6 +47,6 @@ sp-consensus = { path = "../../primitives/consensus/common" }
sp-externalities = { path = "../../primitives/externalities" }
sp-maybe-compressed-blob = { path = "../../primitives/maybe-compressed-blob" }
sc-block-builder = { path = "../block-builder" }
sc-service = { path = "../service", features = ["test-helpers"]}
sc-service = { path = "../service", features = ["test-helpers"] }
assert_matches = "1.3.0"
pretty_assertions = "1.2.1"
+4 -4
View File
@@ -13,10 +13,10 @@ readme = "README.md"
targets = ["x86_64-unknown-linux-gnu"]
[features]
default = [ "rocksdb" ]
default = ["rocksdb"]
# The RocksDB feature activates the RocksDB database backend. If it is not activated, and you pass
# a path to a database, an error will be produced at runtime.
rocksdb = [ "sc-client-db/rocksdb" ]
rocksdb = ["sc-client-db/rocksdb"]
# exposes the client type
test-helpers = []
runtime-benchmarks = [
@@ -59,7 +59,7 @@ sc-network-transactions = { path = "../network/transactions" }
sc-chain-spec = { path = "../chain-spec" }
sc-client-api = { path = "../api" }
sp-api = { path = "../../primitives/api" }
sc-client-db = { path = "../db", default-features = false}
sc-client-db = { path = "../db", default-features = false }
codec = { package = "parity-scale-codec", version = "3.6.1" }
sc-executor = { path = "../executor" }
sc-transaction-pool = { path = "../transaction-pool" }
@@ -77,7 +77,7 @@ sc-sysinfo = { path = "../sysinfo" }
tracing = "0.1.29"
tracing-futures = { version = "0.2.4" }
async-trait = "0.1.57"
tokio = { version = "1.22.0", features = ["time", "rt-multi-thread", "parking_lot"] }
tokio = { version = "1.22.0", features = ["parking_lot", "rt-multi-thread", "time"] }
tempfile = "3.1.0"
directories = "5.0.1"
static_init = "1.0.3"
+2 -2
View File
@@ -23,12 +23,12 @@ tempfile = "3.1.0"
tokio = { version = "1.22.0", features = ["time"] }
sc-block-builder = { path = "../../block-builder" }
sc-client-api = { path = "../../api" }
sc-client-db = { path = "../../db", default-features = false}
sc-client-db = { path = "../../db", default-features = false }
sc-consensus = { path = "../../consensus/common" }
sc-executor = { path = "../../executor" }
sc-network = { path = "../../network" }
sc-network-sync = { path = "../../network/sync" }
sc-service = { path = "..", features = ["test-helpers"]}
sc-service = { path = "..", features = ["test-helpers"] }
sc-transaction-pool-api = { path = "../../transaction-pool/api" }
sp-api = { path = "../../../primitives/api" }
sp-blockchain = { path = "../../../primitives/blockchain" }
+1 -1
View File
@@ -12,7 +12,7 @@ homepage = "https://substrate.io"
clap = { version = "4.4.10", features = ["derive", "string"] }
log = "0.4.17"
fs4 = "0.7.0"
sc-client-db = { path = "../db", default-features = false}
sc-client-db = { path = "../db", default-features = false }
sp-core = { path = "../../primitives/core" }
tokio = "1.22.0"
thiserror = "1.0.48"
+1 -1
View File
@@ -13,7 +13,7 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
codec = { package = "parity-scale-codec", version = "3.6.1" }
jsonrpsee = { version = "0.16.2", features = ["client-core", "server", "macros"] }
jsonrpsee = { version = "0.16.2", features = ["client-core", "macros", "server"] }
serde = { version = "1.0.193", features = ["derive"] }
serde_json = "1.0.108"
thiserror = "1.0.48"
@@ -18,4 +18,4 @@ proc-macro = true
proc-macro-crate = "1.1.3"
proc-macro2 = "1.0.56"
quote = { version = "1.0.28", features = ["proc-macro"] }
syn = { version = "2.0.38", features = ["proc-macro", "full", "extra-traits", "parsing"] }
syn = { version = "2.0.38", features = ["extra-traits", "full", "parsing", "proc-macro"] }
@@ -16,8 +16,8 @@ log = "0.4.17"
serde = { version = "1.0.193", features = ["derive"] }
thiserror = "1.0.48"
sp-blockchain = { path = "../../../primitives/blockchain" }
sp-core = { path = "../../../primitives/core", default-features = false}
sp-runtime = { path = "../../../primitives/runtime", default-features = false}
sp-core = { path = "../../../primitives/core", default-features = false }
sp-runtime = { path = "../../../primitives/runtime", default-features = false }
[dev-dependencies]
serde_json = "1.0.108"
+2 -2
View File
@@ -17,10 +17,10 @@ lazy_static = "1.4.0"
log = "0.4"
parking_lot = "0.12.1"
prometheus = { version = "0.13.0", default-features = false }
sp-arithmetic = { path = "../../primitives/arithmetic", default-features = false}
sp-arithmetic = { path = "../../primitives/arithmetic", default-features = false }
[features]
default = [ "metered" ]
default = ["metered"]
metered = []
[dev-dependencies]