lighthouse/beacon_node
naviechan 9547ac069c Implement block_rewards API (per-validator reward) (#3907)
## Issue Addressed

[#3661](https://github.com/sigp/lighthouse/issues/3661)

## Proposed Changes

`/eth/v1/beacon/rewards/blocks/{block_id}`

```
{
  "execution_optimistic": false,
  "finalized": false,
  "data": {
    "proposer_index": "123",
    "total": "123",
    "attestations": "123",
    "sync_aggregate": "123",
    "proposer_slashings": "123",
    "attester_slashings": "123"
  }
}
```

The issue contains the implementation of three per-validator reward APIs:
* `sync_committee_rewards`
* [`attestation_rewards`](https://github.com/sigp/lighthouse/pull/3822)
* `block_rewards`

This PR only implements the `block_rewards`.

The endpoints can be viewed in the Ethereum Beacon nodes API browser: [https://ethereum.github.io/beacon-APIs/?urls.primaryName=dev#/Rewards](https://ethereum.github.io/beacon-APIs/?urls.primaryName=dev#/Rewards)

## Additional Info

The implementation of [consensus client reward APIs](https://github.com/eth-protocol-fellows/cohort-three/blob/master/projects/project-ideas.md#consensus-client-reward-apis) is part of the [EPF](https://github.com/eth-protocol-fellows/cohort-three).

Co-authored-by: kevinbogner <kevbogner@gmail.com>
Co-authored-by: navie <naviechan@gmail.com>
2023-02-07 08:33:23 +00:00
..
beacon_chain Implement block_rewards API (per-validator reward) (#3907) 2023-02-07 08:33:23 +00:00
builder_client Verify execution block hashes during finalized sync (#3794) 2023-01-09 03:11:59 +00:00
client Improve validator monitor experience for high validator counts (#3728) 2023-01-09 08:18:55 +00:00
eth1 Clippy lints for rust 1.66 (#3810) 2022-12-16 04:04:00 +00:00
execution_layer Verify execution block hashes during finalized sync (#3794) 2023-01-09 03:11:59 +00:00
genesis Super small improvement: Remove unnecessary mut (#3736) 2022-11-21 03:15:54 +00:00
http_api Implement block_rewards API (per-validator reward) (#3907) 2023-02-07 08:33:23 +00:00
http_metrics Support IPv6 in BN and VC HTTP APIs (#3104) 2022-03-24 00:04:49 +00:00
lighthouse_network Upgrade to libp2p v0.50.0 (#3764) 2023-01-06 15:59:33 +00:00
network light client optimistic update reprocessing (#3799) 2023-01-24 22:17:50 +00:00
operation_pool Implement block_rewards API (per-validator reward) (#3907) 2023-02-07 08:33:23 +00:00
src Improve validator monitor experience for high validator counts (#3728) 2023-01-09 08:18:55 +00:00
store Clippy lints for rust 1.66 (#3810) 2022-12-16 04:04:00 +00:00
tests Altair consensus changes and refactors (#2279) 2021-07-09 06:15:32 +00:00
timer Use async code when interacting with EL (#3244) 2022-07-03 05:36:50 +00:00
Cargo.toml Release v3.4.0 (#3862) 2023-01-11 03:27:08 +00:00