Configure custom node submission handling of high risk transactions #473
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a new flag
--disable-high-risk-public-mempool-transactions
which controls whether or not "high-risk" transactions (i.e. transactions that interact with AMMs and can revert due to price movement and have MEV extracted from it) should be disabled for public mempool submission strategy.Previously, we had hard-coded this to be enabled for Mainnet and disabled for other networks. This PR makes it configurable allowing is to:
This PR is done in anticipation of The Merge™, where it is unclear whether or not Eden and Flashbots will continue to function for the first few epochs - so we need to be able to only submit to the public mempool in case of emergency.
Test Plan
Run without
--disable-high-risk-public-mempool-transactions
:Run with
--disable-high-risk-public-mempool-transactions
:Also, unit test that verifies filtering logic was added.
Release notes
DISABLE_HIGH_RISK_PUBLIC_MEMPOOL_TRANSACTIONS=true
environment variable for Mainnet and leave it unset for our other networks.