Skip to content
Merged
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
16 changes: 8 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ orbs:
executors:
golang:
docker:
- image: cimg/go:1.23.7
- image: cimg/go:1.24.7
resource_class: 2xlarge
ubuntu:
docker:
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
lid-docker-compose:
description: 'Run LID integration tests'
docker:
- image: cimg/go:1.23.7 # Primary container to run Go tests
- image: cimg/go:1.24.7 # Primary container to run Go tests
environment:
YUGABYTE_HOST: yugabyte
- image: yugabytedb/yugabyte:2024.1.3.0-b105 # Service container for YugabyteDB
Expand Down Expand Up @@ -172,7 +172,7 @@ jobs:
linux: false
darwin: true
- golang/install:
version: "1.23.7"
version: "1.24.7"
- run:
name: Install pkg-config
command: HOMEBREW_NO_AUTO_UPDATE=1 brew install pkg-config
Expand Down Expand Up @@ -271,7 +271,7 @@ jobs:
default: golang
golangci-lint-version:
type: string
default: 1.60.1
default: 2.4.0
concurrency:
type: string
default: '2'
Expand Down Expand Up @@ -336,10 +336,10 @@ workflows:
suite: itest-dummydeal
target: "./itests/dummydeal_test.go"

- test:
name: test-graphsync_identity_cid
suite: itest-graphsync_identity_cid
target: "./itests/graphsync_identity_cid_test.go"
# - test:
# name: test-graphsync_identity_cid
# suite: itest-graphsync_identity_cid
# target: "./itests/graphsync_identity_cid_test.go"

- test:
name: test-itest-retrieval
Expand Down
4 changes: 2 additions & 2 deletions .github/image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## This image is used to github action runner for this repo
# Use the official Golang image as the base image
FROM golang:1.23-bullseye AS builder
FROM golang:1.24-bullseye AS builder

# Set the working directory inside the container
WORKDIR /app
Expand All @@ -23,7 +23,7 @@ RUN git submodule update --init
RUN go mod download

# Stage 2: Install Lotus binary
FROM ghcr.io/filecoin-shipyard/lotus-containers:lotus-v1.32.1-devnet AS lotus-test
FROM ghcr.io/filecoin-shipyard/lotus-containers:lotus-v1.34.0-rc2-devnet AS lotus-test

# Stage 3: Build the final image
FROM myoung34/github-runner AS curio-github-runner
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- main

env:
GO_VERSION: 1.23.7
GO_VERSION: 1.24.7

jobs:
ci-lint:
Expand Down Expand Up @@ -73,8 +73,8 @@ jobs:
target: "./itests/dummydeal_offline_test.go"
- name: test-itest-dummydeal
target: "./itests/dummydeal_test.go"
- name: test-graphsync_identity_cid
target: "./itests/graphsync_identity_cid_test.go"
# - name: test-graphsync_identity_cid
# target: "./itests/graphsync_identity_cid_test.go"
- name: test-itest-retrieval
target: "./itests/graphsync_retrieval_test.go"
- name: test-itest-direct_deal
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:

- name: Install golangci-lint
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.60.1
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.4.0
shell: bash

- name: Lint
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $(warning Your Golang version is go$(shell expr $(GOVERSION) / 1000000).$(shell
$(error Update Golang to version to at least 1.20.0)
endif

ALLOWED_NODE_VERSIONS := 16 18 20
ALLOWED_NODE_VERSIONS := 16 18 20 22 24
validate-node-version:
ifeq ($(filter $(shell node -v | cut -c2-3),$(ALLOWED_NODE_VERSIONS)),)
@echo "Unsupported Node.js version. Please install one of the following versions: $(ALLOWED_NODE_VERSIONS)"
Expand Down Expand Up @@ -217,7 +217,7 @@ docsgen-openrpc-boost: docsgen-openrpc-bin

## DOCKER IMAGES
docker_user?=filecoin
lotus_version?=v1.32.1
lotus_version?=v1.34.0-rc2
ffi_from_source?=0
build_lotus?=0
ifeq ($(build_lotus),1)
Expand Down
Binary file modified build/openrpc/boost.json.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion build/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func BuildTypeString() string {
}
}

const BuildVersion = "2.4.3"
const BuildVersion = "2.4.4"

func UserVersion() string {
return BuildVersion + BuildTypeString() + CurrentCommit
Expand Down
4 changes: 2 additions & 2 deletions car/car_offset_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"io"

"github.com/ipfs/boxo/blockservice"
blockstore "github.com/ipfs/boxo/blockstore"
offline "github.com/ipfs/boxo/exchange/offline"
"github.com/ipfs/boxo/blockstore"
"github.com/ipfs/boxo/exchange/offline"
"github.com/ipfs/boxo/ipld/merkledag"
"github.com/ipfs/go-cid"
format "github.com/ipfs/go-ipld-format"
Expand Down
3 changes: 2 additions & 1 deletion car/car_offset_writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"github.com/ipld/go-car"
mh "github.com/multiformats/go-multihash"
"github.com/stretchr/testify/require"
"google.golang.org/protobuf/proto"
)

func TestCarOffsetWriterDagOrder(t *testing.T) {
Expand All @@ -46,7 +47,7 @@ func TestCarOffsetWriterDagOrder(t *testing.T) {
{Hash: aaaaBlk.Cid().Bytes(), Name: &aaaa},
},
}
rootByts, err := pbn.Marshal()
rootByts, err := proto.Marshal(pbn)
require.NoError(t, err)
rootBlk := blocks.NewBlock(rootByts)
require.NoError(t, bserv.AddBlock(ctx, rootBlk))
Expand Down
7 changes: 3 additions & 4 deletions cli/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@ package node
import (
"bytes"
"context"
"crypto/rand"
"errors"
"fmt"
"os"
"path/filepath"

crand "crypto/rand"

"github.com/filecoin-project/boost/lib/keystore"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/lotus/chain/types"
Expand All @@ -33,7 +32,7 @@ func Setup(cfgdir string) (*Node, error) {

_, err = os.Stat(cfgdir)
if err != nil && errors.Is(err, os.ErrNotExist) {
return nil, errors.New("repo dir doesn't exist. run `boost init` first.")
return nil, errors.New("repo dir doesn't exist. run `boost init` first")
}

peerkey, err := loadOrInitPeerKey(keyPath(cfgdir))
Expand Down Expand Up @@ -67,7 +66,7 @@ func loadOrInitPeerKey(kf string) (crypto.PrivKey, error) {
return nil, err
}

k, _, err := crypto.GenerateEd25519Key(crand.Reader)
k, _, err := crypto.GenerateEd25519Key(rand.Reader)
if err != nil {
return nil, err
}
Expand Down
6 changes: 4 additions & 2 deletions cmd/boost/deal_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func dealCmdAction(cctx *cli.Context, isOnline bool) error {
return err
}

api, closer, err := lcli.GetGatewayAPI(cctx)
api, closer, err := lcli.GetGatewayAPIV1(cctx)
if err != nil {
return fmt.Errorf("cant setup gateway connection: %w", err)
}
Expand Down Expand Up @@ -282,7 +282,9 @@ func dealCmdAction(cctx *cli.Context, isOnline bool) error {
if err != nil {
return fmt.Errorf("failed to open stream to peer %s: %w", addrInfo.ID, err)
}
defer s.Close()
defer func() {
_ = s.Close()
}()

var resp types.DealResponse
if err := doRpc(ctx, s, &dealParams, &resp); err != nil {
Expand Down
5 changes: 2 additions & 3 deletions cmd/boost/deal_status_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (

bcli "github.com/filecoin-project/boost/cli"
"github.com/filecoin-project/boost/cli/node"
clinode "github.com/filecoin-project/boost/cli/node"
"github.com/filecoin-project/boost/cmd"
"github.com/filecoin-project/boost/storagemarket/lp2pimpl"
"github.com/filecoin-project/boost/storagemarket/types"
Expand Down Expand Up @@ -45,12 +44,12 @@ var dealStatusCmd = &cli.Command{
return err
}

n, err := clinode.Setup(cctx.String(cmd.FlagRepo.Name))
n, err := node.Setup(cctx.String(cmd.FlagRepo.Name))
if err != nil {
return err
}

api, closer, err := lcli.GetGatewayAPI(cctx)
api, closer, err := lcli.GetGatewayAPIV1(cctx)
if err != nil {
return fmt.Errorf("cant setup gateway connection: %w", err)
}
Expand Down
12 changes: 7 additions & 5 deletions cmd/boost/direct_deal.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ var directDealAllocate = &cli.Command{
if err != nil {
return err
}
defer file.Close()
defer func() {
_ = file.Close()
}()
scanner := bufio.NewScanner(file)
for scanner.Scan() {
line := scanner.Text()
Expand Down Expand Up @@ -247,7 +249,7 @@ var directDealAllocate = &cli.Command{
return err
}

gapi, closer, err := lcli.GetGatewayAPI(cctx)
gapi, closer, err := lcli.GetGatewayAPIV1(cctx)
if err != nil {
return fmt.Errorf("can't setup gateway connection: %w", err)
}
Expand Down Expand Up @@ -381,7 +383,7 @@ var directDealGetAllocations = &cli.Command{
return err
}

gapi, closer, err := lcli.GetGatewayAPI(cctx)
gapi, closer, err := lcli.GetGatewayAPIV1(cctx)
if err != nil {
return fmt.Errorf("cant setup gateway connection: %w", err)
}
Expand Down Expand Up @@ -591,7 +593,7 @@ If the client id different then claim can be extended up to maximum 5 years from
return fmt.Errorf("specified term-max %d is larger than %d maximum allowed by verified regirty actor policy", tmax, verifreg13types.MaximumVerifiedAllocationTerm)
}

gapi, closer, err := lcli.GetGatewayAPI(cctx)
gapi, closer, err := lcli.GetGatewayAPIV1(cctx)
if err != nil {
return fmt.Errorf("can't setup gateway connection: %w", err)
}
Expand Down Expand Up @@ -725,7 +727,7 @@ var listClaimsCmd = &cli.Command{
return fmt.Errorf("must provide a miner ID")
}

gapi, closer, err := lcli.GetGatewayAPI(cctx)
gapi, closer, err := lcli.GetGatewayAPIV1(cctx)
if err != nil {
return fmt.Errorf("can't setup gateway connection: %w", err)
}
Expand Down
6 changes: 3 additions & 3 deletions cmd/boost/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ func NewAppFmt(a *ufcli.App) *AppFmt {
}

func (a *AppFmt) Print(args ...interface{}) {
fmt.Fprint(a.app.Writer, args...)
_, _ = fmt.Fprint(a.app.Writer, args...)
}

func (a *AppFmt) Println(args ...interface{}) {
fmt.Fprintln(a.app.Writer, args...)
_, _ = fmt.Fprintln(a.app.Writer, args...)
}

func (a *AppFmt) Printf(fmtstr string, args ...interface{}) {
fmt.Fprintf(a.app.Writer, fmtstr, args...)
_, _ = fmt.Fprintf(a.app.Writer, fmtstr, args...)
}

func (a *AppFmt) Scan(args ...interface{}) (int, error) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/boost/init_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var initCmd = &cli.Command{
return err
}

api, closer, err := lcli.GetGatewayAPI(cctx)
api, closer, err := lcli.GetGatewayAPIV1(cctx)
if err != nil {
return fmt.Errorf("cant setup gateway connection: %w", err)
}
Expand Down
10 changes: 6 additions & 4 deletions cmd/boost/provider_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ var libp2pInfoCmd = &cli.Command{
return fmt.Errorf("setting up CLI node: %w", err)
}

api, closer, err := lcli.GetGatewayAPI(cctx)
api, closer, err := lcli.GetGatewayAPIV1(cctx)
if err != nil {
return fmt.Errorf("setting up gateway connection: %w", err)
}
Expand Down Expand Up @@ -144,7 +144,7 @@ var storageAskCmd = &cli.Command{
return err
}

api, closer, err := lcli.GetGatewayAPI(cctx)
api, closer, err := lcli.GetGatewayAPIV1(cctx)
if err != nil {
return fmt.Errorf("cant setup gateway connection: %w", err)
}
Expand All @@ -170,7 +170,9 @@ var storageAskCmd = &cli.Command{
if err != nil {
return fmt.Errorf("failed to open stream to peer %s: %w", addrInfo.ID, err)
}
defer s.Close()
defer func() {
_ = s.Close()
}()

var resp network.AskResponse

Expand Down Expand Up @@ -225,7 +227,7 @@ var retrievalTransportsCmd = &cli.Command{
return err
}

api, closer, err := lcli.GetGatewayAPI(cctx)
api, closer, err := lcli.GetGatewayAPIV1(cctx)
if err != nil {
return fmt.Errorf("cant setup gateway connection: %w", err)
}
Expand Down
14 changes: 9 additions & 5 deletions cmd/boost/retrieve_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ var retrieveCmd = &cli.Command{
selNode = selspec.Node()
}

api, closer, err := lcli.GetGatewayAPI(cctx)
api, closer, err := lcli.GetGatewayAPIV1(cctx)
if err != nil {
return fmt.Errorf("setting up gateway connection: %w", err)
}
Expand All @@ -166,7 +166,9 @@ var retrieveCmd = &cli.Command{
return fmt.Errorf("setting up temp dir: %w", err)
}
// Clean up the temp directory before exiting
defer os.RemoveAll(bstoreTmpDir)
defer func() {
_ = os.RemoveAll(bstoreTmpDir)
}()

bstoreDatastore, err := flatfs.CreateOrOpen(bstoreTmpDir, flatfs.NextToLast(3), false)
bstore := blockstore.NewBlockstore(bstoreDatastore, blockstore.NoPrefix())
Expand All @@ -180,7 +182,9 @@ var retrieveCmd = &cli.Command{
return fmt.Errorf("setting up temp dir: %w", err)
}
// Clean up the temp directory before exiting
defer os.RemoveAll(datastoreTmpDir)
defer func() {
_ = os.RemoveAll(datastoreTmpDir)
}()

ds, err := levelds.NewDatastore(datastoreTmpDir, nil)
if err != nil {
Expand All @@ -200,7 +204,7 @@ var retrieveCmd = &cli.Command{

proposal, err := rc.RetrievalProposalForAsk(query, c, selNode)
if err != nil {
return fmt.Errorf("Failed to create retrieval proposal with candidate miner %s: %v", miner, err)
return fmt.Errorf("failed to create retrieval proposal with candidate miner %s: %v", miner, err)
}

// Retrieve the data
Expand All @@ -213,7 +217,7 @@ var retrieveCmd = &cli.Command{
},
)
if err != nil {
return fmt.Errorf("Failed to retrieve content with candidate miner %s: %v", miner, err)
return fmt.Errorf("failed to retrieve content with candidate miner %s: %v", miner, err)
}

printRetrievalStats(&FILRetrievalStats{RStats: *stats})
Expand Down
Loading