From a011d6701d6e1212f5f212c12a255d4189666add Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Thu, 22 Jul 2021 20:22:58 +0300 Subject: [PATCH] [#120] bin: Support notary disabled workflow for helper commands Signed-off-by: Alex Vanin --- bin/config.sh | 6 +++++- bin/tick.sh | 6 +++++- docs/notary.md | 16 +++++++++++++--- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/bin/config.sh b/bin/config.sh index dc89216..50d4b36 100755 --- a/bin/config.sh +++ b/bin/config.sh @@ -21,7 +21,11 @@ VALUE="${2}" [ -z "$VALUE" ] && echo "Empty config value" && exit 1 # Internal variables -ADDR=`cat ${WALLET} | jq -r .accounts[2].address` +if [[ -z "${NEOFS_NOTARY_DISABLED}" ]]; then + ADDR=`cat ${WALLET} | jq -r .accounts[2].address` +else + ADDR=`cat ${WALLET} | jq -r .accounts[0].address` +fi # Change config value in side chain echo "Changing ${KEY} configration value to ${VALUE}" diff --git a/bin/tick.sh b/bin/tick.sh index 5c258f4..1f5620e 100755 --- a/bin/tick.sh +++ b/bin/tick.sh @@ -18,7 +18,11 @@ WALLET_IMG="${WALLET_IMG:-wallets/node-wallet.json}" PASSWD="one" # Internal variables -ADDR=`cat ${WALLET} | jq -r .accounts[2].address` +if [[ -z "${NEOFS_NOTARY_DISABLED}" ]]; then + ADDR=`cat ${WALLET} | jq -r .accounts[2].address` +else + ADDR=`cat ${WALLET} | jq -r .accounts[0].address` +fi # Fetch current epoch value EPOCH=`${NEOGO_NONINTERACTIVE} contract testinvokefunction -r \ diff --git a/docs/notary.md b/docs/notary.md index 72d7a49..3188456 100644 --- a/docs/notary.md +++ b/docs/notary.md @@ -45,9 +45,19 @@ Chain dump without notary service does not have predefined network map. Therefore, you need to wait about 5 minutes until new epoch tick with updated network map. -All helper commands such as `make tick.epoch` or `make update.epoch_duration` -are designed as multisignature transactions, so you can't use them without -notary. + +4. Enable helper commands + +To enable helper commands such as `make tick.epoch` or `make update.epoch_duration` +make sure to export non-empty `NEOFS_NOTARY_DISABLED` environment variable. +``` +$ export NEOFS_NOTARY_DISABLED=1 +``` + +Use `unset` command to return it back. +``` +$ unset NEOFS_NOTARY_DISABLED +``` # Enable notary service in main chain