Changed to allow offline splitting of validator keys with different passwords#69
Changed to allow offline splitting of validator keys with different passwords#69gnongs wants to merge 13 commits intossvlabs:mainfrom
Conversation
|
@RaekwonIII @IlyaVi Could you please review this PR? |
| } | ||
| } | ||
| else { | ||
| keystorePassword = await fsp.readFile(this.args.password, 'utf-8'); |
There was a problem hiding this comment.
move this line outside of for loop in line 75
There was a problem hiding this comment.
@IlyaVi If this line is moved outside the for loop at line 75, there will be an issue with setting the value of keystoreSet.
There was a problem hiding this comment.
@gnongs let me rephrase my comment
what I meant is to have this in line 75
keystorePassword = this.args.password;
this will preserve the same approach as before your change and won't change anything for existing users in the way the use ssv-keys
There was a problem hiding this comment.
@IlyaVi
Now I understand your intention.
What you want is for it to behave the same as before when using the same password.
Updated.
|
|
||
| const validatedFiles = await this.validateKeystoreFiles(keystoreSet); | ||
|
|
||
| process.stdout.write(validatedFiles[0].keystoreFile); |
README.md
Outdated
| yarn cli shares --keystore=./keystore-files --password=test --operator-ids=1,2,3,4 --operator-keys=LS..,LS..,LS..,LS.. --output-folder=./ --owner-address=... --owner-nonce=.. | ||
| ## folder structure | ||
| keystore_folders | ||
| ├── 0xe020.... |
There was a problem hiding this comment.
validator public key is redundant as folder name - change to something generic
README.md
Outdated
|
|
||
| # folder with multiple keystore files | ||
| yarn cli shares --keystore=./keystore-files --password=test --operator-ids=1,2,3,4 --operator-keys=LS..,LS..,LS..,LS.. --output-folder=./ --owner-address=... --owner-nonce=.. | ||
| ## folder structure |
There was a problem hiding this comment.
Separate this usecase with this sub header
Add comment to underline that --password parameter is actual password file name
"folder structure for keystore files with different password"
Add sub header for one password and multiple files. Command should be the same as before change
…fferent password files more clear
|
@IlyaVi Could you check this again? |
| if (dirent.name.includes(this.args.password)) { | ||
| keystorePassword = await fsp.readFile(path.join(file, dirent.name), 'utf-8'); | ||
| } else { | ||
| keystoreFile = path.join(file, dirent.name); |
There was a problem hiding this comment.
@gnongs if there are multiple keystore files in same sub directory you will add only last one to the array
There was a problem hiding this comment.
Having multiple keystore files is not the folder structure I intend.
Would it be better to terminate the program in such cases?
| } | ||
| } | ||
| else { | ||
| keystorePassword = await fsp.readFile(this.args.password, 'utf-8'); |
There was a problem hiding this comment.
@gnongs let me rephrase my comment
what I meant is to have this in line 75
keystorePassword = this.args.password;
this will preserve the same approach as before your change and won't change anything for existing users in the way the use ssv-keys
README.md
Outdated
| ```bash | ||
| # single file | ||
| yarn cli shares --keystore=keystore.json --password=test --operator-ids=1,2,3,4 --operator-keys=LS..,LS..,LS..,LS.. --output-folder=./ --owner-address=... --owner-nonce=.. | ||
| yarn cli shares --keystore=./keystore.json --password=./password.txt --operator-ids=1,2,3,4 --operator-keys=LS..,LS..,LS..,LS.. --output-folder=./ --owner-address=... --owner-nonce=.. |
There was a problem hiding this comment.
please revert this change, user will continue using plane password as parameter
README.md
Outdated
| └── keystore5.json | ||
| password.txt | ||
|
|
||
| yarn cli shares --keystore=./keystore_files --password=./password.txt --operator-ids=1,2,3,4 --operator-keys=LS..,LS..,LS..,LS.. --output-folder=./ --owner-address=... --owner-nonce=.. |
There was a problem hiding this comment.
please change to plain password instead file name and remove "password.txt" from folder structure
README.md
Outdated
| ├── keystore.json | ||
| └── password.txt | ||
|
|
||
| yarn cli shares --keystore=./keystore_folders --password=password.txt --operator-ids=1,2,3,4 --operator-keys=LS..,LS..,LS..,LS.. --output-folder=./ --owner-address=... --owner-nonce=.. |
There was a problem hiding this comment.
instead "password.txt" write here and in the folder structure - the name and extension are not important as long as file can be read as utf-8 encoded text
There was a problem hiding this comment.
I tried to convey that it can be a simple file without an extension.
|
Hey, @IlyaVi The update is quite late… Sorry.... I have made all the updates to the parts you mentioned, and I have some thoughts on certain areas. Please share your feedback on those comments. :)
|
Fixes #<issue_number_goes_here>