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

Fix duplicate keyper set error #463

Closed jannikluhn closed 5 days ago

jannikluhn commented 5 days ago

On startup, the chainsyncer gives all keyper sets it can find in the keyper set manager to its subscribers, no matter if they are actually new or already in the db. This results in duplicate primary key errors when we try to insert them a second time.

To fix this, the SQL query now does not insert the keyper set if it is already present.