Waivio

Clive Updates - witness update operations available in the CLI

1 comment

thebeedevs14 days ago3 min read

The new feature introduced in this release is not for everyone, it is for witnesses. The new command allows them to set witness properties such as the account creation fee, maximum block size, HBD interest rate, HBD exchange rate, URL as well as to change a signing (witness) key. The operation can be signed using either the active or the signing key.

Witness operations

There are the following witness operations on Hive:
witness_set_properties_operation - the newest of them all, a witness can use it to set all properties. The operation must be signed using a witness (signing) key.
witness_update_operation - an older operation that allows setting witness properties. The operation must be signed using an active authority.
feed_publish_operation- also an older operation, it allows setting only the HBD exchange rate. The operation must be signed using an active authority.

Witness set properties operationWitness update operationFeed publish operation
Account_creation_feeYesYesNo
Account_subsidy_budgetYesNoNo
Account_subsidy_decayYesNoNo
Maximum_block_sizeYesYesNo
Hbd_interest_rateYesYesNo
Hbd_exchange_rateYesNoYes
UrlYesYesNo
New_signing_keyYesYesNo

CLI - new command update-witness

A new command combines all three operations and allows you to use one command to set all properties. By default, a singing (witness) key is used, so operation Witness_set_properties_operation is used.
If you want to use an active authority, you should set the flag --use-active-authority and then the operations witness_update_operation or feed_publish_operation (or both) is being performed.

witness update - help
witness update - help

Example - change HBD exchange rate using a singing (witness) key

The example was run on the testnet. You can notice that the operation witness set properties was used.
clive process update-witness --hbd-exchange-rate "0.14 HBD" --sign-with witness_key

transaction signing with witness key
transaction signing with witness key

Example - change HBD exchange rate using an active key

The example was run on the testnet. You can notice that the operation feed publish operation was used.
clive process update-witness --use-active-authority --hbd-exchange-rate "0.14 HBD" --sign-with active_key

Transacion signing with active key
Transacion signing with active key

The scripts that allow you to run Clive are here:

Your feedback is invaluable and always welcome.

Comments

Sort byBest