lighthouse/beacon_node/http_api/src
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
..
attestation_performance.rs Fix attestation performance API InvalidValidatorIndex error (#3503) 2022-09-05 04:50:45 +00:00
attester_duties.rs Indicate that invalid blocks are optimistic (#3383) 2022-07-30 05:08:57 +00:00
block_id.rs Fix lints for Rust 1.63 (#3459) 2022-08-12 00:56:39 +00:00
block_packing_efficiency.rs Separate execution payloads in the DB (#3157) 2022-05-12 00:42:17 +00:00
block_rewards.rs Implement skip_randao_verification and blinded block rewards API (#3540) 2022-09-19 07:58:48 +00:00
database.rs Use async code when interacting with EL (#3244) 2022-07-03 05:36:50 +00:00
lib.rs Implement block_rewards API (per-validator reward) (#3907) 2023-02-07 08:33:23 +00:00
metrics.rs Metrics and DEBG log for late gossip blocks (#2533) 2021-08-23 00:59:14 +00:00
proposer_duties.rs Indicate that invalid blocks are optimistic (#3383) 2022-07-30 05:08:57 +00:00
publish_blocks.rs Reduce log severity for late and unrevealed blocks (#3775) 2022-12-10 00:45:18 +00:00
standard_block_rewards.rs Implement block_rewards API (per-validator reward) (#3907) 2023-02-07 08:33:23 +00:00
state_id.rs Optimise HTTP validator lookups (#3559) 2022-10-15 22:25:51 +00:00
sync_committee_rewards.rs Implement block_rewards API (per-validator reward) (#3907) 2023-02-07 08:33:23 +00:00
sync_committees.rs Don't return errors on HTTP API for already-known messages (#3341) 2022-08-10 07:52:57 +00:00
ui.rs Expose certain validator_monitor metrics to the HTTP API (#3760) 2022-12-09 06:39:19 +00:00
validator_inclusion.rs Add execution_optimistic flag to HTTP responses (#3070) 2022-07-25 08:23:00 +00:00
version.rs Add execution_optimistic flag to HTTP responses (#3070) 2022-07-25 08:23:00 +00:00