astriaorg / astria

A monorepo containing all the custom components of the Astria network, a decentralized system that replaces traditional sequencers, offering a shared, permissionless sequencer network.
https://www.astria.org/
Apache License 2.0
115 stars 76 forks source link

composer: add timeouts to pending tx stream #216

Open SuperFluffy opened 1 year ago

SuperFluffy commented 1 year ago

192 contains timeouts for get_net_version but not for subscribe_full_pending_txs. Adding this is more complex because subscribe_full_pending_txs returns a stream. Since we don't want composer to shut down if the stream times out, the stream needs to be wrapped.

https://crates.io/crates/async-stream might help

dereksione commented 1 year ago

Do we need to address this before the collector refactor drops since that is going to change how pending txs are coming in?

SuperFluffy commented 1 year ago

Depends on the shape of the refactor I guess. I have had a quick look but it's hard to see what's going on with it right now because it's not yet rebased.