Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct remotekeys endpoint #10

Merged
merged 1 commit into from
Oct 25, 2024
Merged

Correct remotekeys endpoint #10

merged 1 commit into from
Oct 25, 2024

Conversation

bernatfp
Copy link
Member

I have been struggling with deploying validators with the remote signer setup.

I was getting this error:

python -m swarm deploy --n_keys 1 --index 201 --remote_sign
Enter mnemonic: [redacted]
creating 1 keys...
Success!
{'data': [{'status': 'imported', 'message': None}]}
Loaded keystores into remote signer successfuly
{'code': 400, 'message': 'BAD_REQUEST: body deserialize error: Request body deserialize error: unknown field `remote_keys`, expected one of `keystores`, `passwords`, `slashing_protection` at line 1 column 14', 'stacktraces': []}
Submission of keys to validator client unsuccessful. Status code: 400 <traceback object at 0x103a5edc0>
Error: failed to load keys into validator client: Submission of keys to validator client unsuccessful. Status code: 400

At first I got paranoid and tested it out both with our new testnet validator as well as our old validator, but the issue persisted.

After some troubleshooting and research, I realized the remote_keys key is expected in a different Keymanager endpoint. Or at least that's according to these docs.

Changing the endpoint used in the load_remote_keys method from /eth/v1/keystores to /eth/v1/remotekeys fixed it:

python -m swarm deploy --n_keys 1 --index 202 --remote_sign
Enter mnemonic: [redacted]
creating 1 keys...
Success!
{'data': [{'status': 'imported', 'message': None}]}
Loaded keystores into remote signer successfuly
{'data': [{'status': 'imported'}]}
Loaded remote keys into validator successfuly
<swarm.connection.connection.NodeWSConnection object at 0x1024dfa10>
Bond is 1.5 ETH for 1 keys
Submitting keys....
Serving local signing app on http://localhost:8000
127.0.0.1 - - [24/Oct/2024 18:27:33] "GET / HTTP/1.1" 304 -
127.0.0.1 - - [24/Oct/2024 18:27:34] "GET /params HTTP/1.1" 200 -
127.0.0.1 - - [24/Oct/2024 18:27:37] "GET /done?txHash=0x89c5e9e17f2b92a3e227f106aa9a183fa55f3da12b97c7254d2a475551fa4376 HTTP/1.1" 200 -
Shutting down signing app.
Tx hash:  0x89c5e9e17f2b92a3e227f106aa9a183fa55f3da12b97c7254d2a475551fa4376
Uploaded keys and sent ETH to CSM sucessfully

I'm pretty sure we had tested this so I'm very confused... Did I miss anything?

@bernatfp bernatfp requested a review from javierron October 24, 2024 16:37
@javierron
Copy link
Collaborator

This is indeed a bug. It was introduced in #7

The fix is correct

@bernatfp bernatfp merged commit 0fa83ae into main Oct 25, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants