Skip to content

Commit cafa1f3

Browse files
authored
rm unused RPC signatures replaced by Plain versions (#5685)
1 parent 0639eaa commit cafa1f3

File tree

4 files changed

+5
-88
lines changed

4 files changed

+5
-88
lines changed

beacon_chain/spec/eth2_apis/rest_beacon_calls.nim

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2018-2023 Status Research & Development GmbH
1+
# Copyright (c) 2018-2024 Status Research & Development GmbH
22
# Licensed and distributed under either of
33
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
44
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
@@ -33,11 +33,6 @@ proc getStateRoot*(state_id: StateIdent): RestResponse[GetStateRootResponse] {.
3333
meth: MethodGet.}
3434
## https://ethereum.github.io/beacon-APIs/#/Beacon/getStateRoot
3535

36-
proc getStateFork*(state_id: StateIdent): RestResponse[GetStateForkResponse] {.
37-
rest, endpoint: "/eth/v1/beacon/states/{state_id}/fork",
38-
meth: MethodGet.}
39-
## https://ethereum.github.io/beacon-APIs/#/Beacon/getStateFork
40-
4136
proc getStateForkPlain*(state_id: StateIdent): RestPlainResponse {.
4237
rest, endpoint: "/eth/v1/beacon/states/{state_id}/fork",
4338
meth: MethodGet.}
@@ -49,13 +44,6 @@ proc getStateFinalityCheckpoints*(state_id: StateIdent
4944
meth: MethodGet.}
5045
## https://ethereum.github.io/beacon-APIs/#/Beacon/getStateFinalityCheckpoints
5146

52-
proc getStateValidators*(state_id: StateIdent,
53-
id: seq[ValidatorIdent]
54-
): RestResponse[GetStateValidatorsResponse] {.
55-
rest, endpoint: "/eth/v1/beacon/states/{state_id}/validators",
56-
meth: MethodGet.}
57-
## https://ethereum.github.io/beacon-APIs/#/Beacon/getStateValidators
58-
5947
proc getStateValidatorsPlain*(
6048
state_id: StateIdent,
6149
id: seq[ValidatorIdent]
@@ -64,14 +52,6 @@ proc getStateValidatorsPlain*(
6452
meth: MethodGet.}
6553
## https://ethereum.github.io/beacon-APIs/#/Beacon/getStateValidators
6654

67-
proc getStateValidator*(state_id: StateIdent,
68-
validator_id: ValidatorIdent
69-
): RestResponse[GetStateValidatorResponse] {.
70-
rest,
71-
endpoint: "/eth/v1/beacon/states/{state_id}/validators/{validator_id}",
72-
meth: MethodGet.}
73-
## https://ethereum.github.io/beacon-APIs/#/Beacon/getStateValidator
74-
7555
proc getStateValidatorPlain*(state_id: StateIdent,
7656
validator_id: ValidatorIdent
7757
): RestPlainResponse {.
@@ -110,11 +90,6 @@ proc getBlockHeaders*(slot: Option[Slot], parent_root: Option[Eth2Digest]
11090
meth: MethodGet.}
11191
## https://ethereum.github.io/beacon-APIs/#/Beacon/getBlockHeaders
11292

113-
# proc getBlockHeader*(block_id: BlockIdent): RestResponse[GetBlockHeaderResponse] {.
114-
# rest, endpoint: "/eth/v1/beacon/headers/{block_id}",
115-
# meth: MethodGet.}
116-
# ## https://ethereum.github.io/beacon-APIs/#/Beacon/getBlockHeader
117-
11893
proc getBlockHeaderPlain*(block_id: BlockIdent): RestPlainResponse {.
11994
rest, endpoint: "/eth/v1/beacon/headers/{block_id}",
12095
meth: MethodGet.}
@@ -315,11 +290,6 @@ proc getBlockV2*(client: RestClientRef, block_id: BlockIdent,
315290
else:
316291
raiseRestResponseError(resp)
317292

318-
proc getBlockRoot*(block_id: BlockIdent): RestResponse[GetBlockRootResponse] {.
319-
rest, endpoint: "/eth/v1/beacon/blocks/{block_id}/root",
320-
meth: MethodGet.}
321-
## https://ethereum.github.io/beacon-APIs/#/Beacon/getBlockRoot
322-
323293
proc getBlockRootPlain*(block_id: BlockIdent): RestPlainResponse {.
324294
rest, endpoint: "/eth/v1/beacon/blocks/{block_id}/root",
325295
meth: MethodGet.}

beacon_chain/spec/eth2_apis/rest_config_calls.nim

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2018-2023 Status Research & Development GmbH
1+
# Copyright (c) 2018-2024 Status Research & Development GmbH
22
# Licensed and distributed under either of
33
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
44
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
@@ -12,10 +12,6 @@ import
1212

1313
export chronos, client, rest_types, eth2_rest_serialization
1414

15-
proc getForkSchedule*(): RestResponse[GetForkScheduleResponse] {.
16-
rest, endpoint: "/eth/v1/config/fork_schedule", meth: MethodGet.}
17-
## https://ethereum.github.io/beacon-APIs/#/Config/getForkSchedule
18-
1915
proc getForkSchedulePlain*(): RestPlainResponse {.
2016
rest, endpoint: "/eth/v1/config/fork_schedule", meth: MethodGet.}
2117
## https://ethereum.github.io/beacon-APIs/#/Config/getForkSchedule

beacon_chain/spec/eth2_apis/rest_validator_calls.nim

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2018-2023 Status Research & Development GmbH
1+
# Copyright (c) 2018-2024 Status Research & Development GmbH
22
# Licensed and distributed under either of
33
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
44
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
@@ -12,14 +12,6 @@ import
1212

1313
export chronos, client, rest_types, eth2_rest_serialization
1414

15-
proc getAttesterDuties*(
16-
epoch: Epoch,
17-
body: seq[ValidatorIndex]
18-
): RestResponse[GetAttesterDutiesResponse] {.
19-
rest, endpoint: "/eth/v1/validator/duties/attester/{epoch}",
20-
meth: MethodPost.}
21-
## https://ethereum.github.io/beacon-APIs/#/Validator/getAttesterDuties
22-
2315
proc getAttesterDutiesPlain*(
2416
epoch: Epoch,
2517
body: seq[ValidatorIndex]
@@ -28,28 +20,13 @@ proc getAttesterDutiesPlain*(
2820
meth: MethodPost.}
2921
## https://ethereum.github.io/beacon-APIs/#/Validator/getAttesterDuties
3022

31-
proc getProposerDuties*(
32-
epoch: Epoch
33-
): RestResponse[GetProposerDutiesResponse] {.
34-
rest, endpoint: "/eth/v1/validator/duties/proposer/{epoch}",
35-
meth: MethodGet.}
36-
## https://ethereum.github.io/beacon-APIs/#/Validator/getProposerDuties
37-
3823
proc getProposerDutiesPlain*(
3924
epoch: Epoch
4025
): RestPlainResponse {.
4126
rest, endpoint: "/eth/v1/validator/duties/proposer/{epoch}",
4227
meth: MethodGet.}
4328
## https://ethereum.github.io/beacon-APIs/#/Validator/getProposerDuties
4429

45-
proc getSyncCommitteeDuties*(
46-
epoch: Epoch,
47-
body: seq[ValidatorIndex]
48-
): RestResponse[GetSyncCommitteeDutiesResponse] {.
49-
rest, endpoint: "/eth/v1/validator/duties/sync/{epoch}",
50-
meth: MethodPost.}
51-
## https://ethereum.github.io/beacon-APIs/#/Validator/getSyncCommitteeDuties
52-
5330
proc getSyncCommitteeDutiesPlain*(
5431
epoch: Epoch,
5532
body: seq[ValidatorIndex]
@@ -76,14 +53,6 @@ proc produceBlindedBlockPlain*(
7653
accept: preferSSZ, meth: MethodGet.}
7754
## https://ethereum.github.io/beacon-APIs/#/Validator/produceBlindedBlock
7855

79-
proc produceAttestationData*(
80-
slot: Slot,
81-
committee_index: CommitteeIndex
82-
): RestResponse[ProduceAttestationDataResponse] {.
83-
rest, endpoint: "/eth/v1/validator/attestation_data",
84-
meth: MethodGet.}
85-
## https://ethereum.github.io/beacon-APIs/#/Validator/produceAttestationData
86-
8756
proc produceAttestationDataPlain*(
8857
slot: Slot,
8958
committee_index: CommitteeIndex
@@ -92,14 +61,6 @@ proc produceAttestationDataPlain*(
9261
meth: MethodGet.}
9362
## https://ethereum.github.io/beacon-APIs/#/Validator/produceAttestationData
9463

95-
proc getAggregatedAttestation*(
96-
attestation_data_root: Eth2Digest,
97-
slot: Slot
98-
): RestResponse[GetAggregatedAttestationResponse] {.
99-
rest, endpoint: "/eth/v1/validator/aggregate_attestation"
100-
meth: MethodGet.}
101-
## https://ethereum.github.io/beacon-APIs/#/Validator/getAggregatedAttestation
102-
10364
proc getAggregatedAttestationPlain*(
10465
attestation_data_root: Eth2Digest,
10566
slot: Slot
@@ -129,15 +90,6 @@ proc prepareSyncCommitteeSubnets*(
12990
meth: MethodPost.}
13091
## https://ethereum.github.io/beacon-APIs/#/Validator/prepareSyncCommitteeSubnets
13192

132-
proc produceSyncCommitteeContribution*(
133-
slot: Slot,
134-
subcommittee_index: SyncSubcommitteeIndex,
135-
beacon_block_root: Eth2Digest
136-
): RestResponse[ProduceSyncCommitteeContributionResponse] {.
137-
rest, endpoint: "/eth/v1/validator/sync_committee_contribution",
138-
meth: MethodGet.}
139-
## https://ethereum.github.io/beacon-APIs/#/Validator/produceSyncCommitteeContribution
140-
14193
proc produceSyncCommitteeContributionPlain*(
14294
slot: Slot,
14395
subcommittee_index: SyncSubcommitteeIndex,
@@ -181,4 +133,3 @@ proc submitSyncCommitteeSelectionsPlain*(
181133
rest, endpoint: "/eth/v1/validator/sync_committee_selections",
182134
meth: MethodPost.}
183135
## https://ethereum.github.io/beacon-APIs/#/Validator/submitSyncCommitteeSelections
184-

beacon_chain/validator_client/fallback_service.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# beacon_chain
2-
# Copyright (c) 2021-2023 Status Research & Development GmbH
2+
# Copyright (c) 2021-2024 Status Research & Development GmbH
33
# Licensed and distributed under either of
44
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
55
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
@@ -376,7 +376,7 @@ proc checkOffsetStatus(node: BeaconNodeServerRef, offset: TimeOffset) =
376376

377377
proc runTimeMonitor(service: FallbackServiceRef,
378378
node: BeaconNodeServerRef) {.async.} =
379-
const NimbusExtensionsLog = "Beacon node do not support nimbus extensions"
379+
const NimbusExtensionsLog = "Beacon node does not support Nimbus extensions"
380380
let
381381
vc = service.client
382382
roles = AllBeaconNodeRoles

0 commit comments

Comments
 (0)