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

Resolve eon index / keyper set index ambiguity #434

Closed jannikluhn closed 1 month ago

jannikluhn commented 4 months ago

The keyper set index is the index of a keyper set in the keyper set manager contract. The eon index is the index of a eon DKG process. Normally, the two indices should be the same. However, they can diverge in the following situations:

In some places in the code we assume they are the same. This results in errors. We need to

1) Identify the places in which we use the keyper set index instead of the eon index and vice versa. 2) In those places, translate one into the other. This can be done using the eons table in the keyper db which stores all eon indices with corresponding keyper set index. Adding a query to select the highest eon for a given keyper set index might be useful.

jannikluhn commented 4 months ago

Setting InitialEon to a high value does not trigger this bug.

jannikluhn commented 1 month ago

Fixed as far as we know