diff --git a/cmd/flags/prover.go b/cmd/flags/prover.go index c042fd5bd..0a9c1a491 100644 --- a/cmd/flags/prover.go +++ b/cmd/flags/prover.go @@ -41,12 +41,6 @@ var ( Usage: "If set, prover will start proving blocks from the block with this ID", Category: proverCategory, } - MaxConcurrentProvingJobs = &cli.UintFlag{ - Name: "prover.maxConcurrentJobs", - Usage: "Limits the number of concurrent proving blocks jobs", - Value: 1, - Category: proverCategory, - } Graffiti = &cli.StringFlag{ Name: "prover.graffiti", Usage: "When string is passed, adds additional graffiti info to proof evidence", @@ -170,7 +164,6 @@ var ProverFlags = MergeFlags(CommonFlags, []cli.Flag{ MinPseZkevmTierFee, MinSgxAndPseZkevmTierFee, StartingBlockID, - MaxConcurrentProvingJobs, Dummy, GuardianProver, GuardianProverPrivateKey, diff --git a/prover/config.go b/prover/config.go index 2640cc146..5a3e55389 100644 --- a/prover/config.go +++ b/prover/config.go @@ -25,7 +25,6 @@ type Config struct { ZKEvmRpcdEndpoint string ZkEvmRpcdParamsPath string StartingBlockID *big.Int - MaxConcurrentProvingJobs uint Dummy bool GuardianProverAddress common.Address GuardianProverPrivateKey *ecdsa.PrivateKey @@ -114,7 +113,6 @@ func NewConfigFromCliContext(c *cli.Context) (*Config, error) { ZKEvmRpcdEndpoint: c.String(flags.ZkEvmRpcdEndpoint.Name), ZkEvmRpcdParamsPath: c.String(flags.ZkEvmRpcdParamsPath.Name), StartingBlockID: startingBlockID, - MaxConcurrentProvingJobs: c.Uint(flags.MaxConcurrentProvingJobs.Name), Dummy: c.Bool(flags.Dummy.Name), GuardianProverAddress: common.HexToAddress(c.String(flags.GuardianProver.Name)), GuardianProverPrivateKey: guardianProverPrivKey, diff --git a/prover/prover.go b/prover/prover.go index 5c56acffd..a9d921931 100644 --- a/prover/prover.go +++ b/prover/prover.go @@ -142,8 +142,8 @@ func InitFromConfig(ctx context.Context, p *Prover, cfg *Config) (err error) { } // Concurrency guards - p.proposeConcurrencyGuard = make(chan struct{}, cfg.MaxConcurrentProvingJobs) - p.submitProofConcurrencyGuard = make(chan struct{}, cfg.MaxConcurrentProvingJobs) + p.proposeConcurrencyGuard = make(chan struct{}, cfg.Capacity) + p.submitProofConcurrencyGuard = make(chan struct{}, cfg.Capacity) // Protocol proof tiers if p.tiers, err = p.rpc.GetTiers(ctx); err != nil { diff --git a/prover/prover_test.go b/prover/prover_test.go index 4cb546ac6..44423c69f 100644 --- a/prover/prover_test.go +++ b/prover/prover_test.go @@ -54,7 +54,6 @@ func (s *ProverTestSuite) SetupTest() { L1ProverPrivKey: l1ProverPrivKey, GuardianProverPrivateKey: l1ProverPrivKey, Dummy: true, - MaxConcurrentProvingJobs: 1, ProveUnassignedBlocks: true, Capacity: 1024, MinOptimisticTierFee: common.Big1, @@ -140,7 +139,6 @@ func (s *ProverTestSuite) TestInitError() { L1ProverPrivKey: l1ProverPrivKey, GuardianProverPrivateKey: l1ProverPrivKey, Dummy: true, - MaxConcurrentProvingJobs: 1, ProveUnassignedBlocks: true, ProveBlockTxReplacementMultiplier: 2, })), "dial tcp:")