Skip to content

Commit

Permalink
feat: ipfs: remove IPFS client backend
Browse files Browse the repository at this point in the history
This was used to run an internal IPFS node...
  • Loading branch information
Stebalien committed Feb 27, 2024
1 parent d3ca54d commit 086ed0c
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 218 deletions.
154 changes: 0 additions & 154 deletions blockstore/ipfs.go

This file was deleted.

8 changes: 0 additions & 8 deletions node/builder_chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ func ConfigFullNode(c interface{}) Option {

enableLibp2pNode := true // always enable libp2p for full nodes

ipfsMaddr := cfg.Client.IpfsMAddr
return Options(
ConfigCommon(&cfg.Common, enableLibp2pNode),

Expand Down Expand Up @@ -227,13 +226,6 @@ func ConfigFullNode(c interface{}) Option {

Override(new(dtypes.ClientBlockstore), modules.ClientBlockstore),

If(cfg.Client.UseIpfs,
Override(new(dtypes.ClientBlockstore), modules.IpfsClientBlockstore(ipfsMaddr, cfg.Client.IpfsOnlineMode)),
Override(new(storagemarket.BlockstoreAccessor), modules.IpfsStorageBlockstoreAccessor),
If(cfg.Client.IpfsUseForRetrieval,
Override(new(retrievalmarket.BlockstoreAccessor), modules.IpfsRetrievalBlockstoreAccessor),
),
),
Override(new(dtypes.Graphsync), modules.Graphsync(cfg.Client.SimultaneousTransfersForStorage, cfg.Client.SimultaneousTransfersForRetrieval)),

Override(new(retrievalmarket.RetrievalClient), modules.RetrievalClient(cfg.Client.OffChainRetrieval)),
Expand Down
5 changes: 1 addition & 4 deletions node/config/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -819,10 +819,7 @@ type Splitstore struct {

// // Full Node
type Client struct {
UseIpfs bool
IpfsOnlineMode bool
IpfsMAddr string
IpfsUseForRetrieval bool
UseIpfs bool
// The maximum number of simultaneous data transfers between the client
// and storage providers for storage deals
SimultaneousTransfersForStorage uint64
Expand Down
50 changes: 0 additions & 50 deletions node/modules/ipfs.go

This file was deleted.

4 changes: 2 additions & 2 deletions node/repo/repo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ func basicTest(t *testing.T, repo Repo) {
// mutate config and persist back to repo
err = lrepo.SetConfig(func(c interface{}) {
cfg := c.(*config.FullNode)
cfg.Client.IpfsMAddr = "duvall"
cfg.FaultReporter.ConsensusFaultReporterAddress = "duvall"
})
assert.NoError(t, err)

// load config and verify changes
c2, err := lrepo.Config()
require.NoError(t, err)
cfg2 := c2.(*config.FullNode)
require.Equal(t, cfg2.Client.IpfsMAddr, "duvall")
require.Equal(t, cfg2.FaultReporter.ConsensusFaultReporterAddress, "duvall")

err = lrepo.Close()
assert.NoError(t, err, "should be able to close")
Expand Down

0 comments on commit 086ed0c

Please sign in to comment.