From 639279216095e6d0cbba76fbd75b1f6462034768 Mon Sep 17 00:00:00 2001 From: valdok Date: Thu, 7 Mar 2024 08:53:32 +0000 Subject: [PATCH] node_init script updated --- deployment/ci/node_init.sh | 4 ++-- deployment/docker/testnet/node_init.sh | 10 +++++----- docs/node_init.sh | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/deployment/ci/node_init.sh b/deployment/ci/node_init.sh index 4fb7bc425..2dc5f4f26 100644 --- a/deployment/ci/node_init.sh +++ b/deployment/ci/node_init.sh @@ -34,9 +34,9 @@ cp /tmp/.secretd/keyring-test /root/.secretd/ -r secretd init-enclave -PUBLIC_KEY=$(secretd parse /opt/secret/.sgx_secrets/attestation_cert.der 2> /dev/null | cut -c 3- ) +PUBLIC_KEY=$(secretd dump /opt/secret/.sgx_secrets/pubkey.bin 2> /dev/null) -echo "Public key: $(secretd parse /opt/secret/.sgx_secrets/attestation_cert.der 2> /dev/null | cut -c 3- )" +echo "Public key: $(secretd dump /opt/secret/.sgx_secrets/pubkey.bin 2> /dev/null)" secretd tx register auth /opt/secret/.sgx_secrets/attestation_combined.bin -y --from a --gas-prices 0.25uscrt --gas 5000000 diff --git a/deployment/docker/testnet/node_init.sh b/deployment/docker/testnet/node_init.sh index ea98dca58..b3309049f 100644 --- a/deployment/docker/testnet/node_init.sh +++ b/deployment/docker/testnet/node_init.sh @@ -49,17 +49,17 @@ then secretd init-enclave - PUBLIC_KEY=$(secretd parse /opt/secret/.sgx_secrets/attestation_cert.der 2> /dev/null | cut -c 3- ) + PUBLIC_KEY=$(secretd dump /opt/secret/.sgx_secrets/pubkey.bin 2> /dev/null) - echo "Public key: $(secretd parse /opt/secret/.sgx_secrets/attestation_cert.der 2> /dev/null | cut -c 3- )" + echo "Public key: $(secretd parse /opt/secret/.sgx_secrets/pubkey.bin 2> /dev/null)" curl http://"$FAUCET_URL"/faucet?address=$(secretd keys show -a a) # cp /opt/secret/.sgx_secrets/attestation_cert.der ./ sleep 10 # openssl base64 -A -in attestation_cert.der -out b64_cert - # secretd tx register auth attestation_cert.der --from a --gas-prices 0.25uscrt -y + # secretd tx register auth attestation_combined.bin --from a --gas-prices 0.25uscrt --gas 5000000 -y - secretd tx register auth /opt/secret/.sgx_secrets/attestation_cert.der -y --from a --gas-prices 0.25uscrt + secretd tx register auth /opt/secret/.sgx_secrets/attestation_combined.bin -y --from a --gas-prices 0.25uscrt --gas 5000000 sleep 10 @@ -77,7 +77,7 @@ then secretd validate-genesis # this is here to make sure that the node doesn't resync - cp /opt/secret/.sgx_secrets/attestation_cert.der /root/.secretd/config/ + cp /opt/secret/.sgx_secrets/* /root/.secretd/config/ if [ "$VALIDATOR" == "true" ] then diff --git a/docs/node_init.sh b/docs/node_init.sh index 3f4d73cda..67c87bbc0 100644 --- a/docs/node_init.sh +++ b/docs/node_init.sh @@ -39,13 +39,13 @@ cp /tmp/.secretd/keyring-test /root/.secretd/ -r SGX_MODE=SW secretd init-enclave --reset -PUBLIC_KEY=$(SGX_MODE=SW secretd parse /root/attestation_cert.der | cut -c 3- ) +PUBLIC_KEY=$(SGX_MODE=SW secretd dump /root/pubkey.bin) echo "Public key: $PUBLIC_KEY" -SGX_MODE=SW secretd parse /root/attestation_cert.der +SGX_MODE=SW secretd dump /root/pubkey.bin cat /root/attestation_cert.der -tx_hash="$(SGX_MODE=SW secretd tx register auth /root/attestation_cert.der -y --from a --gas-prices 0.25uscrt | jq -r '.txhash')" +tx_hash="$(SGX_MODE=SW secretd tx register auth /root/attestation_combined.bin -y --from a --gas-prices 0.25uscrt --gas 5000000 | jq -r '.txhash')" #secretd q tx "$tx_hash" sleep 15