From 6ebcbbdf4ec25c9b5075526b8928446bdbc59484 Mon Sep 17 00:00:00 2001 From: tersec Date: Sat, 10 Jun 2023 08:07:36 +0000 Subject: [PATCH] remove removed Debug/getDebugChainHeads V1 (#4970) * remove removed Debug/getDebugChainHeads V1 * REST API tests --- beacon_chain/rpc/rest_debug_api.nim | 7 ------- beacon_chain/spec/eth2_apis/rest_debug_calls.nim | 5 ----- docs/the_nimbus_book/src/api.md | 8 -------- ncli/resttest-rules.json | 12 ------------ 4 files changed, 32 deletions(-) diff --git a/beacon_chain/rpc/rest_debug_api.nim b/beacon_chain/rpc/rest_debug_api.nim index 279aaeb3c..91d715fcc 100644 --- a/beacon_chain/rpc/rest_debug_api.nim +++ b/beacon_chain/rpc/rest_debug_api.nim @@ -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: diff --git a/beacon_chain/spec/eth2_apis/rest_debug_calls.nim b/beacon_chain/spec/eth2_apis/rest_debug_calls.nim index 45dc00a28..ef5f0d3a0 100644 --- a/beacon_chain/spec/eth2_apis/rest_debug_calls.nim +++ b/beacon_chain/spec/eth2_apis/rest_debug_calls.nim @@ -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, diff --git a/docs/the_nimbus_book/src/api.md b/docs/the_nimbus_book/src/api.md index 579b92add..f65806bdb 100644 --- a/docs/the_nimbus_book/src/api.md +++ b/docs/the_nimbus_book/src/api.md @@ -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 diff --git a/ncli/resttest-rules.json b/ncli/resttest-rules.json index fd3c948ef..be2330ab6 100644 --- a/ncli/resttest-rules.json +++ b/ncli/resttest-rules.json @@ -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": {