diff --git a/.changeset/dull-windows-travel.md b/.changeset/dull-windows-travel.md new file mode 100644 index 000000000..bfc1cead8 --- /dev/null +++ b/.changeset/dull-windows-travel.md @@ -0,0 +1,9 @@ +--- +'@celo/celocli': major +--- + +Remove `celocli validator:force-deaffiliate` + +This command was only ever usable pre mainnet launch. The force deaffiliate method it would call is only callable by one of the whitelisted Slasher Contracts. + +To force removal of validator with poor uptime use `celocli validator:downtime-slash` or to sever association with a validator from your group use `celocli validator:deaffiliate` \ No newline at end of file diff --git a/docs/command-line-interface/reserve.md b/docs/command-line-interface/reserve.md deleted file mode 100644 index 8d4972c4b..000000000 --- a/docs/command-line-interface/reserve.md +++ /dev/null @@ -1,71 +0,0 @@ -`celocli reserve` -================= - -Shows information about reserve - -* [`celocli reserve:status`](#celocli-reservestatus) -* [`celocli reserve:transfergold`](#celocli-reservetransfergold) - -## `celocli reserve:status` - -Shows information about reserve - -``` -USAGE - $ celocli reserve:status [--gasCurrency - 0x1234567890123456789012345678901234567890] [--globalHelp] - -FLAGS - --gasCurrency=0x1234567890123456789012345678901234567890 Use a specific gas currency - for transaction fees - (defaults to CELO if no gas - currency is supplied). It - must be a whitelisted token. - --globalHelp View all available global - flags - -DESCRIPTION - Shows information about reserve - -EXAMPLES - status -``` - -_See code: [src/commands/reserve/status.ts](https://github.com/celo-org/developer-tooling/tree/master/packages/cli/src/commands/reserve/status.ts)_ - -## `celocli reserve:transfergold` - -Transfers reserve celo to other reserve address - -``` -USAGE - $ celocli reserve:transfergold --value --to - 0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d --from - 0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d [--gasCurrency - 0x1234567890123456789012345678901234567890] [--globalHelp] [--useMultiSig] - -FLAGS - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Spender's address - --gasCurrency=0x1234567890123456789012345678901234567890 Use a specific gas currency - for transaction fees - (defaults to CELO if no gas - currency is supplied). It - must be a whitelisted token. - --globalHelp View all available global - flags - --to=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Receiving address - --useMultiSig True means the request will - be sent through multisig. - --value= (required) The unit amount - of CELO - -DESCRIPTION - Transfers reserve celo to other reserve address - -EXAMPLES - transfergold --value 9000 --to 0x91c987bf62D25945dB517BDAa840A6c661374402 --from 0x5409ed021d9299bf6814279a6a1411a7e866a631 - - transfergold --value 9000 --to 0x91c987bf62D25945dB517BDAa840A6c661374402 --from 0x5409ed021d9299bf6814279a6a1411a7e866a631 --useMultiSig -``` - -_See code: [src/commands/reserve/transfergold.ts](https://github.com/celo-org/developer-tooling/tree/master/packages/cli/src/commands/reserve/transfergold.ts)_ diff --git a/docs/command-line-interface/validator.md b/docs/command-line-interface/validator.md index 18ec8de3b..e252e631d 100644 --- a/docs/command-line-interface/validator.md +++ b/docs/command-line-interface/validator.md @@ -7,7 +7,6 @@ View and manage Validators * [`celocli validator:deaffiliate`](#celocli-validatordeaffiliate) * [`celocli validator:deregister`](#celocli-validatorderegister) * [`celocli validator:downtime-slash`](#celocli-validatordowntime-slash) -* [`celocli validator:force-deaffiliate`](#celocli-validatorforce-deaffiliate) * [`celocli validator:list`](#celocli-validatorlist) * [`celocli validator:register`](#celocli-validatorregister) * [`celocli validator:requirements`](#celocli-validatorrequirements) @@ -164,41 +163,6 @@ EXAMPLES _See code: [src/commands/validator/downtime-slash.ts](https://github.com/celo-org/developer-tooling/tree/master/packages/cli/src/commands/validator/downtime-slash.ts)_ -## `celocli validator:force-deaffiliate` - -Force deaffiliate a Validator from a Validator Group, and remove it from the Group if it is also a member. Used by stake-off admins in order to remove validators from the next epoch's validator set if they are down and consistently unresponsive, in order to preserve the health of the network. This feature will be removed once slashing for downtime is implemented. - -``` -USAGE - $ celocli validator:force-deaffiliate --from 0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d - --validator 0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d [--gasCurrency - 0x1234567890123456789012345678901234567890] [--globalHelp] - -FLAGS - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Initiator - --gasCurrency=0x1234567890123456789012345678901234567890 Use a specific gas currency - for transaction fees - (defaults to CELO if no gas - currency is supplied). It - must be a whitelisted token. - --globalHelp View all available global - flags - --validator=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Validator's - address - -DESCRIPTION - Force deaffiliate a Validator from a Validator Group, and remove it from the Group if - it is also a member. Used by stake-off admins in order to remove validators from the - next epoch's validator set if they are down and consistently unresponsive, in order to - preserve the health of the network. This feature will be removed once slashing for - downtime is implemented. - -EXAMPLES - force-deaffiliate --from 0x47e172f6cfb6c7d01c1574fa3e2be7cc73269d95 --validator 0xb7ef0985bdb4f19460A29d9829aA1514B181C4CD -``` - -_See code: [src/commands/validator/force-deaffiliate.ts](https://github.com/celo-org/developer-tooling/tree/master/packages/cli/src/commands/validator/force-deaffiliate.ts)_ - ## `celocli validator:list` List registered Validators, their name (if provided), affiliation, uptime score, and public keys used for validating. diff --git a/packages/cli/generate_docs.sh b/packages/cli/generate_docs.sh index 44084f9a5..27178df2f 100755 --- a/packages/cli/generate_docs.sh +++ b/packages/cli/generate_docs.sh @@ -1,6 +1,9 @@ #!/usr/bin/env bash set -e export COLUMNS=88 +yarn build +yarn oclif manifest +rm -rf ../../docs/command-line-interface yarn oclif readme --multi --dir=../../docs/command-line-interface sed -i.bak '/^- \[/d' ../../docs/command-line-interface/* rm -rf ../../docs/command-line-interface/*.bak diff --git a/packages/cli/src/commands/validator/force-deaffiliate.ts b/packages/cli/src/commands/validator/force-deaffiliate.ts deleted file mode 100644 index 6d995a673..000000000 --- a/packages/cli/src/commands/validator/force-deaffiliate.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { BaseCommand } from '../../base' -import { newCheckBuilder } from '../../utils/checks' -import { displaySendTx } from '../../utils/cli' -import { CustomFlags } from '../../utils/command' - -export default class ValidatorForceDeaffiliate extends BaseCommand { - static description = - "Force deaffiliate a Validator from a Validator Group, and remove it from the Group if it is also a member. Used by stake-off admins in order to remove validators from the next epoch's validator set if they are down and consistently unresponsive, in order to preserve the health of the network. This feature will be removed once slashing for downtime is implemented." - - static flags = { - ...BaseCommand.flags, - from: CustomFlags.address({ required: true, description: 'Initiator' }), - validator: CustomFlags.address({ required: true, description: "Validator's address" }), - } - - static examples = [ - 'force-deaffiliate --from 0x47e172f6cfb6c7d01c1574fa3e2be7cc73269d95 --validator 0xb7ef0985bdb4f19460A29d9829aA1514B181C4CD', - ] - - async run() { - const kit = await this.getKit() - const res = await this.parse(ValidatorForceDeaffiliate) - - const validators = await kit.contracts.getValidators() - - await newCheckBuilder(this, res.flags.validator) - .isSignerOrAccount() - .canSignValidatorTxs() - .signerAccountIsValidator() - .runChecks() - - await displaySendTx( - 'force-deaffiliate', - validators.forceDeaffiliateIfValidator(res.flags.validator) - ) - } -}