Skip to content

fix(rpc)!: chain_isValidator answers for session validator accounts, not Aura keys, and refuses a value that does not decode exactly (fc-rpc-v2 2.0.1-dev) - #172

Merged
nol4lej merged 1 commit into
mainfrom
ix/chain-is-validator-session
Oct 18, 2026

Conversation

@nol4lej

@nol4lej nol4lej commented Oct 18, 2026

Copy link
Copy Markdown
Member

Summary

chain_isValidator compared the account against pallet_aura::Authorities, the validators' Aura keys. Since spec 19 a validator is its account: an operator that registered its session keys from its account, with a key that is not the account, was reported as not a validator.

Fixed

  • chain_isValidator reads pallet_session::Validators (validator accounts) at the best block.
  • Decoding moves to a pure contains_validator using decode_all: a truncated value or one with trailing bytes is an InternalError, never a partial match.

Documentation

  • privacy module docs list privacy_getSubtreeRoots, state that every endpoint reads the best block, and describe the proof gate as implemented: proof_slots (half the cores) at once, then a queue bounded by MAX_QUEUED_PROOFS and MAX_PROOF_WAIT. The docs cited MAX_CONCURRENT_PROOFS, which no longer exists.
  • The crate README documents chain_isValidator against Session::Validators.

Version

fc-rpc-v2 2.0.0-dev → 2.0.1-dev, with a new CHANGELOG.md.

Testing

  • cargo test -p fc-rpc-v2 (50): storage key layout; absent value, empty set, member, non-member, truncated value, trailing bytes.
  • cargo clippy -D warnings, cargo fmt --check.
  • --dev node (spec 20): chain_isValidator is true for Alice and false for Bob.

…not Aura keys, and refuses a value that does not decode exactly (fc-rpc-v2 2.0.1-dev)
@nol4lej
nol4lej merged commit 54a3b11 into main Oct 18, 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