Skip to content

fix(node): sign benchmark extrinsics with the funded sr25519 //Bob and derive its account through the runtime's signer — benchmark overhead/extrinsic no longer fail with BadProof - #177

Merged
nol4lej merged 1 commit into
mainfrom
fix/benchmark-signer
Oct 22, 2026

Conversation

@nol4lej

@nol4lej nol4lej commented Oct 22, 2026

Copy link
Copy Markdown
Member

Summary

benchmark overhead and benchmark extrinsic failed on every run with BadProof, so the node's base block and extrinsic weights could not be regenerated. Benchmark extrinsics are now signed by an account the runtime recognizes and that holds funds.

Cause

  • The builder signed with ECDSA //Bob but named the sender MultiSigner::Ecdsa(pubkey).into_account(), which is blake2_256(pubkey). On Orbinum an ECDSA signer's account is [eth_address ‖ 0x00 × 12], so the signature never matched the sender.
  • ECDSA //Bob (0x25451A4de12dcCc2D166922fA938E900fCc4ED24) is not endowed in the dev genesis. Fixing only the account would have left transfer_keep_alive failing on fees.

Changes

  • template/node/src/benchmarking.rs:
    • The builders sign with sr25519 //Bob, which is endowed in the dev genesis.
    • The sender account comes from <runtime::Signature as Verify>::Signer, the runtime's own mapping, instead of a hard-coded MultiSigner.

Testing

With a runtime-benchmarks build on --dev, before and after:

Command Before After
benchmark extrinsic --pallet system --extrinsic remark BadProof ok, median 77 µs
benchmark extrinsic --pallet balances --extrinsic transfer_keep_alive BadProof ok, median 97 µs
benchmark overhead BadProof ok, writes block_weights.rs and extrinsic_weights.rs

cargo fmt is clean and the build has no warnings. No runtime code changes, so spec_version is unaffected.

…d derive its account through the runtime's signer — benchmark overhead/extrinsic no longer fail with BadProof
@nol4lej
nol4lej merged commit 63e94f4 into main Oct 22, 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.

1 participant