Merge readiness endpoint (#3349)

## Issue Addressed

Resolves final task in https://github.com/sigp/lighthouse/issues/3260

## Proposed Changes

Adds a lighthouse http endpoint to indicate merge readiness.

Blocked on #3339
This commit is contained in:
Pawan Dhananjay
2022-07-21 05:45:39 +00:00
parent e32868458f
commit 612cdb7092
4 changed files with 63 additions and 14 deletions

View File

@@ -453,4 +453,23 @@ Caveats:
loading a state on a boundary is most efficient.
[block_reward_src]:
https://github.com/sigp/lighthouse/tree/unstable/common/eth2/src/lighthouse/block_rewards.rs
https://github.com/sigp/lighthouse/tree/unstable/common/eth2/src/lighthouse/block_rewards.rs
### `/lighthouse/merge_readiness`
```bash
curl -X GET "http://localhost:5052/lighthouse/merge_readiness"
```
```
{
"data":{
"type":"ready",
"config":{
"terminal_total_difficulty":"6400"
},
"current_difficulty":"4800"
}
}
```