Files
pezkuwi-subxt/cumulus/test/service/Cargo.toml
T
Sebastian Kunert 3386377b0f PoV Reclaim Runtime Side (#3002)
# Runtime side for PoV Reclaim

## Implementation Overview
- Hostfunction to fetch the storage proof size has been added to the
PVF. It uses the size tracking recorder that was introduced in my
previous PR.
- Mechanisms to use the reclaim HostFunction have been introduced.
- 1. A SignedExtension that checks the node-reported proof size before
and after application of an extrinsic. Then it reclaims the difference.
- 2. A manual helper to make reclaiming easier when manual interaction
is required, for example in `on_idle` or other hooks.
- In order to utilize the manual reclaiming, I modified `WeightMeter` to
support the reduction of consumed weight, at least for storage proof
size.

## How to use
To enable the general functionality for a parachain:
1. Add the SignedExtension to your parachain runtime. 
2. Provide the HostFunction to the node
3. Enable proof recording during block import

## TODO
- [x] PRDoc

---------

Co-authored-by: Dmitry Markin <dmitry@markin.tech>
Co-authored-by: Davide Galassi <davxy@datawok.net>
Co-authored-by: Bastian Köcher <git@kchr.de>
2024-02-23 14:09:49 +00:00

148 lines
6.0 KiB
TOML

[package]
name = "cumulus-test-service"
version = "0.1.0"
authors.workspace = true
edition.workspace = true
publish = false
[lints]
workspace = true
[[bin]]
name = "test-parachain"
path = "src/main.rs"
[dependencies]
async-trait = "0.1.74"
clap = { version = "4.5.1", features = ["derive"] }
codec = { package = "parity-scale-codec", version = "3.0.0" }
criterion = { version = "0.5.1", features = ["async_tokio"] }
jsonrpsee = { version = "0.22", features = ["server"] }
rand = "0.8.5"
serde = { features = ["derive"], workspace = true, default-features = true }
serde_json = { workspace = true, default-features = true }
tokio = { version = "1.32.0", features = ["macros"] }
tracing = "0.1.37"
url = "2.4.0"
tempfile = "3.8.0"
# Substrate
frame-system = { path = "../../../substrate/frame/system" }
frame-system-rpc-runtime-api = { path = "../../../substrate/frame/system/rpc/runtime-api" }
pallet-transaction-payment = { path = "../../../substrate/frame/transaction-payment" }
sc-basic-authorship = { path = "../../../substrate/client/basic-authorship" }
sc-chain-spec = { path = "../../../substrate/client/chain-spec" }
sc-client-api = { path = "../../../substrate/client/api" }
sc-consensus = { path = "../../../substrate/client/consensus/common" }
sc-executor = { path = "../../../substrate/client/executor" }
sc-network = { path = "../../../substrate/client/network" }
sc-service = { path = "../../../substrate/client/service" }
sc-tracing = { path = "../../../substrate/client/tracing" }
sc-transaction-pool = { path = "../../../substrate/client/transaction-pool" }
sc-transaction-pool-api = { path = "../../../substrate/client/transaction-pool/api" }
sc-telemetry = { path = "../../../substrate/client/telemetry" }
sp-arithmetic = { path = "../../../substrate/primitives/arithmetic" }
sp-blockchain = { path = "../../../substrate/primitives/blockchain" }
sp-core = { path = "../../../substrate/primitives/core" }
sp-io = { path = "../../../substrate/primitives/io" }
sp-api = { path = "../../../substrate/primitives/api" }
sp-keyring = { path = "../../../substrate/primitives/keyring" }
sp-runtime = { path = "../../../substrate/primitives/runtime", default-features = false }
sp-state-machine = { path = "../../../substrate/primitives/state-machine" }
sp-tracing = { path = "../../../substrate/primitives/tracing" }
sp-timestamp = { path = "../../../substrate/primitives/timestamp" }
sp-consensus = { path = "../../../substrate/primitives/consensus/common" }
substrate-test-client = { path = "../../../substrate/test-utils/client" }
sc-cli = { path = "../../../substrate/client/cli" }
sc-block-builder = { path = "../../../substrate/client/block-builder" }
sc-executor-wasmtime = { path = "../../../substrate/client/executor/wasmtime" }
sc-executor-common = { path = "../../../substrate/client/executor/common" }
# Polkadot
polkadot-primitives = { path = "../../../polkadot/primitives" }
polkadot-service = { path = "../../../polkadot/node/service" }
polkadot-test-service = { path = "../../../polkadot/node/test/service" }
polkadot-cli = { path = "../../../polkadot/cli" }
polkadot-node-subsystem = { path = "../../../polkadot/node/subsystem" }
polkadot-overseer = { path = "../../../polkadot/node/overseer" }
# Cumulus
cumulus-client-cli = { path = "../../client/cli" }
parachains-common = { path = "../../parachains/common" }
cumulus-client-consensus-common = { path = "../../client/consensus/common" }
cumulus-client-consensus-relay-chain = { path = "../../client/consensus/relay-chain" }
cumulus-client-parachain-inherent = { path = "../../client/parachain-inherent" }
cumulus-client-service = { path = "../../client/service" }
cumulus-primitives-core = { path = "../../primitives/core" }
cumulus-relay-chain-inprocess-interface = { path = "../../client/relay-chain-inprocess-interface" }
cumulus-relay-chain-interface = { path = "../../client/relay-chain-interface" }
cumulus-test-runtime = { path = "../runtime" }
cumulus-relay-chain-minimal-node = { path = "../../client/relay-chain-minimal-node" }
cumulus-client-pov-recovery = { path = "../../client/pov-recovery" }
cumulus-test-relay-sproof-builder = { path = "../relay-sproof-builder" }
cumulus-pallet-parachain-system = { path = "../../pallets/parachain-system", default-features = false, features = ["parameterized-consensus-hook"] }
cumulus-primitives-storage-weight-reclaim = { path = "../../primitives/storage-weight-reclaim" }
pallet-timestamp = { path = "../../../substrate/frame/timestamp" }
[dev-dependencies]
futures = "0.3.28"
portpicker = "0.1.1"
rococo-parachain-runtime = { path = "../../parachains/runtimes/testing/rococo-parachain" }
pallet-im-online = { path = "../../../substrate/frame/im-online" }
sp-consensus-grandpa = { path = "../../../substrate/primitives/consensus/grandpa" }
sp-authority-discovery = { path = "../../../substrate/primitives/authority-discovery" }
cumulus-test-client = { path = "../client" }
# Polkadot dependencies
polkadot-test-service = { path = "../../../polkadot/node/test/service" }
# Substrate dependencies
sc-cli = { path = "../../../substrate/client/cli" }
substrate-test-utils = { path = "../../../substrate/test-utils" }
[features]
runtime-benchmarks = [
"cumulus-pallet-parachain-system/runtime-benchmarks",
"cumulus-primitives-core/runtime-benchmarks",
"cumulus-test-client/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"pallet-im-online/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks",
"parachains-common/runtime-benchmarks",
"polkadot-cli/runtime-benchmarks",
"polkadot-primitives/runtime-benchmarks",
"polkadot-service/runtime-benchmarks",
"polkadot-test-service/runtime-benchmarks",
"rococo-parachain-runtime/runtime-benchmarks",
"sc-service/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]
[[bench]]
name = "transaction_throughput"
harness = false
[[bench]]
name = "block_import"
harness = false
[[bench]]
name = "block_production"
harness = false
[[bench]]
name = "block_production_glutton"
harness = false
[[bench]]
name = "block_import_glutton"
harness = false
[[bench]]
name = "validate_block"
harness = false
[[bench]]
name = "validate_block_glutton"
harness = false