flashbots / mev-inspect-py

🔎 an MEV inspector for Ethereum 🔎
MIT License
826 stars 258 forks source link

ignore reverted transactions from liquidation classifier #317

Closed pintail-xyz closed 1 year ago

pintail-xyz commented 2 years ago

What does this PR do?

It prevents reverted liquidations being sent for parsing (since the classified trace for a reverted transaction will be incomplete and this will cause block processing to fail). Reverted transactions do not result in extraction of MEV and should not be included.

Related issue

issue 315

Testing

I've added an additional test to test_compound.py this test supplies a block which contains a reverted liquidation transaction and verifies that the transaction does not get included in the set of liquidation traces (and the fact that this block is now processed successfully - it previously didn't - demonstrates the problem has been solved).

I've also successfully run ./mev inspect on blocks which previously failed due to reverted liquidations.

Checklist before merging