Skip to content

Commit

Permalink
Update finality-provider-operation.md
Browse files Browse the repository at this point in the history
  • Loading branch information
samricotta committed Dec 18, 2024
1 parent e995884 commit 89d5053
Showing 1 changed file with 51 additions and 3 deletions.
54 changes: 51 additions & 3 deletions docs/finality-provider-operation.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ gain an overall understanding of the finality provider.
2. [Withdrawing Rewards](#52-withdrawing-rewards)
3. [Jailing and Unjailing](#53-jailing-and-unjailing)
4. [Slashing](#54-slashing)
5. [Prometheus Metrics](#55-prometheus-metrics)
6. [Withdrawing Rewards](#56-withdrawing-rewards)

## 1. A note about Phase-1 Finality Providers

Expand Down Expand Up @@ -493,7 +495,7 @@ saves the finality provider information in the database.
fpd create-finality-provider \
--chain-id bbn-test-5 \
--eots-pk <eots-pk-hex> \
--commission 0.05 \
--commission-rate 0.05 \
--key-name finality-provider \
--moniker "MyFinalityProvider" \
--website "https://myfinalityprovider.com" \
Expand Down Expand Up @@ -598,7 +600,8 @@ When jailed, the following happens to a finality provider:
- Delegator rewards stop

To unjail a finality provider, you must complete the following steps:
1. Fix the underlying issue that caused jailing (e.g., ensure your node is properly synced and voting)
1. Fix the underlying issue that caused jailing (e.g., ensure your node is
properly synced and voting)
2. Wait for the jailing period to pass (defined by finality module parameters)
3. Send the unjail transaction to the Babylon chain using the following command:

Expand Down Expand Up @@ -626,7 +629,7 @@ removal from the active set.
> ⚠️ **Critical**: Slashing is irreversible and results in
> permanent removal from the network.
### 5.5 Prometheus
### 5.5. Prometheus Metrics

The finality provider exposes Prometheus metrics for monitoring your
finality provider. The metrics endpoint is configurable in `fpd.conf`:
Expand Down Expand Up @@ -657,3 +660,48 @@ For a complete list of available metrics, see:
- Finality Provider metrics: [fp_collectors.go](../metrics/fp_collectors.go)
- EOTS metrics: [eots_collectors.go](../metrics/eots_collectors.go)

### 5.6. Withdrawing Rewards

When you are ready to withdraw your rewards, you have the option first to set
the address to withdraw your rewards to.

```shell
fpd set-withdraw-addr <new-address> --from <finality-provider-address>
--keyring-backend test --home <home-dir> --fees <fees>
```

Parameters:
- `<new-address>`: The new address to withdraw rewards to.
- `--from`: The finality provider's address.
- `--keyring-backend`: The keyring backend to use.
- `--home`: The home directory for the finality provider.
- `--fees`: The fees to pay for the transaction, should be over `400ubbn`.

This command should ask you to
`confirm transaction before signing and broadcasting [y/N]:` and output the
transaction hash.

Once you have set the address, you can withdraw your rewards by running the
following command:

```shell
fpd withdraw-reward <type> --from <finality-provider-address>
--keyring-backend test --home <home-dir> --fees <fees>
```

Parameters:
- `<type>`: The type of reward to withdraw (one of `finality_provider`,
`btc_delegation`)
- `--from`: The finality provider's address.
- `--keyring-backend`: The keyring backend to use.
- `--home`: The home directory for the finality provider.
- `--fees`: The fees to pay for the transaction, should be over `400ubbn`.

Again, this command should ask you to
`confirm transaction before signing and broadcasting [y/N]:` and output the
transaction hash.

This will withdraw ALL accumulated rewards to the address you set in the
`set-withdraw-addr` command.

Congratulations! You have successfully set up and operated a finality provider.

0 comments on commit 89d5053

Please sign in to comment.