stratum-mining / stratum

stratum
https://stratumprotocol.org
Other
211 stars 124 forks source link

standardize `roles` CLI #813

Open plebhash opened 6 months ago

plebhash commented 6 months ago

context

Stratum Reference Implementation implies that the community will look at our roles to understand how to implement one.

therefore, code readability on the application level of the SRI stack (roles) implementations is a requirement

problem

all crates under roles follow a similar pattern for CLI args parsing, but each with slightly different approaches, making them clumsy to navigate and reason about

proposal

standardizing coding patterns across all roles CLI is essential for code readability

jbesraa commented 3 months ago

@plebhash is CLI the only way we expect users to interact with the roles? because here we have two things: 1) How to configure the role(our approach is currently supports only toml files) 2) How to run the role(our approach is currently assuming this will always be CLI)

I wonder if there is a previous discussion you could link me to? thanks

plebhash commented 3 months ago

@plebhash is CLI the only way we expect users to interact with the roles? because here we have two things:

  1. How to configure the role(our approach is currently supports only toml files)
  2. How to run the role(our approach is currently assuming this will always be CLI)

I wonder if there is a previous discussion you could link me to? thanks

right now, the only way to interact with the roles is to give them a path to a config.toml file over CLI, I think that is enough for a reasonable UX for now, we just need to make sure all roles are following the same coding patterns, since they are currently scattered

here's a discussion on the topic https://github.com/stratum-mining/stratum/discussions/857

average-gary commented 2 months ago

937 closed for future consideration of this issue.

average-gary commented 2 months ago

Related: #1058