Skip to content

chore: regenerate pallet weights - #650

Merged
illuzen merged 1 commit into
mainfrom
chore/regenerate-weights
Aug 8, 2026
Merged

chore: regenerate pallet weights#650
illuzen merged 1 commit into
mainfrom
chore/regenerate-weights

Conversation

@n13

@n13 n13 commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Regenerates benchmark weights for every pallet registered in define_benchmarks whose weights the runtime actually consumes, measured on current main (includes #646 vesting).

What changed

Regenerated weights (50 steps / 20 repeats, compiled WASM): wormhole, multisig, reversible-transfers, scheduler, mining-rewards, treasury, vesting — plus balances and frame-system, which were registered and wired into the runtime but missing from the script. regenerate_weights.sh now covers them.

Fixed broken wormhole benchmarkspre_validate_proof / pre_validate_public_batch_proof panicked against the live runtime: the committed proof fixtures (test-data/*.hex) still baked in the old 10 bps volume fee, while the runtime has charged 4 bps since #632, so production pre-validation rejected the fixture with InvalidVolumeFeeRate. Mock-based tests never caught it because the mock was pinned to 10 bps to match the fixtures. Fixtures regenerated at 4 bps; mock and affected tests aligned.

Hand-augmented weight files preserved — a raw template run wipes these, so the measured bases were merged into the existing hand layers instead:

  • wormhole: refreshed the four timing constants. Notable moves: public-batch pre-validation 4.5B → 1.9B ps (cheaper production path after turnstile removal in Remove wormhole turnstile (soundness counters and address reveal) #645), private pre-validation 700M → 900M ps, ZK verify 14.97B → 15.16B / 20.69B → 21.08B ps. Depth-scaling storage tails and invariant tests kept; the public pre-validation floor test now tracks the post-Remove wormhole turnstile (soundness counters and address reveal) #645 cost.
  • mining-rewards: measured base 163M → 162M ps; depth pricing and tests kept.
  • reversible-transfers: execute_transfer base 110M → 98M ps; live-depth pricing helper and tests kept, other extrinsics take fresh measurements.
  • scheduler: kept the V12 audit #162534 explicit Retries write charge in service_task_base (benchmark still doesn't measure it).

regenerate_weights.sh documents these hand layers so future runs don't silently drop them.

Verification

  • cargo check --workspace --release clean
  • All unit tests pass for every touched pallet (wormhole 68, mining-rewards 29, reversible-transfers 76, scheduler 274, multisig 56, treasury 15, vesting 88, balances, frame-system), including the weight invariant tests
  • Benchmarks re-run end-to-end with no failures

- Regenerate weights for all benchmarked pallets: wormhole, multisig,
  reversible-transfers, scheduler, mining-rewards, treasury, vesting,
  balances, frame-system
- Fix wormhole benchmark fixtures: regenerate proofs at the production
  4 bps volume fee (stale 10 bps fixtures made the pre_validate
  benchmarks panic against the live runtime); align mock fee rate
- Extend regenerate_weights.sh with pallet_balances and frame_system,
  and document the hand-augmented weight files that raw regeneration
  must not overwrite
@illuzen
illuzen merged commit a78bdd8 into main Aug 8, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants