-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
Implement an RPC function called reset-identity that resets the current loaded identity. This resets it to a new random identity.
Currently setIdentity will only accept the key specified in expected. This means that once loaded the key cannot be "unloaded" except via restarting jet.
It would be better to be able to reset the identity.
An extension of this feature would be smarter handling of failover so when you call resetIdentity:
- Disconnect from jet gateway or stop accepting transactions over the RPC interface
- Wait for all transactions in the queue to flush using the old identity (i.e. being sent with the old identity)
- Set the internal identity to a random new keypair
- Go back to the starting state where Jet is waiting for the
expected key to be loaded