mirror of
https://github.com/datahaven-xyz/datahaven
synced 2026-05-24 09:50:01 +00:00
## Add missing weights The aim of this PR is to complete our weights by enabling more runtime benchmarks from the pallets used in DataHaven. I will start this effort with Storage Hub pallets. ## What's included - [x] `pallet_nfts` - [x] Added signing helper for pallet nfts - [x] Add pallet to benchmarks - [x] Run benches and generate weights - [x] Wire up weights to runtimes - [x] `pallet_session` - [x] Added a `pallet_session_benchmarking` crate - [x] Added signing helpers - [x] Add pallet to benchmarks - [x] Run benches and generate weights - [x] Wire up weights to runtimes - [x] `pallet_payment_streams` - [x] Add `TreasuryAccount` helper and configure properly - [x] Add pallet to benchmarks - [x] Run benches and generate weights - [x] Wire up weights to runtimes - [x] `pallet_storage_providers` - [x] Add `TreasuryAccount` helper and configure properly - [x] Add pallet to benchmarks - [x] Run benches and generate weights - [x] Wire up weights to runtimes - [x] `pallet_file_system` - [x] Add pallet to benchmarks and configure properly - [ ] Run benches and generate weights - [x] Wire up weights to runtimes - [x] `pallet_proofs_dealer` - [x] Add pallet to benchmarks and configure properly - [x] Run benches and generate weights - [x] Wire up weights to runtimes ## What's not included - `pallet_identity` - We'll enable it once we update to `2506`, that will allow us to have a BenchmarkHelper in the config on the pallet (see [here](ac28323e7d/operator/runtime/mainnet/src/configs/mod.rs (L632-L643))) - `pallet_grandpa` - the upstream pallet defines [benchmarks](bbc435c766/substrate/frame/grandpa/src/benchmarking.rs (L25)) for `check_equivocation_proof` and `note_stalled`, but the required weights to be wired are actually `report_equivocation`, `report_equivocation_unsigned` and `note_stalled`. That means including `pallet_grandpa` in the benchmarks results in an inconsistent `WeightInfo` implementation, so further understanding in the pallet's approach to benchmarking is needed. - `pallet_file_system` -> Run benches and generate weights. Weights will fail because of a hardcoded `AccountId32` on the [benchmarks](57d2a195d5/pallets/file-system/src/benchmark_proofs.rs (L69-L71)). I'll create a PR for SH soon. These two are left for a follow up PR.
40 lines
1,011 B
TOML
40 lines
1,011 B
TOML
[package]
|
|
authors = { workspace = true }
|
|
description = "Benchmarking helpers for pallet-session in DataHaven runtimes."
|
|
edition = { workspace = true }
|
|
license = { workspace = true }
|
|
name = "pallet-session-benchmarking"
|
|
version = { workspace = true }
|
|
|
|
[package.metadata.docs.rs]
|
|
targets = ["x86_64-unknown-linux-gnu"]
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
codec = { workspace = true }
|
|
frame-benchmarking = { workspace = true, optional = true }
|
|
frame-support = { workspace = true }
|
|
frame-system = { workspace = true }
|
|
pallet-session = { workspace = true }
|
|
sp-runtime = { workspace = true }
|
|
sp-std = { workspace = true }
|
|
|
|
[features]
|
|
default = ["std"]
|
|
std = [
|
|
"codec/std",
|
|
"frame-benchmarking?/std",
|
|
"frame-support/std",
|
|
"frame-system/std",
|
|
"pallet-session/std",
|
|
"sp-runtime/std",
|
|
"sp-std/std",
|
|
]
|
|
runtime-benchmarks = [
|
|
"frame-benchmarking/runtime-benchmarks",
|
|
"frame-support/runtime-benchmarks",
|
|
"frame-system/runtime-benchmarks",
|
|
"sp-runtime/runtime-benchmarks",
|
|
]
|