You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@GitGab19@plebhash@Shourya742 here is a start for roles code-debt, what I think should be included in refactoring. We can explain each point further, but maybe it would be best to priorities them first and then elaborate in a new issue created for any planned point from here.
Can we switch to clap for the CLI? Right now, we’re using basic argument parsing, which works but feels a bit clunky. clap could make things a lot better, which would make the CLI much more user-friendly.
Since the roles module is meant to be a library, I’m wondering how we should handle the runtime for the parent process that uses it. If we bundle our own Tokio runtime in the crate, it could cause issues, like conflicts with multiple runtimes, which Tokio doesn’t support well. I think it’d be better to expose abstractions that let the parent runtime manage the tasks we spawn. This way, we avoid conflicts and give more flexibility to whoever’s using the library.
About tokio::Mutex, even the Tokio team advises against using it in high-traffic paths because it can cause thread contention and slow things down.
The rest looks great! Let me know what you think. 🚀
Public API
Runtime/Threading
tokio::main
Networking
async-channel
and usetokio
channels insteadasync-channel
#1389Mutex/Lock behavior
Common Code
stratum-common
cratebitcoin
export fromstratum-common
, it should be exported from the crates requiring itstratum-common
roles-logic-sv2
andstratum-common
a single crateConfigurations
Documentation
The text was updated successfully, but these errors were encountered: