datahaven/.github
Gonza Montiel be4bd2a56c
feat: 🏁 pallet grandpa benchmarking (#442)
## Changes

### Add `pallet-grandpa-benchmarking` crate

Upstream `pallet-grandpa` does not benchmark `report_equivocation`, only
the raw `check_equivocation_proof` crypto proxy.

This PR adds a new `pallet-grandpa-benchmarking` wrapper crate (modelled
after `pallet-session-benchmarking`) that benchmarks both
`report_equivocation` and `note_stalled` against the DataHaven runtimes,
using upstream `check_equivocation_proof()`.

### Add node's benchmark pallet subcommand to benchmarks script

Running the bench for `report_equivocation` requires a real ed25519
verifier. We typically use `frame-omni-bencher`, but this helper
executes the runtime as a WASM blob. In that environment the ed25519
host function does not work as a real verifier, and since the
equivocation proof contains real signatures created outside the WASM
sandbox, the verification always fails and the extrinsic returns
`InvalidEquivocationProof`. So, benchmarks for `pallet_grandpa` must run
via the node's `benchmark pallet` subcommand.

The `run-benchmarks.sh` script was updated to support this case running
directly via node. Any palet included in the new `NODE_PALLETS` list,
routes selected pallets through the node binary, while all other pallets
continue to use `frame-omni-bencher`.

### Calculate proper weights for production

Weight files for all three runtimes (stagenet, testnet, mainnet) are
updated with the
new `report_equivocation(v, n)` linear weight function derived from real
measurements.

---------

Co-authored-by: Steve Degosserie <723552+stiiifff@users.noreply.github.com>
Co-authored-by: Ahmad Kaouk <56095276+ahmadkaouk@users.noreply.github.com>
2026-03-03 09:20:04 +01:00
..
workflow-templates Revert "feat: statically build binary (#292)" (#330) 2025-12-02 15:42:43 +01:00
workflows feat: 🏁 pallet grandpa benchmarking (#442) 2026-03-03 09:20:04 +01:00
CODEOWNERS chore: 🛡️ Add CODEOWNERS file (#281) 2025-11-06 22:04:44 +02:00