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

Changed to allow offline splitting of validator keys with different passwords #69

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 30 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ To run you will use the "shares" command

**Input parameters:**
- keystore (ks) = The path to either a validator keystore file or a folder that contains multiple validator keystore files. If a folder is provided, it will split in bulk all the keystore files within it according to the additional arguments provided
- password (ps) = The keystore file encryption password, if a folder was provided the password will be used for all keystore files in the folder
- password (ps) = The keystore file encryption password. For one keystore, enter the absolute path. For multiple keystores, enter only the password file name.
- operator-ids (oids) = Comma-separated list of operator IDs. The amount must be 3f+1 compatible
- operator-keys (oks) = Comma-separated list of operator keys (same sequence as operator ids). The amount must be 3f+1 compatible
- output-folder (of) = Target folder path to output the key shares file
Expand All @@ -103,7 +103,35 @@ To run you will use the "shares" command
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=..

# 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 for keystore files with the same password
keystore-files
├── keystore1.json
├── keystore2.json
├── keystore3.json
├── keystore4.json
└── keystore5.json

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 for keystore files with diffent passwords
keystore_folders
├── validator1
│   ├── keystore.json
│   └── password
├── validator2
│   ├── keystore.json
│   └── password
├── validator3
│   ├── keystore.json
│   └── password
├── validator4
│   ├── keystore.json
│   └── password
└── validator5
├── keystore.json
└── password

yarn cli shares --keystore=./keystore_folders --password=password --operator-ids=1,2,3,4 --operator-keys=LS..,LS..,LS..,LS.. --output-folder=./ --owner-address=... --owner-nonce=..
```

**Output:** Name will start with keyshares-timestamp.json
Expand Down
47 changes: 35 additions & 12 deletions dist/tsc/src/commands/actions/KeySharesAction.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/tsc/src/commands/actions/KeySharesAction.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading