remove removed Debug/getDebugChainHeads V1 (#4970)

* remove removed Debug/getDebugChainHeads V1

* REST API tests
This commit is contained in:
tersec 2023-06-10 08:07:36 +00:00 committed by GitHub
parent 9e14d904ac
commit 6ebcbbdf4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 0 additions and 32 deletions

View File

@ -61,13 +61,6 @@ proc installDebugApiHandlers*(router: var RestRouter, node: BeaconNode) =
RestApiResponse.jsonError(Http500, InvalidAcceptError) RestApiResponse.jsonError(Http500, InvalidAcceptError)
return RestApiResponse.jsonError(Http404, StateNotFoundError) 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 # https://ethereum.github.io/beacon-APIs/#/Debug/getDebugChainHeadsV2
router.api(MethodGet, router.api(MethodGet,
"/eth/v2/debug/beacon/heads") do () -> RestApiResponse: "/eth/v2/debug/beacon/heads") do () -> RestApiResponse:

View File

@ -13,11 +13,6 @@ import
export chronos, client, rest_types, eth2_rest_serialization 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 {. proc getStateV2Plain*(state_id: StateIdent): RestPlainResponse {.
rest, endpoint: "/eth/v2/debug/beacon/states/{state_id}", rest, endpoint: "/eth/v2/debug/beacon/states/{state_id}",
accept: preferSSZ, accept: preferSSZ,

View File

@ -466,14 +466,6 @@ Equivalent call in the official REST API:
curl http://localhost:5052/eth/v2/debug/beacon/states/head -s | jq 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 ## Nimbus extensions
### getBeaconHead ### getBeaconHead

View File

@ -2817,18 +2817,6 @@
"body": [{"operator": "jstructcmps", "start": ["data"], "value": {"chain_id": "", "address": ""}}] "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"], "topics": ["debug", "beacon_states_head_slow", "slow"],
"request": { "request": {