celestia-node icon indicating copy to clipboard operation
celestia-node copied to clipboard

feat: celestia node run

Open ramin opened this issue 1 year ago • 0 comments

Ok, been doing this in small bits over a few weeks and re-arranged the furniture multiple times, so hopefully it is still coherent, but figured it was time stop fiddling and open the PR even though i don't love it

What it does?

  • establishes celestia light run as its own command that will both init and start (request from @smuu refs #2279)
  • tries to prevent code dupe of copying init.go and start.go into a run.go by introducing a 'runner' construct
  • removes the run alias for start, therefore marked breaking

so, we now can

celestia light init -> celestia light start celestia light start celestia light run

What else

  • i don't love or like the cmd/runner.go at all but i think its a fine/ok stop gap to get this running and done with small scope
  • i think a next step would be a larger and further refactoring to move the runner/run thing into nodebuilder.go, but this should be part of a bigger refactor to clean up some of the usage of cmd/env.go (ie: StorePath, NodeConfig) that the existing init and start rely on and bundle this all into a refactoring of 'nodebuilder' closer to @Wondertan's original vision i will start on imminently...

ramin avatar Jun 17 '24 09:06 ramin