HTTP VALIDATOR API: remote keymanager api /eth/v1/remotekeys (#13059)

* WIP migrating keymanager api changes

* gaz

* fixing more tests

* fixing unit tests

* fixing deepsource

* fixing visibility of package

* fixing more package visability issues

* gaz

* fixing test

* moving routes to proper location

* removing whitespae for linting

* Update validator/rpc/handlers_keymanager.go

Co-authored-by: Radosław Kapka <rkapka@wp.pl>

* radek's comments

---------

Co-authored-by: Radosław Kapka <rkapka@wp.pl>
This commit is contained in:
james-prysm
2023-10-19 11:17:42 -05:00
committed by GitHub
parent e231d88ca0
commit 7143fe80bc
24 changed files with 682 additions and 1948 deletions

View File

@@ -53,6 +53,7 @@ go_test(
"//config/params:go_default_library",
"//testing/assert:go_default_library",
"//testing/require:go_default_library",
"//validator/rpc:go_default_library",
"//validator/rpc/apimiddleware:go_default_library",
"@com_github_ethereum_go_ethereum//common/hexutil:go_default_library",
"@com_github_sirupsen_logrus//hooks/test:go_default_library",

View File

@@ -125,7 +125,7 @@ var Commands = []*cli.Command{
},
{
Name: "proposer-settings",
Aliases: []string{"w"},
Aliases: []string{"ps"},
Usage: "Display or recreate currently used proposer settings.",
Flags: []cli.Flag{
cmd.ConfigFileFlag,

View File

@@ -13,6 +13,7 @@ import (
"github.com/prysmaticlabs/prysm/v4/testing/assert"
"github.com/prysmaticlabs/prysm/v4/testing/require"
"github.com/prysmaticlabs/prysm/v4/validator/rpc"
"github.com/prysmaticlabs/prysm/v4/validator/rpc/apimiddleware"
logtest "github.com/sirupsen/logrus/hooks/test"
"github.com/urfave/cli/v2"
@@ -39,8 +40,8 @@ func getValidatorHappyPathTestServer(t *testing.T) *httptest.Server {
})
require.NoError(t, err)
} else if r.RequestURI == "/eth/v1/remotekeys" {
err := json.NewEncoder(w).Encode(&apimiddleware.ListRemoteKeysResponseJson{
Keystores: []*apimiddleware.RemoteKeysListJson{
err := json.NewEncoder(w).Encode(&rpc.ListRemoteKeysResponse{
Data: []*rpc.RemoteKey{
{
Pubkey: key1,
},