mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
Remove Deprecated HTTP Provider Flag (#12140)
* remove deprecated http provider flag * test --------- Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
@@ -68,8 +68,7 @@ func parseJWTSecretFromFile(c *cli.Context) ([]byte, error) {
|
||||
}
|
||||
|
||||
func parseExecutionChainEndpoint(c *cli.Context) (string, error) {
|
||||
aliasUsed := c.IsSet(flags.HTTPWeb3ProviderFlag.Name)
|
||||
if c.String(flags.ExecutionEngineEndpoint.Name) == "" && !aliasUsed {
|
||||
if c.String(flags.ExecutionEngineEndpoint.Name) == "" {
|
||||
return "", fmt.Errorf(
|
||||
"you need to specify %s to provide a connection endpoint to an Ethereum execution client "+
|
||||
"for your Prysm beacon node. This is a requirement for running a node. You can read more about "+
|
||||
@@ -78,12 +77,5 @@ func parseExecutionChainEndpoint(c *cli.Context) (string, error) {
|
||||
flags.ExecutionEngineEndpoint.Name,
|
||||
)
|
||||
}
|
||||
// If users only declare the deprecated flag without setting the execution engine
|
||||
// flag, we fallback to using the deprecated flag value.
|
||||
if aliasUsed && !c.IsSet(flags.ExecutionEngineEndpoint.Name) {
|
||||
log.Warnf("The %s flag has been deprecated and will be removed in a future release,"+
|
||||
"please use the execution endpoint flag instead %s", flags.HTTPWeb3ProviderFlag.Name, flags.ExecutionEngineEndpoint.Name)
|
||||
return c.String(flags.HTTPWeb3ProviderFlag.Name), nil
|
||||
}
|
||||
return c.String(flags.ExecutionEngineEndpoint.Name), nil
|
||||
}
|
||||
|
||||
@@ -39,13 +39,6 @@ var (
|
||||
Usage: "A comma separated list of key value pairs to pass as HTTP headers for all execution " +
|
||||
"client calls. Example: --execution-headers=key1=value1,key2=value2",
|
||||
}
|
||||
// Deprecated: HTTPWeb3ProviderFlag is a deprecated flag and is an alias for the ExecutionEngineEndpoint flag.
|
||||
HTTPWeb3ProviderFlag = &cli.StringFlag{
|
||||
Name: "http-web3provider",
|
||||
Usage: "DEPRECATED: A mainchain web3 provider string http endpoint. Can contain auth header as well in the format --http-web3provider=\"https://goerli.infura.io/v3/xxxx,Basic xxx\" for project secret (base64 encoded) and --http-web3provider=\"https://goerli.infura.io/v3/xxxx,Bearer xxx\" for jwt use",
|
||||
Value: "http://localhost:8551",
|
||||
Hidden: true,
|
||||
}
|
||||
// ExecutionJWTSecretFlag provides a path to a file containing a hex-encoded string representing a 32 byte secret
|
||||
// used to authenticate with an execution node via HTTP. This is required if using an HTTP connection, otherwise all requests
|
||||
// to execution nodes for consensus-related calls will fail. This is not required if using an IPC connection.
|
||||
|
||||
@@ -39,7 +39,6 @@ var appFlags = []cli.Flag{
|
||||
flags.DepositContractFlag,
|
||||
flags.ExecutionEngineEndpoint,
|
||||
flags.ExecutionEngineHeaders,
|
||||
flags.HTTPWeb3ProviderFlag,
|
||||
flags.ExecutionJWTSecretFlag,
|
||||
flags.RPCHost,
|
||||
flags.RPCPort,
|
||||
@@ -195,9 +194,6 @@ func main() {
|
||||
if err := cmd.ExpandSingleEndpointIfFile(ctx, flags.ExecutionEngineEndpoint); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := cmd.ExpandSingleEndpointIfFile(ctx, flags.HTTPWeb3ProviderFlag); err != nil {
|
||||
return err
|
||||
}
|
||||
if ctx.IsSet(flags.SetGCPercent.Name) {
|
||||
runtimeDebug.SetGCPercent(ctx.Int(flags.SetGCPercent.Name))
|
||||
}
|
||||
|
||||
@@ -107,7 +107,6 @@ var appHelpFlagGroups = []flagGroup{
|
||||
flags.GPRCGatewayCorsDomain,
|
||||
flags.ExecutionEngineEndpoint,
|
||||
flags.ExecutionEngineHeaders,
|
||||
flags.HTTPWeb3ProviderFlag,
|
||||
flags.ExecutionJWTSecretFlag,
|
||||
flags.SetGCPercent,
|
||||
flags.SlotsPerArchivedPoint,
|
||||
|
||||
Reference in New Issue
Block a user