flashbots / mev-inspect-rs

Discover historic Miner Extractable Value (MEV) opportunities
MIT License
547 stars 127 forks source link

Parallelize block processing #24

Closed gakonst closed 3 years ago

gakonst commented 3 years ago

Currently we process each block's transactions by joining all the futures together. It'd be nice if we could also do block processing in parallel. A naive way to do this is by spawning multiple processes of the binary. This might be an issue if we end up getting too many handles to PostGres?

brockelmore commented 3 years ago

might i suggest maybe looking into actix/actor model? actix in particular makes it super easy to spin up concurrent processing actors. if you're interested, i can help out - i've used actix a lot. multiple binaries seems less than optimal

gakonst commented 3 years ago

Not opposed, by all means! I haven't used Actix, but agree multiple binaries is bad and should be replaced

mattsse commented 3 years ago

Hey, I found this to be an interesting problem and attempted a solution in #51 However due to lack of access to an archive node I'm not sure how to test it yet

obadiaa commented 3 years ago

Thank you @mattsse !!