Skip to content

Commit

Permalink
feat: update lotus version
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkmc committed May 25, 2023
1 parent 08be788 commit cae96e6
Show file tree
Hide file tree
Showing 27 changed files with 119 additions and 331 deletions.
2 changes: 1 addition & 1 deletion car/car_offset_writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import (
"math/rand"
"testing"

blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-blockservice"
"github.com/ipfs/go-cidutil"
"github.com/ipfs/go-datastore"
dss "github.com/ipfs/go-datastore/sync"
bstore "github.com/ipfs/go-ipfs-blockstore"
chunk "github.com/ipfs/go-ipfs-chunker"
format "github.com/ipfs/go-ipld-format"
"github.com/ipfs/go-libipfs/blocks"
"github.com/ipfs/go-merkledag"
merkledagpb "github.com/ipfs/go-merkledag/pb"
"github.com/ipfs/go-unixfs/importer/balanced"
Expand Down
4 changes: 2 additions & 2 deletions cmd/boost/retrieve_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/lotus/chain/types"
lcli "github.com/filecoin-project/lotus/cli"
"github.com/ipfs/boxo/files"
"github.com/ipfs/go-blockservice"
"github.com/ipfs/go-cid"
offline "github.com/ipfs/go-ipfs-exchange-offline"
"github.com/ipfs/go-libipfs/files"
"github.com/ipfs/go-merkledag"
unixfile "github.com/ipfs/go-unixfs/file"
"github.com/ipld/go-car"
Expand Down Expand Up @@ -165,7 +165,7 @@ var retrieveCmd = &cli.Command{
defer os.RemoveAll(bstoreTmpDir)

bstoreDatastore, err := flatfs.CreateOrOpen(bstoreTmpDir, flatfs.NextToLast(3), false)
bstore := blockstore.NewBlockstoreNoPrefix(bstoreDatastore)
bstore := blockstore.NewBlockstore(bstoreDatastore, blockstore.NoPrefix())
if err != nil {
return fmt.Errorf("could not open blockstore: %w", err)
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/booster-bitswap/bitswap/bitswap.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package bitswap

import (
"github.com/ipfs/go-libipfs/bitswap/network"
"github.com/ipfs/boxo/bitswap/network"
"github.com/libp2p/go-libp2p/core/protocol"
)

Expand Down
6 changes: 3 additions & 3 deletions cmd/booster-bitswap/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ import (

"github.com/filecoin-project/boost/cmd/booster-bitswap/bitswap"
lcli "github.com/filecoin-project/lotus/cli"
"github.com/ipfs/boxo/bitswap/client"
bsnetwork "github.com/ipfs/boxo/bitswap/network"
blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid"
nilrouting "github.com/ipfs/go-ipfs-routing/none"
ipldlegacy "github.com/ipfs/go-ipld-legacy"
"github.com/ipfs/go-libipfs/bitswap/client"
bsnetwork "github.com/ipfs/go-libipfs/bitswap/network"
"github.com/ipfs/go-libipfs/blocks"
"github.com/ipld/go-car/v2/blockstore"
"github.com/libp2p/go-libp2p"
"github.com/libp2p/go-libp2p/core/crypto"
Expand Down
4 changes: 2 additions & 2 deletions cmd/booster-bitswap/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import (
"time"

"github.com/filecoin-project/boost/protocolproxy"
bsnetwork "github.com/ipfs/boxo/bitswap/network"
"github.com/ipfs/boxo/bitswap/server"
"github.com/ipfs/go-cid"
blockstore "github.com/ipfs/go-ipfs-blockstore"
nilrouting "github.com/ipfs/go-ipfs-routing/none"
bsnetwork "github.com/ipfs/go-libipfs/bitswap/network"
"github.com/ipfs/go-libipfs/bitswap/server"
"github.com/libp2p/go-libp2p/core/host"
"github.com/libp2p/go-libp2p/core/peer"
)
Expand Down
237 changes: 0 additions & 237 deletions cmd/booster-http/blocks.go

This file was deleted.

4 changes: 2 additions & 2 deletions cmd/booster-http/gateway_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package main

import (
"fmt"
"github.com/ipfs/go-libipfs/gateway"
"github.com/ipfs/boxo/gateway"
"mime"
"net/http"
"strings"
Expand All @@ -13,7 +13,7 @@ type gatewayHandler struct {
supportedFormats map[string]struct{}
}

func newGatewayHandler(gw *BlocksGateway, supportedFormats []string) http.Handler {
func newGatewayHandler(gw *gateway.BlocksGateway, supportedFormats []string) http.Handler {
headers := map[string][]string{}
gateway.AddAccessControlHeaders(headers)

Expand Down
5 changes: 3 additions & 2 deletions cmd/booster-http/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ import (
"github.com/filecoin-project/dagstore/mount"
"github.com/filecoin-project/go-state-types/abi"
"github.com/hashicorp/go-multierror"
"github.com/ipfs/go-blockservice"
"github.com/ipfs/boxo/blockservice"
"github.com/ipfs/boxo/gateway"
"github.com/ipfs/go-cid"
"github.com/ipfs/go-datastore"
blockstore "github.com/ipfs/go-ipfs-blockstore"
Expand Down Expand Up @@ -91,7 +92,7 @@ func (s *HttpServer) Start(ctx context.Context) error {

if s.opts.Blockstore != nil {
blockService := blockservice.New(s.opts.Blockstore, offline.Exchange(s.opts.Blockstore))
gw, err := NewBlocksGateway(blockService, nil)
gw, err := gateway.NewBlocksGateway(blockService, nil)
if err != nil {
return fmt.Errorf("creating blocks gateway: %w", err)
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/lib/filters/filteredblockstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package filters
import (
"context"
"fmt"
blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid"
blockstore "github.com/ipfs/go-ipfs-blockstore"
ipld "github.com/ipfs/go-ipld-format"
"github.com/ipfs/go-libipfs/blocks"
)

type FilteredBlockstore struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/lib/filters/filteredblockstore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func TestFilteredBlockstore(t *testing.T) {
filter.EXPECT().FulfillRequest(gomock.Any(), blk.Cid()).Return(true, nil)
gotBlk, err := fbs.Get(ctx, blk.Cid())
require.NoError(t, err)
require.Equal(t, blk, gotBlk)
require.Equal(t, blk.RawData(), gotBlk.RawData())

// Filter rejects cid
filter.EXPECT().FulfillRequest(gomock.Any(), blk.Cid()).Return(false, nil)
Expand Down
2 changes: 1 addition & 1 deletion cmd/lib/remoteblockstore/remoteblockstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"strings"

"github.com/filecoin-project/boostd-data/shared/tracing"
blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid"
blockstore "github.com/ipfs/go-ipfs-blockstore"
format "github.com/ipfs/go-ipld-format"
"github.com/ipfs/go-libipfs/blocks"
logging "github.com/ipfs/go-log/v2"
"go.opencensus.io/stats"
"go.opentelemetry.io/otel/attribute"
Expand Down
4 changes: 3 additions & 1 deletion documentation/en/api-v1-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -1314,7 +1314,9 @@ Response:
```json
{
"Reachability": 1,
"PublicAddr": "string value"
"PublicAddrs": [
"string value"
]
}
```

Expand Down
Loading

0 comments on commit cae96e6

Please sign in to comment.