Chainbound channel leak
Starting a Chainbound connection
- Creates a channel A to receive transactions
- Spawns a goroutine to connect to Fiber
- Blocks reading from channel A
https://github.com/flashbots/mempool-dumpster/blob/84c076852252151ff6aef0174a94a778464af6b2/collector/node_conn_chainbound.go#L55-L69
If an error occurs either when first connecting to Fiber or from an error receiving a new tx a reconnect is triggered
https://github.com/flashbots/mempool-dumpster/blob/84c076852252151ff6aef0174a94a778464af6b2/collector/node_conn_chainbound.go#L95-L99
or
https://github.com/flashbots/mempool-dumpster/blob/84c076852252151ff6aef0174a94a778464af6b2/collector/node_conn_chainbound.go#L109-L114
The reconnect will call start and a new channel B will be created. Channel A will not be closed and leak. https://github.com/flashbots/mempool-dumpster/blob/84c076852252151ff6aef0174a94a778464af6b2/collector/node_conn_chainbound.go#L82
I'm not sure how much of a problem the leak is, but a more robust way to handle the connection lifecycle would be to create a centralized loop.