Repository navigation
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
Conversation
…d derive its account through the runtime's signer — benchmark overhead/extrinsic no longer fail with BadProof
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
benchmark overheadandbenchmark extrinsicfailed on every run withBadProof, 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
//Bobbut named the senderMultiSigner::Ecdsa(pubkey).into_account(), which isblake2_256(pubkey). On Orbinum an ECDSA signer's account is[eth_address ‖ 0x00 × 12], so the signature never matched the sender.//Bob(0x25451A4de12dcCc2D166922fA938E900fCc4ED24) is not endowed in the dev genesis. Fixing only the account would have lefttransfer_keep_alivefailing on fees.Changes
template/node/src/benchmarking.rs://Bob, which is endowed in the dev genesis.<runtime::Signature as Verify>::Signer, the runtime's own mapping, instead of a hard-codedMultiSigner.Testing
With a
runtime-benchmarksbuild on--dev, before and after:benchmark extrinsic --pallet system --extrinsic remarkBadProofbenchmark extrinsic --pallet balances --extrinsic transfer_keep_aliveBadProofbenchmark overheadBadProofblock_weights.rsandextrinsic_weights.rscargo fmtis clean and the build has no warnings. No runtime code changes, sospec_versionis unaffected.