@@ -182,6 +182,11 @@ func ValidateDecryptionKeysSignatures(
182
182
extra * p2pmsg.ShutterServiceDecryptionKeysExtra ,
183
183
keyperSet * obskeyperdatabase.KeyperSet ,
184
184
) (pubsub.ValidationResult , error ) {
185
+ // Allow for empty signatures and signer indices
186
+ if len (extra .SignerIndices ) == 0 || len (extra .Signature ) == 0 {
187
+ return pubsub .ValidationAccept , nil
188
+ }
189
+
185
190
if int32 (len (extra .SignerIndices )) != keyperSet .Threshold {
186
191
return pubsub .ValidationReject , errors .Errorf ("expected %d signers, got %d" , keyperSet .Threshold , len (extra .SignerIndices ))
187
192
}
@@ -248,12 +253,7 @@ func (h *DecryptionKeysHandler) HandleMessage(ctx context.Context, msg p2pmsg.Me
248
253
extra := keys .Extra .(* p2pmsg.DecryptionKeys_Service ).Service
249
254
serviceDB := database .New (h .dbpool )
250
255
251
- identityPreimages := []identitypreimage.IdentityPreimage {}
252
- for _ , key := range keys .Keys {
253
- identityPreimage := identitypreimage .IdentityPreimage (key .IdentityPreimage )
254
- identityPreimages = append (identityPreimages , identityPreimage )
255
- }
256
- identitiesHash := computeIdentitiesHash (identityPreimages )
256
+ identitiesHash := computeIdentitiesHashFromKeys (keys .GetKeys ())
257
257
for i , keyperIndex := range extra .SignerIndices {
258
258
err := serviceDB .InsertDecryptionSignature (ctx , database.InsertDecryptionSignatureParams {
259
259
Eon : int64 (keys .Eon ),
0 commit comments