rolling-shutter icon indicating copy to clipboard operation
rolling-shutter copied to clipboard

Resend latest `DecryptionTrigger` message when no activity

Open ezdac opened this issue 2 years ago • 0 comments

Problem

If the keypers missed or ignored (e.g. message not valid yet) a collator's DecryptionTrigger message at some point, the system will not recover from this. The collator keeps waiting for the DecryptionKey, and the Keypers will wait for new DecryptionTrigger messages.

Since we don't have ACK messages or other delivery guarantees, the collator needs a mechanism to blindly re-broadcast the latest DecryptionTrigger message to the P2P network.

Solution

The simplest solution would be to reset a timer in the collators event loop whenever a DecryptionTrigger was successfully sent out. The timer has a timeout that is higher than the usual batch-production duration. Whenever the timer times out, the latest successfully sent DecryptionTrigger is sent out again.

ezdac avatar Jan 10 '23 14:01 ezdac