Newbie question
Closed this issue · 4 comments
I'm trying to get started in MEV, and I've never used Rust, but: Is this complete code?
I only see one rust file build.rs with 10 lines of code.
Build and deploy hints would be very useful in case you have time for that.
The majority of the logic is in main.rs. It may be helpful to read through this Twitter thread to understand why the code in main.rs
will no longer work in its current state.
TL;DR: Reading pending transactions from the mempool was patched (code that reads from mempool)
I believe this code is meant more-so for reference to build your own tool. It's still possible to listen for transactions after they've been included in the block (and use the majority of this code) but as evmcheb points out the "main edge" was recently patched, so it will need modifications.
To run a Rust project, cd
into the directory and run...
$ cargo install --path .
$ cargo run src/main.rs
I'm learning myself, so please take what I said with a grain of salt.
Thanks for elaborating!
Thanks @ZaneH , your remake looks great. To respond to your blog post
I imagine the FIFOCache should be more than 10 entries. 100 or 1,000 wouldn’t take that much more memory and would increase the odds of finding a target quickly.
The FIFOCache is to de-duplicate the 5 websocket streams (there are a few blast-api backend nodes each with separate mempools). You're right though, this could be 100 or 1000.
Feel free to reach out on twitter if you have any more questions