flashbots / mev-geth

Go implementation of MEV-Auction for Ethereum
GNU Lesser General Public License v3.0
786 stars 197 forks source link

Calculate megabundle as soon as it's received #112

Closed Ruteri closed 2 years ago

Ruteri commented 2 years ago

Since megabundles are only sent if they improve the profit over previous megabundle, they should be considered for mining immediately.

Ruteri commented 2 years ago

Is there no risk that this change removes the liveness requirements of the block builder? If better megabundles keep coming than a new block will never get built?

If you notice here https://github.com/flashbots/mev-geth/pull/112/files#diff-689874b30f6f905ce6c47cdefeddcf052b467a7936a981f4b6cf38939e10d924R457 that the megabundle interrupt is submitted with "interrupt none", it will not stop the previous task (whatever it may be). So if we are getting more requests than we can handle, we still produce blocks as fast as we can, and the (non-) interrupts are queued. If a different interrupt is submitted (head/recommit) the higher interrupt is propagated to the task.