mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 04:01:02 +00:00
025a9cad59
* Add benchmarking skeleton * Allow runtime to indicate concrete header type for benches * Set up skeleton for benchmark tests * Play around with mutating bench header * Create a working test for benchmarking * Add benches related to enacting authority set changes * Add bench for checking effect of prec-commits/vote ancestries * Use new `no_std` test utils in benchmarks * Support pallet instances in benchmarking * Use correct benchmarking instance macro * Add instance to runtime benchmark helper impl * Start using new justification creation API * Allow mock header's number to be specified * Set up benches with correct fork/depth parameters * Use new pallet name during runtime bench setup * Use correct `set_id` in tests * Limit number of forks as workaround to get tests passing * Use number of authorities which matches number of forks * Make sure test post-conditions are checked properly * Only read `CurrentAuthoritySet` from storage once * Add combined benchmark for `submit_finality_proof` * Add bench test * Introduce config bounds related to justification verification * Use config consts from pallet in benchmarking * Return data relevant to benchmarks from helper functions * Annotate `submit_finality_proof` with autogenerated weights * Return actual weight after call execution * Ignore Clippy warnings in bench template * Update benchmark template * Use `test-utils` to create test headers * Clarify that helper is only for messages benches * Add more documentation to benches * Update TODOs * Clarify return types in comment * Fix pallet name post-merge * Update NOTE to a TODO item * Indicate that Config params are max values, not actual values * Change Config validator count type to be `u32` * Return decoded justification instead of fields * Add missing trait bounds for tests * Correctly issue weight refund Thanks for spotting this Tomek! * Update comment * Add note about SESSION_LENGTH * Fix benchmarking code
61 lines
2.3 KiB
TOML
61 lines
2.3 KiB
TOML
[package]
|
|
name = "pallet-bridge-grandpa"
|
|
version = "0.1.0"
|
|
authors = ["Parity Technologies <admin@parity.io>"]
|
|
edition = "2018"
|
|
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
|
|
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
|
|
[dependencies]
|
|
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false }
|
|
finality-grandpa = { version = "0.14.0", default-features = false }
|
|
log = { version = "0.4.14", default-features = false }
|
|
num-traits = { version = "0.2", default-features = false }
|
|
serde = { version = "1.0", optional = true }
|
|
|
|
# Bridge Dependencies
|
|
|
|
bp-runtime = { path = "../../primitives/runtime", default-features = false }
|
|
bp-header-chain = { path = "../../primitives/header-chain", default-features = false }
|
|
|
|
# Substrate Dependencies
|
|
|
|
frame-support = { git = "https://github.com/paritytech/substrate", branch = "master" , default-features = false }
|
|
frame-system = { git = "https://github.com/paritytech/substrate", branch = "master" , default-features = false }
|
|
sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master" , default-features = false }
|
|
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" , default-features = false }
|
|
sp-std = { git = "https://github.com/paritytech/substrate", branch = "master" , default-features = false }
|
|
sp-trie = { git = "https://github.com/paritytech/substrate", branch = "master" , default-features = false }
|
|
|
|
# Optional Benchmarking Dependencies
|
|
bp-test-utils = { path = "../../primitives/test-utils", default-features = false, optional = true }
|
|
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master" , default-features = false, optional = true }
|
|
|
|
[dev-dependencies]
|
|
pallet-substrate-bridge = { path = "../../modules/substrate" }
|
|
sp-io = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
|
|
|
[features]
|
|
default = ["std"]
|
|
std = [
|
|
"bp-header-chain/std",
|
|
"bp-runtime/std",
|
|
"bp-test-utils/std",
|
|
"codec/std",
|
|
"finality-grandpa/std",
|
|
"frame-support/std",
|
|
"frame-system/std",
|
|
"log/std",
|
|
"num-traits/std",
|
|
"serde",
|
|
"sp-finality-grandpa/std",
|
|
"sp-runtime/std",
|
|
"sp-std/std",
|
|
"sp-trie/std",
|
|
]
|
|
runtime-benchmarks = [
|
|
"bp-test-utils",
|
|
"frame-benchmarking",
|
|
]
|