diff --git a/packages/taiko-client/cmd/flags/driver.go b/packages/taiko-client/cmd/flags/driver.go index 3c28dc7571a..f068a5d075e 100644 --- a/packages/taiko-client/cmd/flags/driver.go +++ b/packages/taiko-client/cmd/flags/driver.go @@ -30,7 +30,7 @@ var ( Category: driverCategory, EnvVars: []string{"P2P_CHECK_POINT_SYNC_URL"}, } - // syncer specific flag + // Chain syncer specific flag MaxExponent = &cli.Uint64Flag{ Name: "syncer.maxExponent", Usage: "Maximum exponent of retrieving L1 blocks when there is a mismatch between protocol and L2 EE," + diff --git a/packages/taiko-client/cmd/flags/proposer.go b/packages/taiko-client/cmd/flags/proposer.go index ff8e85c0ce3..fef22d7a1fb 100644 --- a/packages/taiko-client/cmd/flags/proposer.go +++ b/packages/taiko-client/cmd/flags/proposer.go @@ -98,13 +98,6 @@ var ( Category: proposerCategory, EnvVars: []string{"TX_POOL_MAX_TX_LISTS_PER_EPOCH"}, } - ProposeBlockIncludeParentMetaHash = &cli.BoolFlag{ - Name: "includeParentMetaHash", - Usage: "Include parent meta hash when proposing block", - Value: false, - Category: proposerCategory, - EnvVars: []string{"INCLUDE_PARENT_META_HASH"}, - } // Transaction related. BlobAllowed = &cli.BoolFlag{ Name: "l1.blobAllowed", @@ -139,7 +132,6 @@ var ProposerFlags = MergeFlags(CommonFlags, []cli.Flag{ MinProposingInternal, AllowZeroInterval, MaxProposedTxListsPerEpoch, - ProposeBlockIncludeParentMetaHash, BlobAllowed, RevertProtectionEnabled, }, TxmgrFlags) diff --git a/packages/taiko-client/cmd/flags/prover.go b/packages/taiko-client/cmd/flags/prover.go index 2de5bbc1422..ba24227d482 100644 --- a/packages/taiko-client/cmd/flags/prover.go +++ b/packages/taiko-client/cmd/flags/prover.go @@ -17,13 +17,6 @@ var ( Category: proverCategory, EnvVars: []string{"L1_PROVER_PRIV_KEY"}, } - ProverCapacity = &cli.Uint64Flag{ - Name: "prover.capacity", - Usage: "Capacity of prover", - Required: true, - Category: proverCategory, - EnvVars: []string{"PROVER_CAPACITY"}, - } ) // Optional flags used by prover. @@ -74,20 +67,6 @@ var ( Value: false, EnvVars: []string{"PROVER_PROVE_UNASSIGNED_BLOCKS"}, } - MinEthBalance = &cli.Float64Flag{ - Name: "prover.minEthBalance", - Usage: "Minimum ETH balance (in Ether) a prover wants to keep", - Category: proverCategory, - Value: 0, - EnvVars: []string{"PROVER_MIN_ETH_BALANCE"}, - } - MinTaikoTokenBalance = &cli.Float64Flag{ - Name: "prover.minTaikoTokenBalance", - Usage: "Minimum Taiko token balance without decimal a prover wants to keep", - Category: proverCategory, - Value: 0, - EnvVars: []string{"PROVER_MIN_TAIKO_TOKEN_BALANCE"}, - } // Running mode ContesterMode = &cli.BoolFlag{ Name: "mode.contester", @@ -119,22 +98,7 @@ var ( Category: proverCategory, EnvVars: []string{"PROVER_DUMMY"}, } - // Max slippage allowed - MaxAcceptableBlockSlippage = &cli.Uint64Flag{ - Name: "prover.blockSlippage", - Usage: "Maximum accepted slippage difference for blockID for accepting proving a block", - Value: 1024, - Category: proverCategory, - EnvVars: []string{"PROVER_BLOCK_SLIPPAGE"}, - } // Max amount of L1 blocks that can pass before block is invalid - MaxProposedIn = &cli.Uint64Flag{ - Name: "prover.maxProposedIn", - Usage: "Maximum amount of L1 blocks that can pass before block can not be proposed. 0 means no limit.", - Value: 0, - Category: proverCategory, - EnvVars: []string{"PROVER_MAX_PROPOSED_IN"}, - } Allowance = &cli.Float64Flag{ Name: "prover.allowance", Usage: "Amount without decimal to approve TaikoL1 contract for TaikoToken usage", @@ -229,8 +193,6 @@ var ProverFlags = MergeFlags(CommonFlags, []cli.Flag{ RaikoHostEndpoint, RaikoJWTPath, L1ProverPrivKey, - MinEthBalance, - MinTaikoTokenBalance, StartingBlockID, Dummy, GuardianProverMinority, @@ -241,11 +203,8 @@ var ProverFlags = MergeFlags(CommonFlags, []cli.Flag{ ProveUnassignedBlocks, ContesterMode, ProverHTTPServerPort, - ProverCapacity, MaxExpiry, - MaxProposedIn, TaikoTokenAddress, - MaxAcceptableBlockSlippage, Allowance, L1NodeVersion, L2NodeVersion, diff --git a/packages/taiko-client/proposer/config.go b/packages/taiko-client/proposer/config.go index 24f631a3872..72b755fe4be 100644 --- a/packages/taiko-client/proposer/config.go +++ b/packages/taiko-client/proposer/config.go @@ -34,7 +34,6 @@ type Config struct { AllowZeroInterval uint64 MaxProposedTxListsPerEpoch uint64 ProposeBlockTxGasLimit uint64 - IncludeParentMetaHash bool BlobAllowed bool RevertProtectionEnabled bool TxmgrConfigs *txmgr.CLIConfig @@ -104,7 +103,6 @@ func NewConfigFromCliContext(c *cli.Context) (*Config, error) { MaxProposedTxListsPerEpoch: maxProposedTxListsPerEpoch, AllowZeroInterval: c.Uint64(flags.AllowZeroInterval.Name), ProposeBlockTxGasLimit: c.Uint64(flags.TxGasLimit.Name), - IncludeParentMetaHash: c.Bool(flags.ProposeBlockIncludeParentMetaHash.Name), BlobAllowed: c.Bool(flags.BlobAllowed.Name), RevertProtectionEnabled: c.Bool(flags.RevertProtectionEnabled.Name), TxmgrConfigs: pkgFlags.InitTxmgrConfigsFromCli( diff --git a/packages/taiko-client/proposer/config_test.go b/packages/taiko-client/proposer/config_test.go index d7a08880272..e1af554fed3 100644 --- a/packages/taiko-client/proposer/config_test.go +++ b/packages/taiko-client/proposer/config_test.go @@ -43,7 +43,6 @@ func (s *ProposerTestSuite) TestNewConfigFromCliContext() { s.Equal(1, len(c.LocalAddresses)) s.Equal(goldenTouchAddress, c.LocalAddresses[0]) s.Equal(5*time.Second, c.Timeout) - s.Equal(true, c.IncludeParentMetaHash) s.Nil(new(Proposer).InitFromCli(context.Background(), cliCtx)) return nil @@ -62,7 +61,6 @@ func (s *ProposerTestSuite) TestNewConfigFromCliContext() { "--" + flags.TxPoolLocals.Name, goldenTouchAddress.Hex(), "--" + flags.RPCTimeout.Name, rpcTimeout, "--" + flags.TxGasLimit.Name, "100000", - "--" + flags.ProposeBlockIncludeParentMetaHash.Name, "true", })) } @@ -117,7 +115,6 @@ func (s *ProposerTestSuite) SetupApp() *cli.App { &cli.DurationFlag{Name: flags.ProposeInterval.Name}, &cli.StringFlag{Name: flags.TxPoolLocals.Name}, &cli.DurationFlag{Name: flags.RPCTimeout.Name}, - &cli.BoolFlag{Name: flags.ProposeBlockIncludeParentMetaHash.Name}, } app.Flags = append(app.Flags, flags.TxmgrFlags...) app.Action = func(ctx *cli.Context) error { diff --git a/packages/taiko-client/prover/config.go b/packages/taiko-client/prover/config.go index cab66a38db6..0a63ea6e7e2 100644 --- a/packages/taiko-client/prover/config.go +++ b/packages/taiko-client/prover/config.go @@ -43,12 +43,8 @@ type Config struct { RPCTimeout time.Duration ProveBlockGasLimit uint64 HTTPServerPort uint64 - Capacity uint64 MinEthBalance *big.Int - MinTaikoTokenBalance *big.Int MaxExpiry time.Duration - MaxProposedIn uint64 - MaxBlockSlippage uint64 Allowance *big.Int GuardianProverHealthCheckServerEndpoint *url.URL RaikoHostEndpoint string @@ -117,16 +113,6 @@ func NewConfigFromCliContext(c *cli.Context) (*Config, error) { } } - minEthBalance, err := utils.EtherToWei(c.Float64(flags.MinEthBalance.Name)) - if err != nil { - return nil, err - } - - minTaikoTokenBalance, err := utils.EtherToWei(c.Float64(flags.MinTaikoTokenBalance.Name)) - if err != nil { - return nil, err - } - if !c.IsSet(flags.GuardianProverMajority.Name) && !c.IsSet(flags.RaikoHostEndpoint.Name) { return nil, errors.New("empty raiko host endpoint") } @@ -165,13 +151,8 @@ func NewConfigFromCliContext(c *cli.Context) (*Config, error) { EnableLivenessBondProof: c.Bool(flags.EnableLivenessBondProof.Name), RPCTimeout: c.Duration(flags.RPCTimeout.Name), ProveBlockGasLimit: c.Uint64(flags.TxGasLimit.Name), - Capacity: c.Uint64(flags.ProverCapacity.Name), HTTPServerPort: c.Uint64(flags.ProverHTTPServerPort.Name), - MinEthBalance: minEthBalance, - MinTaikoTokenBalance: minTaikoTokenBalance, MaxExpiry: c.Duration(flags.MaxExpiry.Name), - MaxBlockSlippage: c.Uint64(flags.MaxAcceptableBlockSlippage.Name), - MaxProposedIn: c.Uint64(flags.MaxProposedIn.Name), Allowance: allowance, L1NodeVersion: c.String(flags.L1NodeVersion.Name), L2NodeVersion: c.String(flags.L2NodeVersion.Name), diff --git a/packages/taiko-client/prover/config_test.go b/packages/taiko-client/prover/config_test.go index 9391bb1f75f..6924774140d 100644 --- a/packages/taiko-client/prover/config_test.go +++ b/packages/taiko-client/prover/config_test.go @@ -44,12 +44,10 @@ func (s *ProverTestSuite) TestNewConfigFromCliContextGuardianProver() { s.True(c.ProveUnassignedBlocks) s.True(c.ContesterMode) s.Equal(rpcTimeout, c.RPCTimeout) - s.Equal(uint64(8), c.Capacity) s.Equal(c.L1NodeVersion, l1NodeVersion) s.Equal(c.L2NodeVersion, l2NodeVersion) s.Nil(new(Prover).InitFromCli(context.Background(), ctx)) s.True(c.ProveUnassignedBlocks) - s.Equal(uint64(100), c.MaxProposedIn) allowanceWithDecimal, err := utils.EtherToWei(allowance) s.Nil(err) s.Equal(allowanceWithDecimal.Uint64(), c.Allowance.Uint64()) @@ -69,12 +67,10 @@ func (s *ProverTestSuite) TestNewConfigFromCliContextGuardianProver() { "--" + flags.RPCTimeout.Name, "5s", "--" + flags.TxGasLimit.Name, "100000", "--" + flags.Dummy.Name, - "--" + flags.ProverCapacity.Name, "8", "--" + flags.GuardianProverMajority.Name, os.Getenv("GUARDIAN_PROVER_CONTRACT"), "--" + flags.GuardianProverMinority.Name, os.Getenv("GUARDIAN_PROVER_MINORITY"), "--" + flags.Graffiti.Name, "", "--" + flags.ProveUnassignedBlocks.Name, - "--" + flags.MaxProposedIn.Name, "100", "--" + flags.Allowance.Name, fmt.Sprint(allowance), "--" + flags.L1NodeVersion.Name, l1NodeVersion, "--" + flags.L2NodeVersion.Name, l2NodeVersion, @@ -107,8 +103,6 @@ func (s *ProverTestSuite) SetupApp() *cli.App { &cli.StringFlag{Name: flags.Graffiti.Name}, &cli.BoolFlag{Name: flags.ProveUnassignedBlocks.Name}, &cli.DurationFlag{Name: flags.RPCTimeout.Name}, - &cli.Uint64Flag{Name: flags.ProverCapacity.Name}, - &cli.Uint64Flag{Name: flags.MaxProposedIn.Name}, &cli.StringFlag{Name: flags.Allowance.Name}, &cli.StringFlag{Name: flags.ContesterMode.Name}, &cli.StringFlag{Name: flags.L1NodeVersion.Name}, diff --git a/packages/taiko-client/prover/prover.go b/packages/taiko-client/prover/prover.go index 80c20da4612..541373a3d81 100644 --- a/packages/taiko-client/prover/prover.go +++ b/packages/taiko-client/prover/prover.go @@ -135,8 +135,8 @@ func InitFromConfig( p.proofGenerationCh = make(chan *proofProducer.ProofWithHeader, chBufferSize) p.batchProofGenerationCh = make(chan *proofProducer.BatchProofs, chBufferSize) p.assignmentExpiredCh = make(chan metadata.TaikoBlockMetaData, chBufferSize) - p.proofSubmissionCh = make(chan *proofProducer.ProofRequestBody, p.cfg.Capacity) - p.proofContestCh = make(chan *proofProducer.ContestRequestBody, p.cfg.Capacity) + p.proofSubmissionCh = make(chan *proofProducer.ProofRequestBody, chBufferSize) + p.proofContestCh = make(chan *proofProducer.ContestRequestBody, chBufferSize) p.proveNotify = make(chan struct{}, 1) p.aggregationNotify = make(chan uint16, 1) diff --git a/packages/taiko-client/prover/prover_test.go b/packages/taiko-client/prover/prover_test.go index 377e9816c92..9325fcacaba 100644 --- a/packages/taiko-client/prover/prover_test.go +++ b/packages/taiko-client/prover/prover_test.go @@ -465,7 +465,6 @@ func (s *ProverTestSuite) TestAggregateProofsAlreadyProved() { L1ProverPrivKey: l1ProverPrivKey, Dummy: true, ProveUnassignedBlocks: true, - Capacity: 1024, Allowance: new(big.Int).Exp(big.NewInt(1_000_000_100), new(big.Int).SetUint64(uint64(decimal)), nil), RPCTimeout: 3 * time.Second, BackOffRetryInterval: 3 * time.Second, @@ -525,7 +524,6 @@ func (s *ProverTestSuite) TestAggregateProofs() { L1ProverPrivKey: l1ProverPrivKey, Dummy: true, ProveUnassignedBlocks: true, - Capacity: 1024, Allowance: new(big.Int).Exp(big.NewInt(1_000_000_100), new(big.Int).SetUint64(uint64(decimal)), nil), RPCTimeout: 3 * time.Second, BackOffRetryInterval: 3 * time.Second, @@ -602,7 +600,6 @@ func (s *ProverTestSuite) initProver( L1ProverPrivKey: key, Dummy: true, ProveUnassignedBlocks: true, - Capacity: 1024, Allowance: new(big.Int).Exp(big.NewInt(1_000_000_100), new(big.Int).SetUint64(uint64(decimal)), nil), RPCTimeout: 3 * time.Second, BackOffRetryInterval: 3 * time.Second,