paradigmxyz / artemis

A simple, modular, and fast framework for writing MEV bots in Rust.
Apache License 2.0
2.33k stars 447 forks source link

Static channel size #37

Closed mteam88 closed 1 year ago

mteam88 commented 1 year ago

I am getting errors like: ERROR artemis_core::engine: error receiving event: channel lagged by 91 consistently when using LogCollector and a slow Strategy

I believe this is explained here: https://docs.rs/tokio/latest/src/tokio/sync/broadcast.rs.html

I checked out the code and found that you can't configure the channel size: https://github.com/paradigmxyz/artemis/blob/0b04eed4ad5c288becdbbd7e83a0a65c42abbfaf/crates/artemis-core/src/engine.rs#L61

I propose an option to change this on creation.