Skip to content

Commit

Permalink
refactor(taiko-client): rm unused L1_NODE_HTTP_ENDPOINT (#17768)
Browse files Browse the repository at this point in the history
  • Loading branch information
YoGhurt111 authored Jul 9, 2024
1 parent 15a5e7f commit 73c7aee
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 17 deletions.
7 changes: 0 additions & 7 deletions packages/taiko-client/cmd/flags/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,6 @@ var (
Category: commonCategory,
EnvVars: []string{"L2_WS"},
}
L1HTTPEndpoint = &cli.StringFlag{
Name: "l1.http",
Usage: "HTTP RPC endpoint of a L1 ethereum node",
Required: true,
Category: commonCategory,
EnvVars: []string{"L1_HTTP"},
}
L1BeaconEndpoint = &cli.StringFlag{
Name: "l1.beacon",
Usage: "HTTP RPC endpoint of a L1 beacon node",
Expand Down
1 change: 0 additions & 1 deletion packages/taiko-client/cmd/flags/prover.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ var (

// ProverFlags All prover flags.
var ProverFlags = MergeFlags(CommonFlags, []cli.Flag{
L1HTTPEndpoint,
L2WSEndpoint,
L2HTTPEndpoint,
RaikoHostEndpoint,
Expand Down
4 changes: 1 addition & 3 deletions packages/taiko-client/prover/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
// Config contains the configurations to initialize a Taiko prover.
type Config struct {
L1WsEndpoint string
L1HttpEndpoint string
L2WsEndpoint string
L2HttpEndpoint string
TaikoL1Address common.Address
Expand Down Expand Up @@ -136,7 +135,6 @@ func NewConfigFromCliContext(c *cli.Context) (*Config, error) {

return &Config{
L1WsEndpoint: c.String(flags.L1WSEndpoint.Name),
L1HttpEndpoint: c.String(flags.L1HTTPEndpoint.Name),
L2WsEndpoint: c.String(flags.L2WSEndpoint.Name),
L2HttpEndpoint: c.String(flags.L2HTTPEndpoint.Name),
TaikoL1Address: common.HexToAddress(c.String(flags.TaikoL1Address.Name)),
Expand Down Expand Up @@ -173,7 +171,7 @@ func NewConfigFromCliContext(c *cli.Context) (*Config, error) {
L2NodeVersion: c.String(flags.L2NodeVersion.Name),
BlockConfirmations: c.Uint64(flags.BlockConfirmations.Name),
TxmgrConfigs: pkgFlags.InitTxmgrConfigsFromCli(
c.String(flags.L1HTTPEndpoint.Name),
c.String(flags.L1WSEndpoint.Name),
l1ProverPrivKey,
c,
),
Expand Down
4 changes: 0 additions & 4 deletions packages/taiko-client/prover/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (

var (
l1WsEndpoint = os.Getenv("L1_NODE_WS_ENDPOINT")
l1HttpEndpoint = os.Getenv("L1_NODE_HTTP_ENDPOINT")
l2WsEndpoint = os.Getenv("L2_EXECUTION_ENGINE_WS_ENDPOINT")
l2HttpEndpoint = os.Getenv("L2_EXECUTION_ENGINE_HTTP_ENDPOINT")
l1NodeVersion = "1.0.0"
Expand All @@ -32,7 +31,6 @@ func (s *ProverTestSuite) TestNewConfigFromCliContextGuardianProver() {
c, err := NewConfigFromCliContext(ctx)
s.Nil(err)
s.Equal(l1WsEndpoint, c.L1WsEndpoint)
s.Equal(l1HttpEndpoint, c.L1HttpEndpoint)
s.Equal(l2WsEndpoint, c.L2WsEndpoint)
s.Equal(l2HttpEndpoint, c.L2HttpEndpoint)
s.Equal(taikoL1, c.TaikoL1Address.String())
Expand Down Expand Up @@ -62,7 +60,6 @@ func (s *ProverTestSuite) TestNewConfigFromCliContextGuardianProver() {
s.Nil(app.Run([]string{
"TestNewConfigFromCliContextGuardianProver",
"--" + flags.L1WSEndpoint.Name, l1WsEndpoint,
"--" + flags.L1HTTPEndpoint.Name, l1HttpEndpoint,
"--" + flags.L2WSEndpoint.Name, l2WsEndpoint,
"--" + flags.L2HTTPEndpoint.Name, l2HttpEndpoint,
"--" + flags.TaikoL1Address.Name, taikoL1,
Expand Down Expand Up @@ -98,7 +95,6 @@ func (s *ProverTestSuite) SetupApp() *cli.App {
app := cli.NewApp()
app.Flags = []cli.Flag{
&cli.StringFlag{Name: flags.L1WSEndpoint.Name},
&cli.StringFlag{Name: flags.L1HTTPEndpoint.Name},
&cli.StringFlag{Name: flags.L2WSEndpoint.Name},
&cli.StringFlag{Name: flags.L2HTTPEndpoint.Name},
&cli.StringFlag{Name: flags.TaikoL1Address.Name},
Expand Down
2 changes: 0 additions & 2 deletions packages/taiko-client/prover/prover_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ func (s *ProverTestSuite) TestInitError() {

s.NotNil(InitFromConfig(ctx, p, &Config{
L1WsEndpoint: os.Getenv("L1_NODE_WS_ENDPOINT"),
L1HttpEndpoint: os.Getenv("L1_NODE_HTTP_ENDPOINT"),
L2WsEndpoint: os.Getenv("L2_EXECUTION_ENGINE_WS_ENDPOINT"),
L2HttpEndpoint: os.Getenv("L2_EXECUTION_ENGINE_HTTP_ENDPOINT"),
TaikoL1Address: common.HexToAddress(os.Getenv("TAIKO_L1_ADDRESS")),
Expand Down Expand Up @@ -484,7 +483,6 @@ func (s *ProverTestSuite) initProver(
p := new(Prover)
s.Nil(InitFromConfig(ctx, p, &Config{
L1WsEndpoint: os.Getenv("L1_NODE_WS_ENDPOINT"),
L1HttpEndpoint: os.Getenv("L1_NODE_HTTP_ENDPOINT"),
L2WsEndpoint: os.Getenv("L2_EXECUTION_ENGINE_WS_ENDPOINT"),
L2HttpEndpoint: os.Getenv("L2_EXECUTION_ENGINE_HTTP_ENDPOINT"),
TaikoL1Address: common.HexToAddress(os.Getenv("TAIKO_L1_ADDRESS")),
Expand Down

0 comments on commit 73c7aee

Please sign in to comment.