wealdtech/ethdo

fail to prepare offline

Closed this issue · 13 comments

./ethdo validator exit --prepare-offline --connection=http://localhost:3501 --timeout 600s

and I get

Error: failed to process: failed to obtain validators: no beacon state

my prysm node is running as I can get the list of validator via simple curl

curl -s http://localhost:3501/eth/v1/beacon/states/head/validators

I tried to clone the source and open it in vscode and it seems that eth2-client package in go changed the interface for all the calls, I don't know if that is the reason. say this call in chainInfo.go

// Obtain validators.
validatorsResponse, err := consensusClient.(consensusclient.ValidatorsProvider).Validators(ctx, &api.ValidatorsOpts{State: "head"})

it now is a 3 value return (*apiResponse, validators, err) instead of 2

I downloaded 1.29 and it works so something has changed starting 1.30

What happens if you run

curl -s http://localhost:3501/eth/v2/debug/beacon/states/head

404 so need to enable prysm support for v2 ? not sure if they have that

I am looking at this,

https://ethereum.github.io/beacon-APIs/#/Beacon

where is that /eth/v2 defined ?

The relevant endpoint is https://ethereum.github.io/beacon-APIs/#/Debug/getStateV2 please could you raise an issue with prysm for them to support it?

Alternatively, you may need to add a flag to the beacon node to enable this as it is a debug endpoint.

I would try. Though I have created a free account on quicknode which provide beacon api support and it seems they also only support the official 'v1' version only

Same here, It would be helpful to have a flag --use-api= v1 | v2 or similar.

The V2 version of the endpoint has been in the beacon API spec for over 2 years, and the V1 version deprecated for the same amount of time. It isn't practical to continue to support older versions, especially as each endpoint is individually versioned and commonly return different information for different versions.

Can you tell me how to fix this, I'm having the same problem!

Can you tell me how to fix this, I'm having the same problem!

Use a beacon node that supports the standard endpoint. Lighthouse, nimbus and Teku all provide support.

Can you tell me how to fix this, I'm having the same problem!

Use a beacon node that supports the standard endpoint. Lighthouse, nimbus and Teku all provide support.

We're using Prysm as a validator now, and the dependencies are heavy and not easy to replace, I've rolled back ethdo to 1.29.2 for now, so I'll just have to follow up with the prysm team to see if they can fix it!

This can be fixed by adding --enable-debug-rpc-endpoints to the prysm startup parameters.