-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It should be possible to start multiple instances of ElectrumSV for an SDK run #16
Comments
I think I should change the CLI structure for the "start" command. Instead of: to signify starting ElectrumSV wallet x 1 + ElectrumX x 1 + Node x 1 it should be: or something like that which would start:
Then these identifiers could be used by the stop command for granular control over re-starting or stopping specified wallets. I think we'd want there to be a 1:1 relationship between a wallet database and a given identifier right? edit: (1 second after you already commented) The thing I'd need to think through a bit is... |
Can we rethink this and make it a bit different. My preference is that we should only allow one start component in one command. So in theory, we should be able to go: Starting a aggregate component collection should not necessarily allow much if any customisation: Then to start the GUI alongside whatever is there should be another command: |
I would lean towards no id meaning a default id, and the user can only start one instance. The user would have to explicitly give instruction to start a new instance that wasn't the default one for a component type. |
Which leads me to this: Or |
I think that sounds okay except that I would move |
I'm also unsure if it would be good to include the "--new" flag for electrumx and the node for example because now would that mean that we need to maintain multiple directories of electrumx and node database / state... that would get hella complicated... So maybe both "--gui" and "--new" would need to go into the And further to this point... if we are not supporting "--new" for a component, the "--id" flag kind of loses relevance to an extent as well... but maybe we would make it so that we can only have 1 instance of electrumX and node database and so --id would act to rename the existing id to a new id? I think you had it better the first time with the more simple: because these flags require the context of component type |
Then you're mixing options to pass to the component and sdk options for starting the component. |
We will have multiple instances of both nodes and indexers. In fact it will be necessary for some testing. And yes, a component should know it's data directory location. If a component does not have a gui mode then it would error. |
Oh so I have misunderstood the meaning of In that case... I guess it's okay but I think if we do it via: we should enforce that edit: I posted this 1 second after your last comment haha... Sure. Okay. I think this sounds okay |
I think we can make it non-complex. Every component type should have a default instance mode and declare how it responds to component level options, like new and gui. But they should all be done generically so it provides for future multiple instancing when we have time for those bonus tasks. |
Here's one option for gui mode and non-gui mode for the node.
|
I am not sure regtest can do multiple nodes and don't think there's any benefit I can see. But multiple instances of electrumx, definitely need that. |
Maybe the web-gui for the node is overkill, and the dashboard should just integrate it. Then the console version might be enough. |
Sure. I wish there were a way to have the component name to the left of the options. It's not very intuitive to me otherwise... Does: Where
|
Yes. I think in the short term we can just disable the --gui option with an error message explaining... and can wire something up later when we have the time. |
No. That does not work for me. Think of it like |
I want us to go for explicit and standard style approaches over custom versions that suit our preferences. |
That's fine. I was more thinking of how the systemd / systemctl model does things and how (thinking of English grammar) usually people are conditioned to expect a sentence to lead with the subject before the predicate ("the people are walking" instead of "walking is what the people were doing". (like Yoda 🤣 ). But it's not so bad. Sounds like a plan. PS: I am not sure how the passing of arguments to the underlying electrumsv will work off the top of my head because I already pass quite a few arguments in the generated .bat or .sh files... but I suppose can make an adapter in the middle to make it work somehow... discussion for when we get to it. |
…g of argument parsing and acceptance of only a single component for starting or stopping... - added a facade for the electrumsv CLI - always start status monitor if not already running. - silence connection error when checking if status monitor is running. - no component argument will start or stop all active components
pushed 3 commits that largely address this re-organisation of the CLI. But still requires some 'massaging'. reminders to self:
|
electrumsv-sdk start electrumsv --gui
.The text was updated successfully, but these errors were encountered: