mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 05:07:55 +00:00
3386377b0f
# 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>
80 lines
3.6 KiB
TOML
80 lines
3.6 KiB
TOML
[package]
|
|
name = "cumulus-test-runtime"
|
|
version = "0.1.0"
|
|
authors.workspace = true
|
|
edition.workspace = true
|
|
publish = false
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] }
|
|
scale-info = { version = "2.10.0", default-features = false, features = ["derive"] }
|
|
|
|
# Substrate
|
|
frame-executive = { path = "../../../substrate/frame/executive", default-features = false }
|
|
frame-support = { path = "../../../substrate/frame/support", default-features = false }
|
|
frame-system = { path = "../../../substrate/frame/system", default-features = false }
|
|
frame-system-rpc-runtime-api = { path = "../../../substrate/frame/system/rpc/runtime-api", default-features = false }
|
|
pallet-balances = { path = "../../../substrate/frame/balances", default-features = false }
|
|
pallet-message-queue = { path = "../../../substrate/frame/message-queue", default-features = false }
|
|
pallet-sudo = { path = "../../../substrate/frame/sudo", default-features = false }
|
|
pallet-timestamp = { path = "../../../substrate/frame/timestamp", default-features = false }
|
|
pallet-glutton = { path = "../../../substrate/frame/glutton", default-features = false }
|
|
pallet-transaction-payment = { path = "../../../substrate/frame/transaction-payment", default-features = false }
|
|
sp-api = { path = "../../../substrate/primitives/api", default-features = false }
|
|
sp-block-builder = { path = "../../../substrate/primitives/block-builder", default-features = false }
|
|
sp-core = { path = "../../../substrate/primitives/core", default-features = false }
|
|
sp-genesis-builder = { path = "../../../substrate/primitives/genesis-builder", default-features = false }
|
|
sp-inherents = { path = "../../../substrate/primitives/inherents", default-features = false }
|
|
sp-io = { path = "../../../substrate/primitives/io", default-features = false }
|
|
sp-offchain = { path = "../../../substrate/primitives/offchain", default-features = false }
|
|
sp-runtime = { path = "../../../substrate/primitives/runtime", default-features = false }
|
|
sp-session = { path = "../../../substrate/primitives/session", default-features = false }
|
|
sp-std = { path = "../../../substrate/primitives/std", default-features = false }
|
|
sp-transaction-pool = { path = "../../../substrate/primitives/transaction-pool", default-features = false }
|
|
sp-version = { path = "../../../substrate/primitives/version", default-features = false }
|
|
|
|
# Cumulus
|
|
cumulus-pallet-parachain-system = { path = "../../pallets/parachain-system", default-features = false, features = ["parameterized-consensus-hook"] }
|
|
cumulus-primitives-core = { path = "../../primitives/core", default-features = false }
|
|
cumulus-primitives-storage-weight-reclaim = { path = "../../primitives/storage-weight-reclaim", default-features = false }
|
|
|
|
[build-dependencies]
|
|
substrate-wasm-builder = { path = "../../../substrate/utils/wasm-builder", optional = true }
|
|
|
|
[features]
|
|
default = ["std"]
|
|
std = [
|
|
"codec/std",
|
|
"cumulus-pallet-parachain-system/std",
|
|
"cumulus-primitives-core/std",
|
|
"cumulus-primitives-storage-weight-reclaim/std",
|
|
"frame-executive/std",
|
|
"frame-support/std",
|
|
"frame-system-rpc-runtime-api/std",
|
|
"frame-system/std",
|
|
"pallet-balances/std",
|
|
"pallet-glutton/std",
|
|
"pallet-message-queue/std",
|
|
"pallet-sudo/std",
|
|
"pallet-timestamp/std",
|
|
"pallet-transaction-payment/std",
|
|
"scale-info/std",
|
|
"sp-api/std",
|
|
"sp-block-builder/std",
|
|
"sp-core/std",
|
|
"sp-genesis-builder/std",
|
|
"sp-inherents/std",
|
|
"sp-io/std",
|
|
"sp-offchain/std",
|
|
"sp-runtime/std",
|
|
"sp-session/std",
|
|
"sp-std/std",
|
|
"sp-transaction-pool/std",
|
|
"sp-version/std",
|
|
"substrate-wasm-builder",
|
|
]
|
|
increment-spec-version = []
|