anoma / namada

Rust implementation of Namada, a Proof-of-Stake L1 for interchain asset-agnostic privacy
https://namada.net
GNU General Public License v3.0
2.38k stars 950 forks source link

`run_aux` should be able to manage any arbitrary number of tasks #459

Open james-chf opened 1 year ago

james-chf commented 1 year ago

Currently run_aux in the eth-bridge-integration branch needs a hardcoded five JoinHandles to manage (tendermint node, ABCI server, broadcaster, Ethereum fullnode, oracle).

https://github.com/anoma/namada/blob/65fb781db1f5194de11a983a39b2166f40b7fb8f/apps/src/lib/node/ledger/mod.rs#L539-L545

This means if we don't want to run the Ethereum fullnode and/or oracle, we still need to provide dummy JoinHandles that don't do anything. We could simplify our code by making run_aux work with only handles for mandatory components (i.e. tendermint node + ABCI server + broadcaster) so that we don't need to provide dummy handles for the Ethereum fullnode and/or oracle components if they aren't needed.

james-chf commented 1 year ago

Extra context: https://github.com/anoma/namada/pull/663#discussion_r1003023292