Skip to content
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

Graceful Startup #799

Open
utkarshg6 opened this issue May 24, 2024 · 1 comment
Open

Graceful Startup #799

utkarshg6 opened this issue May 24, 2024 · 1 comment

Comments

@utkarshg6
Copy link

utkarshg6 commented May 24, 2024

A partial solution to eliminate the need of restarting the Node while Generating/Recovering Wallets during the Node startup is to redefine the trigger of the startup of Neighborhood and Accountant.

This could be achieved using an already in use message called StartMessage.

This message is used for two unrelated purposes.

  1. After the ActorSystemFactory has finished binding all the Actors with BindMessage,
    it sends a StartMessage to the Neighborhood so that it can start trying to connect the new Node
    to the Network.
  2. After the Neighborhood is successfully connected to the Network well enough to begin
    routing messages, the Neighborhood sends another StartMessage to the Accountant, which uses
    the StartMessage as a signal to begin running its regular scans.

These sequence of events can be understood as:

ActorSystemFactory -> Neighborhood -> Accountant

We can modify this sequence of events so that the ActorSystemFactory sends a message to the Configurator, and then the Configurator sends another message to the Accountant.

This sequencing allows the Configurator to verify whether wallets are present or not.

The new sequence of events can be understood as:

ActorSystemFactory -> Configurator -> Neighborhood -> Accountant

The Configurator performs this check using information provided by BootstrapperConfig. Here’s how it works:

  1. BootstrapperConfig prepares ConfiguratorConfig, indicating whether wallets are present or not.
  2. If wallets are present in the ConfiguratorConfig, the Configurator immediately sends a message to the Neighborhood upon receiving the StartMessage. If wallets are not present, it notifies the user to generate/recover wallets and waits for the user to complete this action.

Note: There's another idea that we haven't discussed much about. It involves building a separate utility to generate/recover wallet.

@kauri-hero kauri-hero moved this from 🆕 New to 🔖 Ready in MASQ Node v2 Jul 28, 2024
@bertllll
Copy link

I do root for what was roughed out in the premier comment. (Maybe because I was leading the effort to design it this way - look at it, what an awesome example of human vanity haha)

Back to work...
I'm here as I just brushed some of these thoughts off and on my journey seeking this card I stumbled a couple of times over some other cards at least distantly resembling these. And so I'd like to mention them:

#712
#549
#458

and perhaps more...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🔖 Ready
Development

No branches or pull requests

2 participants