Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a command to the docker script allowing to stop validating #2295

Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
2b57e99
Merge pull request #1 from celo-org/master
aaitor Oct 15, 2019
dbf364d
Merge pull request #2 from celo-org/master
aaitor Oct 28, 2019
bea22ce
Merge pull request #3 from celo-org/master
aaitor Nov 1, 2019
e816c2f
Merge pull request #4 from celo-org/master
aaitor Nov 5, 2019
3885464
Merge pull request #5 from celo-org/master
aaitor Nov 8, 2019
4bf9b9c
Merge pull request #6 from celo-org/master
aaitor Nov 11, 2019
6e48d18
Merge pull request #7 from celo-org/master
aaitor Nov 13, 2019
cfe2b4b
Merge pull request #8 from celo-org/master
aaitor Nov 18, 2019
5ec5e52
Merge pull request #9 from celo-org/master
aaitor Nov 19, 2019
eb20309
Merge pull request #10 from celo-org/master
aaitor Nov 25, 2019
ef3d8d1
Merge pull request #12 from celo-org/master
aaitor Nov 27, 2019
a5be9c5
Merge pull request #13 from celo-org/master
aaitor Nov 28, 2019
b8ad1af
Merge pull request #14 from celo-org/master
aaitor Dec 2, 2019
92cf27c
Merge pull request #15 from celo-org/master
aaitor Dec 3, 2019
ed0ed8e
Merge pull request #16 from celo-org/master
aaitor Dec 4, 2019
e8f19dd
Merge pull request #18 from celo-org/master
aaitor Dec 5, 2019
181e782
Merge pull request #19 from celo-org/master
aaitor Dec 6, 2019
6787bd5
Merge pull request #20 from celo-org/master
aaitor Dec 8, 2019
c7c080e
Merge pull request #21 from celo-org/master
aaitor Dec 9, 2019
1d4aa9f
Merge pull request #22 from celo-org/master
aaitor Dec 10, 2019
46fd5a6
Merge pull request #23 from celo-org/master
aaitor Dec 11, 2019
3a7dcee
Merge pull request #24 from celo-org/master
aaitor Dec 12, 2019
befb7fd
Merge pull request #25 from celo-org/master
aaitor Dec 12, 2019
de828f7
Merge pull request #26 from celo-org/master
aaitor Dec 13, 2019
1770aad
Merge pull request #27 from celo-org/master
aaitor Dec 17, 2019
d59e873
Adds a new script command allowing to stop validating
aaitor Dec 18, 2019
efa4b89
Merge branch 'master' into feature/script-stop-validating
aaitor Dec 18, 2019
874ee05
Merge branch 'master' into feature/script-stop-validating
Jan 3, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion scripts/run-docker-validator-network.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ if [[ $COMMAND == *"help"* ]]; then

echo -e "Options:"
echo -e "$0 <COMMAND> <DATA_DIR> <CELO_IMAGE> <NETWORK_ID> <NETWORK_NAME> <PASSWORD>"
echo -e "\t - Command; comma separated list of actions to execute. Options are: help, pull, clean, accounts, run-validator, run-proxy, run-attestation, register-metadata, run-fullnode, status, print-env, get-cooking. Default: pull,accounts,run-validator,run-proxy,status"
echo -e "\t - Command; comma separated list of actions to execute. Options are: help, pull, clean, accounts, run-validator, run-proxy, run-attestation, register-metadata, run-fullnode, status, print-env, get-cooking, stop-validating. Default: pull,accounts,run-validator,run-proxy,status"
echo -e "\t - Data Dir; Local folder where will be created the data dir for the nodes. Default: $HOME/.celo/network"
echo -e "\t - Celo Image; Image to download"
echo -e "\t - Celo Network; Docker image network to use (typically alfajores or baklava, but you can use a commit). "
Expand Down Expand Up @@ -231,6 +231,29 @@ if [[ $COMMAND == *"run-validator"* ]]; then

fi


if [[ $COMMAND == *"stop-validating"* ]]; then

echo -e "* Let's stop of validate ..."

if [ -z ${CELO_VALIDATOR_ADDRESS+x} ]; then echo "CELO_VALIDATOR_ADDRESS is unset"; exit 1; fi
if [ -z ${CELO_VALIDATOR_GROUP_ADDRESS+x} ]; then echo "CELO_VALIDATOR_GROUP_ADDRESS is unset"; exit 1; fi


echo -e "\tDe-registering Validator $CELO_VALIDATOR_ADDRESS"
$CELOCLI validator:deaffiliate --from $CELO_VALIDATOR_ADDRESS
$CELOCLI validator:deregister --from $CELO_VALIDATOR_ADDRESS

$CELOCLI election:revoke --from $CELO_VALIDATOR_ADDRESS --for $CELO_VALIDATOR_GROUP_ADDRESS --value 10000000000000000000000
$CELOCLI election:revoke --from $CELO_VALIDATOR_GROUP_ADDRESS --for $CELO_VALIDATOR_GROUP_ADDRESS --value 10000000000000000000000

echo -e "\tDeregister validator group:"
$CELOCLI validatorgroup:deregister --from $CELO_VALIDATOR_GROUP_ADDRESS

docker stop celo-validator celo-proxy
fi


if [[ $COMMAND == *"run-attestation"* ]]; then

echo -e "* Let's run the attestation service ..."
Expand Down