Skip to content

Commit

Permalink
Split keys
Browse files Browse the repository at this point in the history
Signed-off-by: Dylan Schultz <[email protected]>
  • Loading branch information
dylanschultzie committed Aug 10, 2023
1 parent 43beb29 commit 5566270
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ endif
# Generate keys from validator private key
#
genkeys: deps
cd ${KEYS_DIR} && ../${HORCRUX_HOST} create-shares --home . priv_validator_key.json 2 3
cd ${KEYS_DIR} && ../${HORCRUX_HOST} create-ecies-shards --home . priv_validator_key.json 2 3

getshards: deps
cd ${KEYS_DIR} && ../${HORCRUX_HOST} create-ecies-shards shards 3

test:
@echo running ansible test..
Expand Down
12 changes: 11 additions & 1 deletion roles/horcrux_create_shares/tasks/create_multi_share.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
---
- name: Generate and move keys
block:
- name: Generate ECIES shards
delegate_to: localhost
run_once: true
shell: |
cd {{ playbook_dir }}/keys
../hostbin/horcrux create-ecies-shards --shards {{ shares }}
- name: Generate private keys
become: false
local_action: command make genkeys
delegate_to: localhost
shell: |
cd {{ playbook_dir }}/keys
../hostbin/horcrux create-ed25519-shards --chain-id {{ chain_id }} --key-file ./priv_validator_key.json --threshold {{ threshold }} --shards {{ shares }}
run_once: true

- name: Find local key share
Expand Down

0 comments on commit 5566270

Please sign in to comment.