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

separate in-memory seed storage #27

Open
johncantrell97 opened this issue Mar 26, 2022 · 3 comments
Open

separate in-memory seed storage #27

johncantrell97 opened this issue Mar 26, 2022 · 3 comments

Comments

@johncantrell97
Copy link
Contributor

One big pain point I've run into is that if I need to restart my sensei node then all of the child nodes stop running and can't automatically be started back up.

The big use case for needing to restart a node is if you want to perform an update to the sensei software itself.

Since the seed is already loaded into memory when the node is unlocked, I was thinking of supporting a separate process that users can run to keep these seeds in memory. When sensei is started it can try to start child nodes by checking if their seed is stored in this secondary in-memory cache.

I'm not sure if anyone has ideas for the best way to implement the secondary process/cache? One idea was just use simple in-memory store like redis and make sure persistence is disabled. Other idea is to just implement an extremely minimal binary in rust that can hold these values in memory. Need some mechanism for sensei to connect and read/write to the store though.

It's also possible this 'shared cache' might be useful for storing chain data as well.

Thoughts?

@johncantrell97
Copy link
Contributor Author

talked a bit about this in discord.

I think the path forward with this is going to be an auto-unlock feature that nodes can opt into. If you opt into auto-unlock then your passphrase is stored encrypted with the sensei default node's passphrase.

When the sensei node is started + unlocked it can then automatically decrypt and start all the nodes who have opted into this feature.

@w3irdrobot
Copy link
Contributor

is the idea to save this in the database then or on the filesystem? if kept in memory, the encrypted child passphrases would be lost if the main node was restarted.

@johncantrell97
Copy link
Contributor Author

the idea was to store the encrypted passphrases in the database and then when the root node is started/unlocked it's passphrase could be used to decrypt all the other nodes passphrases and start them automatically.

this issue might be on hold as we figure out the remote signing architecture though

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

No branches or pull requests

2 participants