mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +00:00
depend-o-pocalipse (#9450)
Remove unneeded dependencies and dev-dependencies. Made self_destruct test not dependent on wasm bin size. Updated code related to deprecated warning on tracing-subscriber `scope()` ( See https://github.com/tokio-rs/tracing/issues/1429 )
This commit is contained in:
Generated
+3
-214
File diff suppressed because it is too large
Load Diff
@@ -25,7 +25,6 @@ sc-executor = { version = "0.10.0-dev", path = "../../../client/executor", featu
|
||||
sc-service = { version = "0.10.0-dev", path = "../../../client/service", features = ["wasmtime"] }
|
||||
sc-telemetry = { version = "4.0.0-dev", path = "../../../client/telemetry" }
|
||||
sc-keystore = { version = "4.0.0-dev", path = "../../../client/keystore" }
|
||||
sp-inherents = { version = "4.0.0-dev", path = "../../../primitives/inherents" }
|
||||
sc-transaction-pool = { version = "4.0.0-dev", path = "../../../client/transaction-pool" }
|
||||
sc-transaction-pool-api = { version = "4.0.0-dev", path = "../../../client/transaction-pool/api" }
|
||||
sc-consensus-aura = { version = "0.10.0-dev", path = "../../../client/consensus/aura" }
|
||||
|
||||
@@ -14,13 +14,14 @@ publish = false
|
||||
targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = [
|
||||
"derive",
|
||||
] }
|
||||
frame-support = { default-features = false, version = "4.0.0-dev", path = "../../../../frame/support" }
|
||||
frame-system = { default-features = false, version = "4.0.0-dev", path = "../../../../frame/system" }
|
||||
frame-benchmarking = { default-features = false, version = "4.0.0-dev", path = "../../../../frame/benchmarking", optional = true }
|
||||
frame-system = { default-features = false, version = "4.0.0-dev", path = "../../../../frame/system" }
|
||||
frame-benchmarking = { default-features = false, version = "4.0.0-dev", path = "../../../../frame/benchmarking", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
serde = { version = "1.0.126" }
|
||||
sp-core = { default-features = false, version = "4.0.0-dev", path = "../../../../primitives/core" }
|
||||
sp-io = { default-features = false, version = "4.0.0-dev", path = "../../../../primitives/io" }
|
||||
sp-runtime = { default-features = false, version = "4.0.0-dev", path = "../../../../primitives/runtime" }
|
||||
|
||||
@@ -13,7 +13,6 @@ log = "0.4.8"
|
||||
node-primitives = { version = "2.0.0", path = "../primitives" }
|
||||
node-testing = { version = "3.0.0-dev", path = "../testing" }
|
||||
node-runtime = { version = "3.0.0-dev", path = "../runtime" }
|
||||
sc-cli = { version = "0.10.0-dev", path = "../../../client/cli" }
|
||||
sc-client-api = { version = "4.0.0-dev", path = "../../../client/api/" }
|
||||
sp-runtime = { version = "4.0.0-dev", path = "../../../primitives/runtime" }
|
||||
sp-state-machine = { version = "0.10.0-dev", path = "../../../primitives/state-machine" }
|
||||
@@ -36,7 +35,9 @@ fs_extra = "1"
|
||||
hex = "0.4.0"
|
||||
rand = { version = "0.7.2", features = ["small_rng"] }
|
||||
lazy_static = "1.4.0"
|
||||
parity-util-mem = { version = "0.10.0", default-features = false, features = ["primitive-types"] }
|
||||
parity-util-mem = { version = "0.10.0", default-features = false, features = [
|
||||
"primitive-types",
|
||||
] }
|
||||
parity-db = { version = "0.3" }
|
||||
sc-transaction-pool = { version = "4.0.0-dev", path = "../../../client/transaction-pool" }
|
||||
sc-transaction-pool-api = { version = "4.0.0-dev", path = "../../../client/transaction-pool/api" }
|
||||
|
||||
@@ -7,18 +7,16 @@ edition = "2018"
|
||||
license = "Apache-2.0"
|
||||
|
||||
[dependencies]
|
||||
futures-timer = "3.0.2"
|
||||
libp2p = { version = "0.37.1", default-features = false }
|
||||
jsonrpc-core = "18.0.0"
|
||||
serde = "1.0.126"
|
||||
serde_json = "1.0.48"
|
||||
wasm-bindgen = { version = "=0.2.73", features = ["serde-serialize"] }
|
||||
wasm-bindgen-futures = "0.4.18"
|
||||
wasm-bindgen-test = "0.3.18"
|
||||
futures = "0.3.9"
|
||||
|
||||
node-cli = { path = "../cli", default-features = false, features = ["browser"], version = "3.0.0-dev"}
|
||||
sc-rpc-api = { path = "../../../client/rpc-api", version = "0.10.0-dev"}
|
||||
node-cli = { path = "../cli", default-features = false, features = [
|
||||
"browser",
|
||||
], version = "3.0.0-dev" }
|
||||
|
||||
# This is a HACK to make browser tests pass.
|
||||
# enables [`instant/wasm_bindgen`]
|
||||
|
||||
@@ -41,10 +41,9 @@ hex-literal = "0.3.1"
|
||||
log = "0.4.8"
|
||||
rand = "0.7.2"
|
||||
structopt = { version = "0.3.8", optional = true }
|
||||
parking_lot = "0.11.1"
|
||||
|
||||
# primitives
|
||||
sp-authority-discovery = { version = "4.0.0-dev", path = "../../../primitives/authority-discovery" }
|
||||
sp-authority-discovery = { version = "4.0.0-dev", path = "../../../primitives/authority-discovery" }
|
||||
sp-consensus-babe = { version = "0.10.0-dev", path = "../../../primitives/consensus/babe" }
|
||||
grandpa-primitives = { version = "4.0.0-dev", package = "sp-finality-grandpa", path = "../../../primitives/finality-grandpa" }
|
||||
sp-core = { version = "4.0.0-dev", path = "../../../primitives/core" }
|
||||
@@ -54,7 +53,6 @@ sp-authorship = { version = "4.0.0-dev", path = "../../../primitives/authorship"
|
||||
sp-inherents = { version = "4.0.0-dev", path = "../../../primitives/inherents" }
|
||||
sp-keyring = { version = "4.0.0-dev", path = "../../../primitives/keyring" }
|
||||
sp-keystore = { version = "0.10.0-dev", path = "../../../primitives/keystore" }
|
||||
sp-io = { version = "4.0.0-dev", path = "../../../primitives/io" }
|
||||
sp-consensus = { version = "0.10.0-dev", path = "../../../primitives/consensus/common" }
|
||||
sp-transaction-pool = { version = "4.0.0-dev", path = "../../../primitives/transaction-pool" }
|
||||
sp-transaction-storage-proof = { version = "4.0.0-dev", path = "../../../primitives/transaction-storage-proof" }
|
||||
@@ -70,28 +68,17 @@ sc-consensus-slots = { version = "0.10.0-dev", path = "../../../client/consensus
|
||||
sc-consensus-babe = { version = "0.10.0-dev", path = "../../../client/consensus/babe" }
|
||||
sc-consensus-uncles = { version = "0.10.0-dev", path = "../../../client/consensus/uncles" }
|
||||
grandpa = { version = "0.10.0-dev", package = "sc-finality-grandpa", path = "../../../client/finality-grandpa" }
|
||||
sc-client-db = { version = "0.10.0-dev", default-features = false, path = "../../../client/db" }
|
||||
sc-offchain = { version = "4.0.0-dev", path = "../../../client/offchain" }
|
||||
sc-rpc = { version = "4.0.0-dev", path = "../../../client/rpc" }
|
||||
sc-basic-authorship = { version = "0.10.0-dev", path = "../../../client/basic-authorship" }
|
||||
sc-service = { version = "0.10.0-dev", default-features = false, path = "../../../client/service" }
|
||||
sc-tracing = { version = "4.0.0-dev", path = "../../../client/tracing" }
|
||||
sc-telemetry = { version = "4.0.0-dev", path = "../../../client/telemetry" }
|
||||
sc-authority-discovery = { version = "0.10.0-dev", path = "../../../client/authority-discovery" }
|
||||
sc-authority-discovery = { version = "0.10.0-dev", path = "../../../client/authority-discovery" }
|
||||
sc-sync-state-rpc = { version = "0.10.0-dev", path = "../../../client/sync-state-rpc" }
|
||||
|
||||
# frame dependencies
|
||||
pallet-indices = { version = "4.0.0-dev", path = "../../../frame/indices" }
|
||||
pallet-timestamp = { version = "4.0.0-dev", default-features = false, path = "../../../frame/timestamp" }
|
||||
pallet-contracts = { version = "4.0.0-dev", path = "../../../frame/contracts" }
|
||||
frame-system = { version = "4.0.0-dev", path = "../../../frame/system" }
|
||||
pallet-balances = { version = "4.0.0-dev", path = "../../../frame/balances" }
|
||||
pallet-transaction-payment = { version = "4.0.0-dev", path = "../../../frame/transaction-payment" }
|
||||
frame-support = { version = "4.0.0-dev", default-features = false, path = "../../../frame/support" }
|
||||
pallet-im-online = { version = "4.0.0-dev", default-features = false, path = "../../../frame/im-online" }
|
||||
pallet-authority-discovery = { version = "4.0.0-dev", path = "../../../frame/authority-discovery" }
|
||||
pallet-staking = { version = "4.0.0-dev", path = "../../../frame/staking" }
|
||||
pallet-grandpa = { version = "4.0.0-dev", path = "../../../frame/grandpa" }
|
||||
|
||||
# node-specific dependencies
|
||||
node-runtime = { version = "3.0.0-dev", path = "../runtime" }
|
||||
@@ -108,14 +95,24 @@ try-runtime-cli = { version = "0.10.0-dev", optional = true, path = "../../../ut
|
||||
# WASM-specific dependencies
|
||||
wasm-bindgen = { version = "0.2.73", optional = true }
|
||||
wasm-bindgen-futures = { version = "0.4.18", optional = true }
|
||||
browser-utils = { package = "substrate-browser-utils", path = "../../../utils/browser", optional = true, version = "0.10.0-dev"}
|
||||
libp2p-wasm-ext = { version = "0.28", features = ["websocket"], optional = true }
|
||||
browser-utils = { package = "substrate-browser-utils", path = "../../../utils/browser", optional = true, version = "0.10.0-dev" }
|
||||
libp2p-wasm-ext = { version = "0.28", features = [
|
||||
"websocket",
|
||||
], optional = true }
|
||||
|
||||
[target.'cfg(target_arch="x86_64")'.dependencies]
|
||||
node-executor = { version = "3.0.0-dev", path = "../executor", features = [ "wasmtime" ] }
|
||||
sc-cli = { version = "0.10.0-dev", optional = true, path = "../../../client/cli", features = [ "wasmtime" ] }
|
||||
sc-service = { version = "0.10.0-dev", default-features = false, path = "../../../client/service", features = [ "wasmtime" ] }
|
||||
sp-trie = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/trie", features = ["memory-tracker"] }
|
||||
node-executor = { version = "3.0.0-dev", path = "../executor", features = [
|
||||
"wasmtime",
|
||||
] }
|
||||
sc-cli = { version = "0.10.0-dev", optional = true, path = "../../../client/cli", features = [
|
||||
"wasmtime",
|
||||
] }
|
||||
sc-service = { version = "0.10.0-dev", default-features = false, path = "../../../client/service", features = [
|
||||
"wasmtime",
|
||||
] }
|
||||
sp-trie = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/trie", features = [
|
||||
"memory-tracker",
|
||||
] }
|
||||
|
||||
[dev-dependencies]
|
||||
sc-keystore = { version = "4.0.0-dev", path = "../../../client/keystore" }
|
||||
@@ -148,7 +145,7 @@ path = "../../../client/cli"
|
||||
optional = true
|
||||
|
||||
[features]
|
||||
default = [ "cli" ]
|
||||
default = ["cli"]
|
||||
browser = [
|
||||
"browser-utils",
|
||||
"wasm-bindgen",
|
||||
@@ -172,7 +169,4 @@ runtime-benchmarks = [
|
||||
]
|
||||
# Enable features that allow the runtime to be tried and debugged. Name might be subject to change
|
||||
# in the near future.
|
||||
try-runtime = [
|
||||
"node-runtime/try-runtime",
|
||||
"try-runtime-cli",
|
||||
]
|
||||
try-runtime = ["node-runtime/try-runtime", "try-runtime-cli"]
|
||||
|
||||
@@ -78,8 +78,9 @@ impl<'a> ExportImportRevertExecutor<'a> {
|
||||
let sub_command_str = sub_command.to_string();
|
||||
// Adding "--binary" if need be.
|
||||
let arguments: Vec<&str> = match format_opt {
|
||||
FormatOpt::Binary =>
|
||||
vec![&sub_command_str, "--dev", "--pruning", "archive", "--binary", "-d"],
|
||||
FormatOpt::Binary => {
|
||||
vec![&sub_command_str, "--dev", "--pruning", "archive", "--binary", "-d"]
|
||||
},
|
||||
FormatOpt::Json => vec![&sub_command_str, "--dev", "--pruning", "archive", "-d"],
|
||||
};
|
||||
|
||||
|
||||
@@ -18,10 +18,8 @@ node-runtime = { version = "3.0.0-dev", path = "../runtime" }
|
||||
sc-executor = { version = "0.10.0-dev", path = "../../../client/executor" }
|
||||
sp-core = { version = "4.0.0-dev", path = "../../../primitives/core" }
|
||||
sp-keystore = { version = "0.10.0-dev", path = "../../../primitives/keystore" }
|
||||
sp-io = { version = "4.0.0-dev", path = "../../../primitives/io" }
|
||||
sp-state-machine = { version = "0.10.0-dev", path = "../../../primitives/state-machine" }
|
||||
sp-trie = { version = "4.0.0-dev", path = "../../../primitives/trie" }
|
||||
trie-root = "0.16.0"
|
||||
frame-benchmarking = { version = "4.0.0-dev", path = "../../../frame/benchmarking" }
|
||||
|
||||
[dev-dependencies]
|
||||
@@ -31,28 +29,19 @@ frame-system = { version = "4.0.0-dev", path = "../../../frame/system" }
|
||||
node-testing = { version = "3.0.0-dev", path = "../testing" }
|
||||
pallet-balances = { version = "4.0.0-dev", path = "../../../frame/balances" }
|
||||
pallet-contracts = { version = "4.0.0-dev", path = "../../../frame/contracts" }
|
||||
pallet-grandpa = { version = "4.0.0-dev", path = "../../../frame/grandpa" }
|
||||
pallet-im-online = { version = "4.0.0-dev", path = "../../../frame/im-online" }
|
||||
pallet-indices = { version = "4.0.0-dev", path = "../../../frame/indices" }
|
||||
pallet-session = { version = "4.0.0-dev", path = "../../../frame/session" }
|
||||
pallet-timestamp = { version = "4.0.0-dev", path = "../../../frame/timestamp" }
|
||||
pallet-transaction-payment = { version = "4.0.0-dev", path = "../../../frame/transaction-payment" }
|
||||
pallet-treasury = { version = "4.0.0-dev", path = "../../../frame/treasury" }
|
||||
sp-application-crypto = { version = "4.0.0-dev", path = "../../../primitives/application-crypto" }
|
||||
sp-consensus-babe = { version = "0.10.0-dev", path = "../../../primitives/consensus/babe" }
|
||||
sp-runtime = { version = "4.0.0-dev", path = "../../../primitives/runtime" }
|
||||
sp-externalities = { version = "0.10.0-dev", path = "../../../primitives/externalities" }
|
||||
substrate-test-client = { version = "2.0.0", path = "../../../test-utils/client" }
|
||||
wat = "1.0"
|
||||
futures = "0.3.9"
|
||||
|
||||
[features]
|
||||
wasmtime = [
|
||||
"sc-executor/wasmtime",
|
||||
]
|
||||
wasmi-errno = [
|
||||
"sc-executor/wasmi-errno",
|
||||
]
|
||||
wasmtime = ["sc-executor/wasmtime"]
|
||||
wasmi-errno = ["sc-executor/wasmi-errno"]
|
||||
stress-test = []
|
||||
|
||||
[[bench]]
|
||||
|
||||
@@ -13,7 +13,6 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0" }
|
||||
derive_more = "0.99"
|
||||
log = "0.4.8"
|
||||
sc-cli = { version = "0.10.0-dev", path = "../../../client/cli" }
|
||||
sc-client-api = { version = "4.0.0-dev", path = "../../../client/api" }
|
||||
sc-service = { version = "0.10.0-dev", default-features = false, path = "../../../client/service" }
|
||||
|
||||
@@ -11,16 +11,14 @@ repository = "https://github.com/paritytech/substrate/"
|
||||
targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = [
|
||||
"derive",
|
||||
] }
|
||||
frame-system = { version = "4.0.0-dev", default-features = false, path = "../../../frame/system" }
|
||||
sp-application-crypto = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/application-crypto" }
|
||||
sp-core = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/core" }
|
||||
sp-runtime = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/runtime" }
|
||||
|
||||
[dev-dependencies]
|
||||
sp-serializer = { version = "3.0.0", path = "../../../primitives/serializer" }
|
||||
pretty_assertions = "0.6.1"
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = [
|
||||
|
||||
@@ -12,8 +12,9 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
futures = "0.3.16"
|
||||
jsonrpc-core-client = { version = "18.0.0", default-features = false, features = ["http"] }
|
||||
log = "0.4.8"
|
||||
jsonrpc-core-client = { version = "18.0.0", default-features = false, features = [
|
||||
"http",
|
||||
] }
|
||||
node-primitives = { version = "2.0.0", path = "../primitives" }
|
||||
sp-tracing = { version = "4.0.0-dev", path = "../../../primitives/tracing" }
|
||||
sc-rpc = { version = "4.0.0-dev", path = "../../../client/rpc" }
|
||||
|
||||
@@ -23,7 +23,6 @@ sc-consensus-epochs = { version = "0.10.0-dev", path = "../../../client/consensu
|
||||
sc-chain-spec = { version = "4.0.0-dev", path = "../../../client/chain-spec" }
|
||||
sc-finality-grandpa = { version = "0.10.0-dev", path = "../../../client/finality-grandpa" }
|
||||
sc-finality-grandpa-rpc = { version = "0.10.0-dev", path = "../../../client/finality-grandpa/rpc" }
|
||||
sc-keystore = { version = "4.0.0-dev", path = "../../../client/keystore" }
|
||||
sc-rpc-api = { version = "0.10.0-dev", path = "../../../client/rpc-api" }
|
||||
sc-rpc = { version = "4.0.0-dev", path = "../../../client/rpc" }
|
||||
sc-sync-state-rpc = { version = "0.10.0-dev", path = "../../../client/sync-state-rpc" }
|
||||
|
||||
@@ -14,7 +14,10 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
[dependencies]
|
||||
|
||||
# third-party dependencies
|
||||
codec = { package = "parity-scale-codec", version = "2.2.0", default-features = false, features = ["derive", "max-encoded-len"] }
|
||||
codec = { package = "parity-scale-codec", version = "2.2.0", default-features = false, features = [
|
||||
"derive",
|
||||
"max-encoded-len",
|
||||
] }
|
||||
static_assertions = "1.1.0"
|
||||
hex-literal = { version = "0.3.1", optional = true }
|
||||
log = { version = "0.4.14", default-features = false }
|
||||
@@ -22,7 +25,7 @@ log = { version = "0.4.14", default-features = false }
|
||||
# primitives
|
||||
sp-authority-discovery = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/authority-discovery" }
|
||||
sp-consensus-babe = { version = "0.10.0-dev", default-features = false, path = "../../../primitives/consensus/babe" }
|
||||
sp-block-builder = { path = "../../../primitives/block-builder", default-features = false, version = "4.0.0-dev"}
|
||||
sp-block-builder = { path = "../../../primitives/block-builder", default-features = false, version = "4.0.0-dev" }
|
||||
sp-inherents = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/inherents" }
|
||||
node-primitives = { version = "2.0.0", default-features = false, path = "../primitives" }
|
||||
sp-offchain = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/offchain" }
|
||||
@@ -73,7 +76,9 @@ pallet-offences-benchmarking = { version = "4.0.0-dev", path = "../../../frame/o
|
||||
pallet-proxy = { version = "4.0.0-dev", default-features = false, path = "../../../frame/proxy" }
|
||||
pallet-randomness-collective-flip = { version = "4.0.0-dev", default-features = false, path = "../../../frame/randomness-collective-flip" }
|
||||
pallet-recovery = { version = "4.0.0-dev", default-features = false, path = "../../../frame/recovery" }
|
||||
pallet-session = { version = "4.0.0-dev", features = ["historical"], path = "../../../frame/session", default-features = false }
|
||||
pallet-session = { version = "4.0.0-dev", features = [
|
||||
"historical",
|
||||
], path = "../../../frame/session", default-features = false }
|
||||
pallet-session-benchmarking = { version = "4.0.0-dev", path = "../../../frame/session/benchmarking", default-features = false, optional = true }
|
||||
pallet-staking = { version = "4.0.0-dev", default-features = false, path = "../../../frame/staking" }
|
||||
pallet-staking-reward-curve = { version = "4.0.0-dev", default-features = false, path = "../../../frame/staking/reward-curve" }
|
||||
@@ -98,7 +103,7 @@ sp-io = { version = "4.0.0-dev", path = "../../../primitives/io" }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
with-tracing = [ "frame-executive/with-tracing" ]
|
||||
with-tracing = ["frame-executive/with-tracing"]
|
||||
std = [
|
||||
"sp-authority-discovery/std",
|
||||
"pallet-assets/std",
|
||||
@@ -247,6 +252,4 @@ try-runtime = [
|
||||
]
|
||||
# Make contract callable functions marked as __unstable__ available. Do not enable
|
||||
# on live chains as those are subject to change.
|
||||
contracts-unstable-interface = [
|
||||
"pallet-contracts/unstable-interface"
|
||||
]
|
||||
contracts-unstable-interface = ["pallet-contracts/unstable-interface"]
|
||||
|
||||
@@ -9,10 +9,7 @@ publish = false
|
||||
test-runner = { path = "../../../test-utils/test-runner" }
|
||||
|
||||
frame-system = { path = "../../../frame/system" }
|
||||
frame-support = { path = "../../../frame/support" }
|
||||
frame-benchmarking = { path = "../../../frame/benchmarking" }
|
||||
pallet-balances = { path = "../../../frame/balances" }
|
||||
pallet-sudo = { path = "../../../frame/sudo" }
|
||||
pallet-transaction-payment = { path = "../../../frame/transaction-payment" }
|
||||
|
||||
node-runtime = { path = "../runtime" }
|
||||
@@ -25,16 +22,7 @@ sc-consensus-babe = { path = "../../../client/consensus/babe" }
|
||||
sc-consensus-manual-seal = { path = "../../../client/consensus/manual-seal" }
|
||||
sc-service = { default-features = false, path = "../../../client/service" }
|
||||
sc-executor = { path = "../../../client/executor" }
|
||||
sc-client-api = { path = "../../../client/api" }
|
||||
sc-network = { path = "../../../client/network" }
|
||||
sc-informant = { path = "../../../client/informant" }
|
||||
sc-consensus = { path = "../../../client/consensus/common" }
|
||||
|
||||
sp-runtime = { path = "../../../primitives/runtime" }
|
||||
sp-keyring = { path = "../../../primitives/keyring" }
|
||||
sp-timestamp = { path = "../../../primitives/timestamp" }
|
||||
sp-api = { path = "../../../primitives/api" }
|
||||
sp-inherents = { path = "../../../primitives/inherents" }
|
||||
sp-keystore = { path = "../../../primitives/keystore" }
|
||||
|
||||
log = "0.4.14"
|
||||
|
||||
@@ -13,33 +13,31 @@ publish = true
|
||||
targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
pallet-balances = { version = "4.0.0-dev", path = "../../../frame/balances" }
|
||||
sc-service = { version = "0.10.0-dev", features = ["test-helpers", "db"], path = "../../../client/service" }
|
||||
sc-client-db = { version = "0.10.0-dev", path = "../../../client/db/", features = ["kvdb-rocksdb", "parity-db"] }
|
||||
sc-service = { version = "0.10.0-dev", features = [
|
||||
"test-helpers",
|
||||
"db",
|
||||
], path = "../../../client/service" }
|
||||
sc-client-db = { version = "0.10.0-dev", path = "../../../client/db/", features = [
|
||||
"kvdb-rocksdb",
|
||||
"parity-db",
|
||||
] }
|
||||
sc-client-api = { version = "4.0.0-dev", path = "../../../client/api/" }
|
||||
sc-consensus = { version = "0.10.0-dev", path = "../../../client/consensus/common" }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0" }
|
||||
pallet-contracts = { version = "4.0.0-dev", path = "../../../frame/contracts" }
|
||||
pallet-grandpa = { version = "4.0.0-dev", path = "../../../frame/grandpa" }
|
||||
pallet-indices = { version = "4.0.0-dev", path = "../../../frame/indices" }
|
||||
sp-keyring = { version = "4.0.0-dev", path = "../../../primitives/keyring" }
|
||||
node-executor = { version = "3.0.0-dev", path = "../executor" }
|
||||
node-primitives = { version = "2.0.0", path = "../primitives" }
|
||||
node-runtime = { version = "3.0.0-dev", path = "../runtime" }
|
||||
sp-core = { version = "4.0.0-dev", path = "../../../primitives/core" }
|
||||
sp-io = { version = "4.0.0-dev", path = "../../../primitives/io" }
|
||||
frame-support = { version = "4.0.0-dev", path = "../../../frame/support" }
|
||||
pallet-session = { version = "4.0.0-dev", path = "../../../frame/session" }
|
||||
pallet-society = { version = "4.0.0-dev", path = "../../../frame/society" }
|
||||
sp-runtime = { version = "4.0.0-dev", path = "../../../primitives/runtime" }
|
||||
pallet-staking = { version = "4.0.0-dev", path = "../../../frame/staking" }
|
||||
sc-executor = { version = "0.10.0-dev", path = "../../../client/executor", features = ["wasmtime"] }
|
||||
sc-executor = { version = "0.10.0-dev", path = "../../../client/executor", features = [
|
||||
"wasmtime",
|
||||
] }
|
||||
sp-consensus = { version = "0.10.0-dev", path = "../../../primitives/consensus/common" }
|
||||
frame-system = { version = "4.0.0-dev", path = "../../../frame/system" }
|
||||
substrate-test-client = { version = "2.0.0", path = "../../../test-utils/client" }
|
||||
pallet-timestamp = { version = "4.0.0-dev", path = "../../../frame/timestamp" }
|
||||
pallet-transaction-payment = { version = "4.0.0-dev", path = "../../../frame/transaction-payment" }
|
||||
pallet-treasury = { version = "4.0.0-dev", path = "../../../frame/treasury" }
|
||||
sp-api = { version = "4.0.0-dev", path = "../../../primitives/api" }
|
||||
sp-timestamp = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/timestamp" }
|
||||
sp-block-builder = { version = "4.0.0-dev", path = "../../../primitives/block-builder" }
|
||||
@@ -50,7 +48,3 @@ log = "0.4.8"
|
||||
tempfile = "3.1.0"
|
||||
fs_extra = "1"
|
||||
futures = "0.3.1"
|
||||
|
||||
[dev-dependencies]
|
||||
criterion = "0.3.0"
|
||||
sc-cli = { version = "0.10.0-dev", path = "../../../client/cli" }
|
||||
|
||||
@@ -14,25 +14,21 @@ readme = "README.md"
|
||||
targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = [
|
||||
"derive",
|
||||
] }
|
||||
sp-consensus = { version = "0.10.0-dev", path = "../../primitives/consensus/common" }
|
||||
derive_more = "0.99.2"
|
||||
sc-executor = { version = "0.10.0-dev", path = "../executor" }
|
||||
sp-externalities = { version = "0.10.0-dev", path = "../../primitives/externalities" }
|
||||
fnv = "1.0.6"
|
||||
futures = "0.3.1"
|
||||
hash-db = { version = "0.15.2", default-features = false }
|
||||
sp-blockchain = { version = "4.0.0-dev", path = "../../primitives/blockchain" }
|
||||
sp-inherents = { version = "4.0.0-dev", default-features = false, path = "../../primitives/inherents" }
|
||||
kvdb = "0.10.0"
|
||||
log = "0.4.8"
|
||||
parking_lot = "0.11.1"
|
||||
lazy_static = "1.4.0"
|
||||
sp-database = { version = "4.0.0-dev", path = "../../primitives/database" }
|
||||
sp-core = { version = "4.0.0-dev", default-features = false, path = "../../primitives/core" }
|
||||
sp-keystore = { version = "0.10.0-dev", default-features = false, path = "../../primitives/keystore" }
|
||||
sp-std = { version = "4.0.0-dev", default-features = false, path = "../../primitives/std" }
|
||||
sp-version = { version = "4.0.0-dev", default-features = false, path = "../../primitives/version" }
|
||||
sp-api = { version = "4.0.0-dev", path = "../../primitives/api" }
|
||||
sp-utils = { version = "4.0.0-dev", path = "../../primitives/utils" }
|
||||
sp-runtime = { version = "4.0.0-dev", default-features = false, path = "../../primitives/runtime" }
|
||||
@@ -43,7 +39,6 @@ sc-transaction-pool-api = { version = "4.0.0-dev", path = "../transaction-pool/a
|
||||
prometheus-endpoint = { package = "substrate-prometheus-endpoint", version = "0.9.0", path = "../../utils/prometheus" }
|
||||
|
||||
[dev-dependencies]
|
||||
kvdb-memorydb = "0.10.0"
|
||||
sp-test-primitives = { version = "2.0.0", path = "../../primitives/test-primitives" }
|
||||
substrate-test-runtime = { version = "2.0.0", path = "../../test-utils/runtime" }
|
||||
substrate-test-runtime = { version = "2.0.0", path = "../../test-utils/runtime" }
|
||||
thiserror = "1.0.21"
|
||||
|
||||
@@ -20,18 +20,16 @@ prost-build = "0.7"
|
||||
async-trait = "0.1"
|
||||
codec = { package = "parity-scale-codec", default-features = false, version = "2.0.0" }
|
||||
derive_more = "0.99.2"
|
||||
either = "1.5.3"
|
||||
futures = "0.3.9"
|
||||
futures-timer = "3.0.1"
|
||||
ip_network = "0.3.4"
|
||||
libp2p = { version = "0.37.1", default-features = false, features = ["kad"] }
|
||||
log = "0.4.8"
|
||||
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../utils/prometheus", version = "0.9.0"}
|
||||
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../utils/prometheus", version = "0.9.0" }
|
||||
prost = "0.7"
|
||||
rand = "0.7.2"
|
||||
sc-client-api = { version = "4.0.0-dev", path = "../api" }
|
||||
sc-network = { version = "0.10.0-dev", path = "../network" }
|
||||
serde_json = "1.0.41"
|
||||
sp-authority-discovery = { version = "4.0.0-dev", path = "../../primitives/authority-discovery" }
|
||||
sp-blockchain = { version = "4.0.0-dev", path = "../../primitives/blockchain" }
|
||||
sp-core = { version = "4.0.0-dev", path = "../../primitives/core" }
|
||||
@@ -42,5 +40,4 @@ sp-api = { version = "4.0.0-dev", path = "../../primitives/api" }
|
||||
[dev-dependencies]
|
||||
quickcheck = "1.0.3"
|
||||
sp-tracing = { version = "4.0.0-dev", path = "../../primitives/tracing" }
|
||||
sc-peerset = { version = "4.0.0-dev", path = "../peerset" }
|
||||
substrate-test-runtime-client = { version = "2.0.0", path = "../../test-utils/runtime/client"}
|
||||
substrate-test-runtime-client = { version = "2.0.0", path = "../../test-utils/runtime/client" }
|
||||
|
||||
@@ -319,8 +319,9 @@ where
|
||||
|
||||
for inherent in block_builder.create_inherents(inherent_data)? {
|
||||
match block_builder.push(inherent) {
|
||||
Err(ApplyExtrinsicFailed(Validity(e))) if e.exhausted_resources() =>
|
||||
warn!("⚠️ Dropping non-mandatory inherent from overweight block."),
|
||||
Err(ApplyExtrinsicFailed(Validity(e))) if e.exhausted_resources() => {
|
||||
warn!("⚠️ Dropping non-mandatory inherent from overweight block.")
|
||||
},
|
||||
Err(ApplyExtrinsicFailed(Validity(e))) if e.was_mandatory() => {
|
||||
error!(
|
||||
"❌️ Mandatory inherent extrinsic returned error. Block cannot be produced."
|
||||
|
||||
@@ -22,8 +22,9 @@ sp-core = { version = "4.0.0-dev", path = "../../primitives/core" }
|
||||
sp-block-builder = { version = "4.0.0-dev", path = "../../primitives/block-builder" }
|
||||
sp-inherents = { version = "4.0.0-dev", path = "../../primitives/inherents" }
|
||||
sc-client-api = { version = "4.0.0-dev", path = "../api" }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", features = ["derive"] }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", features = [
|
||||
"derive",
|
||||
] }
|
||||
|
||||
[dev-dependencies]
|
||||
substrate-test-runtime-client = { path = "../../test-utils/runtime/client" }
|
||||
sp-trie = { version = "4.0.0-dev", path = "../../primitives/trie" }
|
||||
|
||||
@@ -24,19 +24,16 @@ sc-consensus = { version = "0.10.0-dev", path = "../../../client/consensus/commo
|
||||
sp-consensus-slots = { version = "0.10.0-dev", path = "../../../primitives/consensus/slots" }
|
||||
derive_more = "0.99.2"
|
||||
futures = "0.3.9"
|
||||
futures-timer = "3.0.1"
|
||||
sp-inherents = { version = "4.0.0-dev", path = "../../../primitives/inherents" }
|
||||
log = "0.4.8"
|
||||
sp-core = { version = "4.0.0-dev", path = "../../../primitives/core" }
|
||||
sp-blockchain = { version = "4.0.0-dev", path = "../../../primitives/blockchain" }
|
||||
sp-io = { version = "4.0.0-dev", path = "../../../primitives/io" }
|
||||
sp-version = { version = "4.0.0-dev", path = "../../../primitives/version" }
|
||||
sc-consensus-slots = { version = "0.10.0-dev", path = "../slots" }
|
||||
sp-api = { version = "4.0.0-dev", path = "../../../primitives/api" }
|
||||
sp-runtime = { version = "4.0.0-dev", path = "../../../primitives/runtime" }
|
||||
sp-keystore = { version = "0.10.0-dev", path = "../../../primitives/keystore" }
|
||||
sc-telemetry = { version = "4.0.0-dev", path = "../../telemetry" }
|
||||
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../../utils/prometheus", version = "0.9.0"}
|
||||
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../../utils/prometheus", version = "0.9.0" }
|
||||
async-trait = "0.1.50"
|
||||
# We enable it only for web-wasm check
|
||||
# See https://docs.rs/getrandom/0.2.1/getrandom/#webassembly-support
|
||||
@@ -46,11 +43,9 @@ getrandom = { version = "0.2", features = ["js"], optional = true }
|
||||
sp-timestamp = { version = "4.0.0-dev", path = "../../../primitives/timestamp" }
|
||||
sp-keyring = { version = "4.0.0-dev", path = "../../../primitives/keyring" }
|
||||
sp-tracing = { version = "4.0.0-dev", path = "../../../primitives/tracing" }
|
||||
sc-executor = { version = "0.10.0-dev", path = "../../executor" }
|
||||
sc-keystore = { version = "4.0.0-dev", path = "../../keystore" }
|
||||
sc-network = { version = "0.10.0-dev", path = "../../network" }
|
||||
sc-network-test = { version = "0.8.0", path = "../../network/test" }
|
||||
sc-service = { version = "0.10.0-dev", default-features = false, path = "../../service" }
|
||||
substrate-test-runtime-client = { version = "2.0.0", path = "../../../test-utils/runtime/client" }
|
||||
tempfile = "3.1.0"
|
||||
parking_lot = "0.11.1"
|
||||
|
||||
@@ -14,7 +14,9 @@ readme = "README.md"
|
||||
targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", features = ["derive"] }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", features = [
|
||||
"derive",
|
||||
] }
|
||||
sp-consensus-babe = { version = "0.10.0-dev", path = "../../../primitives/consensus/babe" }
|
||||
sc-consensus = { version = "0.10.0-dev", path = "../../../client/consensus/common" }
|
||||
sp-core = { version = "4.0.0-dev", path = "../../../primitives/core" }
|
||||
@@ -37,14 +39,11 @@ sp-blockchain = { version = "4.0.0-dev", path = "../../../primitives/blockchain"
|
||||
sp-consensus = { version = "0.10.0-dev", path = "../../../primitives/consensus/common" }
|
||||
sp-consensus-slots = { version = "0.10.0-dev", path = "../../../primitives/consensus/slots" }
|
||||
sp-consensus-vrf = { version = "0.10.0-dev", path = "../../../primitives/consensus/vrf" }
|
||||
sc-consensus-uncles = { version = "0.10.0-dev", path = "../uncles" }
|
||||
sc-consensus-slots = { version = "0.10.0-dev", path = "../slots" }
|
||||
sp-runtime = { version = "4.0.0-dev", path = "../../../primitives/runtime" }
|
||||
sp-utils = { version = "4.0.0-dev", path = "../../../primitives/utils" }
|
||||
fork-tree = { version = "3.0.0", path = "../../../utils/fork-tree" }
|
||||
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../../utils/prometheus", version = "0.9.0"}
|
||||
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../../utils/prometheus", version = "0.9.0" }
|
||||
futures = "0.3.9"
|
||||
futures-timer = "3.0.1"
|
||||
parking_lot = "0.11.1"
|
||||
log = "0.4.8"
|
||||
schnorrkel = { version = "0.9.1", features = ["preaudit_deprecated"] }
|
||||
@@ -56,12 +55,9 @@ async-trait = "0.1.50"
|
||||
|
||||
[dev-dependencies]
|
||||
sp-timestamp = { version = "4.0.0-dev", path = "../../../primitives/timestamp" }
|
||||
sp-keyring = { version = "4.0.0-dev", path = "../../../primitives/keyring" }
|
||||
sp-tracing = { version = "4.0.0-dev", path = "../../../primitives/tracing" }
|
||||
sc-executor = { version = "0.10.0-dev", path = "../../executor" }
|
||||
sc-network = { version = "0.10.0-dev", path = "../../network" }
|
||||
sc-network-test = { version = "0.8.0", path = "../../network/test" }
|
||||
sc-service = { version = "0.10.0-dev", default-features = false, path = "../../service" }
|
||||
substrate-test-runtime-client = { version = "2.0.0", path = "../../../test-utils/runtime/client" }
|
||||
sc-block-builder = { version = "0.10.0-dev", path = "../../block-builder" }
|
||||
rand_chacha = "0.2.2"
|
||||
|
||||
@@ -20,8 +20,8 @@ futures = { version = "0.3.1", features = ["thread-pool"] }
|
||||
futures-timer = "3.0.1"
|
||||
sc-client-api = { version = "4.0.0-dev", path = "../../api" }
|
||||
sp-blockchain = { version = "4.0.0-dev", path = "../../../primitives/blockchain" }
|
||||
sp-core = { path = "../../../primitives/core", version = "4.0.0-dev"}
|
||||
sp-consensus = { path = "../../../primitives/consensus/common", version = "0.10.0-dev"}
|
||||
sp-core = { path = "../../../primitives/core", version = "4.0.0-dev" }
|
||||
sp-consensus = { path = "../../../primitives/consensus/common", version = "0.10.0-dev" }
|
||||
sp-state-machine = { version = "0.10.0-dev", path = "../../../primitives/state-machine" }
|
||||
sp-runtime = { version = "4.0.0-dev", path = "../../../primitives/runtime" }
|
||||
sp-utils = { version = "4.0.0-dev", path = "../../../primitives/utils" }
|
||||
|
||||
@@ -561,12 +561,13 @@ where
|
||||
// Ok, we found our node.
|
||||
// and here we figure out which of the internal epochs
|
||||
// of a genesis node to use based on their start slot.
|
||||
PersistedEpochHeader::Genesis(ref epoch_0, ref epoch_1) =>
|
||||
PersistedEpochHeader::Genesis(ref epoch_0, ref epoch_1) => {
|
||||
if epoch_1.start_slot <= slot {
|
||||
(EpochIdentifierPosition::Genesis1, epoch_1.clone())
|
||||
} else {
|
||||
(EpochIdentifierPosition::Genesis0, epoch_0.clone())
|
||||
},
|
||||
}
|
||||
},
|
||||
PersistedEpochHeader::Regular(ref epoch_n) =>
|
||||
(EpochIdentifierPosition::Regular, epoch_n.clone()),
|
||||
},
|
||||
|
||||
@@ -19,36 +19,33 @@ jsonrpc-core = "18.0.0"
|
||||
jsonrpc-core-client = "18.0.0"
|
||||
jsonrpc-derive = "18.0.0"
|
||||
log = "0.4.8"
|
||||
parking_lot = "0.11.1"
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0" }
|
||||
serde = { version = "1.0", features=["derive"] }
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
assert_matches = "1.3.0"
|
||||
async-trait = "0.1.50"
|
||||
|
||||
sc-client-api = { path = "../../api", version = "4.0.0-dev"}
|
||||
sc-client-api = { path = "../../api", version = "4.0.0-dev" }
|
||||
sc-consensus = { version = "0.10.0-dev", path = "../../consensus/common" }
|
||||
sc-consensus-babe = { path = "../../consensus/babe", version = "0.10.0-dev"}
|
||||
sc-consensus-epochs = { path = "../../consensus/epochs", version = "0.10.0-dev"}
|
||||
sp-consensus-babe = { path = "../../../primitives/consensus/babe", version = "0.10.0-dev"}
|
||||
sc-consensus-babe = { path = "../../consensus/babe", version = "0.10.0-dev" }
|
||||
sc-consensus-epochs = { path = "../../consensus/epochs", version = "0.10.0-dev" }
|
||||
sp-consensus-babe = { path = "../../../primitives/consensus/babe", version = "0.10.0-dev" }
|
||||
|
||||
sc-transaction-pool = { path = "../../transaction-pool", version = "4.0.0-dev"}
|
||||
sp-blockchain = { path = "../../../primitives/blockchain", version = "4.0.0-dev"}
|
||||
sp-consensus = { path = "../../../primitives/consensus/common", version = "0.10.0-dev"}
|
||||
sp-consensus-slots = { path = "../../../primitives/consensus/slots", version = "0.10.0-dev"}
|
||||
sp-inherents = { path = "../../../primitives/inherents", version = "4.0.0-dev"}
|
||||
sp-runtime = { path = "../../../primitives/runtime", version = "4.0.0-dev"}
|
||||
sp-core = { path = "../../../primitives/core", version = "4.0.0-dev"}
|
||||
sp-keystore = { path = "../../../primitives/keystore", version = "0.10.0-dev"}
|
||||
sp-keyring = { path = "../../../primitives/keyring", version = "4.0.0-dev"}
|
||||
sp-api = { path = "../../../primitives/api", version = "4.0.0-dev"}
|
||||
sc-transaction-pool-api = { path = "../../../client/transaction-pool/api", version = "4.0.0-dev"}
|
||||
sp-timestamp = { path = "../../../primitives/timestamp", version = "4.0.0-dev"}
|
||||
sc-transaction-pool = { path = "../../transaction-pool", version = "4.0.0-dev" }
|
||||
sp-blockchain = { path = "../../../primitives/blockchain", version = "4.0.0-dev" }
|
||||
sp-consensus = { path = "../../../primitives/consensus/common", version = "0.10.0-dev" }
|
||||
sp-consensus-slots = { path = "../../../primitives/consensus/slots", version = "0.10.0-dev" }
|
||||
sp-inherents = { path = "../../../primitives/inherents", version = "4.0.0-dev" }
|
||||
sp-runtime = { path = "../../../primitives/runtime", version = "4.0.0-dev" }
|
||||
sp-core = { path = "../../../primitives/core", version = "4.0.0-dev" }
|
||||
sp-keystore = { path = "../../../primitives/keystore", version = "0.10.0-dev" }
|
||||
sp-api = { path = "../../../primitives/api", version = "4.0.0-dev" }
|
||||
sc-transaction-pool-api = { path = "../../../client/transaction-pool/api", version = "4.0.0-dev" }
|
||||
sp-timestamp = { path = "../../../primitives/timestamp", version = "4.0.0-dev" }
|
||||
|
||||
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../../utils/prometheus", version = "0.9.0"}
|
||||
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../../utils/prometheus", version = "0.9.0" }
|
||||
|
||||
[dev-dependencies]
|
||||
tokio = { version = "0.2", features = ["rt-core", "macros"] }
|
||||
sc-basic-authorship = { path = "../../basic-authorship", version = "0.10.0-dev"}
|
||||
sc-basic-authorship = { path = "../../basic-authorship", version = "0.10.0-dev" }
|
||||
substrate-test-runtime-client = { path = "../../../test-utils/runtime/client", version = "2.0.0" }
|
||||
substrate-test-runtime-transaction-pool = { path = "../../../test-utils/runtime/transaction-pool", version = "2.0.0" }
|
||||
tempfile = "3.1.0"
|
||||
|
||||
@@ -17,8 +17,6 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0" }
|
||||
sc-client-api = { version = "4.0.0-dev", path = "../../api" }
|
||||
sp-core = { version = "4.0.0-dev", path = "../../../primitives/core" }
|
||||
sp-trie = { version = "4.0.0-dev", path = "../../../primitives/trie" }
|
||||
sp-application-crypto = { version = "4.0.0-dev", path = "../../../primitives/application-crypto" }
|
||||
sp-arithmetic = { version = "4.0.0-dev", path = "../../../primitives/arithmetic" }
|
||||
sp-blockchain = { version = "4.0.0-dev", path = "../../../primitives/blockchain" }
|
||||
sc-consensus = { version = "0.10.0-dev", path = "../../../client/consensus/common" }
|
||||
@@ -34,7 +32,6 @@ futures = "0.3.9"
|
||||
futures-timer = "3.0.1"
|
||||
log = "0.4.11"
|
||||
thiserror = "1.0.21"
|
||||
impl-trait-for-tuples = "0.2.1"
|
||||
async-trait = "0.1.50"
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
@@ -20,25 +20,22 @@ kvdb-rocksdb = { version = "0.14.0", optional = true }
|
||||
kvdb-memorydb = "0.10.0"
|
||||
linked-hash-map = "0.5.4"
|
||||
hash-db = "0.15.2"
|
||||
parity-util-mem = { version = "0.10.0", default-features = false, features = ["std"] }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", features = ["derive"] }
|
||||
blake2-rfc = "0.2.18"
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", features = [
|
||||
"derive",
|
||||
] }
|
||||
|
||||
sc-client-api = { version = "4.0.0-dev", path = "../api" }
|
||||
sp-arithmetic = { version = "4.0.0-dev", path = "../../primitives/arithmetic" }
|
||||
sp-core = { version = "4.0.0-dev", path = "../../primitives/core" }
|
||||
sp-runtime = { version = "4.0.0-dev", path = "../../primitives/runtime" }
|
||||
sp-state-machine = { version = "0.10.0-dev", path = "../../primitives/state-machine" }
|
||||
sc-executor = { version = "0.10.0-dev", path = "../executor" }
|
||||
sc-state-db = { version = "0.10.0-dev", path = "../state-db" }
|
||||
sp-trie = { version = "4.0.0-dev", path = "../../primitives/trie" }
|
||||
sp-blockchain = { version = "4.0.0-dev", path = "../../primitives/blockchain" }
|
||||
sp-database = { version = "4.0.0-dev", path = "../../primitives/database" }
|
||||
parity-db = { version = "0.3.1", optional = true }
|
||||
prometheus-endpoint = { package = "substrate-prometheus-endpoint", version = "0.9.0", path = "../../utils/prometheus" }
|
||||
|
||||
[dev-dependencies]
|
||||
sp-keyring = { version = "4.0.0-dev", path = "../../primitives/keyring" }
|
||||
sp-tracing = { version = "4.0.0-dev", path = "../../primitives/tracing" }
|
||||
substrate-test-runtime-client = { version = "2.0.0", path = "../../test-utils/runtime/client" }
|
||||
quickcheck = "1.0.3"
|
||||
|
||||
@@ -67,15 +67,19 @@ impl From<io::Error> for UpgradeError {
|
||||
impl fmt::Display for UpgradeError {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
match self {
|
||||
UpgradeError::UnknownDatabaseVersion =>
|
||||
write!(f, "Database version cannot be read from exisiting db_version file"),
|
||||
UpgradeError::UnknownDatabaseVersion => {
|
||||
write!(f, "Database version cannot be read from exisiting db_version file")
|
||||
},
|
||||
UpgradeError::MissingDatabaseVersionFile => write!(f, "Missing database version file"),
|
||||
UpgradeError::UnsupportedVersion(version) =>
|
||||
write!(f, "Database version no longer supported: {}", version),
|
||||
UpgradeError::FutureDatabaseVersion(version) =>
|
||||
write!(f, "Database version comes from future version of the client: {}", version),
|
||||
UpgradeError::DecodingJustificationBlock =>
|
||||
write!(f, "Decodoning justification block failed"),
|
||||
UpgradeError::UnsupportedVersion(version) => {
|
||||
write!(f, "Database version no longer supported: {}", version)
|
||||
},
|
||||
UpgradeError::FutureDatabaseVersion(version) => {
|
||||
write!(f, "Database version comes from future version of the client: {}", version)
|
||||
},
|
||||
UpgradeError::DecodingJustificationBlock => {
|
||||
write!(f, "Decodoning justification block failed")
|
||||
},
|
||||
UpgradeError::Io(err) => write!(f, "Io error: {}", err),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -249,8 +249,9 @@ impl fmt::Display for OpenDbError {
|
||||
match self {
|
||||
OpenDbError::Internal(e) => write!(f, "{}", e.to_string()),
|
||||
OpenDbError::DoesNotExist => write!(f, "Database does not exist at given location"),
|
||||
OpenDbError::NotEnabled(feat) =>
|
||||
write!(f, "`{}` feature not enabled, database can not be opened", feat),
|
||||
OpenDbError::NotEnabled(feat) => {
|
||||
write!(f, "`{}` feature not enabled, database can not be opened", feat)
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,17 +14,14 @@ readme = "README.md"
|
||||
targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
derive_more = "0.99.2"
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0" }
|
||||
sp-io = { version = "4.0.0-dev", path = "../../primitives/io" }
|
||||
sp-core = { version = "4.0.0-dev", path = "../../primitives/core" }
|
||||
sp-tasks = { version = "4.0.0-dev", path = "../../primitives/tasks" }
|
||||
sp-trie = { version = "4.0.0-dev", path = "../../primitives/trie" }
|
||||
sp-serializer = { version = "3.0.0", path = "../../primitives/serializer" }
|
||||
sp-version = { version = "4.0.0-dev", path = "../../primitives/version" }
|
||||
sp-panic-handler = { version = "3.0.0", path = "../../primitives/panic-handler" }
|
||||
wasmi = "0.9.0"
|
||||
parity-wasm = "0.42.0"
|
||||
lazy_static = "1.4.0"
|
||||
sp-api = { version = "4.0.0-dev", path = "../../primitives/api" }
|
||||
sp-wasm-interface = { version = "4.0.0-dev", path = "../../primitives/wasm-interface" }
|
||||
@@ -38,29 +35,23 @@ log = "0.4.8"
|
||||
libsecp256k1 = "0.3.4"
|
||||
|
||||
[dev-dependencies]
|
||||
assert_matches = "1.3.0"
|
||||
wat = "1.0"
|
||||
hex-literal = "0.3.1"
|
||||
sc-runtime-test = { version = "2.0.0", path = "runtime-test" }
|
||||
substrate-test-runtime = { version = "2.0.0", path = "../../test-utils/runtime" }
|
||||
sp-state-machine = { version = "0.10.0-dev", path = "../../primitives/state-machine" }
|
||||
sp-runtime = { version = "4.0.0-dev", path = "../../primitives/runtime" }
|
||||
sp-tracing = { version = "4.0.0-dev", path = "../../primitives/tracing" }
|
||||
sp-maybe-compressed-blob = { version = "4.0.0-dev", path = "../../primitives/maybe-compressed-blob" }
|
||||
sc-tracing = { version = "4.0.0-dev", path = "../tracing" }
|
||||
tracing = "0.1.25"
|
||||
tracing-subscriber = "0.2.18"
|
||||
tracing-subscriber = "0.2.19"
|
||||
paste = "1.0"
|
||||
regex = "1"
|
||||
|
||||
[features]
|
||||
default = [ "std" ]
|
||||
default = ["std"]
|
||||
# This crate does not have `no_std` support, we just require this for tests
|
||||
std = []
|
||||
wasm-extern-trace = []
|
||||
wasmtime = [
|
||||
"sc-executor-wasmtime",
|
||||
]
|
||||
wasmi-errno = [
|
||||
"wasmi/errno"
|
||||
]
|
||||
wasmtime = ["sc-executor-wasmtime"]
|
||||
wasmi-errno = ["wasmi/errno"]
|
||||
|
||||
@@ -24,11 +24,12 @@ sp-wasm-interface = { version = "4.0.0-dev", path = "../../../primitives/wasm-in
|
||||
sp-runtime-interface = { version = "4.0.0-dev", path = "../../../primitives/runtime-interface" }
|
||||
sp-core = { version = "4.0.0-dev", path = "../../../primitives/core" }
|
||||
sc-allocator = { version = "4.0.0-dev", path = "../../allocator" }
|
||||
wasmtime = { version = "0.27.0", default-features = false, features = ["cache", "parallel-compilation"] }
|
||||
pwasm-utils = { version = "0.18" }
|
||||
wasmtime = { version = "0.27.0", default-features = false, features = [
|
||||
"cache",
|
||||
"parallel-compilation",
|
||||
] }
|
||||
|
||||
[dev-dependencies]
|
||||
assert_matches = "1.3.0"
|
||||
sc-runtime-test = { version = "2.0.0", path = "../runtime-test" }
|
||||
sp-io = { version = "4.0.0-dev", path = "../../../primitives/io" }
|
||||
wat = "1.0"
|
||||
|
||||
@@ -16,8 +16,6 @@ codec = { package = "parity-scale-codec", version = "2.0.0" }
|
||||
derive_more = "0.99.11"
|
||||
futures = "0.3.8"
|
||||
log = "0.4.11"
|
||||
num-traits = "0.2.14"
|
||||
parking_lot = "0.11.1"
|
||||
prost = "0.7"
|
||||
sc-client-api = { version = "4.0.0-dev", path = "../api" }
|
||||
sc-finality-grandpa = { version = "0.10.0-dev", path = "../finality-grandpa" }
|
||||
|
||||
@@ -37,28 +37,26 @@ sc-telemetry = { version = "4.0.0-dev", path = "../telemetry" }
|
||||
sc-keystore = { version = "4.0.0-dev", path = "../keystore" }
|
||||
serde_json = "1.0.41"
|
||||
sc-client-api = { version = "4.0.0-dev", path = "../api" }
|
||||
sp-inherents = { version = "4.0.0-dev", path = "../../primitives/inherents" }
|
||||
sp-blockchain = { version = "4.0.0-dev", path = "../../primitives/blockchain" }
|
||||
sc-network = { version = "0.10.0-dev", path = "../network" }
|
||||
sc-network-gossip = { version = "0.10.0-dev", path = "../network-gossip" }
|
||||
sp-finality-grandpa = { version = "4.0.0-dev", path = "../../primitives/finality-grandpa" }
|
||||
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../utils/prometheus", version = "0.9.0"}
|
||||
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../utils/prometheus", version = "0.9.0" }
|
||||
sc-block-builder = { version = "0.10.0-dev", path = "../block-builder" }
|
||||
finality-grandpa = { version = "0.14.1", features = ["derive-codec"] }
|
||||
pin-project = "1.0.4"
|
||||
linked-hash-map = "0.5.4"
|
||||
async-trait = "0.1.50"
|
||||
wasm-timer = "0.2"
|
||||
|
||||
[dev-dependencies]
|
||||
assert_matches = "1.3.0"
|
||||
finality-grandpa = { version = "0.14.1", features = ["derive-codec", "test-helpers"] }
|
||||
finality-grandpa = { version = "0.14.1", features = [
|
||||
"derive-codec",
|
||||
"test-helpers",
|
||||
] }
|
||||
sc-network = { version = "0.10.0-dev", path = "../network" }
|
||||
sc-network-test = { version = "0.8.0", path = "../network/test" }
|
||||
sp-keyring = { version = "4.0.0-dev", path = "../../primitives/keyring" }
|
||||
substrate-test-runtime-client = { version = "2.0.0", path = "../../test-utils/runtime/client" }
|
||||
sp-consensus-babe = { version = "0.10.0-dev", path = "../../primitives/consensus/babe" }
|
||||
sp-state-machine = { version = "0.10.0-dev", path = "../../primitives/state-machine" }
|
||||
substrate-test-runtime-client = { version = "2.0.0", path = "../../test-utils/runtime/client" }
|
||||
sp-tracing = { version = "4.0.0-dev", path = "../../primitives/tracing" }
|
||||
tokio = { version = "0.2", features = ["rt-core"] }
|
||||
tempfile = "3.1.0"
|
||||
|
||||
@@ -29,11 +29,10 @@ sc-client-api = { version = "4.0.0-dev", path = "../../api" }
|
||||
|
||||
[dev-dependencies]
|
||||
sc-block-builder = { version = "0.10.0-dev", path = "../../block-builder" }
|
||||
sc-network-test = { version = "0.8.0", path = "../../network/test" }
|
||||
sc-rpc = { version = "4.0.0-dev", path = "../../rpc", features = ["test-helpers"] }
|
||||
sp-consensus = { version = "0.10.0-dev", path = "../../../primitives/consensus/common" }
|
||||
sc-rpc = { version = "4.0.0-dev", path = "../../rpc", features = [
|
||||
"test-helpers",
|
||||
] }
|
||||
sp-core = { version = "4.0.0-dev", path = "../../../primitives/core" }
|
||||
sp-finality-grandpa = { version = "4.0.0-dev", path = "../../../primitives/finality-grandpa" }
|
||||
sp-keyring = { version = "4.0.0-dev", path = "../../../primitives/keyring" }
|
||||
substrate-test-runtime-client = { version = "2.0.0", path = "../../../test-utils/runtime/client" }
|
||||
lazy_static = "1.4"
|
||||
substrate-test-runtime-client = { version = "2.0.0", path = "../../../test-utils/runtime/client" }
|
||||
|
||||
@@ -1194,19 +1194,21 @@ impl<Block: BlockT> Inner<Block> {
|
||||
catch_up_request: &CatchUpRequestMessage,
|
||||
) -> (bool, Option<Report>) {
|
||||
let report = match &self.pending_catch_up {
|
||||
PendingCatchUp::Requesting { who: peer, instant, .. } =>
|
||||
PendingCatchUp::Requesting { who: peer, instant, .. } => {
|
||||
if instant.elapsed() <= CATCH_UP_REQUEST_TIMEOUT {
|
||||
return (false, None)
|
||||
} else {
|
||||
// report peer for timeout
|
||||
Some((peer.clone(), cost::CATCH_UP_REQUEST_TIMEOUT))
|
||||
},
|
||||
PendingCatchUp::Processing { instant, .. } =>
|
||||
}
|
||||
},
|
||||
PendingCatchUp::Processing { instant, .. } => {
|
||||
if instant.elapsed() < CATCH_UP_PROCESS_TIMEOUT {
|
||||
return (false, None)
|
||||
} else {
|
||||
None
|
||||
},
|
||||
}
|
||||
},
|
||||
_ => None,
|
||||
};
|
||||
|
||||
|
||||
@@ -684,18 +684,21 @@ impl<Block: BlockT> Sink<Message<Block>> for OutgoingMessages<Block> {
|
||||
fn start_send(mut self: Pin<&mut Self>, mut msg: Message<Block>) -> Result<(), Self::Error> {
|
||||
// if we've voted on this round previously under the same key, send that vote instead
|
||||
match &mut msg {
|
||||
finality_grandpa::Message::PrimaryPropose(ref mut vote) =>
|
||||
finality_grandpa::Message::PrimaryPropose(ref mut vote) => {
|
||||
if let Some(propose) = self.has_voted.propose() {
|
||||
*vote = propose.clone();
|
||||
},
|
||||
finality_grandpa::Message::Prevote(ref mut vote) =>
|
||||
}
|
||||
},
|
||||
finality_grandpa::Message::Prevote(ref mut vote) => {
|
||||
if let Some(prevote) = self.has_voted.prevote() {
|
||||
*vote = prevote.clone();
|
||||
},
|
||||
finality_grandpa::Message::Precommit(ref mut vote) =>
|
||||
}
|
||||
},
|
||||
finality_grandpa::Message::Precommit(ref mut vote) => {
|
||||
if let Some(precommit) = self.has_voted.precommit() {
|
||||
*vote = precommit.clone();
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
// when locals exist, sign messages on import
|
||||
|
||||
@@ -17,17 +17,12 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
[dependencies]
|
||||
async-trait = "0.1.50"
|
||||
derive_more = "0.99.2"
|
||||
futures = "0.3.9"
|
||||
futures-util = "0.3.4"
|
||||
sp-application-crypto = { version = "4.0.0-dev", path = "../../primitives/application-crypto" }
|
||||
sp-core = { version = "4.0.0-dev", path = "../../primitives/core" }
|
||||
sp-keystore = { version = "0.10.0-dev", path = "../../primitives/keystore" }
|
||||
hex = "0.4.0"
|
||||
merlin = { version = "2.0", default-features = false }
|
||||
parking_lot = "0.11.1"
|
||||
rand = "0.7.2"
|
||||
serde_json = "1.0.41"
|
||||
subtle = "2.1.1"
|
||||
|
||||
[dev-dependencies]
|
||||
tempfile = "3.1.0"
|
||||
|
||||
@@ -12,7 +12,6 @@ readme = "README.md"
|
||||
|
||||
[dependencies]
|
||||
parking_lot = "0.11.1"
|
||||
lazy_static = "1.4.0"
|
||||
hash-db = "0.15.2"
|
||||
sp-runtime = { version = "4.0.0-dev", path = "../../primitives/runtime" }
|
||||
sp-externalities = { version = "0.10.0-dev", path = "../../primitives/externalities" }
|
||||
|
||||
@@ -29,5 +29,4 @@ tracing = "0.1.25"
|
||||
[dev-dependencies]
|
||||
async-std = "1.6.5"
|
||||
quickcheck = "1.0.3"
|
||||
rand = "0.7.2"
|
||||
substrate-test-runtime-client = { version = "2.0.0", path = "../../test-utils/runtime/client" }
|
||||
|
||||
@@ -263,8 +263,9 @@ impl<B: BlockT> Future for GossipEngine<B> {
|
||||
for sink in sinks {
|
||||
match sink.start_send(notification.clone()) {
|
||||
Ok(()) => {},
|
||||
Err(e) if e.is_full() =>
|
||||
unreachable!("Previously ensured that all sinks are ready; qed."),
|
||||
Err(e) if e.is_full() => {
|
||||
unreachable!("Previously ensured that all sinks are ready; qed.")
|
||||
},
|
||||
// Receiver got dropped. Will be removed in next iteration (See (1)).
|
||||
Err(_) => {},
|
||||
}
|
||||
@@ -623,8 +624,9 @@ mod tests {
|
||||
.and_modify(|e| *e += 1)
|
||||
.or_insert(1);
|
||||
},
|
||||
Poll::Ready(None) =>
|
||||
unreachable!("Sender side of channel is never dropped"),
|
||||
Poll::Ready(None) => {
|
||||
unreachable!("Sender side of channel is never dropped")
|
||||
},
|
||||
Poll::Pending => {},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,14 +127,15 @@ where
|
||||
} else {
|
||||
MessageIntent::Broadcast
|
||||
},
|
||||
MessageIntent::PeriodicRebroadcast =>
|
||||
MessageIntent::PeriodicRebroadcast => {
|
||||
if peer.known_messages.contains(&message_hash) {
|
||||
MessageIntent::PeriodicRebroadcast
|
||||
} else {
|
||||
// peer doesn't know message, so the logic should treat it as an
|
||||
// initial broadcast.
|
||||
MessageIntent::Broadcast
|
||||
},
|
||||
}
|
||||
},
|
||||
other => other,
|
||||
};
|
||||
|
||||
|
||||
@@ -20,13 +20,13 @@ prost-build = "0.7"
|
||||
async-trait = "0.1"
|
||||
async-std = "1.6.5"
|
||||
bitflags = "1.2.0"
|
||||
bs58 = "0.4.0"
|
||||
cid = "0.6.0"
|
||||
bytes = "1"
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", features = ["derive"] }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", features = [
|
||||
"derive",
|
||||
] }
|
||||
derive_more = "0.99.2"
|
||||
either = "1.5.3"
|
||||
erased-serde = "0.3.9"
|
||||
fnv = "1.0.6"
|
||||
fork-tree = { version = "3.0.0", path = "../../utils/fork-tree" }
|
||||
futures = "0.3.9"
|
||||
@@ -38,7 +38,6 @@ linked-hash-map = "0.5.4"
|
||||
linked_hash_set = "0.1.3"
|
||||
lru = "0.6.5"
|
||||
log = "0.4.8"
|
||||
nohash-hasher = "0.2.0"
|
||||
parking_lot = "0.11.1"
|
||||
pin-project = "1.0.4"
|
||||
prometheus-endpoint = { package = "substrate-prometheus-endpoint", version = "0.9.0", path = "../../utils/prometheus" }
|
||||
@@ -59,7 +58,10 @@ sp-runtime = { version = "4.0.0-dev", path = "../../primitives/runtime" }
|
||||
sp-utils = { version = "4.0.0-dev", path = "../../primitives/utils" }
|
||||
sp-finality-grandpa = { version = "4.0.0-dev", path = "../../primitives/finality-grandpa" }
|
||||
thiserror = "1"
|
||||
unsigned-varint = { version = "0.6.0", features = ["futures", "asynchronous_codec"] }
|
||||
unsigned-varint = { version = "0.6.0", features = [
|
||||
"futures",
|
||||
"asynchronous_codec",
|
||||
] }
|
||||
void = "1.0.2"
|
||||
wasm-timer = "0.2"
|
||||
zeroize = "1.2.0"
|
||||
@@ -70,7 +72,18 @@ version = "0.37.1"
|
||||
[target.'cfg(target_os = "unknown")'.dependencies.libp2p]
|
||||
version = "0.37.1"
|
||||
default-features = false
|
||||
features = ["identify", "kad", "mdns", "mplex", "noise", "ping", "request-response", "tcp-async-io", "websocket", "yamux"]
|
||||
features = [
|
||||
"identify",
|
||||
"kad",
|
||||
"mdns",
|
||||
"mplex",
|
||||
"noise",
|
||||
"ping",
|
||||
"request-response",
|
||||
"tcp-async-io",
|
||||
"websocket",
|
||||
"yamux",
|
||||
]
|
||||
|
||||
|
||||
[dev-dependencies]
|
||||
@@ -78,7 +91,6 @@ assert_matches = "1.3"
|
||||
libp2p = { version = "0.37.1", default-features = false }
|
||||
quickcheck = "1.0.3"
|
||||
rand = "0.7.2"
|
||||
sp-keyring = { version = "4.0.0-dev", path = "../../primitives/keyring" }
|
||||
sp-test-primitives = { version = "2.0.0", path = "../../primitives/test-primitives" }
|
||||
sp-tracing = { version = "4.0.0-dev", path = "../../primitives/tracing" }
|
||||
substrate-test-runtime = { version = "2.0.0", path = "../../test-utils/runtime" }
|
||||
|
||||
@@ -213,14 +213,15 @@ where
|
||||
) -> Result<Reply<B>, Error> {
|
||||
use schema::v1::light::response::Response;
|
||||
match response.response {
|
||||
Some(Response::RemoteCallResponse(response)) =>
|
||||
Some(Response::RemoteCallResponse(response)) => {
|
||||
if let Request::Call { request, .. } = request {
|
||||
let proof = Decode::decode(&mut response.proof.as_ref())?;
|
||||
let reply = self.checker.check_execution_proof(request, proof)?;
|
||||
Ok(Reply::VecU8(reply))
|
||||
} else {
|
||||
Err(Error::UnexpectedResponse)
|
||||
},
|
||||
}
|
||||
},
|
||||
Some(Response::RemoteReadResponse(response)) => match request {
|
||||
Request::Read { request, .. } => {
|
||||
let proof = Decode::decode(&mut response.proof.as_ref())?;
|
||||
@@ -234,7 +235,7 @@ where
|
||||
},
|
||||
_ => Err(Error::UnexpectedResponse),
|
||||
},
|
||||
Some(Response::RemoteChangesResponse(response)) =>
|
||||
Some(Response::RemoteChangesResponse(response)) => {
|
||||
if let Request::Changes { request, .. } = request {
|
||||
let max_block = Decode::decode(&mut response.max.as_ref())?;
|
||||
let roots_proof = Decode::decode(&mut response.roots_proof.as_ref())?;
|
||||
@@ -259,8 +260,9 @@ where
|
||||
Ok(Reply::VecNumberU32(reply))
|
||||
} else {
|
||||
Err(Error::UnexpectedResponse)
|
||||
},
|
||||
Some(Response::RemoteHeaderResponse(response)) =>
|
||||
}
|
||||
},
|
||||
Some(Response::RemoteHeaderResponse(response)) => {
|
||||
if let Request::Header { request, .. } = request {
|
||||
let header = if response.header.is_empty() {
|
||||
None
|
||||
@@ -272,7 +274,8 @@ where
|
||||
Ok(Reply::Header(reply))
|
||||
} else {
|
||||
Err(Error::UnexpectedResponse)
|
||||
},
|
||||
}
|
||||
},
|
||||
None => Err(Error::UnexpectedResponse),
|
||||
}
|
||||
}
|
||||
@@ -779,8 +782,9 @@ impl<B: Block> Request<B> {
|
||||
Request::Header { request, sender } => match result {
|
||||
Err(e) => send(Err(e), sender),
|
||||
Ok(Reply::Header(x)) => send(Ok(x), sender),
|
||||
reply =>
|
||||
log::error!("invalid reply for header request: {:?}, {:?}", reply, request),
|
||||
reply => {
|
||||
log::error!("invalid reply for header request: {:?}, {:?}", reply, request)
|
||||
},
|
||||
},
|
||||
Request::Read { request, sender } => match result {
|
||||
Err(e) => send(Err(e), sender),
|
||||
@@ -790,8 +794,9 @@ impl<B: Block> Request<B> {
|
||||
Request::ReadChild { request, sender } => match result {
|
||||
Err(e) => send(Err(e), sender),
|
||||
Ok(Reply::MapVecU8OptVecU8(x)) => send(Ok(x), sender),
|
||||
reply =>
|
||||
log::error!("invalid reply for read child request: {:?}, {:?}", reply, request),
|
||||
reply => {
|
||||
log::error!("invalid reply for read child request: {:?}, {:?}", reply, request)
|
||||
},
|
||||
},
|
||||
Request::Call { request, sender } => match result {
|
||||
Err(e) => send(Err(e), sender),
|
||||
@@ -801,8 +806,9 @@ impl<B: Block> Request<B> {
|
||||
Request::Changes { request, sender } => match result {
|
||||
Err(e) => send(Err(e), sender),
|
||||
Ok(Reply::VecNumberU32(x)) => send(Ok(x), sender),
|
||||
reply =>
|
||||
log::error!("invalid reply for changes request: {:?}, {:?}", reply, request),
|
||||
reply => {
|
||||
log::error!("invalid reply for changes request: {:?}, {:?}", reply, request)
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -352,8 +352,9 @@ impl NetworkBehaviour for PeerInfoBehaviour {
|
||||
let event = PeerInfoEvent::Identified { peer_id, info };
|
||||
return Poll::Ready(NetworkBehaviourAction::GenerateEvent(event))
|
||||
},
|
||||
IdentifyEvent::Error { peer_id, error } =>
|
||||
debug!(target: "sub-libp2p", "Identification with peer {:?} failed => {}", peer_id, error),
|
||||
IdentifyEvent::Error { peer_id, error } => {
|
||||
debug!(target: "sub-libp2p", "Identification with peer {:?} failed => {}", peer_id, error)
|
||||
},
|
||||
IdentifyEvent::Pushed { .. } => {},
|
||||
IdentifyEvent::Sent { .. } => {},
|
||||
},
|
||||
|
||||
@@ -565,8 +565,9 @@ impl Notifications {
|
||||
*entry.into_mut() = PeerState::Disabled { connections, backoff_until }
|
||||
},
|
||||
|
||||
PeerState::Poisoned =>
|
||||
error!(target: "sub-libp2p", "State of {:?} is poisoned", peer_id),
|
||||
PeerState::Poisoned => {
|
||||
error!(target: "sub-libp2p", "State of {:?} is poisoned", peer_id)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -218,7 +218,7 @@ where
|
||||
|
||||
loop {
|
||||
match mem::replace(this.handshake, NotificationsInSubstreamHandshake::Sent) {
|
||||
NotificationsInSubstreamHandshake::PendingSend(msg) =>
|
||||
NotificationsInSubstreamHandshake::PendingSend(msg) => {
|
||||
match Sink::poll_ready(this.socket.as_mut(), cx) {
|
||||
Poll::Ready(_) => {
|
||||
*this.handshake = NotificationsInSubstreamHandshake::Flush;
|
||||
@@ -231,8 +231,9 @@ where
|
||||
*this.handshake = NotificationsInSubstreamHandshake::PendingSend(msg);
|
||||
return Poll::Pending
|
||||
},
|
||||
},
|
||||
NotificationsInSubstreamHandshake::Flush =>
|
||||
}
|
||||
},
|
||||
NotificationsInSubstreamHandshake::Flush => {
|
||||
match Sink::poll_flush(this.socket.as_mut(), cx)? {
|
||||
Poll::Ready(()) =>
|
||||
*this.handshake = NotificationsInSubstreamHandshake::Sent,
|
||||
@@ -240,7 +241,8 @@ where
|
||||
*this.handshake = NotificationsInSubstreamHandshake::Flush;
|
||||
return Poll::Pending
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
st @ NotificationsInSubstreamHandshake::NotSent |
|
||||
st @ NotificationsInSubstreamHandshake::Sent |
|
||||
@@ -270,7 +272,7 @@ where
|
||||
*this.handshake = NotificationsInSubstreamHandshake::NotSent;
|
||||
return Poll::Pending
|
||||
},
|
||||
NotificationsInSubstreamHandshake::PendingSend(msg) =>
|
||||
NotificationsInSubstreamHandshake::PendingSend(msg) => {
|
||||
match Sink::poll_ready(this.socket.as_mut(), cx) {
|
||||
Poll::Ready(_) => {
|
||||
*this.handshake = NotificationsInSubstreamHandshake::Flush;
|
||||
@@ -283,8 +285,9 @@ where
|
||||
*this.handshake = NotificationsInSubstreamHandshake::PendingSend(msg);
|
||||
return Poll::Pending
|
||||
},
|
||||
},
|
||||
NotificationsInSubstreamHandshake::Flush =>
|
||||
}
|
||||
},
|
||||
NotificationsInSubstreamHandshake::Flush => {
|
||||
match Sink::poll_flush(this.socket.as_mut(), cx)? {
|
||||
Poll::Ready(()) =>
|
||||
*this.handshake = NotificationsInSubstreamHandshake::Sent,
|
||||
@@ -292,7 +295,8 @@ where
|
||||
*this.handshake = NotificationsInSubstreamHandshake::Flush;
|
||||
return Poll::Pending
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
NotificationsInSubstreamHandshake::Sent => {
|
||||
match Stream::poll_next(this.socket.as_mut(), cx) {
|
||||
|
||||
@@ -1967,8 +1967,9 @@ impl<B: BlockT + 'static, H: ExHashT> Future for NetworkWorker<B, H> {
|
||||
}
|
||||
}
|
||||
},
|
||||
Poll::Ready(SwarmEvent::Dialing(peer_id)) =>
|
||||
trace!(target: "sub-libp2p", "Libp2p => Dialing({:?})", peer_id),
|
||||
Poll::Ready(SwarmEvent::Dialing(peer_id)) => {
|
||||
trace!(target: "sub-libp2p", "Libp2p => Dialing({:?})", peer_id)
|
||||
},
|
||||
Poll::Ready(SwarmEvent::IncomingConnection { local_addr, send_back_addr }) => {
|
||||
trace!(target: "sub-libp2p", "Libp2p => IncomingConnection({},{}))",
|
||||
local_addr, send_back_addr);
|
||||
@@ -2007,9 +2008,10 @@ impl<B: BlockT + 'static, H: ExHashT> Future for NetworkWorker<B, H> {
|
||||
.inc();
|
||||
}
|
||||
},
|
||||
Poll::Ready(SwarmEvent::UnknownPeerUnreachableAddr { address, error }) =>
|
||||
Poll::Ready(SwarmEvent::UnknownPeerUnreachableAddr { address, error }) => {
|
||||
trace!(target: "sub-libp2p", "Libp2p => UnknownPeerUnreachableAddr({}): {}",
|
||||
address, error),
|
||||
address, error)
|
||||
},
|
||||
Poll::Ready(SwarmEvent::ListenerClosed { reason, addresses }) => {
|
||||
if let Some(metrics) = this.metrics.as_ref() {
|
||||
metrics.listeners_local_addresses.sub(addresses.len() as u64);
|
||||
|
||||
@@ -135,8 +135,9 @@ impl<TBlock: BlockT> RequestHandler<TBlock> {
|
||||
let IncomingRequest { peer, payload, pending_response } = request;
|
||||
|
||||
match self.handle_request(payload, pending_response) {
|
||||
Ok(()) =>
|
||||
debug!(target: "sync", "Handled grandpa warp sync request from {}.", peer),
|
||||
Ok(()) => {
|
||||
debug!(target: "sync", "Handled grandpa warp sync request from {}.", peer)
|
||||
},
|
||||
Err(e) => debug!(
|
||||
target: "sync",
|
||||
"Failed to handle grandpa warp sync request from {}: {}",
|
||||
|
||||
@@ -31,7 +31,6 @@ sc-block-builder = { version = "0.10.0-dev", path = "../../block-builder" }
|
||||
sp-consensus-babe = { version = "0.10.0-dev", path = "../../../primitives/consensus/babe" }
|
||||
substrate-test-runtime-client = { version = "2.0.0", path = "../../../test-utils/runtime/client" }
|
||||
substrate-test-runtime = { version = "2.0.0", path = "../../../test-utils/runtime" }
|
||||
tempfile = "3.1.0"
|
||||
sp-tracing = { version = "4.0.0-dev", path = "../../../primitives/tracing" }
|
||||
sc-service = { version = "0.10.0-dev", default-features = false, features = ["test-helpers"], path = "../../service" }
|
||||
async-trait = "0.1.50"
|
||||
|
||||
@@ -24,7 +24,6 @@ num_cpus = "1.10"
|
||||
parking_lot = "0.11.1"
|
||||
rand = "0.7.2"
|
||||
sc-client-api = { version = "4.0.0-dev", path = "../api" }
|
||||
sc-keystore = { version = "4.0.0-dev", path = "../keystore" }
|
||||
sc-network = { version = "0.10.0-dev", path = "../network" }
|
||||
sp-api = { version = "4.0.0-dev", path = "../../primitives/api" }
|
||||
sp-core = { version = "4.0.0-dev", path = "../../primitives/core" }
|
||||
|
||||
@@ -219,7 +219,7 @@ impl HttpApi {
|
||||
HttpApiRequest::Dispatched(Some(sender))
|
||||
},
|
||||
|
||||
HttpApiRequest::Dispatched(Some(mut sender)) =>
|
||||
HttpApiRequest::Dispatched(Some(mut sender)) => {
|
||||
if !chunk.is_empty() {
|
||||
match poll_sender(&mut sender) {
|
||||
Err(HttpError::IoError) => return Err(HttpError::IoError),
|
||||
@@ -234,11 +234,12 @@ impl HttpApi {
|
||||
// the sender.
|
||||
self.requests.insert(request_id, HttpApiRequest::Dispatched(None));
|
||||
return Ok(())
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
HttpApiRequest::Response(
|
||||
mut response @ HttpApiRequestRp { sending_body: Some(_), .. },
|
||||
) =>
|
||||
) => {
|
||||
if !chunk.is_empty() {
|
||||
match poll_sender(
|
||||
response
|
||||
@@ -264,7 +265,8 @@ impl HttpApi {
|
||||
}),
|
||||
);
|
||||
return Ok(())
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
HttpApiRequest::Fail(_) =>
|
||||
// If the request has already failed, return without putting back the request
|
||||
@@ -368,7 +370,7 @@ impl HttpApi {
|
||||
|
||||
// Update internal state based on received message.
|
||||
match next_message {
|
||||
Some(WorkerToApi::Response { id, status_code, headers, body }) =>
|
||||
Some(WorkerToApi::Response { id, status_code, headers, body }) => {
|
||||
match self.requests.remove(&id) {
|
||||
Some(HttpApiRequest::Dispatched(sending_body)) => {
|
||||
self.requests.insert(
|
||||
@@ -384,7 +386,8 @@ impl HttpApi {
|
||||
},
|
||||
None => {}, // can happen if we detected an IO error when sending the body
|
||||
_ => error!("State mismatch between the API and worker"),
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
Some(WorkerToApi::Fail { id, error }) => match self.requests.remove(&id) {
|
||||
Some(HttpApiRequest::Dispatched(_)) => {
|
||||
|
||||
@@ -648,8 +648,9 @@ impl Peerset {
|
||||
peer_id, DISCONNECT_REPUTATION_CHANGE, entry.reputation());
|
||||
entry.disconnect();
|
||||
},
|
||||
peersstate::Peer::NotConnected(_) | peersstate::Peer::Unknown(_) =>
|
||||
error!(target: "peerset", "Received dropped() for non-connected node"),
|
||||
peersstate::Peer::NotConnected(_) | peersstate::Peer::Unknown(_) => {
|
||||
error!(target: "peerset", "Received dropped() for non-connected node")
|
||||
},
|
||||
}
|
||||
|
||||
if let DropReason::Refused = reason {
|
||||
|
||||
@@ -18,9 +18,7 @@ jsonrpc-core = "18.0.0"
|
||||
pubsub = { package = "jsonrpc-pubsub", version = "18.0.0" }
|
||||
log = "0.4.8"
|
||||
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../utils/prometheus", version = "0.9.0"}
|
||||
serde = "1.0.126"
|
||||
serde_json = "1.0.41"
|
||||
sp-runtime = { version = "4.0.0-dev", path = "../../primitives/runtime" }
|
||||
|
||||
[target.'cfg(not(target_os = "unknown"))'.dependencies]
|
||||
http = { package = "jsonrpc-http-server", version = "18.0.0" }
|
||||
|
||||
@@ -30,17 +30,13 @@ sp-runtime = { version = "4.0.0-dev", path = "../../primitives/runtime" }
|
||||
sp-utils = { version = "4.0.0-dev", path = "../../primitives/utils" }
|
||||
sp-rpc = { version = "4.0.0-dev", path = "../../primitives/rpc" }
|
||||
sp-keystore = { version = "0.10.0-dev", path = "../../primitives/keystore" }
|
||||
sp-state-machine = { version = "0.10.0-dev", path = "../../primitives/state-machine" }
|
||||
sc-chain-spec = { version = "4.0.0-dev", path = "../chain-spec" }
|
||||
sc-executor = { version = "0.10.0-dev", path = "../executor" }
|
||||
sc-block-builder = { version = "0.10.0-dev", path = "../block-builder" }
|
||||
sc-keystore = { version = "4.0.0-dev", path = "../keystore" }
|
||||
sp-blockchain = { version = "4.0.0-dev", path = "../../primitives/blockchain" }
|
||||
sc-tracing = { version = "4.0.0-dev", path = "../tracing" }
|
||||
hash-db = { version = "0.15.2", default-features = false }
|
||||
parking_lot = "0.11.1"
|
||||
lazy_static = { version = "1.4.0", optional = true }
|
||||
sp-tracing = { version = "4.0.0-dev", path = "../../primitives/tracing" }
|
||||
sc-transaction-pool-api = { version = "4.0.0-dev", path = "../transaction-pool/api" }
|
||||
|
||||
[dev-dependencies]
|
||||
@@ -50,7 +46,6 @@ sc-network = { version = "0.10.0-dev", path = "../network" }
|
||||
sp-io = { version = "4.0.0-dev", path = "../../primitives/io" }
|
||||
substrate-test-runtime-client = { version = "2.0.0", path = "../../test-utils/runtime/client" }
|
||||
sc-transaction-pool = { version = "4.0.0-dev", path = "../transaction-pool" }
|
||||
sc-cli = { version = "0.10.0-dev", path = "../cli" }
|
||||
sp-consensus = { version = "0.10.0-dev", path = "../../primitives/consensus/common" }
|
||||
|
||||
[features]
|
||||
|
||||
@@ -17,9 +17,7 @@ default = ["db"]
|
||||
# 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.
|
||||
db = ["sc-client-db/with-kvdb-rocksdb", "sc-client-db/with-parity-db"]
|
||||
wasmtime = [
|
||||
"sc-executor/wasmtime",
|
||||
]
|
||||
wasmtime = ["sc-executor/wasmtime"]
|
||||
# exposes the client type
|
||||
test-helpers = []
|
||||
|
||||
@@ -30,7 +28,6 @@ jsonrpc-pubsub = "18.0"
|
||||
jsonrpc-core = "18.0"
|
||||
rand = "0.7.3"
|
||||
parking_lot = "0.11.1"
|
||||
lazy_static = "1.4.0"
|
||||
log = "0.4.11"
|
||||
futures-timer = "3.0.1"
|
||||
wasm-timer = "0.2"
|
||||
@@ -40,7 +37,6 @@ hash-db = "0.15.2"
|
||||
serde = "1.0.126"
|
||||
serde_json = "1.0.41"
|
||||
sc-keystore = { version = "4.0.0-dev", path = "../keystore" }
|
||||
sp-io = { version = "4.0.0-dev", path = "../../primitives/io" }
|
||||
sp-runtime = { version = "4.0.0-dev", path = "../../primitives/runtime" }
|
||||
sp-trie = { version = "4.0.0-dev", path = "../../primitives/trie" }
|
||||
sp-externalities = { version = "0.10.0-dev", path = "../../primitives/externalities" }
|
||||
@@ -75,12 +71,14 @@ sp-block-builder = { version = "4.0.0-dev", path = "../../primitives/block-build
|
||||
sc-informant = { version = "0.10.0-dev", path = "../informant" }
|
||||
sc-telemetry = { version = "4.0.0-dev", path = "../telemetry" }
|
||||
sc-offchain = { version = "4.0.0-dev", path = "../offchain" }
|
||||
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../utils/prometheus", version = "0.9.0"}
|
||||
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../utils/prometheus", version = "0.9.0" }
|
||||
sc-tracing = { version = "4.0.0-dev", path = "../tracing" }
|
||||
sp-tracing = { version = "4.0.0-dev", path = "../../primitives/tracing" }
|
||||
tracing = "0.1.25"
|
||||
tracing-futures = { version = "0.2.4" }
|
||||
parity-util-mem = { version = "0.10.0", default-features = false, features = ["primitive-types"] }
|
||||
parity-util-mem = { version = "0.10.0", default-features = false, features = [
|
||||
"primitive-types",
|
||||
] }
|
||||
async-trait = "0.1.50"
|
||||
|
||||
[target.'cfg(not(target_os = "unknown"))'.dependencies]
|
||||
@@ -90,8 +88,5 @@ directories = "3.0.1"
|
||||
[dev-dependencies]
|
||||
substrate-test-runtime-client = { version = "2.0.0", path = "../../test-utils/runtime/client" }
|
||||
substrate-test-runtime = { version = "2.0.0", path = "../../test-utils/runtime/" }
|
||||
sp-consensus-babe = { version = "0.10.0-dev", path = "../../primitives/consensus/babe" }
|
||||
grandpa = { version = "0.10.0-dev", package = "sc-finality-grandpa", path = "../finality-grandpa" }
|
||||
grandpa-primitives = { version = "4.0.0-dev", package = "sp-finality-grandpa", path = "../../primitives/finality-grandpa" }
|
||||
tokio = { version = "0.2.25", default-features = false }
|
||||
async-std = { version = "1.6.5", default-features = false }
|
||||
|
||||
@@ -13,7 +13,6 @@ readme = "README.md"
|
||||
targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
thiserror = "1.0.21"
|
||||
parking_lot = "0.11.1"
|
||||
log = "0.4.11"
|
||||
sc-client-api = { version = "4.0.0-dev", path = "../api" }
|
||||
|
||||
@@ -23,8 +23,6 @@ log = "0.4.8"
|
||||
pin-project = "1.0.4"
|
||||
rand = "0.7.2"
|
||||
serde = { version = "1.0.126", features = ["derive"] }
|
||||
take_mut = "0.2.2"
|
||||
void = "1.0.2"
|
||||
serde_json = "1.0.41"
|
||||
chrono = "0.4.19"
|
||||
thiserror = "1.0.21"
|
||||
|
||||
@@ -21,26 +21,20 @@ once_cell = "1.4.1"
|
||||
parking_lot = "0.11.1"
|
||||
regex = "1.4.2"
|
||||
rustc-hash = "1.1.0"
|
||||
erased-serde = "0.3.9"
|
||||
serde = "1.0.126"
|
||||
serde_json = "1.0.41"
|
||||
thiserror = "1.0.21"
|
||||
tracing = "0.1.25"
|
||||
tracing-log = "0.1.2"
|
||||
tracing-subscriber = "0.2.18"
|
||||
tracing-subscriber = "0.2.19"
|
||||
sp-tracing = { version = "4.0.0-dev", path = "../../primitives/tracing" }
|
||||
sp-rpc = { version = "4.0.0-dev", path = "../../primitives/rpc" }
|
||||
sp-block-builder = { version = "4.0.0-dev", path = "../../primitives/block-builder" }
|
||||
sp-storage = { version = "4.0.0-dev", path = "../../primitives/storage" }
|
||||
sp-runtime = { version = "4.0.0-dev", path = "../../primitives/runtime" }
|
||||
sp-blockchain = { version = "4.0.0-dev", path = "../../primitives/blockchain" }
|
||||
sp-api = { version = "4.0.0-dev", path = "../../primitives/api" }
|
||||
sp-core = { version = "4.0.0-dev", path = "../../primitives/core" }
|
||||
sc-telemetry = { version = "4.0.0-dev", path = "../telemetry" }
|
||||
sc-client-api = { version = "4.0.0-dev", path = "../api" }
|
||||
sc-tracing-proc-macro = { version = "4.0.0-dev", path = "./proc-macro" }
|
||||
sc-rpc-server = { version = "4.0.0-dev", path = "../rpc-servers" }
|
||||
wasm-timer = "0.2"
|
||||
sc-rpc-server = { version = "4.0.0-dev", path = "../rpc-servers" }
|
||||
|
||||
[target.'cfg(target_os = "unknown")'.dependencies]
|
||||
wasm-bindgen = "0.2.67"
|
||||
|
||||
@@ -93,8 +93,7 @@ where
|
||||
|
||||
// Custom code to display node name
|
||||
if let Some(span) = ctx.lookup_current() {
|
||||
let parents = span.parents();
|
||||
for span in std::iter::once(span).chain(parents) {
|
||||
for span in span.scope() {
|
||||
let exts = span.extensions();
|
||||
if let Some(prefix) = exts.get::<super::layers::Prefix>() {
|
||||
write!(writer, "{}", prefix.as_str())?;
|
||||
|
||||
@@ -31,7 +31,6 @@ sc-transaction-pool-api = { version = "4.0.0-dev", path = "./api" }
|
||||
sp-blockchain = { version = "4.0.0-dev", path = "../../primitives/blockchain" }
|
||||
sp-utils = { version = "4.0.0-dev", path = "../../primitives/utils" }
|
||||
wasm-timer = "0.2"
|
||||
derive_more = "0.99.2"
|
||||
serde = { version = "1.0.126", features = ["derive"] }
|
||||
linked-hash-map = "0.5.4"
|
||||
retain_mut = "0.1.3"
|
||||
|
||||
@@ -15,6 +15,5 @@ serde = { version = "1.0.126", features = ["derive"] }
|
||||
thiserror = { version = "1.0.21" }
|
||||
sp-runtime = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/runtime" }
|
||||
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0" }
|
||||
derive_more = { version = "0.99.11" }
|
||||
sp-blockchain = { version = "4.0.0-dev", path = "../../../primitives/blockchain" }
|
||||
|
||||
@@ -14,9 +14,10 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
sp-application-crypto = { version = "4.0.0-dev", default-features = false, path = "../../primitives/application-crypto" }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = [
|
||||
"derive",
|
||||
] }
|
||||
sp-std = { version = "4.0.0-dev", default-features = false, path = "../../primitives/std" }
|
||||
pallet-session = { version = "4.0.0-dev", default-features = false, path = "../session" }
|
||||
sp-runtime = { version = "4.0.0-dev", default-features = false, path = "../../primitives/runtime" }
|
||||
frame-support = { version = "4.0.0-dev", default-features = false, path = "../support" }
|
||||
sp-consensus-aura = { version = "0.10.0-dev", path = "../../primitives/consensus/aura", default-features = false }
|
||||
@@ -25,9 +26,7 @@ pallet-timestamp = { version = "4.0.0-dev", default-features = false, path = "..
|
||||
|
||||
[dev-dependencies]
|
||||
sp-core = { version = "4.0.0-dev", default-features = false, path = "../../primitives/core" }
|
||||
sp-io ={ version = "4.0.0-dev", path = "../../primitives/io" }
|
||||
lazy_static = "1.4.0"
|
||||
parking_lot = "0.11.1"
|
||||
sp-io = { version = "4.0.0-dev", path = "../../primitives/io" }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
|
||||
@@ -15,9 +15,13 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
[dependencies]
|
||||
sp-authority-discovery = { version = "4.0.0-dev", default-features = false, path = "../../primitives/authority-discovery" }
|
||||
sp-application-crypto = { version = "4.0.0-dev", default-features = false, path = "../../primitives/application-crypto" }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = [
|
||||
"derive",
|
||||
] }
|
||||
sp-std = { version = "4.0.0-dev", default-features = false, path = "../../primitives/std" }
|
||||
pallet-session = { version = "4.0.0-dev", features = ["historical" ], path = "../session", default-features = false }
|
||||
pallet-session = { version = "4.0.0-dev", features = [
|
||||
"historical",
|
||||
], path = "../session", default-features = false }
|
||||
sp-runtime = { version = "4.0.0-dev", default-features = false, path = "../../primitives/runtime" }
|
||||
frame-support = { version = "4.0.0-dev", default-features = false, path = "../support" }
|
||||
frame-system = { version = "4.0.0-dev", default-features = false, path = "../system" }
|
||||
@@ -25,7 +29,6 @@ frame-system = { version = "4.0.0-dev", default-features = false, path = "../sys
|
||||
[dev-dependencies]
|
||||
sp-core = { version = "4.0.0-dev", path = "../../primitives/core" }
|
||||
sp-io = { version = "4.0.0-dev", path = "../../primitives/io" }
|
||||
sp-staking = { version = "4.0.0-dev", default-features = false, path = "../../primitives/staking" }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
|
||||
@@ -13,7 +13,9 @@ readme = "README.md"
|
||||
targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = [
|
||||
"derive",
|
||||
] }
|
||||
sp-authorship = { version = "4.0.0-dev", default-features = false, path = "../../primitives/authorship" }
|
||||
sp-std = { version = "4.0.0-dev", default-features = false, path = "../../primitives/std" }
|
||||
sp-runtime = { version = "4.0.0-dev", default-features = false, path = "../../primitives/runtime" }
|
||||
@@ -23,8 +25,7 @@ impl-trait-for-tuples = "0.2.1"
|
||||
|
||||
[dev-dependencies]
|
||||
sp-core = { version = "4.0.0-dev", path = "../../primitives/core" }
|
||||
sp-io ={ version = "4.0.0-dev", path = "../../primitives/io" }
|
||||
serde = { version = "1.0.126" }
|
||||
sp-io = { version = "4.0.0-dev", path = "../../primitives/io" }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
|
||||
@@ -28,7 +28,6 @@ log = { version = "0.4.14", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
hex-literal = "0.3.1"
|
||||
serde = "1.0.126"
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
|
||||
@@ -13,7 +13,9 @@ readme = "README.md"
|
||||
targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = [
|
||||
"derive",
|
||||
] }
|
||||
sp-std = { version = "4.0.0-dev", default-features = false, path = "../../primitives/std" }
|
||||
sp-runtime = { version = "4.0.0-dev", default-features = false, path = "../../primitives/runtime" }
|
||||
frame-support = { version = "4.0.0-dev", default-features = false, path = "../support" }
|
||||
@@ -23,9 +25,8 @@ pallet-treasury = { version = "4.0.0-dev", default-features = false, path = "../
|
||||
frame-benchmarking = { version = "4.0.0-dev", default-features = false, path = "../benchmarking", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
sp-io ={ version = "4.0.0-dev", path = "../../primitives/io" }
|
||||
sp-io = { version = "4.0.0-dev", path = "../../primitives/io" }
|
||||
sp-core = { version = "4.0.0-dev", path = "../../primitives/core" }
|
||||
sp-storage = { version = "4.0.0-dev", path = "../../primitives/storage" }
|
||||
pallet-balances = { version = "4.0.0-dev", path = "../balances" }
|
||||
|
||||
[features]
|
||||
|
||||
@@ -13,7 +13,9 @@ readme = "README.md"
|
||||
targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = [
|
||||
"derive",
|
||||
] }
|
||||
sp-core = { version = "4.0.0-dev", default-features = false, path = "../../primitives/core" }
|
||||
sp-std = { version = "4.0.0-dev", default-features = false, path = "../../primitives/std" }
|
||||
sp-io = { version = "4.0.0-dev", default-features = false, path = "../../primitives/io" }
|
||||
@@ -25,7 +27,6 @@ log = { version = "0.4.14", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
hex-literal = "0.3.1"
|
||||
pallet-balances = { version = "4.0.0-dev", path = "../balances" }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
|
||||
@@ -14,11 +14,16 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
bitflags = "1.0"
|
||||
codec = { package = "parity-scale-codec", version = "2.2.0", default-features = false, features = ["derive", "max-encoded-len"] }
|
||||
codec = { package = "parity-scale-codec", version = "2.2.0", default-features = false, features = [
|
||||
"derive",
|
||||
"max-encoded-len",
|
||||
] }
|
||||
log = { version = "0.4", default-features = false }
|
||||
pwasm-utils = { version = "0.18", default-features = false }
|
||||
serde = { version = "1", optional = true, features = ["derive"] }
|
||||
smallvec = { version = "1", default-features = false, features = ["const_generics"] }
|
||||
smallvec = { version = "1", default-features = false, features = [
|
||||
"const_generics",
|
||||
] }
|
||||
wasmi-validation = { version = "0.4", default-features = false }
|
||||
|
||||
# Only used in benchmarking to generate random contract code
|
||||
@@ -40,7 +45,6 @@ sp-std = { version = "4.0.0-dev", default-features = false, path = "../../primit
|
||||
[dev-dependencies]
|
||||
assert_matches = "1"
|
||||
hex-literal = "0.3"
|
||||
paste = "1"
|
||||
pretty_assertions = "0.7"
|
||||
wat = "1"
|
||||
|
||||
|
||||
@@ -1644,10 +1644,28 @@ fn self_destruct_works() {
|
||||
|
||||
// The call triggers rent collection that reduces the amount of balance
|
||||
// that remains for the beneficiary.
|
||||
let balance_after_rent = 93_086;
|
||||
let mut events = System::events();
|
||||
let balance_after_rent = 99_000;
|
||||
|
||||
// The actual figure will bounce about with wasm compiler updates as the rent depends on
|
||||
// the compiled wasm size, so we replace it with a fixed value
|
||||
// as rent isn't what we're testing for in this test.
|
||||
let mut actual_balance_after_rent = 99_000;
|
||||
if let Event::Balances(pallet_balances::Event::Transfer(_, _, ref mut actual_bal)) =
|
||||
&mut events[1].event
|
||||
{
|
||||
std::mem::swap(&mut actual_balance_after_rent, actual_bal);
|
||||
assert!(
|
||||
(90_000..99_000).contains(&actual_balance_after_rent),
|
||||
"expected less than 100_000: {}",
|
||||
actual_balance_after_rent
|
||||
);
|
||||
} else {
|
||||
assert!(false);
|
||||
}
|
||||
|
||||
pretty_assertions::assert_eq!(
|
||||
System::events(),
|
||||
events,
|
||||
vec![
|
||||
EventRecord {
|
||||
phase: Phase::Initialization,
|
||||
@@ -1673,7 +1691,7 @@ fn self_destruct_works() {
|
||||
event: Event::Contracts(crate::Event::Terminated(addr.clone(), DJANGO)),
|
||||
topics: vec![],
|
||||
},
|
||||
]
|
||||
],
|
||||
);
|
||||
|
||||
// Check that account is gone
|
||||
@@ -1681,7 +1699,7 @@ fn self_destruct_works() {
|
||||
|
||||
// check that the beneficiary (django) got remaining balance
|
||||
// some rent was deducted before termination
|
||||
assert_eq!(Balances::free_balance(DJANGO), 1_000_000 + balance_after_rent);
|
||||
assert_eq!(Balances::free_balance(DJANGO), 1_000_000 + actual_balance_after_rent);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,9 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
serde = { version = "1.0.126", optional = true, features = ["derive"] }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = [
|
||||
"derive",
|
||||
] }
|
||||
sp-std = { version = "4.0.0-dev", default-features = false, path = "../../primitives/std" }
|
||||
sp-io = { version = "4.0.0-dev", default-features = false, path = "../../primitives/io" }
|
||||
sp-runtime = { version = "4.0.0-dev", default-features = false, path = "../../primitives/runtime" }
|
||||
@@ -26,9 +28,6 @@ frame-system = { version = "4.0.0-dev", default-features = false, path = "../sys
|
||||
sp-core = { version = "4.0.0-dev", path = "../../primitives/core" }
|
||||
pallet-balances = { version = "4.0.0-dev", path = "../balances" }
|
||||
pallet-scheduler = { version = "4.0.0-dev", path = "../scheduler" }
|
||||
sp-storage = { version = "4.0.0-dev", path = "../../primitives/storage" }
|
||||
substrate-test-utils = { version = "4.0.0-dev", path = "../../test-utils" }
|
||||
hex-literal = "0.3.1"
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
|
||||
@@ -1427,7 +1427,7 @@ impl<T: Config> Pallet<T> {
|
||||
}
|
||||
ReferendumInfoOf::<T>::insert(ref_index, ReferendumInfo::Ongoing(status));
|
||||
},
|
||||
Some(ReferendumInfo::Finished { end, approved }) =>
|
||||
Some(ReferendumInfo::Finished { end, approved }) => {
|
||||
if let Some((lock_periods, balance)) = votes[i].1.locked_if(approved) {
|
||||
let unlock_at = end + T::EnactmentPeriod::get() * lock_periods.into();
|
||||
let now = frame_system::Pallet::<T>::block_number();
|
||||
@@ -1438,7 +1438,8 @@ impl<T: Config> Pallet<T> {
|
||||
);
|
||||
prior.accumulate(unlock_at, balance)
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
None => {}, // Referendum was cancelled.
|
||||
}
|
||||
votes.remove(i);
|
||||
|
||||
@@ -14,7 +14,9 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
static_assertions = "1.1.0"
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = [
|
||||
"derive",
|
||||
] }
|
||||
log = { version = "0.4.14", default-features = false }
|
||||
|
||||
frame-support = { version = "4.0.0-dev", default-features = false, path = "../support" }
|
||||
@@ -30,19 +32,21 @@ frame-election-provider-support = { version = "4.0.0-dev", default-features = fa
|
||||
|
||||
# Optional imports for benchmarking
|
||||
frame-benchmarking = { version = "4.0.0-dev", default-features = false, path = "../benchmarking", optional = true }
|
||||
rand = { version = "0.7.3", default-features = false, optional = true, features = ["alloc", "small_rng"] }
|
||||
rand = { version = "0.7.3", default-features = false, optional = true, features = [
|
||||
"alloc",
|
||||
"small_rng",
|
||||
] }
|
||||
|
||||
[dev-dependencies]
|
||||
paste = "1.0.3"
|
||||
parking_lot = "0.11.0"
|
||||
rand = { version = "0.7.3" }
|
||||
hex-literal = "0.3.1"
|
||||
substrate-test-utils = { version = "4.0.0-dev", path = "../../test-utils" }
|
||||
sp-core = { version = "4.0.0-dev", default-features = false, path = "../../primitives/core" }
|
||||
sp-io = { version = "4.0.0-dev", path = "../../primitives/io" }
|
||||
sp-npos-elections = { version = "4.0.0-dev", default-features = false, path = "../../primitives/npos-elections" }
|
||||
sp-tracing = { version = "4.0.0-dev", path = "../../primitives/tracing" }
|
||||
frame-election-provider-support = { version = "4.0.0-dev", features = ["runtime-benchmarks"], path = "../election-provider-support" }
|
||||
frame-election-provider-support = { version = "4.0.0-dev", features = [
|
||||
"runtime-benchmarks",
|
||||
], path = "../election-provider-support" }
|
||||
pallet-balances = { version = "4.0.0-dev", path = "../balances" }
|
||||
frame-benchmarking = { version = "4.0.0-dev", path = "../benchmarking" }
|
||||
|
||||
@@ -64,8 +68,5 @@ std = [
|
||||
"frame-election-provider-support/std",
|
||||
"log/std",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"frame-benchmarking",
|
||||
"rand",
|
||||
]
|
||||
runtime-benchmarks = ["frame-benchmarking", "rand"]
|
||||
try-runtime = ["frame-support/try-runtime"]
|
||||
|
||||
@@ -13,7 +13,9 @@ readme = "README.md"
|
||||
targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = [
|
||||
"derive",
|
||||
] }
|
||||
sp-runtime = { version = "4.0.0-dev", default-features = false, path = "../../primitives/runtime" }
|
||||
sp-npos-elections = { version = "4.0.0-dev", default-features = false, path = "../../primitives/npos-elections" }
|
||||
sp-io = { version = "4.0.0-dev", default-features = false, path = "../../primitives/io" }
|
||||
@@ -25,7 +27,6 @@ frame-benchmarking = { version = "4.0.0-dev", default-features = false, path = "
|
||||
log = { version = "0.4.14", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
hex-literal = "0.3.1"
|
||||
pallet-balances = { version = "4.0.0-dev", path = "../balances" }
|
||||
sp-core = { version = "4.0.0-dev", path = "../../primitives/core" }
|
||||
substrate-test-utils = { version = "4.0.0-dev", path = "../../test-utils" }
|
||||
|
||||
@@ -679,8 +679,9 @@ pub mod pallet {
|
||||
// election.
|
||||
Members::<T>::mutate(|members| {
|
||||
match members.binary_search_by(|m| m.who.cmp(member)) {
|
||||
Ok(_) =>
|
||||
panic!("Duplicate member in elections-phragmen genesis: {}", member),
|
||||
Ok(_) => {
|
||||
panic!("Duplicate member in elections-phragmen genesis: {}", member)
|
||||
},
|
||||
Err(pos) => members.insert(
|
||||
pos,
|
||||
SeatHolder {
|
||||
|
||||
@@ -13,7 +13,9 @@ readme = "README.md"
|
||||
targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = [
|
||||
"derive",
|
||||
] }
|
||||
sp-core = { version = "4.0.0-dev", default-features = false, path = "../../primitives/core" }
|
||||
sp-std = { version = "4.0.0-dev", default-features = false, path = "../../primitives/std" }
|
||||
sp-io = { version = "4.0.0-dev", default-features = false, path = "../../primitives/io" }
|
||||
@@ -22,7 +24,6 @@ frame-support = { version = "4.0.0-dev", default-features = false, path = "../su
|
||||
frame-system = { version = "4.0.0-dev", default-features = false, path = "../system" }
|
||||
|
||||
[dev-dependencies]
|
||||
hex-literal = "0.3.1"
|
||||
pallet-balances = { version = "4.0.0-dev", path = "../balances" }
|
||||
|
||||
[features]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "pallet-example-offchain-worker"
|
||||
version = "3.0.0-dev"
|
||||
version = "4.0.0-dev"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
edition = "2018"
|
||||
license = "Unlicense"
|
||||
|
||||
@@ -21,9 +21,6 @@ sp-runtime = { version = "4.0.0-dev", default-features = false, path = "../../pr
|
||||
sp-std = { version = "4.0.0-dev", default-features = false, path = "../../primitives/std" }
|
||||
sp-tasks = { version = "4.0.0-dev", default-features = false, path = "../../primitives/tasks" }
|
||||
|
||||
[dev-dependencies]
|
||||
serde = { version = "1.0.126" }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = [
|
||||
|
||||
@@ -13,7 +13,9 @@ readme = "README.md"
|
||||
targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = [
|
||||
"derive",
|
||||
] }
|
||||
frame-support = { version = "4.0.0-dev", default-features = false, path = "../support" }
|
||||
frame-system = { version = "4.0.0-dev", default-features = false, path = "../system" }
|
||||
sp-runtime = { version = "4.0.0-dev", default-features = false, path = "../../primitives/runtime" }
|
||||
@@ -25,8 +27,7 @@ sp-core = { version = "4.0.0-dev", default-features = false, path = "../../primi
|
||||
[dev-dependencies]
|
||||
hex-literal = "0.3.1"
|
||||
sp-core = { version = "4.0.0-dev", path = "../../primitives/core" }
|
||||
sp-io ={ version = "4.0.0-dev", path = "../../primitives/io" }
|
||||
pallet-indices = { version = "4.0.0-dev", path = "../indices" }
|
||||
sp-io = { version = "4.0.0-dev", path = "../../primitives/io" }
|
||||
pallet-balances = { version = "4.0.0-dev", path = "../balances" }
|
||||
pallet-transaction-payment = { version = "4.0.0-dev", path = "../transaction-payment" }
|
||||
sp-version = { version = "4.0.0-dev", path = "../../primitives/version" }
|
||||
@@ -34,9 +35,7 @@ sp-inherents = { version = "4.0.0-dev", path = "../../primitives/inherents" }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
with-tracing = [
|
||||
"sp-tracing/with-tracing"
|
||||
]
|
||||
with-tracing = ["sp-tracing/with-tracing"]
|
||||
std = [
|
||||
"codec/std",
|
||||
"frame-support/std",
|
||||
|
||||
@@ -185,10 +185,12 @@ impl<BlockNumber: sp_std::fmt::Debug> sp_std::fmt::Debug for OffchainErr<BlockNu
|
||||
fn fmt(&self, fmt: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result {
|
||||
match *self {
|
||||
OffchainErr::TooEarly => write!(fmt, "Too early to send heartbeat."),
|
||||
OffchainErr::WaitingForInclusion(ref block) =>
|
||||
write!(fmt, "Heartbeat already sent at {:?}. Waiting for inclusion.", block),
|
||||
OffchainErr::AlreadyOnline(auth_idx) =>
|
||||
write!(fmt, "Authority {} is already online", auth_idx),
|
||||
OffchainErr::WaitingForInclusion(ref block) => {
|
||||
write!(fmt, "Heartbeat already sent at {:?}. Waiting for inclusion.", block)
|
||||
},
|
||||
OffchainErr::AlreadyOnline(auth_idx) => {
|
||||
write!(fmt, "Authority {} is already online", auth_idx)
|
||||
},
|
||||
OffchainErr::FailedSigning => write!(fmt, "Failed to sign heartbeat"),
|
||||
OffchainErr::FailedToAcquireLock => write!(fmt, "Failed to acquire lock"),
|
||||
OffchainErr::NetworkState => write!(fmt, "Failed to fetch network state"),
|
||||
|
||||
@@ -13,7 +13,9 @@ readme = "README.md"
|
||||
targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = [
|
||||
"derive",
|
||||
] }
|
||||
sp-std = { version = "4.0.0-dev", default-features = false, path = "../../primitives/std" }
|
||||
sp-runtime = { version = "4.0.0-dev", default-features = false, path = "../../primitives/runtime" }
|
||||
frame-support = { version = "4.0.0-dev", default-features = false, path = "../support" }
|
||||
@@ -26,7 +28,6 @@ frame-support-test = { version = "3.0.0", path = "../support/test" }
|
||||
pallet-balances = { version = "4.0.0-dev", path = "../balances" }
|
||||
sp-core = { version = "4.0.0-dev", path = "../../primitives/core" }
|
||||
sp-io = { version = "4.0.0-dev", path = "../../primitives/io" }
|
||||
serde = { version = "1.0.126" }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
|
||||
@@ -22,7 +22,6 @@ serde = { version = "1.0.126", features = ["derive"] }
|
||||
sp-api = { version = "4.0.0-dev", path = "../../../primitives/api" }
|
||||
sp-blockchain = { version = "4.0.0-dev", path = "../../../primitives/blockchain" }
|
||||
sp-core = { version = "4.0.0-dev", path = "../../../primitives/core" }
|
||||
sp-rpc = { version = "4.0.0-dev", path = "../../../primitives/rpc" }
|
||||
sp-runtime = { version = "4.0.0-dev", path = "../../../primitives/runtime" }
|
||||
|
||||
pallet-mmr-primitives = { version = "4.0.0-dev", path = "../primitives" }
|
||||
|
||||
@@ -16,7 +16,6 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false }
|
||||
frame-support = { version = "4.0.0-dev", default-features = false, path = "../support" }
|
||||
frame-system = { version = "4.0.0-dev", default-features = false, path = "../system" }
|
||||
sp-core = { version = "4.0.0-dev", default-features = false, path = "../../primitives/core" }
|
||||
sp-runtime = { version = "4.0.0-dev", default-features = false, path = "../../primitives/runtime" }
|
||||
sp-std = { version = "4.0.0-dev", default-features = false, path = "../../primitives/std" }
|
||||
sp-io = { version = "4.0.0-dev", default-features = false, path = "../../primitives/io" }
|
||||
|
||||
@@ -21,9 +21,13 @@ pallet-babe = { version = "4.0.0-dev", default-features = false, path = "../../b
|
||||
pallet-balances = { version = "4.0.0-dev", default-features = false, path = "../../balances" }
|
||||
pallet-grandpa = { version = "4.0.0-dev", default-features = false, path = "../../grandpa" }
|
||||
pallet-im-online = { version = "4.0.0-dev", default-features = false, path = "../../im-online" }
|
||||
pallet-offences = { version = "4.0.0-dev", default-features = false, features = ["runtime-benchmarks"], path = "../../offences" }
|
||||
pallet-offences = { version = "4.0.0-dev", default-features = false, features = [
|
||||
"runtime-benchmarks",
|
||||
], path = "../../offences" }
|
||||
pallet-session = { version = "4.0.0-dev", default-features = false, path = "../../session" }
|
||||
pallet-staking = { version = "4.0.0-dev", default-features = false, features = ["runtime-benchmarks"], path = "../../staking" }
|
||||
pallet-staking = { version = "4.0.0-dev", default-features = false, features = [
|
||||
"runtime-benchmarks",
|
||||
], path = "../../staking" }
|
||||
sp-runtime = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/runtime" }
|
||||
sp-staking = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/staking" }
|
||||
sp-std = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/std" }
|
||||
@@ -32,7 +36,6 @@ frame-election-provider-support = { version = "4.0.0-dev", default-features = fa
|
||||
[dev-dependencies]
|
||||
pallet-staking-reward-curve = { version = "4.0.0-dev", path = "../../staking/reward-curve" }
|
||||
pallet-timestamp = { version = "4.0.0-dev", path = "../../timestamp" }
|
||||
serde = { version = "1.0.101" }
|
||||
sp-core = { version = "4.0.0-dev", path = "../../../primitives/core" }
|
||||
sp-io = { version = "4.0.0-dev", path = "../../../primitives/io" }
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
codec = { package = "parity-scale-codec", version = "2.2.0", default-features = false, features = ["max-encoded-len"] }
|
||||
frame-support = { version = "4.0.0-dev", default-features = false, path = "../support" }
|
||||
frame-system = { version = "4.0.0-dev", default-features = false, path = "../system" }
|
||||
sp-core = { version = "4.0.0-dev", default-features = false, path = "../../primitives/core" }
|
||||
sp-io = { version = "4.0.0-dev", default-features = false, path = "../../primitives/io" }
|
||||
sp-runtime = { version = "4.0.0-dev", default-features = false, path = "../../primitives/runtime" }
|
||||
sp-std = { version = "4.0.0-dev", default-features = false, path = "../../primitives/std" }
|
||||
|
||||
@@ -123,8 +123,9 @@ impl InstanceFilter<Call> for ProxyType {
|
||||
fn filter(&self, c: &Call) -> bool {
|
||||
match self {
|
||||
ProxyType::Any => true,
|
||||
ProxyType::JustTransfer =>
|
||||
matches!(c, Call::Balances(pallet_balances::Call::transfer(..))),
|
||||
ProxyType::JustTransfer => {
|
||||
matches!(c, Call::Balances(pallet_balances::Call::transfer(..)))
|
||||
},
|
||||
ProxyType::JustUtility => matches!(c, Call::Utility(..)),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
|
||||
enumflags2 = { version = "0.6.2" }
|
||||
sp-std = { version = "4.0.0-dev", default-features = false, path = "../../primitives/std" }
|
||||
sp-io = { version = "4.0.0-dev", default-features = false, path = "../../primitives/io" }
|
||||
sp-runtime = { version = "4.0.0-dev", default-features = false, path = "../../primitives/runtime" }
|
||||
|
||||
@@ -13,7 +13,9 @@ readme = "README.md"
|
||||
targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = [
|
||||
"derive",
|
||||
] }
|
||||
sp-core = { version = "4.0.0-dev", default-features = false, path = "../../primitives/core" }
|
||||
sp-std = { version = "4.0.0-dev", default-features = false, path = "../../primitives/std" }
|
||||
sp-io = { version = "4.0.0-dev", default-features = false, path = "../../primitives/io" }
|
||||
@@ -27,10 +29,6 @@ sp-trie = { version = "4.0.0-dev", optional = true, default-features = false, pa
|
||||
log = { version = "0.4.0", default-features = false }
|
||||
impl-trait-for-tuples = "0.2.1"
|
||||
|
||||
[dev-dependencies]
|
||||
sp-application-crypto = { version = "4.0.0-dev", path = "../../primitives/application-crypto" }
|
||||
lazy_static = "1.4.0"
|
||||
|
||||
[features]
|
||||
default = ["std", "historical"]
|
||||
historical = ["sp-trie"]
|
||||
|
||||
@@ -19,16 +19,19 @@ sp-std = { version = "4.0.0-dev", default-features = false, path = "../../../pri
|
||||
frame-system = { version = "4.0.0-dev", default-features = false, path = "../../system" }
|
||||
frame-benchmarking = { version = "4.0.0-dev", default-features = false, path = "../../benchmarking" }
|
||||
frame-support = { version = "4.0.0-dev", default-features = false, path = "../../support" }
|
||||
pallet-staking = { version = "4.0.0-dev", default-features = false, features = ["runtime-benchmarks"], path = "../../staking" }
|
||||
pallet-staking = { version = "4.0.0-dev", default-features = false, features = [
|
||||
"runtime-benchmarks",
|
||||
], path = "../../staking" }
|
||||
pallet-session = { version = "4.0.0-dev", default-features = false, path = "../../session" }
|
||||
rand = { version = "0.7.2", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
serde = { version = "1.0.126" }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", features = ["derive"] }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", features = [
|
||||
"derive",
|
||||
] }
|
||||
sp-core = { version = "4.0.0-dev", path = "../../../primitives/core" }
|
||||
pallet-staking-reward-curve = { version = "4.0.0-dev", path = "../../staking/reward-curve" }
|
||||
sp-io ={ version = "4.0.0-dev", path = "../../../primitives/io" }
|
||||
sp-io = { version = "4.0.0-dev", path = "../../../primitives/io" }
|
||||
pallet-timestamp = { version = "4.0.0-dev", path = "../../timestamp" }
|
||||
pallet-balances = { version = "4.0.0-dev", path = "../../balances" }
|
||||
frame-election-provider-support = { version = "4.0.0-dev", path = "../../election-provider-support" }
|
||||
|
||||
@@ -13,39 +13,40 @@ readme = "README.md"
|
||||
targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
static_assertions = "1.1.0"
|
||||
serde = { version = "1.0.126", optional = true }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = [
|
||||
"derive",
|
||||
] }
|
||||
sp-std = { version = "4.0.0-dev", default-features = false, path = "../../primitives/std" }
|
||||
sp-io ={ version = "4.0.0-dev", default-features = false, path = "../../primitives/io" }
|
||||
sp-io = { version = "4.0.0-dev", default-features = false, path = "../../primitives/io" }
|
||||
sp-runtime = { version = "4.0.0-dev", default-features = false, path = "../../primitives/runtime" }
|
||||
sp-staking = { version = "4.0.0-dev", default-features = false, path = "../../primitives/staking" }
|
||||
frame-support = { version = "4.0.0-dev", default-features = false, path = "../support" }
|
||||
frame-system = { version = "4.0.0-dev", default-features = false, path = "../system" }
|
||||
pallet-session = { version = "4.0.0-dev", default-features = false, features = ["historical"], path = "../session" }
|
||||
pallet-session = { version = "4.0.0-dev", default-features = false, features = [
|
||||
"historical",
|
||||
], path = "../session" }
|
||||
pallet-authorship = { version = "4.0.0-dev", default-features = false, path = "../authorship" }
|
||||
sp-application-crypto = { version = "4.0.0-dev", default-features = false, path = "../../primitives/application-crypto" }
|
||||
frame-election-provider-support = { version = "4.0.0-dev", default-features = false, path = "../election-provider-support" }
|
||||
log = { version = "0.4.14", default-features = false }
|
||||
paste = "1.0"
|
||||
|
||||
# Optional imports for benchmarking
|
||||
frame-benchmarking = { version = "4.0.0-dev", default-features = false, path = "../benchmarking", optional = true }
|
||||
rand_chacha = { version = "0.2", default-features = false, optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
sp-storage = { version = "4.0.0-dev", path = "../../primitives/storage" }
|
||||
sp-tracing = { version = "4.0.0-dev", path = "../../primitives/tracing" }
|
||||
sp-core = { version = "4.0.0-dev", path = "../../primitives/core" }
|
||||
pallet-balances = { version = "4.0.0-dev", path = "../balances" }
|
||||
pallet-timestamp = { version = "4.0.0-dev", path = "../timestamp" }
|
||||
pallet-staking-reward-curve = { version = "4.0.0-dev", path = "../staking/reward-curve" }
|
||||
pallet-staking-reward-curve = { version = "4.0.0-dev", path = "../staking/reward-curve" }
|
||||
substrate-test-utils = { version = "4.0.0-dev", path = "../../test-utils" }
|
||||
frame-benchmarking = { version = "4.0.0-dev", path = "../benchmarking" }
|
||||
frame-election-provider-support = { version = "4.0.0-dev", features = ["runtime-benchmarks"], path = "../election-provider-support" }
|
||||
frame-election-provider-support = { version = "4.0.0-dev", features = [
|
||||
"runtime-benchmarks",
|
||||
], path = "../election-provider-support" }
|
||||
rand_chacha = { version = "0.2" }
|
||||
parking_lot = "0.11.1"
|
||||
hex = "0.4"
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
|
||||
@@ -350,8 +350,9 @@ impl GenericKind {
|
||||
match self {
|
||||
GenericKind::None => quote::quote!(),
|
||||
GenericKind::Config => quote::quote_spanned!(span => T: Config),
|
||||
GenericKind::ConfigAndInstance =>
|
||||
quote::quote_spanned!(span => T: Config<I>, I: 'static),
|
||||
GenericKind::ConfigAndInstance => {
|
||||
quote::quote_spanned!(span => T: Config<I>, I: 'static)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -53,13 +53,14 @@ impl BuilderDef {
|
||||
is_generic |= line.is_generic;
|
||||
|
||||
data = Some(match &line.storage_type {
|
||||
StorageLineTypeDef::Simple(_) if line.is_option =>
|
||||
StorageLineTypeDef::Simple(_) if line.is_option => {
|
||||
quote_spanned!(builder.span() =>
|
||||
// NOTE: the type of `data` is specified when used later in the code
|
||||
let builder: fn(&Self) -> _ = #builder;
|
||||
let data = builder(self);
|
||||
let data = Option::as_ref(&data);
|
||||
),
|
||||
)
|
||||
},
|
||||
_ => quote_spanned!(builder.span() =>
|
||||
// NOTE: the type of `data` is specified when used later in the code
|
||||
let builder: fn(&Self) -> _ = #builder;
|
||||
@@ -70,8 +71,9 @@ impl BuilderDef {
|
||||
is_generic |= line.is_generic;
|
||||
|
||||
data = Some(match &line.storage_type {
|
||||
StorageLineTypeDef::Simple(_) if line.is_option =>
|
||||
quote!( let data = Some(&self.#config); ),
|
||||
StorageLineTypeDef::Simple(_) if line.is_option => {
|
||||
quote!( let data = Some(&self.#config); )
|
||||
},
|
||||
_ => quote!( let data = &self.#config; ),
|
||||
});
|
||||
};
|
||||
|
||||
@@ -58,12 +58,13 @@ impl<
|
||||
SignedImbalance::Positive(one.merge(other)),
|
||||
(SignedImbalance::Negative(one), SignedImbalance::Negative(other)) =>
|
||||
SignedImbalance::Negative(one.merge(other)),
|
||||
(SignedImbalance::Positive(one), SignedImbalance::Negative(other)) =>
|
||||
(SignedImbalance::Positive(one), SignedImbalance::Negative(other)) => {
|
||||
match one.offset(other) {
|
||||
SameOrOther::Same(positive) => SignedImbalance::Positive(positive),
|
||||
SameOrOther::Other(negative) => SignedImbalance::Negative(negative),
|
||||
SameOrOther::None => SignedImbalance::Positive(P::zero()),
|
||||
},
|
||||
}
|
||||
},
|
||||
(one, other) => other.merge(one),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@ sp-io = { version = "4.0.0-dev", path = "../../primitives/io", default-features
|
||||
sp-runtime = { version = "4.0.0-dev", default-features = false, path = "../../primitives/runtime" }
|
||||
sp-version = { version = "4.0.0-dev", default-features = false, path = "../../primitives/version" }
|
||||
frame-support = { version = "4.0.0-dev", default-features = false, path = "../support" }
|
||||
impl-trait-for-tuples = "0.2.1"
|
||||
log = { version = "0.4.14", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
@@ -22,8 +22,7 @@ frame-support = { version = "4.0.0-dev", default-features = false, path = "../..
|
||||
sp-core = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/core" }
|
||||
|
||||
[dev-dependencies]
|
||||
serde = { version = "1.0.126" }
|
||||
sp-io ={ version = "4.0.0-dev", path = "../../../primitives/io" }
|
||||
sp-io = { version = "4.0.0-dev", path = "../../../primitives/io" }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
|
||||
@@ -24,7 +24,6 @@ frame-benchmarking = { version = "4.0.0-dev", default-features = false, path = "
|
||||
frame-support = { version = "4.0.0-dev", default-features = false, path = "../support" }
|
||||
frame-system = { version = "4.0.0-dev", default-features = false, path = "../system" }
|
||||
sp-timestamp = { version = "4.0.0-dev", default-features = false, path = "../../primitives/timestamp" }
|
||||
impl-trait-for-tuples = "0.2.1"
|
||||
log = { version = "0.4.14", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
@@ -13,7 +13,9 @@ readme = "README.md"
|
||||
targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = [
|
||||
"derive",
|
||||
] }
|
||||
serde = { version = "1.0.126", optional = true }
|
||||
smallvec = "1.4.1"
|
||||
|
||||
@@ -27,7 +29,6 @@ frame-system = { version = "4.0.0-dev", default-features = false, path = "../sys
|
||||
|
||||
[dev-dependencies]
|
||||
serde_json = "1.0.41"
|
||||
sp-storage = { version = "4.0.0-dev", path = "../../primitives/storage" }
|
||||
pallet-balances = { version = "4.0.0-dev", path = "../balances" }
|
||||
|
||||
[features]
|
||||
|
||||
@@ -27,16 +27,12 @@ sp-transaction-storage-proof = { version = "4.0.0-dev", default-features = false
|
||||
frame-benchmarking = { version = "4.0.0-dev", default-features = false, path = "../benchmarking", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
frame-support-test = { version = "3.0.0", path = "../support/test" }
|
||||
sp-transaction-storage-proof = { version = "4.0.0-dev", default-features = true, path = "../../primitives/transaction-storage-proof" }
|
||||
sp-core = { version = "4.0.0-dev", path = "../../primitives/core", default-features = false }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
runtime-benchmarks = [
|
||||
"frame-benchmarking",
|
||||
"hex-literal",
|
||||
]
|
||||
runtime-benchmarks = ["frame-benchmarking", "hex-literal"]
|
||||
std = [
|
||||
"serde",
|
||||
"codec/std",
|
||||
|
||||
@@ -13,7 +13,10 @@ readme = "README.md"
|
||||
targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "2.2.0", default-features = false, features = ["derive", "max-encoded-len"] }
|
||||
codec = { package = "parity-scale-codec", version = "2.2.0", default-features = false, features = [
|
||||
"derive",
|
||||
"max-encoded-len",
|
||||
] }
|
||||
serde = { version = "1.0.126", features = ["derive"], optional = true }
|
||||
impl-trait-for-tuples = "0.2.1"
|
||||
|
||||
@@ -27,9 +30,8 @@ pallet-balances = { version = "4.0.0-dev", default-features = false, path = "../
|
||||
|
||||
|
||||
[dev-dependencies]
|
||||
sp-io ={ version = "4.0.0-dev", path = "../../primitives/io" }
|
||||
sp-io = { version = "4.0.0-dev", path = "../../primitives/io" }
|
||||
sp-core = { version = "4.0.0-dev", path = "../../primitives/core" }
|
||||
sp-storage = { version = "4.0.0-dev", path = "../../primitives/storage" }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
|
||||
@@ -13,8 +13,6 @@ readme = "README.md"
|
||||
targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false }
|
||||
|
||||
sp-api = { version = "4.0.0-dev", path = "../../primitives/api", default-features = false }
|
||||
sp-std = { version = "4.0.0-dev", path = "../../primitives/std" , default-features = false }
|
||||
sp-runtime = { version = "4.0.0-dev", path = "../../primitives/runtime" , default-features = false }
|
||||
|
||||
@@ -15,7 +15,6 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false }
|
||||
sp-std = { version = "4.0.0-dev", default-features = false, path = "../../primitives/std" }
|
||||
sp-core = { version = "4.0.0-dev", default-features = false, path = "../../primitives/core" }
|
||||
sp-runtime = { version = "4.0.0-dev", default-features = false, path = "../../primitives/runtime" }
|
||||
frame-support = { version = "4.0.0-dev", default-features = false, path = "../support" }
|
||||
frame-system = { version = "4.0.0-dev", default-features = false, path = "../system" }
|
||||
@@ -32,7 +31,6 @@ default = ["std"]
|
||||
std = [
|
||||
"codec/std",
|
||||
"sp-std/std",
|
||||
"sp-core/std",
|
||||
"sp-runtime/std",
|
||||
"frame-support/std",
|
||||
"frame-system/std",
|
||||
|
||||
@@ -35,7 +35,7 @@ std = [
|
||||
"frame-support/std",
|
||||
"frame-system/std",
|
||||
"sp-io/std",
|
||||
"sp-std/std"
|
||||
"sp-std/std",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"frame-benchmarking",
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user