Clive update - Manage authority in TUI and recovery account in CLI

in HiveDevs3 hours ago
Authored by @itsola

The new features introduced in this release are important for your safety. The first feature allows you to manage your authority in the TUI easily. The second one allows you to check and change your recovery account. It is available in the CLI. Keeping a recovery account up to date is important because it is the only way to help you if your account is compromised.

Even if you are not using Clive, check which account is your recovery account, make sure you are still in touch with the person linked to it and ensure they can help you if needed.

Manage authority in TUI

A while ago, we implemented the Authority view in the TUI. On this view, you can check your authority state and if related keys are available in Clive. Now we have added a possibility to modify authorities. It was really challenging to present modifications to such complex operations using a text-based user interface in the terminal.

Generally, in the blockchain, there are two operations that allow updating authorities: account_update_operation and account_update2_operation. Clive uses the newer account_update2_operation.

You can open the modification view by pressing the Modify button in the Authority tab of the Account Details view.

Account Details

Modify authority view

On this screen, you can easily update the authority settings of your working account. You can view all permission levels, their associated keys and accounts, and the weight assigned to each.
Updating an authority doesn’t mean changing only the parts you modify. Instead, you must send the entire updated authority exactly as it should look after your changes, including all values that you want to remain the same. The Modify Authority view is designed to show this clearly, so you can always see the final state of your authority before broadcasting the operation with marked changes.

Modify authority

At the top, you’ll find the Filter authority input, which you can use to search for a specific account or public/private key.
Next to it, there is a Restore all changes button that returns everything to its initial values (state from node).
The part for modifying working account authority is divided into four sections: Owner, Active, Posting, and Memo key.
Each section (besides memo key) allows you to:

  • Edit a threshold.
  • Add or remove authority entry (public key or account).
  • Edit a weight of the existing entry.

In the memo key section, you can only replace the memo key.

When your modifications are ready, you can add them to the cart or Finalize transaction like for other operations in the Clive TUI.

Edit threshold

Next to each authority level, there is information about the threshold that must be met to satisfy that authority.
We have implemented validations that prevent setting the threshold to an impossible-to-meet value. This is checked before the operation is added to the cart.
If you want to edit a threshold, you need to press the Edit threshold button, which will open a dialog window.

Edit treshold

After modification, a modified label appears next to the threshold to indicate the change.

Modified label

Change entries

Each regular authority level (owner, active, posting) displays a list of keys and accounts along with their weights.
You can change them in the following ways:

  • To add a new entry, click the Add new entry button.
  • To edit a weight, use the Edit button in the Action column.
  • To remove an entry, click the X button in the Action column.
  • To change the memo key, click the Change button.

Whenever you add a new entry or change a weight, a dialog window is shown.

Add a new entry

Edit a weight

After changes, the list shows removed items with a strikethrough, new items labeled new, and items with modified weight labeled with modified.

changes

Recovery account

The recovery account is the only account that may create an account recovery request if the owner authority is compromised (if the other conditions are met). That is why it is so important to keep it up to date.
By default, the recovery account is set to the account creator or it is empty if it was created by a temp account or mined.
Changing the recovery account must be signed with the owner authority. The operation is done with a 30-day delay.

How to change your recovery account using CLI

Before changing anything, it is good to check what your current recovery account is.
You can do it by using a command:
clive show account.

clive show account

If you want to change the recovery account, you can check the help first using:
clive process change-recovery-account -h

Change recovery account - help

In my example, I want to change my recovery account to the account thebeedevs, so I use the following command:
clive process change-recovery-account --new-recovery-account thebeedevs.

Change recovery account

If you check your recovery account again using the same command, you can see that the change is in progress.

Check recovery account

You can also check it using the command: clive show pending change-recovery-account.

Pending

The change takes effect after 30 days. Before that, you can cancel the recovery account change by creating a new recovery account request and setting --new-recovery-account to the previous account.

Decline voting rights operation

You should be absolutely certain that you want to do it before using the decline voting rights operation. Be aware that after 30 days, this operation cannot be undone, and your account will permanently lose voting rights.
By using the decline voting rights operation, you decide that you no longer want to vote for content, witnesses or proposals, and you cannot set a proxy either.
Declining voting rights must be signed with owner authority. The operation is done with a 30-day delay and after that time, you cannot change it.

Decline voting right operation in the CLI

Decline

If you want to decline your voting rights, use the command clive process voting-rights decline.

Decline

If you want to cancel it (remember, you have only 30 days to do so), use the command:
clive process voting-rights cancel-decline.

Cancel decline

Complete list of corrected issues

The scripts that allow you to run Clive are here:
https://gtg.openhive.network/get/clive/

Your feedback is invaluable and always welcome.