Skip to content

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
nol4lej merged 1 commit into
mainfrom
fix/block-author-session-validator
Oct 13, 2026
Merged

nol4lej merged 1 commit into
mainfrom
fix/block-author-session-validator

Conversation

@nol4lej

@nol4lej nol4lej commented Oct 13, 2026

Copy link
Copy Markdown
Member

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.setKeys from another account went unrecognised. On testnet that was 9 of 14.

Consequences on testnet:

  • Minimum author version could never be enabled. Those validators' note_author_version declarations were dropped, so at most 5/14 counted toward the 2/3 quorum set_min_author_version requires.
  • Fallback relay fees landed on Aura keys. When no relayer committed to a spend, the fee was credited to the block author, i.e. to the Aura key read as an account: ~114.8 ORB across 9 such accounts.

Changes

  • Author lookup. pallet_validator_set and pallet_authorship use ValidatorAuthor = pallet_session::FindAccountFromAuthorIndex<Runtime, Aura>: the session validator at the Aura authority index. FindAuthorAccountId is removed.
  • Migration MoveAuraKeyRelayFees.
    • Each PendingRelayerFees balance held by an Aura key that a current validator owns (pallet_session::KeyOwner) moves to that validator's account.
    • Keys no validator owns are left as they are.
    • Idempotent, with try-runtime pre/post checks: the total is unchanged and no owned key keeps a balance.
  • pallet_zk_verifier::migrations::v2::MigrateToV2 is no longer run, because every live chain is at storage version 2.
  • spec_version 18 → 19. transaction_version stays at 6 (no call or encoding changes).
  • pallet-validator-set: Config::FindAuthor is 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

  • Runtime tests: 4 new. Three of them fail with the previous author mapping:
    • the author is the session validator, not its Aura key;
    • a setKeys validator has its version recorded;
    • fallback relay fees go to the validator account;
    • the migration moves fees off Aura keys once.
  • Suites: orbinum-runtime 51, pallet-validator-set 106, pallet-relayer 60, all pass. cargo check --features try-runtime is clean.
  • Local 2-validator network on spec 18 (node 0.4.0; one validator's account ≠ its Aura key), upgraded to spec 19 with setCode:
    • Before: that validator had no lastAuthorVersion.
    • After: it is recorded from its first block.
    • Seeded fees (12 ORB on its Aura key + 5 on its account) end as 17 ORB on its account.
    • setMinAuthorVersion(0.4.0) passes the quorum; 0.5.0 fails with VersionQuorumNotMet; lifting works.
    • The chain keeps producing and finalizing.
  • try-runtime against a fresh testnet snapshot:
    • 9 balances moved, and a second run moves 0;
    • 0.27% of block weight, 5.5 KiB PoV;
    • the whole state decodes.

Deploy

Runtime-only: release a node image carrying the spec-19 wasm, roll it out, then run the runtime upgrade. Afterwards validatorSet.lastAuthorVersion should fill up for every validator running 0.4.0+ within a session.

…t its Aura key; move fallback relay fees off Aura keys (spec 19)
@nol4lej
nol4lej merged commit 32aa793 into main Oct 13, 2026
6 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