datahaven/operator/scripts
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
..
build-runtime-srtool.sh fix: 🔧 Add Podman support to srtool runtime build script (#222) 2025-10-10 22:57:34 +02:00
docker-entrypoint.sh feat: Add Docker Compose setup for local DataHaven network (#314) 2025-11-22 14:07:46 +01:00
docker-healthcheck.sh feat: Add Docker Compose setup for local DataHaven network (#314) 2025-11-22 14:07:46 +01:00
docker-prepare.sh feat: Add Docker Compose setup for local DataHaven network (#314) 2025-11-22 14:07:46 +01:00
run-benchmarks.sh feat: 🏁 pallet grandpa benchmarking (#442) 2026-03-03 09:20:04 +01:00
sort-cargo-deps.sh feat(ci): add script to sort cargo deps (#62) 2025-05-06 17:22:01 +00:00
test_message_encoding.sh refactor: cleanup obsolete test folder (#166) 2025-09-17 14:21:55 +02:00
verify-licenses.sh build: ⬆️ Upgrade to SH release v0.3.1 (#393) 2026-01-14 13:10:53 +01:00