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

Commit

Permalink
feat(bindings): update Go contract bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha committed Apr 10, 2024
1 parent 553c432 commit 12ce79e
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 42 deletions.
2 changes: 1 addition & 1 deletion bindings/.githead
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2c63cb0c796495948f1dd887662044397394d852
03d610d8a94e4f1ef52b4c3e5656ed9081b8585f
33 changes: 1 addition & 32 deletions bindings/gen_lib_proving.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion cmd/flags/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package flags
import (
"time"

"github.com/cenkalti/backoff/v4"
"github.com/urfave/cli/v2"
)

Expand Down Expand Up @@ -119,7 +120,7 @@ var (
Name: "backoff.retryInterval",
Usage: "Retry interval in seconds when there is an error",
Category: commonCategory,
Value: 12 * time.Second,
Value: backoff.DefaultMaxInterval,
}
RPCTimeout = &cli.DurationFlag{
Name: "rpc.timeout",
Expand Down
2 changes: 1 addition & 1 deletion cmd/flags/prover.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ var (
// Confirmations specific flag
BlockConfirmations = &cli.Uint64Flag{
Name: "prover.blockConfirmations",
Usage: "Confirmations to the latest l1 block before submitting a proof for a l2 block",
Usage: "Confirmations to the latest L1 block before submitting a proof for a L2 block",
Value: 6,
Category: proverCategory,
}
Expand Down
9 changes: 4 additions & 5 deletions prover/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,21 +100,20 @@ func NewConfigFromCliContext(c *cli.Context) (*Config, error) {
if err := c.Set(flags.ProveUnassignedBlocks.Name, "true"); err != nil {
return nil, err
}

if err := c.Set(flags.ContesterMode.Name, "true"); err != nil {
return nil, err
}

// l1 and l2 node version flags are required only if guardian prover
// L1 and L2 node version flags are required only if guardian prover
if !c.IsSet(flags.L1NodeVersion.Name) {
return nil, errors.New("L1NodeVersion is required if guardian prover is set")
return nil, errors.New("--prover.l1NodeVersion flag is required if guardian prover is set")
}

if !c.IsSet(flags.L2NodeVersion.Name) {
return nil, errors.New("L2NodeVersion is required if guardian prover is set")
return nil, errors.New("--prover.l2NodeVersion flag is required if guardian prover is set")
}
}

// If we are not running a guardian prover, a raiko host endpoint is required.
if !c.IsSet(flags.GuardianProver.Name) && !c.IsSet(flags.RaikoHostEndpoint.Name) {
return nil, fmt.Errorf("raiko host not provided")
}
Expand Down
3 changes: 1 addition & 2 deletions prover/prover.go
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,7 @@ func (p *Prover) withRetry(f func() error) {
p.wg.Add(1)
go func() {
defer p.wg.Done()
err := backoff.Retry(f, p.backoff)
if err != nil {
if err := backoff.Retry(f, p.backoff); err != nil {
log.Error("Operation failed", "error", err)
}
}()
Expand Down

0 comments on commit 12ce79e

Please sign in to comment.