Repository navigation
fix(runtime)!: identify the block author by its session validator, not its Aura key; move fallback relay fees off Aura keys (spec 19) - #166
Merged
Conversation
…t its Aura key; move fallback relay fees off Aura keys (spec 19)
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
The runtime identified a block's author by reading its Aura key as an account. That is the validator's account only when the operator registered its Aura key as its own account. Every validator that set its keys with
session.setKeysfrom another account went unrecognised. On testnet that was 9 of 14.Consequences on testnet:
note_author_versiondeclarations were dropped, so at most 5/14 counted toward the 2/3 quorumset_min_author_versionrequires.Changes
pallet_validator_setandpallet_authorshipuseValidatorAuthor = pallet_session::FindAccountFromAuthorIndex<Runtime, Aura>: the session validator at the Aura authority index.FindAuthorAccountIdis removed.MoveAuraKeyRelayFees.PendingRelayerFeesbalance held by an Aura key that a current validator owns (pallet_session::KeyOwner) moves to that validator's account.pallet_zk_verifier::migrations::v2::MigrateToV2is no longer run, because every live chain is at storage version 2.spec_version18 → 19.transaction_versionstays at 6 (no call or encoding changes).pallet-validator-set:Config::FindAuthoris documented as returning the validator account, not its consensus key. CHANGELOG entry added.RUNTIME_VERSIONS.md: spec 19 entry added; spec 18 marked released (v0.4.0).Testing
setKeysvalidator has its version recorded;orbinum-runtime51,pallet-validator-set106,pallet-relayer60, all pass.cargo check --features try-runtimeis clean.setCode:lastAuthorVersion.setMinAuthorVersion(0.4.0)passes the quorum;0.5.0fails withVersionQuorumNotMet; lifting works.Deploy
Runtime-only: release a node image carrying the spec-19 wasm, roll it out, then run the runtime upgrade. Afterwards
validatorSet.lastAuthorVersionshould fill up for every validator running 0.4.0+ within a session.