shutter-network / rolling-shutter

Rolling Shutter is an MEV protection system to be plugged into rollups.
https://twitter.com/project_shutter/
26 stars 7 forks source link

Invalid slot decryption signatures #456

Open jannikluhn opened 1 week ago

jannikluhn commented 1 week ago

During my last test on shutter-gnosis-merge, I sporadically saw the following error:

2024/06/19 19:58:25.173738 INF [    messaging.go:392] sending message message="DecryptionKeys{firstIdentity=0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a30392, numKeys=1}" topic=decryptionKeys
2024/06/19 19:58:25.174026 INF [    messaging.go:170] received invalid message error="slot decryption signature invalid" topic=decryptionKeys
2024/06/19 19:58:25.174040 DBG [     messaging.go:40] validated message duration="195.25µs" topic=decryptionKeys
2024/06/19 19:58:25.174052 DBG [    messaging.go:393] called retriable function error="validation failed" count=1 duration=0.295042 funcName=SendMessage
2024/06/19 19:58:25.174072 DBG [    messaging.go:393] retry limit reached error="validation failed" count=1 funcName=SendMessage
2024/06/19 19:58:25.174086 INF [    messaging.go:360] failed to send message error="validation failed" message="DecryptionKeys{firstIdentity=0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a30392, numKeys=1}" topic=decryptionKeys

This error happened independently on all keyper instances, but at different slots.

This happened after a keyper set transition. I also commented out the proposer check, so that keys are produced at every single slot. It is unclear if this is related or not.

jannikluhn commented 1 week ago

Some data logged when such an presumably invalid signature is received:

data: &{InstanceID:42 Eon:2 Slot:10683832 TxPointer:0 IdentityPreimages:[{Bytes:[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 163 5 185]}]}
data hash: ff9d6bfe29cce02e04471901e5c8a8c5e9c91fba43e580ded0bab41081b45f2a
msg: instanceID:42 eon:2 keys:{identity:"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x05\xb9" key:"\xac\xb9\x14\xdc\x1f\x07v\xfap8;\x069\x1b\xf4-\xa9\x89\xcd/\x1bѮ\xe2\x1c\x91\x1d\x84\x07\x86\x8c_i\xb1i\x16\xce\xf0L\x8d\x9au\xe7\xa0!\x85V$"} gnosis:{slot:10683832 signerIndices:0 signerIndices:1 signatures:"\xdb\xc8\x18\x8cG\x95\xf1\xec\x8d\x05p\xe5\x1dN\x06Pv\x93헇\x7f\xff\xe2P\xa3\x13\xe0\x883\xbc\x80\"d힕\x19\x9d\x89A\xd84\x82\xe6_\x0c\x9f\x98N\"aT\xb4\xa6\xaf\x95\x1e(%\x1c\xca.\x1f\x01" signatures:"\xc5\\/\x96\xdc\x0f\xfdyRHϏ\xf7\x99(\x8d<48\xfbZ\xfaw\xde\xd8sx\x00\x89\xf5L\x08u\xa9~tZ\x91\xae0-\xafWxq\xd0B=4\xda\xe2\x0e@xE\xd3\x02V\x9f\xf6\xa1\xf0\x97\xe5\x01"}
keyper set: {KeyperConfigIndex:2 ActivationBlockNumber:10394254 Keypers:[0x9A1ba2D523AAB8f7784870B639924103d25Bb714 0x7b79Ba0f76eE49F6246c0034A2a3445C281a67EB 0x62F6DC5638250bD9edE84DFBfa54efA263186a4a] Threshold:2}
all signatures:
index: 0
signer: 0x9A1ba2D523AAB8f7784870B639924103d25Bb714
signature: dbc8188c4795f1ec8d0570e51d4e06507693ed97877fffe250a313e08833bc802264ed9e95199d8941d83482e65f0c9f984e226154b4a6af951e28251cca2e1f01
valid: false
---
index: 1
signer: 0x7b79Ba0f76eE49F6246c0034A2a3445C281a67EB
signature: c55c2f96dc0ffd795248cf8ff799288d3c3438fb5afa77ded873780089f54c0875a97e745a91ae302daf577871d0423d34dae20e407845d302569ff6a1f097e501
valid: false
---
konradkonrad commented 1 week ago

During my last test on shutter-gnosis-merge, I sporadically saw the following error:

snapshot-gnosis-merge or main-gnosis-merge?

konradkonrad commented 1 week ago

Also: what is the test environment? Assuming it is a full on integration environment: did you empty the db before running the test on the new code base?

jannikluhn commented 1 week ago

snapshot-gnosis-merge.

It's on a local setup with a new db.