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 Apr 4, 2024
1 parent 800ae97 commit e914398
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 104 deletions.
16 changes: 0 additions & 16 deletions documentation/en/default-lotus-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -129,22 +129,6 @@


[Client]
# type: bool
# env var: LOTUS_CLIENT_USEIPFS
#UseIpfs = false

# type: bool
# env var: LOTUS_CLIENT_IPFSONLINEMODE
#IpfsOnlineMode = false

# type: string
# env var: LOTUS_CLIENT_IPFSMADDR
#IpfsMAddr = ""

# type: bool
# env var: LOTUS_CLIENT_IPFSUSEFORRETRIEVAL
#IpfsUseForRetrieval = false

# The maximum number of simultaneous data transfers between the client
# and storage providers for storage deals
#
Expand Down
8 changes: 0 additions & 8 deletions node/builder_chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,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 @@ -229,13 +228,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
24 changes: 0 additions & 24 deletions node/config/doc_gen.go

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

4 changes: 0 additions & 4 deletions node/config/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -940,10 +940,6 @@ type Splitstore struct {

// // Full Node
type Client struct {
UseIpfs bool
IpfsOnlineMode bool
IpfsMAddr string
IpfsUseForRetrieval 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 e914398

Please sign in to comment.