From 8513d7c5e0c4b17f53dab1024e3d70257a857f53 Mon Sep 17 00:00:00 2001 From: Marius van der Wijden Date: Tue, 24 Jan 2023 15:25:21 +0100 Subject: [PATCH 1/3] eth/catalyst: implement getCapabilities --- eth/catalyst/api.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/eth/catalyst/api.go b/eth/catalyst/api.go index 39dcba04f83e..6563bee4a8fc 100644 --- a/eth/catalyst/api.go +++ b/eth/catalyst/api.go @@ -79,6 +79,16 @@ const ( beaconUpdateWarnFrequency = 5 * time.Minute ) +var caps = []string{ + "engine_forkchoiceUpdatedV1", + "engine_forkchoiceUpdatedV2", + "engine_exchangeTransitionConfigurationV1", + "engine_getPayloadV1", + "engine_getPayloadV2", + "engine_newPayloadV1", + "engine_newPayloadV2", +} + type ConsensusAPI struct { eth *eth.Ethereum @@ -720,3 +730,7 @@ func (api *ConsensusAPI) heartbeat() { } } } + +func GetCapabilities([]string) []string { + return caps +} From fc52d1d85d2a7849d57cd4f40543613b8e6f8770 Mon Sep 17 00:00:00 2001 From: Marius van der Wijden Date: Wed, 25 Jan 2023 22:15:54 +0100 Subject: [PATCH 2/3] eth/catalyst: rename exchangeCaps --- eth/catalyst/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eth/catalyst/api.go b/eth/catalyst/api.go index 6563bee4a8fc..d6d97ed0e1fa 100644 --- a/eth/catalyst/api.go +++ b/eth/catalyst/api.go @@ -731,6 +731,6 @@ func (api *ConsensusAPI) heartbeat() { } } -func GetCapabilities([]string) []string { +func (api *ConsensusAPI) ExchangeCapabilities([]string) []string { return caps } From a1267f53bd41b758bbe816ee4c40499fbe1dd19a Mon Sep 17 00:00:00 2001 From: Marius van der Wijden Date: Thu, 26 Jan 2023 11:23:51 +0100 Subject: [PATCH 3/3] eth/catalyst: add comments --- eth/catalyst/api.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eth/catalyst/api.go b/eth/catalyst/api.go index d6d97ed0e1fa..b5c0f6eb9b70 100644 --- a/eth/catalyst/api.go +++ b/eth/catalyst/api.go @@ -79,6 +79,7 @@ const ( beaconUpdateWarnFrequency = 5 * time.Minute ) +// All methods provided over the engine endpoint. var caps = []string{ "engine_forkchoiceUpdatedV1", "engine_forkchoiceUpdatedV2", @@ -731,6 +732,7 @@ func (api *ConsensusAPI) heartbeat() { } } +// ExchangeCapabilities returns the current methods provided by this node. func (api *ConsensusAPI) ExchangeCapabilities([]string) []string { return caps }