diff --git a/Makefile b/Makefile index fea993a..0c508f1 100644 --- a/Makefile +++ b/Makefile @@ -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.. diff --git a/roles/horcrux_create_shares/tasks/create_multi_share.yml b/roles/horcrux_create_shares/tasks/create_multi_share.yml index 02d34e4..7ae024e 100644 --- a/roles/horcrux_create_shares/tasks/create_multi_share.yml +++ b/roles/horcrux_create_shares/tasks/create_multi_share.yml @@ -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