Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions rollup/cmd/permissionless_batches/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package app

import (
"context"
"errors"
"fmt"
"os"
"os/signal"
Expand Down Expand Up @@ -53,16 +54,16 @@ func action(ctx *cli.Context) error {

// Sanity check config. Make sure the required fields are set.
if cfg.RecoveryConfig == nil {
return fmt.Errorf("recovery config must be specified")
return errors.New("recovery config must be specified")
}
if cfg.RecoveryConfig.L1BeaconNodeEndpoint == "" {
return fmt.Errorf("L1 beacon node endpoint must be specified")
return errors.New("L1 beacon node endpoint must be specified")
}
if cfg.RecoveryConfig.L1BlockHeight == 0 {
return fmt.Errorf("L1 block height must be specified")
return errors.New("L1 block height must be specified")
}
if cfg.RecoveryConfig.LatestFinalizedBatch == 0 {
return fmt.Errorf("latest finalized batch must be specified")
return errors.New("latest finalized batch must be specified")
}

// init db connection
Expand Down
3 changes: 2 additions & 1 deletion rollup/internal/controller/relayer/l2_relayer_sanity.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package relayer

import (
"errors"
"fmt"
"math/big"

Expand All @@ -18,7 +19,7 @@ import (
// This ensures the constructed transaction data is correct and consistent with the database state.
func (r *Layer2Relayer) sanityChecksCommitBatchCodecV7CalldataAndBlobs(calldata []byte, blobs []*kzg4844.Blob) error {
if r.l1RollupABI == nil {
return fmt.Errorf("l1RollupABI is nil: cannot parse commitBatches calldata")
return errors.New("l1RollupABI is nil: cannot parse commitBatches calldata")
}
calldataInfo, err := parseCommitBatchesCalldata(r.l1RollupABI, calldata)
if err != nil {
Expand Down
5 changes: 3 additions & 2 deletions rollup/internal/controller/sender/transaction_signer.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package sender

import (
"context"
"errors"
"fmt"
"math/big"

Expand Down Expand Up @@ -51,7 +52,7 @@ func NewTransactionSigner(config *config.SignerConfig, chainID *big.Int) (*Trans
}, nil
case RemoteSignerType:
if config.RemoteSignerConfig.SignerAddress == "" {
return nil, fmt.Errorf("failed to create RemoteSigner, signer address is empty")
return nil, errors.New("failed to create RemoteSigner, signer address is empty")
}
rpcClient, err := rpc.Dial(config.RemoteSignerConfig.RemoteSignerUrl)
if err != nil {
Expand Down Expand Up @@ -94,7 +95,7 @@ func (ts *TransactionSigner) SignTransaction(ctx context.Context, tx *gethTypes.
return signedTx, nil
default:
// this shouldn't happen, because SignerType is checked during creation
return nil, fmt.Errorf("shouldn't happen, unknown signer type")
return nil, errors.New("shouldn't happen, unknown signer type")
}
}

Expand Down