DKG: Handle nil key vector submissions
Closed this issue · 1 comments
jordanschalm commented
Context
When the DKG fails, it returns a key vector containing nil keys. Despite the failure, these key vectors should still be submitted to the smart contract. When deciding whether the DKG has completed, we should consider a key vector (final submission) containing any nil keys to be invalid, even if a majority of participants have submitted that key vector.
Definition of Done
- Decide how to serialize a nil key (either change smart contract to accept
Array<Optional<String>>
and encode nil keys as nil or define a canonical serialization for a nil key (eg. 0x00...) coordinate with https://github.com/dapperlabs/flow-go/issues/5452 - Update key vector submission / storage to use updated encoding, if necessary
- Modify logic determining when DKG is done to consider case where majority key vector contains nil keys as the DKG not being done -- this means the DKG has failed. Eventually we may want to take action when this happens, for now we just never say the DKG is completed and never emit the
EpochCommit
event
jordanschalm commented
Somehow I made this issue twice, closing this as dupe of #152