Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update go to 1.22 and all direct dependencies #853

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion Dockerfile.buildkit.node
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

FROM alpine AS base

FROM golang:1.19 AS go-builder
FROM golang:1.22 AS go-builder
WORKDIR /go/app
COPY go.mod .
COPY go.sum .
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.cli
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM alpine AS base

FROM golang:1.19 AS go-builder
FROM golang:1.22 AS go-builder
WORKDIR /go/app
COPY go.mod .
COPY go.sum .
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.node
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM alpine AS base

FROM golang:1.19 AS go-builder
FROM golang:1.22 AS go-builder
WORKDIR /go/app
COPY go.mod .
COPY go.sum .
Expand Down
5 changes: 4 additions & 1 deletion cmd/scanner/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ import (
"context"
"fmt"
"math/big"
"os"
"strconv"
"strings"
"time"

"golang.org/x/exp/slog"

"github.com/forta-network/forta-node/store"

"github.com/forta-network/forta-core-go/domain"
Expand Down Expand Up @@ -473,6 +476,6 @@ func isNotFoundErr(errMsg string) bool {
}

func Run() {
gethlog.Root().SetHandler(gethlog.StdoutHandler)
gethlog.SetDefault(gethlog.NewLogger(slog.NewTextHandler(os.Stdout, nil)))
services.ContainerMain("scanner", initServices)
}
1 change: 0 additions & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ type LocalShardedBot struct {

type InspectionConfig struct {
BlockInterval *int `yaml:"blockInterval" json:"blockInterval"`
NetworkSavingMode bool `yaml:"networkSavingMode" json:"networkSavingMode"`
InspectAtStartup *bool `yaml:"inspectAtStartup" json:"inspectAtStartup" default:"true"`
}

Expand Down
411 changes: 204 additions & 207 deletions go.mod

Large diffs are not rendered by default.

2,306 changes: 572 additions & 1,734 deletions go.sum

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion services/inspector/inspector.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@ func NewInspector(ctx context.Context, cfg InspectorConfig) (*Inspector, error)
if cfg.Config.Publish.Batch.IntervalSeconds != nil {
publishInterval = (time.Duration(*cfg.Config.Publish.Batch.IntervalSeconds) * time.Second) / 3
}
inspect.DownloadTestSavingMode = cfg.Config.InspectionConfig.NetworkSavingMode

return &Inspector{
ctx: ctx,
Expand Down
2 changes: 1 addition & 1 deletion services/storage/ipfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type IPFSClient interface {
FilesRead(ctx context.Context, path string, options ...ipfsapi.FilesOpt) (io.ReadCloser, error)
FilesWrite(ctx context.Context, path string, data io.Reader, options ...ipfsapi.FilesOpt) error
FilesRm(ctx context.Context, path string, force bool) error
FilesCp(ctx context.Context, src string, dest string) error
FilesCp(ctx context.Context, src string, dest string, options ...ipfsapi.FilesOpt) error
FilesStat(ctx context.Context, path string, options ...ipfsapi.FilesOpt) (*ipfsapi.FilesStatObject, error)
FilesMkdir(ctx context.Context, path string, options ...ipfsapi.FilesOpt) error
FilesLs(ctx context.Context, path string, options ...ipfsapi.FilesOpt) ([]*ipfsapi.MfsLsEntry, error)
Expand Down
13 changes: 9 additions & 4 deletions services/storage/mocks/mock_ipfs.go

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

Loading