9

If I were to insert multiple (valid) author keys over RPC, how does a collator or validator choose which key to sign with when producing a block? As far as I know this cannot be set on start-up.

1
  • It's generally not recommended to do this, because certain parts of the validator code don't handle 'validator virtualization' well. But as Joe says, nodes will just search for keys that they control within the active validator public keys recognized by the chain at any point in time.
    – rob
    Apr 5, 2022 at 14:33

1 Answer 1

4

This is what session.set_keys achieves, it declares that an on-chain account (presumably with keys in some form of cold storage) will sign blocks/consensus messages with some other key. When a node starts, it checks the chain state to see if any private keys in its keystore match the public keys that are registered on-chain. If it has the keys, then it will sign the corresponding messages with them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.