Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure custom node submission handling of high risk transactions #473

Merged
merged 3 commits into from
Aug 25, 2022

Conversation

nlordell
Copy link
Contributor

@nlordell nlordell commented Aug 25, 2022

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:

  • If we need to disable all private submission strategies, then we can still continue to function with the public mempool.
  • If we eventually enable some additional private network submission for other networks (GChain, Polygon), then we can disable high-risk transactions to the public mempool without additional code changes

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:

% cargo run -p solver
...
disable_high_risk_public_mempool_transactions: false
...

Run with --disable-high-risk-public-mempool-transactions:

% cargo run -p solver
...
disable_high_risk_public_mempool_transactions: false
...

Also, unit test that verifies filtering logic was added.

Release notes

  • We need to set DISABLE_HIGH_RISK_PUBLIC_MEMPOOL_TRANSACTIONS=true environment variable for Mainnet and leave it unset for our other networks.

@nlordell nlordell requested a review from a team as a code owner August 25, 2022 11:15
crates/driver/src/main.rs Outdated Show resolved Hide resolved
crates/solver/src/arguments.rs Show resolved Hide resolved
@nlordell nlordell merged commit beb142a into main Aug 25, 2022
@nlordell nlordell deleted the configure-custom-node-high-risk-filtering branch August 25, 2022 15:03
@github-actions github-actions bot locked and limited conversation to collaborators Aug 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants