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

Eon key publishing error #460

Open jannikluhn opened 5 days ago

jannikluhn commented 5 days ago

Keypers fail to publish eon keys with the following error:

failed to check if eon key should be published error="no rows in result set" key=8a5d479286d9b0acec04c257ea670325f53214d9d8e940682b3dc94c5b4a1f5f0bc5bec62b52a345bf7088c6bb92df4008f46b86d72cd2baeb8548cf2ae56a610f7e1a42ceb2f868eeff75a9c2a0df1762d8085f57446532e398820b1e4a658e keyper-set-index=1

This is likely because of this line: https://github.com/shutter-network/rolling-shutter/blob/5fcb8af2fb870d7f9ecb3fa078048ec25676fdd8/rolling-shutter/eonkeypublisher/eonkeypublisher.go#L86

We use the key's keyper internal eon index instead of the keyper set index to get the corresponding keyper set from the db. If eon and keyper set index don't match, they get the wrong or in practice more likely no keyper set at all.

To fix this, we should query by keyper set index which is also part of the EonPublicKey event.