Python helper to generate new private/public keys pair to run RChain node as validator
Python helper to generate new private/public keys pair to run RChain node as validator
Current implemented workflow:
.sk
key file from data folderHere’s a brief overview on how to use the package
PATH
Installation is done via the official Python package manager:
pip3 install rchain-keygen
After installing you will be able to use the binary as:
$ rchain-keygen --help
usage: rchain-keygen [-h] [--save-as-source]
RChain 'ed25519' signed keys generator
optional arguments:
-h, --help show this help message and exit
--save-as-source enable saving variables for bash env sourcing
Having rnode
installed you just need to run:
rchain-keygen
[...]
Launching: rnode.
[...]
VALIDATOR_PUBLIC_KEY=...
VALIDATOR_PRIVATE_KEY=...
That would be as easy as:
docker run --rm -it --entrypoint /bin/bash rchain/rnode:release-rnode-v0.7
# container shell
export PATH=/opt/docker/bin:$PATH
apt update && apt install -y python3-pip
pip3 install rchain-keygen
cd $HOME
rchain-keygen
rnode
installation (or not being found in PATH) would end up execution with Exception:$ rchain-keygen
Temporary dir: ...
Launching: rnode.
[...]
FileNotFoundError: [Errno 2] No such file or directory: 'rnode'
This happened in last docker testing image. Fix is:
sed -i '79s/data_dir/data-dir/' /usr/local/lib/python3.6/dist-packages/rchain_keygen/app.py
docker-compose down –volumes –remove-orphans
- `black` formatter:
```bash
docker run --rm -it \
-v (pwd):/code -w /code \
unibeautify/black -S ./rchain_keygen