Onboard validator's Beacon REST API usage to e2e tests (#11704)

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* Onboard validator's Beacon REST API usage to e2e tests

* Remove unused variables

* Remove use_beacon_api tags

* Fix DeepSource errors

* Revert unneeded changes

* Revert evaluator changes

* Revert import reordering

* Address PR comments

* Remove all REST API e2e tests except minimal one

* Fix validator pointing to inexisting beacon node port

Co-authored-by: Radosław Kapka <rkapka@wp.pl>
This commit is contained in:
Patrice Vignola
2022-12-08 06:38:56 -08:00
committed by GitHub
parent ca2618110f
commit dbeb3ee886
37 changed files with 54 additions and 146 deletions

View File

@@ -5,10 +5,7 @@ go_library(
srcs = [
"flags.go",
"interop.go",
] + select({
"//validator/client/validator-client-factory:beacon_api_usage": ["beacon_api_flags.go"],
"//conditions:default": ["grpc_flags.go"],
}),
],
importpath = "github.com/prysmaticlabs/prysm/v3/cmd/validator/flags",
visibility = [
"//cmd/prysmctl:__subpackages__",

View File

@@ -1,8 +0,0 @@
//go:build use_beacon_api
// +build use_beacon_api
package flags
const (
BuiltWithBeaconApi = true
)

View File

@@ -1,8 +0,0 @@
//go:build !use_beacon_api
// +build !use_beacon_api
package flags
const (
BuiltWithBeaconApi = false
)

View File

@@ -49,6 +49,7 @@ func startNode(ctx *cli.Context) error {
var appFlags = []cli.Flag{
flags.BeaconRPCProviderFlag,
flags.BeaconRPCGatewayProviderFlag,
flags.BeaconRESTApiProviderFlag,
flags.CertFlag,
flags.GraffitiFlag,
flags.DisablePenaltyRewardLogFlag,
@@ -112,11 +113,6 @@ var appFlags = []cli.Flag{
}
func init() {
// Append the Beacon REST API flags
if flags.BuiltWithBeaconApi {
appFlags = append(appFlags, flags.BeaconRESTApiProviderFlag)
}
appFlags = cmd.WrapFlags(append(appFlags, features.ValidatorFlags...))
}

View File

@@ -86,6 +86,7 @@ var appHelpFlagGroups = []flagGroup{
Flags: []cli.Flag{
flags.BeaconRPCProviderFlag,
flags.BeaconRPCGatewayProviderFlag,
flags.BeaconRESTApiProviderFlag,
flags.CertFlag,
flags.EnableWebFlag,
flags.DisablePenaltyRewardLogFlag,
@@ -128,16 +129,6 @@ var appHelpFlagGroups = []flagGroup{
}
func init() {
// Append the Beacon REST API flags
if flags.BuiltWithBeaconApi {
for groupIndex := range appHelpFlagGroups {
group := &appHelpFlagGroups[groupIndex]
if group.Name == "validator" {
group.Flags = append(group.Flags, flags.BeaconRESTApiProviderFlag)
}
}
}
cli.AppHelpTemplate = appHelpTemplate
type helpData struct {