Skip to content

Commit fcbb39a

Browse files
authored
fix(docs): add rewards calculations steps to flare entity (#682)
2 parents 857300e + ba1393d commit fcbb39a

File tree

1 file changed

+145
-54
lines changed

1 file changed

+145
-54
lines changed

docs/run-node/5-flare-entity.mdx

Lines changed: 145 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,14 @@ Log out and log back in or restart your system for the changes to take effect.
5353

5454
:::warning[Minimal conditions]
5555

56-
After the introduction of minimal conditions in [FIP.10](https://proposals.flare.network/FIP/FIP_10.html#21-new-incentive-structure), a Flare Entity needs to be both **available** and **performant** across all Flare protocols in order to be eligible for rewards.
56+
After the introduction of [minimal conditions](/network/fsp/rewarding#minimal-conditions) in [FIP.10](https://proposals.flare.network/FIP/FIP_10.html#21-new-incentive-structure), a Flare Entity needs to be both **available** and **performant** across all Flare protocols in order to be eligible for rewards.
5757

5858
:::
5959

60-
- **FSP (FTSO, FDC)** reward information is available at [flare-foundation/fsp-rewards](https://github.com/flare-foundation/fsp-rewards/tree/main/flare) and on the [Discourse Forum](https://forum.flare.network/t/fsp-rewards-data) (see XLSX file for historical reward data).\*
61-
- **Staking** reward information is available at [flare-foundation/reward-scripts](https://github.com/flare-foundation/reward-scripts/tree/main/generated-files).\*
60+
- [FSP rewards](https://github.com/flare-foundation/FTSO-Scaling/blob/main/scripts/rewards/README.md#claiming-rewards) information is available at [flare-foundation/fsp-rewards](https://github.com/flare-foundation/fsp-rewards/tree/main/flare) and on the [Discourse Forum](https://forum.flare.network/t/fsp-rewards-data) (see XLSX file for historical reward data). Updated every reward epoch (3.5 days), with epochs starting on Monday and Thursday.
61+
- [Validator staking rewards](/network/guides/using-flare-stake-tool#claiming-rewards) information is available at [flare-foundation/reward-scripts](https://github.com/flare-foundation/reward-scripts/tree/main/generated-files). Updated every reward epoch (3.5 days), with epochs starting on Monday and Thursday.
6262

63-
\*Updated every reward epoch (3.5 days), with epochs starting on Monday and Thursday.
64-
65-
Currently, claiming rewards needs to be performed [manually](https://github.com/flare-foundation/FTSO-Scaling/blob/main/scripts/rewards/README.md#claiming-rewards). Automated solutions are being worked upon to simplify this process.
63+
Learn how to check your Flare Entity rewards in the [FAQs](#faqs) section.
6664

6765
## Registration
6866

@@ -672,7 +670,7 @@ Key services to check include: `system-client`, `c-chain-indexer`, `fast-updates
672670

673671
Look for successful connections, registration messages (if applicable for the current reward epoch timing), and absence of repeating critical errors.
674672

675-
Refer to the [Troubleshooting](#troubleshooting) and [Maintenance](#maintenance) sections for common issues and ongoing checks.
673+
Refer to the [Troubleshooting](#troubleshooting) and [FAQs](#faqs) sections for common issues and ongoing checks.
676674

677675
## Update Flare Entity
678676

@@ -741,82 +739,175 @@ To get your validator logo and name listed on the explorers, open a PR on [TowoL
741739

742740
</details>
743741

744-
## Maintenance
745-
746-
Ongoing maintenance is crucial for a reliable Flare Entity.
742+
## FAQs
747743

748744
<details>
749-
<summary>Basic health checks</summary>
745+
<summary>How do I check if my Flare Entity meets Minimal Conditions?</summary>
750746

751-
- Monitor the `/ext/health` endpoint for validator status
752-
- Check validator connectivity using this [API endpoint](https://build.avax.network/docs/api-reference/p-chain/api#platformgetcurrentvalidators) to verify uptime/connected values
753-
- For advanced monitoring, use Avalanche's [Grafana dashboards](https://support.avax.network/en/articles/6159074-grafana-dashboards) which are compatible with Flare
747+
Meeting [minimal conditions](/network/fsp/rewarding#minimal-conditions) for availability and performance in each reward epoch is necessary for FSP reward eligibility.
748+
You can check your entity's status using two primary methods:
754749

755-
</details>
750+
**Method 1: Flare Systems Explorer (Web Interface)**
756751

757-
<details>
758-
<summary>FDC health monitoring</summary>
752+
This is the easiest and most reliable way to check your status.
753+
754+
1. Navigate to the **Minimal Conditions** tab on the [Flare Systems Explorer](https://flare-systems-explorer.flare.network/providers?tab=minimalConditions).
755+
2. Find your entity by searching for your `Identity` address.
756+
3. Review the status column for the relevant reward epoch(s). A **`YES`** indicates conditions were met for that epoch.
759757

760-
Query each FDC verifier with: `GET http://{verifier-host}:{verifier-port}/verifier/{chain}/health`
758+
**Method 2: Explorer Backend API (Command Line)**
759+
760+
You can query the API that powers the explorer for programmatic access.
761+
762+
1. You'll need your entity's registered `Identity` address, without the `0x` prefix.
763+
764+
```bash
765+
IDENTITY_ADDRESS="563...1a8" # <-- REPLACE WITH YOUR Identity ADDRESS WITHOUT 0x
766+
```
767+
768+
2. Query the API and extract the minimal conditions status:
769+
770+
```bash
771+
curl "https://flare-systems-explorer-backend.flare.network/api/v0/entity?query=${IDENTITY_ADDRESS}" \
772+
-H "Accept: application/json" | jq -r '.results[0].entityminimalconditions'
773+
```
774+
775+
3. An example output might look like:
776+
777+
```json
778+
{
779+
"id": 184955,
780+
"reward_epoch": 289, // Epoch the status applies to
781+
"ftso_scaling": true,
782+
"ftso_fast_updates": true,
783+
"staking": true,
784+
"fdc": true,
785+
"passes_held": 3,
786+
"strikes": 0,
787+
"new_number_of_passes": 3,
788+
"eligible_for_reward": true, // Indicates minimal conditions met
789+
"entity": 42
790+
}
791+
```
761792

762793
</details>
763794

764795
<details>
765-
<summary>FTSO health monitoring</summary>
796+
<summary>Where can I find calculated rewards data and my specific rewards?</summary>
766797

767-
- Check minimal conditions status with:
798+
Reward amounts for both staking and FSP participation are calculated and published periodically. Always refer to official Flare sources for the latest data locations.
768799

769-
```bash
770-
curl -s 'https://flare-systems-explorer.flare.network/backend-url/api/v0/entity?limit=100&offset=0&sort_ascending=true&sort_by=' | jq '.results[] | select(.identity_address == "YOUR_IDENTITY_ADDRESS") | .entityminimalconditions'
771-
```
800+
**Validator Staking Rewards:**
772801

773-
- For registration, your log should contain:
802+
Calculated per reward epoch (every 3.5 days, starting Mon/Thu) and claimable every 4 reward epochs (approx. every 14 days).
803+
Check the `validator-rewards` directory within the **[flare-foundation/reward-scripts](https://github.com/flare-foundation/reward-scripts/tree/main/generated-files/validator-rewards)** repository on GitHub.
804+
To inspect your entity's validator rewards for a specific epoch via CLI:
774805

775-
```plaintext
776-
[01-03|23:02:03.175] INFO epoch/registry_utils.go:187 Voter 0x25f42DEf3fCc078DE8895Cd01de8AB6514020548 registered for epoch 3589
777-
[01-04|05:02:04.096] INFO epoch/registry_utils.go:187 Voter 0x25f42DEf3fCc078DE8895Cd01de8AB6514020548 registered for epoch 3590
778-
[01-04|11:02:07.113] INFO epoch/registry_utils.go:187 Voter 0x25f42DEf3fCc078DE8895Cd01de8AB6514020548 registered for epoch 3591
779-
[01-04|17:02:03.136] INFO epoch/registry_utils.go:187 Voter 0x25f42DEf3fCc078DE8895Cd01de8AB6514020548 registered for epoch 3592
780-
[01-04|23:02:03.217] INFO epoch/registry_utils.go:187 Voter 0x25f42DEf3fCc078DE8895Cd01de8AB6514020548 registered for epoch 3593
781-
```
806+
1. Get your `NODE_ID` and the `EPOCH_ID` from the [Flare Systems Explorer](https://flare-systems-explorer.flare.network/providers).
782807

783-
- For submissions, your log should contain:
808+
```bash
809+
NODE_ID="NodeID-CoN...RS" # <-- REPLACE WITH YOUR Node ID
810+
EPOCH_ID="288" # <-- REPLACE WITH THE REWARD EPOCH YOU WANT TO CHECK
811+
```
784812

785-
```plaintext
786-
[01-06|14:39:10.366] INFO protocol/submitter.go:76 Submitter submitSignatures successfully sent tx
787-
[01-06|14:39:31.273] INFO protocol/submitter.go:76 Submitter submit1 successfully sent tx
788-
[01-06|14:39:53.107] INFO protocol/submitter.go:76 Submitter submit2 successfully sent tx
789-
```
813+
2. Use the following command to fetch and display your validator rewards:
790814

791-
:::tip[Set an alert]
815+
```bash
816+
curl -s "https://raw.githubusercontent.com/flare-foundation/reward-scripts/refs/heads/main/generated-files/reward-epoch-${EPOCH_ID}/nodes-data.json" | \
817+
jq --arg node_id "${NODE_ID}" \
818+
'.[] |
819+
select(.nodeId == $node_id) |
820+
(.validatorRewardAmount | tonumber / 1000000000000000000) |
821+
"Validator Rewards: \((. * 100 | floor) / 100) FLR"'
822+
```
792823

793-
Set an alert if there is no `Submitter ... successfully sent tx` message for 5-10 minutes
824+
**FSP (FTSO & FDC) Rewards:**
794825

795-
:::
826+
Calculated per reward epoch (every 3.5 days, starting Mon/Thu). Requires meeting minimal conditions requirements.
827+
Published data is usually available shortly after epoch finalization at:
796828

797-
- For finalization verification, your log should contain:
829+
- **GitHub:** **[flare-foundation/fsp-rewards](https://github.com/flare-foundation/fsp-rewards/tree/main/flare)** repository (look for files named by epoch).
830+
- **Forum:** The **[FSP Rewards Data thread](https://forum.flare.network/t/fsp-rewards-data)** on the Flare Discourse Forum often has summary files (like XLSX) and related discussions.
798831

799-
```plaintext
800-
[01-05|15:55:54.641] INFO finalizer/relay_client.go:168 Relaying finished for protocol 100 with success
801-
[01-05|15:55:55.686] INFO finalizer/relay_client.go:168 Relaying finished for protocol 200 with success
802-
[01-05|15:57:25.608] INFO finalizer/relay_client.go:168 Relaying finished for protocol 100 with non fatal error
803-
[01-05|15:57:28.937] INFO finalizer/relay_client.go:168 Relaying finished for protocol 200 with non fatal error
804-
```
832+
To inspect your entity's FSP rewards for a specific epoch via CLI:
805833

806-
:::tip[Set an alert]
834+
1. Get your `IDENTITY_ADDRESS` and the `EPOCH_ID` from the [Flare Systems Explorer](https://flare-systems-explorer.flare.network/providers).
807835

808-
Set an alert if there is no `Relaying finished for protocol ...` for 5-10 minutes (protocol 100 is FTSOv2 and protocol 200 is FDC)
836+
```bash
837+
IDENTITY_ADDRESS="0x5...1A8" # <-- REPLACE WITH YOUR Identity ADDRESS
838+
EPOCH_ID="288" # <-- REPLACE WITH THE REWARD EPOCH YOU WANT TO CHECK
839+
```
809840

810-
:::
841+
2. Use the following command to fetch and display your FSP rewards:
842+
843+
```bash
844+
curl -s "https://raw.githubusercontent.com/flare-foundation/fsp-rewards/refs/heads/main/flare/${EPOCH_ID}/reward-distribution-data.json" | \
845+
jq --arg identity_address "${IDENTITY_ADDRESS}" \
846+
'.rewardClaims[] |
847+
select(.body.beneficiary == ($identity_address | ascii_downcase)) |
848+
(.body.amount | tonumber / 1000000000000000000) |
849+
"FSP Rewards: \((. * 100 | floor) / 100) FLR"'
850+
```
851+
852+
</details>
853+
854+
<details>
855+
<summary>How does the pass system work with minimal conditions?</summary>
856+
857+
Successfully meeting minimal conditions in an epoch typically earns your entity a "pass" (you can hold up to 3 passes).
858+
These act as a buffer - if your entity occasionally fails to meet conditions (e.g., due to minor submission issues or downtime), a pass is automatically consumed to maintain reward eligibility for that epoch.
859+
If conditions are not met and you have zero passes remaining, FSP rewards for that epoch are forfeited. [Learn more](/network/fsp/rewarding#passes).
811860

812861
</details>
813862

814863
<details>
815-
<summary>Log Management</summary>
864+
<summary>How can I monitor the health of my Flare Entity?</summary>
865+
866+
Consistent monitoring is key to maintaining performance and reward eligibility. Here are primary areas and methods:
867+
868+
**1. Validator node health:**
869+
870+
- Monitor the `/ext/health` endpoint for validator status
871+
- Check validator connectivity using this [API endpoint](https://build.avax.network/docs/api-reference/p-chain/api#platformgetcurrentvalidators) to verify uptime/connected values
872+
- For advanced monitoring, use Avalanche's [Grafana dashboards](https://support.avax.network/en/articles/6159074-grafana-dashboards) which are compatible with Flare
816873

817-
Container logs can consume significant disk space over time. Implement a strategy:
874+
**2. FDC health monitoring:**
875+
876+
- Query the health endpoint exposed by each FDC verifier service you run:
877+
`GET http://{verifier-host}:{verifier-port}/verifier/{chain}/health`
878+
(Replace placeholders with your verifier's host, port, and the relevant chain like `btc`, `doge`, `xrp`, `eth`). Look for a success status/response.
879+
880+
**3. FTSO health monitoring:**
881+
882+
- Check minimal conditions status via the [Flare Systems Explorer](https://flare-systems-explorer.flare.network/providers?tab=minimalConditions) or the backend API detailed previously in the FAQ.
883+
884+
- Monitor the logs of your running Docker containers (`docker compose logs <service_name>`) for errors and key operational messages:
885+
886+
- **Registration:** Look for `RegisterVoter success` messages in the `system-client` logs around the start of reward epochs.
887+
888+
```plaintext
889+
# Example Registration Log Entry (Timestamp/Address vary)
890+
INFO epoch/registry_utils.go:187 Voter 0x... registered for epoch ...
891+
```
892+
893+
- **Submissions:** Look for `Submitter ... successfully sent tx` messages in `system-client` logs during voting periods. Absence for >10 mins may indicate issues.
894+
895+
```plaintext
896+
# Example Submission Log Entries (Timestamp/Type vary)
897+
INFO protocol/submitter.go:76 Submitter submitSignatures successfully sent tx
898+
INFO protocol/submitter.go:76 Submitter submit1 successfully sent tx
899+
```
900+
901+
**Alerting Tip:** Set alerts if no successful submission messages appear for 5-10 minutes during active voting periods.
902+
903+
- **Finalization:** Look for `Relaying finished for protocol ... with success` messages in `system-client` logs after voting periods. Non-fatal errors may occur but should be investigated if persistent. (Protocol 100 = FTSOv2, Protocol 200 = FDC).
904+
905+
```plaintext
906+
# Example Finalization Log Entries (Timestamp/Status vary)
907+
INFO finalizer/relay_client.go:168 Relaying finished for protocol 100 with success
908+
INFO finalizer/relay_client.go:168 Relaying finished for protocol 200 with success
909+
```
818910

819-
- Configure Docker's logging driver (default `json-file`) globally (`/etc/docker/daemon.json`) or per-service in `docker-compose.yaml` to limit log size and file count (e.g., `max-size: "100m"`, `max-file: "5"`). Refer to [Docker logging documentation](https://docs.docker.com/config/containers/logging/configure/).
820-
- Periodically use `docker system prune` or remove old log files manually if rotation is not configured.
911+
**Alerting Tip:** Set alerts if no successful finalization messages appear for protocols 100/200 within 5-10 minutes after a voting round should have completed.
821912

822913
</details>

0 commit comments

Comments
 (0)