Skip to content

Commit

Permalink
remove removed Debug/getDebugChainHeads V1 (#4970)
Browse files Browse the repository at this point in the history
* remove removed Debug/getDebugChainHeads V1

* REST API tests
  • Loading branch information
tersec authored Jun 10, 2023
1 parent 9e14d90 commit 6ebcbbd
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 32 deletions.
7 changes: 0 additions & 7 deletions beacon_chain/rpc/rest_debug_api.nim
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,6 @@ proc installDebugApiHandlers*(router: var RestRouter, node: BeaconNode) =
RestApiResponse.jsonError(Http500, InvalidAcceptError)
return RestApiResponse.jsonError(Http404, StateNotFoundError)

# https://ethereum.github.io/beacon-APIs/#/Debug/getDebugChainHeads
router.api(MethodGet,
"/eth/v1/debug/beacon/heads") do () -> RestApiResponse:
return RestApiResponse.jsonResponse(
node.dag.heads.mapIt((root: it.root, slot: it.slot))
)

# https://ethereum.github.io/beacon-APIs/#/Debug/getDebugChainHeadsV2
router.api(MethodGet,
"/eth/v2/debug/beacon/heads") do () -> RestApiResponse:
Expand Down
5 changes: 0 additions & 5 deletions beacon_chain/spec/eth2_apis/rest_debug_calls.nim
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ import

export chronos, client, rest_types, eth2_rest_serialization

proc getDebugChainHeads*(): RestResponse[GetDebugChainHeadsResponse] {.
rest, endpoint: "/eth/v1/debug/beacon/heads",
meth: MethodGet.}
## https://ethereum.github.io/beacon-APIs/#/Beacon/getDebugChainHeads

proc getStateV2Plain*(state_id: StateIdent): RestPlainResponse {.
rest, endpoint: "/eth/v2/debug/beacon/states/{state_id}",
accept: preferSSZ,
Expand Down
8 changes: 0 additions & 8 deletions docs/the_nimbus_book/src/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -466,14 +466,6 @@ Equivalent call in the official REST API:
curl http://localhost:5052/eth/v2/debug/beacon/states/head -s | jq
```

### [`get_v1_debug_beacon_heads`](https://ethereum.github.io/eth2.0-APIs/#/Debug/getDebugChainHeads)

Equivalent call in the official REST API:

```
curl http://localhost:5052/eth/v1/debug/beacon/heads -s | jq
```

## Nimbus extensions

### getBeaconHead
Expand Down
12 changes: 0 additions & 12 deletions ncli/resttest-rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -2817,18 +2817,6 @@
"body": [{"operator": "jstructcmps", "start": ["data"], "value": {"chain_id": "", "address": ""}}]
}
},
{
"topics": ["debug"],
"request": {
"url": "/eth/v1/debug/beacon/heads",
"headers": {"Accept": "application/json"}
},
"response": {
"status": {"operator": "equals", "value": "200"},
"headers": [{"key": "Content-Type", "value": "application/json", "operator": "equals"}],
"body": [{"operator": "jstructcmps", "start": ["data"], "value": [{"root": "", "slot": ""}]}]
}
},
{
"topics": ["debug", "beacon_states_head_slow", "slow"],
"request": {
Expand Down

0 comments on commit 6ebcbbd

Please sign in to comment.