Skip to content

Commit

Permalink
Update block reward API docs (#3013)
Browse files Browse the repository at this point in the history
## Proposed Changes

Fix the URLs and source code link in the docs for the block rewards API.
  • Loading branch information
michaelsproul committed Feb 11, 2022
1 parent c3a793f commit 886afd6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions book/src/api-lighthouse.md
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ The endpoint will return immediately. See the beacon node logs for an indication
Manually provide `SignedBeaconBlock`s to backfill the database. This is intended
for use by Lighthouse developers during testing only.

### `/lighthouse/block_rewards`
### `/lighthouse/analysis/block_rewards`

Fetch information about the block rewards paid to proposers for a range of consecutive blocks.

Expand All @@ -421,7 +421,7 @@ Two query parameters are required:
Example:

```bash
curl "http://localhost:5052/lighthouse/block_rewards?start_slot=1&end_slot=32" | jq
curl "http://localhost:5052/lighthouse/analysis/block_rewards?start_slot=1&end_slot=32" | jq
```

```json
Expand All @@ -439,12 +439,12 @@ curl "http://localhost:5052/lighthouse/block_rewards?start_slot=1&end_slot=32" |

Caveats:

* Presently only attestation rewards are computed.
* Presently only attestation and sync committee rewards are computed.
* The output format is verbose and subject to change. Please see [`BlockReward`][block_reward_src]
in the source.
* For maximum efficiency the `start_slot` should satisfy `start_slot % slots_per_restore_point == 1`.
This is because the state _prior_ to the `start_slot` needs to be loaded from the database, and
loading a state on a boundary is most efficient.

[block_reward_src]:
https://github.com/sigp/lighthouse/tree/unstable/common/eth2/src/lighthouse/block_reward.rs
https://github.com/sigp/lighthouse/tree/unstable/common/eth2/src/lighthouse/block_rewards.rs

0 comments on commit 886afd6

Please sign in to comment.