datahaven/operator/benchmarking
Gonza Montiel 786ddb39a9
fix: add missing benchmarks and weights (#302)
## 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.
2026-02-03 17:12:11 +01:00
..
frame-weight-template.hbs fix: add missing benchmarks and weights (#302) 2026-02-03 17:12:11 +01:00