Skip to content

Commit 1622a12

Browse files
committed
more callsigs!
1 parent 8a09286 commit 1622a12

File tree

6 files changed

+36
-16
lines changed

6 files changed

+36
-16
lines changed

beacon_chain/rpc/debug_api.nim

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ proc installDebugApiHandlers*(rpcServer: RpcServer, node: BeaconNode) =
1818
withStateForStateId(stateId):
1919
return state
2020

21-
rpcServer.rpc("get_v1_debug_beacon_heads") do (
22-
stateId: string) -> seq[tuple[root: Eth2Digest, slot: Slot]]:
21+
rpcServer.rpc("get_v1_debug_beacon_heads") do () -> seq[tuple[root: Eth2Digest, slot: Slot]]:
2322
return node.chainDag.heads.mapIt((it.root, it.slot))
2423

beacon_chain/spec/eth2_apis/beacon_callsigs.nim

+6-14
Original file line numberDiff line numberDiff line change
@@ -45,24 +45,16 @@ proc get_v1_beacon_blocks_blockId_root(blockId: string): Eth2Digest
4545
proc get_v1_beacon_blocks_blockId_attestations(blockId: string): seq[Attestation]
4646

4747
# TODO POST /v1/beacon/pool/attester_slashings
48-
# TODO GET /v1/beacon/pool/attester_slashings
4948
# TODO POST /v1/beacon/pool/proposer_slashings
50-
# TODO GET /v1/beacon/pool/proposer_slashings
51-
# TODO POST /v1/beacon/pool/voluntary_exits
52-
# TODO GET /v1/beacon/pool/voluntary_exits
5349
# TODO POST /v1/beacon/pool/attestations
54-
# TODO GET /v1/beacon/pool/attestations
50+
proc get_v1_beacon_pool_attestations(slot: Option[uint64], committee_index: Option[uint64]): seq[AttestationTuple]
51+
proc post_v1_beacon_pool_attestations(attestation: Attestation): bool
5552

53+
proc get_v1_beacon_pool_attester_slashings(): seq[AttesterSlashing]
5654

57-
proc post_v1_beacon_pool_attestations(attestation: Attestation): bool
55+
proc get_v1_beacon_pool_proposer_slashings(): seq[ProposerSlashing]
56+
57+
proc get_v1_beacon_pool_voluntary_exits(): seq[VoluntaryExit]
5858
proc post_v1_beacon_pool_voluntary_exits(exit: SignedVoluntaryExit): bool
5959

6060
proc get_v1_config_fork_schedule(): seq[Fork]
61-
62-
# TODO stateId is part of the REST path
63-
proc get_v1_debug_beacon_states_stateId(stateId: string): BeaconState
64-
65-
proc getBeaconHead(): Slot
66-
proc getNetworkPeerId()
67-
proc getNetworkPeers()
68-
proc getNetworkEnr()

beacon_chain/spec/eth2_apis/beacon_rpc_client.nim

+2
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,7 @@ export
1212
eth2_json_rpc_serialization
1313

1414
createRpcSigs(RpcClient, currentSourcePath.parentDir / "beacon_callsigs.nim")
15+
createRpcSigs(RpcClient, currentSourcePath.parentDir / "debug_callsigs.nim")
16+
createRpcSigs(RpcClient, currentSourcePath.parentDir / "nimbus_callsigs.nim")
1517
createRpcSigs(RpcClient, currentSourcePath.parentDir / "node_callsigs.nim")
1618
createRpcSigs(RpcClient, currentSourcePath.parentDir / "validator_callsigs.nim")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import
2+
options,
3+
../[datatypes, digest, crypto],
4+
json_rpc/jsonmarshal,
5+
callsigs_types
6+
7+
proc get_v1_debug_beacon_states_stateId(stateId: string): BeaconState
8+
proc get_v1_debug_beacon_heads(): seq[tuple[root: Eth2Digest, slot: Slot]]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import
2+
options,
3+
../[datatypes, digest, crypto],
4+
json_rpc/jsonmarshal,
5+
callsigs_types
6+
7+
proc getBeaconHead(): Slot
8+
proc getChainHead(): JsonNode
9+
proc getSyncing(): bool
10+
proc getNetworkPeerId(): string
11+
proc getNetworkPeers(): seq[string]
12+
proc getNodeVersion(): string
13+
proc peers(): JsonNode
14+
proc setLogLevel(level: string)
15+
proc getEth1Chain(): JsonNode
16+
proc getEth1ProposalData(): JsonNode
17+
proc getChronosFutures(): JsonNode
18+
proc getGossipSubPeers(): JsonNode

beacon_chain/spec/eth2_apis/node_callsigs.nim

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import
44
json_rpc/jsonmarshal,
55
callsigs_types
66

7+
proc get_v1_node_identity(): NodeIdentityTuple
78
proc get_v1_node_version(): JsonNode
89
proc get_v1_node_syncing(): SyncInfo
910
proc get_v1_node_health(): JsonNode

0 commit comments

Comments
 (0)