Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

Commit

Permalink
feat: remove internal-testnet flags
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha committed Feb 17, 2023
1 parent 3711355 commit 96f4de6
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 30 deletions.
12 changes: 0 additions & 12 deletions cmd/flags/prover.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,6 @@ var (
"`lowerBound-upperBound` (e.g. `30m-1h`), testing purposes only",
Category: proverCategory,
}
ProverIdx = cli.UintFlag{
Name: "proverIdx",
Value: 0,
Category: proverCategory,
}
TotalProvers = cli.UintFlag{
Name: "totalProvers",
Value: 0,
Category: proverCategory,
}
)

// All prover flags.
Expand All @@ -74,6 +64,4 @@ var ProverFlags = MergeFlags(CommonFlags, []cli.Flag{
&MaxConcurrentProvingJobs,
&Dummy,
&RandomDummyProofDelay,
&ProverIdx,
&TotalProvers,
})
4 changes: 0 additions & 4 deletions prover/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ type Config struct {
Dummy bool
RandomDummyProofDelayLowerBound *time.Duration
RandomDummyProofDelayUpperBound *time.Duration
Idx uint
Total uint
}

// NewConfigFromCliContext creates a new config instance from command line flags.
Expand Down Expand Up @@ -87,7 +85,5 @@ func NewConfigFromCliContext(c *cli.Context) (*Config, error) {
Dummy: c.Bool(flags.Dummy.Name),
RandomDummyProofDelayLowerBound: randomDummyProofDelayLowerBound,
RandomDummyProofDelayUpperBound: randomDummyProofDelayUpperBound,
Idx: c.Uint(flags.ProverIdx.Name),
Total: c.Uint(flags.TotalProvers.Name),
}, nil
}
15 changes: 1 addition & 14 deletions prover/prover.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func InitFromConfig(ctx context.Context, p *Prover, cfg *Config) (err error) {
}
p.protocolConfigs = &protocolConfigs

log.Info("Protocol configs", "configs", p.protocolConfigs, "totalProver", p.cfg.Total, "proverIdx", p.cfg.Idx)
log.Info("Protocol configs", "configs")

p.submitProofTxMutex = &sync.Mutex{}
p.txListValidator = txListValidator.NewTxListValidator(
Expand Down Expand Up @@ -268,19 +268,6 @@ func (p *Prover) onBlockProposed(
handleBlockProposedEvent := func() error {
defer func() { <-p.proposeConcurrencyGuard }()

log.Info(
"Check proposed block",
"totalProver", p.cfg.Total,
"proverIdx", p.cfg.Idx,
)

if p.cfg.Total > 0 {
if event.Id.Uint64()%uint64(p.cfg.Total) != uint64(p.cfg.Idx) {
log.Info("Ignore proposed block", "blockID", event.Id, "idx", p.cfg.Idx, "total", p.cfg.Total)
return nil
}
}

// Check whether the block has been verified.
isVerified, err := p.isBlockVerified(event.Id)
if err != nil {
Expand Down

0 comments on commit 96f4de6

Please sign in to comment.