Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
3e1fb7e
chore: 0.35.0-dev
lidel Mar 5, 2025
6f2196f
deps: update boxo to main-branch commit
hsanjuan Mar 7, 2025
ba22102
provider: buffer pin providers.
hsanjuan Mar 6, 2025
9de9384
Update docs/changelogs/v0.34.md
guillaumemichel Mar 7, 2025
4260607
Merge pull request #10746 from ipfs/fix/10596-buffered-reprovides
hsanjuan Mar 10, 2025
095cc0d
Nonfunctional (#10753)
gammazero Mar 11, 2025
183dc7d
Upgrade to Boxo v0.29.1 (#10755)
gammazero Mar 13, 2025
96f3007
docs(readme): update min. requirements + cleanup (#10750)
lidel Mar 14, 2025
b2efaa9
feat: ipfs-webui v4.6 (#10756)
lidel Mar 14, 2025
a9eb546
chore: start changelog for v0.35
lidel Mar 20, 2025
4ea12c5
Merge branch 'master' into merge-release-v0.34.0
lidel Mar 20, 2025
b339490
Merge pull request #10759 from ipfs/merge-release-v0.34.0
lidel Mar 20, 2025
ecca2eb
Support WithIgnoreProviders() in provider query manager
hsanjuan Mar 24, 2025
1d9e3d6
fix: reprovides warning (#10761)
guillaumemichel Mar 25, 2025
2d720d4
Merge branch 'master' into merge-release-v0.34.1
lidel Mar 25, 2025
370bb9f
Merge pull request #10766 from ipfs/merge-release-v0.34.1
lidel Mar 25, 2025
112eb61
changelog: add mention to IgnoreProviders
hsanjuan Apr 1, 2025
8b54407
Merge pull request #10765 from ipfs/ignore-providers
hsanjuan Apr 1, 2025
ef7cc60
docs: Fix typo in v0.34 changelog (#10771)
vorburger Apr 1, 2025
fd50eb0
fix: Add IPFS & IPNS path details to error (re. #10762) (#10770)
vorburger Apr 1, 2025
d7f0266
docs: known issues with file/urlstores (#10768)
lidel Apr 3, 2025
19b591d
chore: update url
lidel Apr 8, 2025
996bcf3
feat: partial DAG provides with Reprovider.Strategy=mfs|pinned+mfs (#…
hsanjuan Apr 9, 2025
ee7fef2
feat: ipfs-webui v4.7.0 (#10780)
lidel Apr 9, 2025
fe3106f
feat(config): expose ProviderSearchMaxResults (#10773)
lidel Apr 9, 2025
6b55e64
feat(config): `ipfs add` and `Import` options for controling UnixFS D…
hsanjuan Apr 15, 2025
ee5665d
remove duplicate workds (#10790)
gammazero Apr 24, 2025
ef39965
docs: use latest fuse package (#10791)
guillaumemichel Apr 29, 2025
0556508
Upgrade to Boxo v0.30.0 (#10794)
gammazero Apr 30, 2025
a599737
feat: `Provider.WorkerCount` and `stats reprovide` (#10779)
guillaumemichel Apr 30, 2025
472674f
feat(pebble): support pinning `FormatMajorVersion` (#10789)
gammazero Apr 30, 2025
de16861
feat(pebble): support pinning `FormatMajorVersion` (#10789)
gammazero Apr 30, 2025
b3973fa
refactor: make datastore metrics opt-in (#10788)
gammazero Apr 30, 2025
e8ff2d5
feat(config): ability to disable Bitswap fully or just server (#10782)
gystemd Apr 30, 2025
7059620
Update go-libp2p-pubsub to v0.13.1 (#10795)
gammazero Apr 30, 2025
b5d7369
feat: opt-in http retrieval client (#10772)
hsanjuan May 6, 2025
7c844ba
feat(fuse): Expose MFS as FUSE mount point (#10781)
gsergey418 May 6, 2025
fffdec3
chore: ensure /mfs is present in docker
lidel May 6, 2025
4e32677
logging: upgrade to go-log/v2 v2.6.0 (#10798)
gammazero May 7, 2025
f7e0568
feat: IPFS_WAIT_REPO_LOCK (#10797)
gammazero May 7, 2025
79ccbb0
chore(version): 0.35.0-rc1
lidel May 7, 2025
6e89271
docs(changelog): go-libp2p-kad-dht
lidel May 7, 2025
36b28a0
fix(config): wire up `Provider.Enabled` flag (#10804)
lidel May 15, 2025
8bdbcbf
fix(fuse): ipns error handling and friendly errors (#10807)
lidel May 15, 2025
623902e
chore(version): 0.35.0-rc2
lidel May 15, 2025
91a146d
fix: p2p-forge v0.5.1 ignoring /p2p-circuit (#10813)
lidel May 20, 2025
b47f0b3
fix: go-libp2p-kad-dht v0.33.1 (#10814)
lidel May 21, 2025
49e2690
chore(version): 0.35.0
lidel May 21, 2025
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Kubo Changelogs

- [v0.35](docs/changelogs/v0.35.md)
- [v0.34](docs/changelogs/v0.34.md)
- [v0.33](docs/changelogs/v0.33.md)
- [v0.32](docs/changelogs/v0.32.md)
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ RUN mkdir -p $IPFS_PATH \
&& chown ipfs:users $IPFS_PATH

# Create mount points for `ipfs mount` command
RUN mkdir /ipfs /ipns \
&& chown ipfs:users /ipfs /ipns
RUN mkdir /ipfs /ipns /mfs \
&& chown ipfs:users /ipfs /ipns /mfs

# Create the init scripts directory
RUN mkdir /container-init.d \
Expand Down
60 changes: 54 additions & 6 deletions cmd/ipfs/kubo/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ const (
initProfileOptionKwd = "init-profile"
ipfsMountKwd = "mount-ipfs"
ipnsMountKwd = "mount-ipns"
mfsMountKwd = "mount-mfs"
migrateKwd = "migrate"
mountKwd = "mount"
offlineKwd = "offline" // global option
Expand Down Expand Up @@ -173,6 +174,7 @@ Headers.
cmds.BoolOption(mountKwd, "Mounts IPFS to the filesystem using FUSE (experimental)"),
cmds.StringOption(ipfsMountKwd, "Path to the mountpoint for IPFS (if using --mount). Defaults to config setting."),
cmds.StringOption(ipnsMountKwd, "Path to the mountpoint for IPNS (if using --mount). Defaults to config setting."),
cmds.StringOption(mfsMountKwd, "Path to the mountpoint for MFS (if using --mount). Defaults to config setting."),
cmds.BoolOption(unrestrictedAPIAccessKwd, "Allow RPC API access to unlisted hashes"),
cmds.BoolOption(unencryptTransportKwd, "Disable transport encryption (for debugging protocols)"),
cmds.BoolOption(enableGCKwd, "Enable automatic periodic repo garbage collection"),
Expand Down Expand Up @@ -458,6 +460,7 @@ func daemonFunc(req *cmds.Request, re cmds.ResponseEmitter, env cmds.Environment
cfg.Identity.PeerID,
cfg.Addresses,
cfg.Identity.PrivKey,
cfg.HTTPRetrieval.Enabled.WithDefault(config.DefaultHTTPRetrievalEnabled),
)
default:
return fmt.Errorf("unrecognized routing option: %s", routingOption)
Expand Down Expand Up @@ -485,6 +488,14 @@ func daemonFunc(req *cmds.Request, re cmds.ResponseEmitter, env cmds.Environment
// This should never happen, but better safe than sorry
log.Fatal("Private network does not work with Routing.Type=auto. Update your config to Routing.Type=dht (or none, and do manual peering)")
}
if cfg.Provider.Strategy.WithDefault("") != "" && cfg.Reprovider.Strategy.IsDefault() {
log.Fatal("Invalid config. Remove unused Provider.Strategy and set Reprovider.Strategy instead. Documentation: https://github.com/ipfs/kubo/blob/master/docs/config.md#reproviderstrategy")
}
if cfg.Experimental.StrategicProviding {
log.Error("Experimental.StrategicProviding was removed. Remove it from your config and set Provider.Enabled=false to remove this message. Documentation: https://github.com/ipfs/kubo/blob/master/docs/experimental-features.md#strategic-providing")
cfg.Experimental.StrategicProviding = false
cfg.Provider.Enabled = config.False
}

printLibp2pPorts(node)

Expand Down Expand Up @@ -619,17 +630,19 @@ take effect.
}()

if !offline {
// Warn users who were victims of 'lowprofile' footgun (https://github.com/ipfs/kubo/pull/10524)
if cfg.Experimental.StrategicProviding {
// Warn users when provide systems are disabled
if !cfg.Provider.Enabled.WithDefault(config.DefaultProviderEnabled) {
fmt.Print(`
⚠️ Reprovide system is disabled due to 'Experimental.StrategicProviding=true'

⚠️ Provide and Reprovide systems are disabled due to 'Provide.Enabled=false'
⚠️ Local CIDs will not be announced to Amino DHT, making them impossible to retrieve without manual peering
⚠️ If this is not intentional, call 'ipfs config profile apply announce-on'
⚠️ If this is not intentional, call 'ipfs config profile apply announce-on' or set Provide.Enabled=true'

`)
} else if cfg.Reprovider.Interval.WithDefault(config.DefaultReproviderInterval) == 0 {
fmt.Print(`
⚠️ Reprovider system is disabled due to 'Reprovider.Interval=0'

⚠️ Provide and Reprovide systems are disabled due to 'Reprovider.Interval=0'
⚠️ Local CIDs will not be announced to Amino DHT, making them impossible to retrieve without manual peering
⚠️ If this is not intentional, call 'ipfs config profile apply announce-on', or set 'Reprovider.Interval=22h'

Expand Down Expand Up @@ -1052,23 +1065,58 @@ func mountFuse(req *cmds.Request, cctx *oldcmds.Context) error {
if !found {
fsdir = cfg.Mounts.IPFS
}
if err := checkFusePath("Mounts.IPFS", fsdir); err != nil {
return err
}

nsdir, found := req.Options[ipnsMountKwd].(string)
if !found {
nsdir = cfg.Mounts.IPNS
}
if err := checkFusePath("Mounts.IPNS", nsdir); err != nil {
return err
}

mfsdir, found := req.Options[mfsMountKwd].(string)
if !found {
mfsdir = cfg.Mounts.MFS
}
if err := checkFusePath("Mounts.MFS", mfsdir); err != nil {
return err
}

node, err := cctx.ConstructNode()
if err != nil {
return fmt.Errorf("mountFuse: ConstructNode() failed: %s", err)
}

err = nodeMount.Mount(node, fsdir, nsdir)
err = nodeMount.Mount(node, fsdir, nsdir, mfsdir)
if err != nil {
return err
}
fmt.Printf("IPFS mounted at: %s\n", fsdir)
fmt.Printf("IPNS mounted at: %s\n", nsdir)
fmt.Printf("MFS mounted at: %s\n", mfsdir)
return nil
}

func checkFusePath(name, path string) error {
if path == "" {
return fmt.Errorf("%s path cannot be empty", name)
}

fileInfo, err := os.Stat(path)
if err != nil {
if os.IsNotExist(err) {
return fmt.Errorf("%s path (%q) does not exist: %w", name, path, err)
}
return fmt.Errorf("error while inspecting %s path (%q): %w", name, path, err)
}

if !fileInfo.IsDir() {
return fmt.Errorf("%s path (%q) is not a directory", name, path)
}

return nil
}

Expand Down
15 changes: 15 additions & 0 deletions config/bitswap.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package config

// Bitswap holds Bitswap configuration options
type Bitswap struct {
// Libp2pEnabled controls if the node initializes bitswap over libp2p (enabled by default)
// (This can be disabled if HTTPRetrieval.Enabled is set to true)
Libp2pEnabled Flag `json:",omitempty"`
// ServerEnabled controls if the node responds to WANTs (depends on Libp2pEnabled, enabled by default)
ServerEnabled Flag `json:",omitempty"`
}

const (
DefaultBitswapLibp2pEnabled = true
DefaultBitswapServerEnabled = true
)
17 changes: 10 additions & 7 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,18 @@ type Config struct {
DNS DNS
Migration Migration

Provider Provider
Reprovider Reprovider
Experimental Experiments
Plugins Plugins
Pinning Pinning
Import Import
Version Version
Provider Provider
Reprovider Reprovider
HTTPRetrieval HTTPRetrieval
Experimental Experiments
Plugins Plugins
Pinning Pinning
Import Import
Version Version

Internal Internal // experimental/unstable options

Bitswap Bitswap `json:",omitempty"`
}

const (
Expand Down
4 changes: 2 additions & 2 deletions config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ func TestCheckKey(t *testing.T) {
t.Fatal("Foo.Bar isn't a valid key in the config")
}

err = CheckKey("Provider.Strategy")
err = CheckKey("Reprovider.Strategy")
if err != nil {
t.Fatalf("%s: %s", err, "Provider.Strategy is a valid key in the config")
t.Fatalf("%s: %s", err, "Reprovider.Strategy is a valid key in the config")
}

err = CheckKey("Provider.Foo")
Expand Down
2 changes: 1 addition & 1 deletion config/experiments.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type Experiments struct {
ShardingEnabled bool `json:",omitempty"` // deprecated by autosharding: https://github.com/ipfs/kubo/pull/8527
Libp2pStreamMounting bool
P2pHttpProxy bool //nolint
StrategicProviding bool
StrategicProviding bool `json:",omitempty"` // removed, use Provider.Enabled instead
OptimisticProvide bool
OptimisticProvideJobsPoolSize int
GatewayOverLibp2p bool `json:",omitempty"`
Expand Down
19 changes: 19 additions & 0 deletions config/http_retrieval.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package config

// HTTPRetrieval is the configuration object for HTTP Retrieval settings.
// Implicit defaults can be found in core/node/bitswap.go
type HTTPRetrieval struct {
Enabled Flag `json:",omitempty"`
Allowlist []string `json:",omitempty"`
Denylist []string `json:",omitempty"`
NumWorkers *OptionalInteger `json:",omitempty"`
MaxBlockSize *OptionalString `json:",omitempty"`
TLSInsecureSkipVerify Flag `json:",omitempty"`
}

const (
DefaultHTTPRetrievalEnabled = false // opt-in for now, until we figure out https://github.com/ipfs/specs/issues/496
DefaultHTTPRetrievalNumWorkers = 16
DefaultHTTPRetrievalTLSInsecureSkipVerify = false // only for testing with self-signed HTTPS certs
DefaultHTTPRetrievalMaxBlockSize = "2MiB" // matching bitswap: https://specs.ipfs.tech/bitswap-protocol/#block-sizes
)
30 changes: 24 additions & 6 deletions config/import.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
package config

import (
"github.com/ipfs/boxo/ipld/unixfs/importer/helpers"
"github.com/ipfs/boxo/ipld/unixfs/io"
)

const (
DefaultCidVersion = 0
DefaultUnixFSRawLeaves = false
DefaultUnixFSChunker = "size-262144"
DefaultHashFunction = "sha2-256"

DefaultUnixFSHAMTDirectorySizeThreshold = "256KiB" // https://github.com/ipfs/boxo/blob/6c5a07602aed248acc86598f30ab61923a54a83e/ipld/unixfs/io/directory.go#L26

// DefaultBatchMaxNodes controls the maximum number of nodes in a
// write-batch. The total size of the batch is limited by
// BatchMaxnodes and BatchMaxSize.
Expand All @@ -14,15 +21,26 @@ const (
// write-batch. The total size of the batch is limited by
// BatchMaxnodes and BatchMaxSize.
DefaultBatchMaxSize = 100 << 20 // 20MiB

)

var (
DefaultUnixFSFileMaxLinks = int64(helpers.DefaultLinksPerBlock)
DefaultUnixFSDirectoryMaxLinks = int64(0)
DefaultUnixFSHAMTDirectoryMaxFanout = int64(io.DefaultShardWidth)
)

// Import configures the default options for ingesting data. This affects commands
// that ingest data, such as 'ipfs add', 'ipfs dag put, 'ipfs block put', 'ipfs files write'.
type Import struct {
CidVersion OptionalInteger
UnixFSRawLeaves Flag
UnixFSChunker OptionalString
HashFunction OptionalString
BatchMaxNodes OptionalInteger
BatchMaxSize OptionalInteger
CidVersion OptionalInteger
UnixFSRawLeaves Flag
UnixFSChunker OptionalString
HashFunction OptionalString
UnixFSFileMaxLinks OptionalInteger
UnixFSDirectoryMaxLinks OptionalInteger
UnixFSHAMTDirectoryMaxFanout OptionalInteger
UnixFSHAMTDirectorySizeThreshold OptionalString
BatchMaxNodes OptionalInteger
BatchMaxSize OptionalInteger
}
55 changes: 47 additions & 8 deletions config/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"io"
"time"

"github.com/cockroachdb/pebble/v2"
"github.com/ipfs/kubo/core/coreiface/options"
"github.com/libp2p/go-libp2p/core/crypto"
"github.com/libp2p/go-libp2p/core/peer"
Expand Down Expand Up @@ -47,16 +48,11 @@ func InitWithIdentity(identity Identity) (*Config, error) {
},
},

Routing: Routing{
Type: nil,
Methods: nil,
Routers: nil,
},

// setup the node mount points.
Mounts: Mounts{
IPFS: "/ipfs",
IPNS: "/ipns",
MFS: "/mfs",
},

Ipns: Ipns{
Expand Down Expand Up @@ -139,17 +135,37 @@ func DefaultDatastoreConfig() Datastore {
}

func pebbleSpec() map[string]interface{} {
return map[string]interface{}{
"type": "pebbleds",
"prefix": "pebble.datastore",
"path": "pebbleds",
"formatMajorVersion": int(pebble.FormatNewest),
}
}

func pebbleSpecMeasure() map[string]interface{} {
return map[string]interface{}{
"type": "measure",
"prefix": "pebble.datastore",
"child": map[string]interface{}{
"type": "pebbleds",
"path": "pebbleds",
"formatMajorVersion": int(pebble.FormatNewest),
"type": "pebbleds",
"path": "pebbleds",
},
}
}

func badgerSpec() map[string]interface{} {
return map[string]interface{}{
"type": "badgerds",
"prefix": "badger.datastore",
"path": "badgerds",
"syncWrites": false,
"truncate": true,
}
}

func badgerSpecMeasure() map[string]interface{} {
return map[string]interface{}{
"type": "measure",
"prefix": "badger.datastore",
Expand All @@ -163,6 +179,29 @@ func badgerSpec() map[string]interface{} {
}

func flatfsSpec() map[string]interface{} {
return map[string]interface{}{
"type": "mount",
"mounts": []interface{}{
map[string]interface{}{
"mountpoint": "/blocks",
"type": "flatfs",
"prefix": "flatfs.datastore",
"path": "blocks",
"sync": false,
"shardFunc": "/repo/flatfs/shard/v1/next-to-last/2",
},
map[string]interface{}{
"mountpoint": "/",
"type": "levelds",
"prefix": "leveldb.datastore",
"path": "datastore",
"compression": "none",
},
},
}
}

func flatfsSpecMeasure() map[string]interface{} {
return map[string]interface{}{
"type": "mount",
"mounts": []interface{}{
Expand Down
3 changes: 2 additions & 1 deletion config/internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package config
type Internal struct {
// All marked as omitempty since we are expecting to make changes to all subcomponents of Internal
Bitswap *InternalBitswap `json:",omitempty"`
UnixFSShardingSizeThreshold *OptionalString `json:",omitempty"`
UnixFSShardingSizeThreshold *OptionalString `json:",omitempty"` // moved to Import.UnixFSHAMTDirectorySizeThreshold
Libp2pForceReachability *OptionalString `json:",omitempty"`
BackupBootstrapInterval *OptionalDuration `json:",omitempty"`
}
Expand All @@ -14,5 +14,6 @@ type InternalBitswap struct {
EngineTaskWorkerCount OptionalInteger
MaxOutstandingBytesPerPeer OptionalInteger
ProviderSearchDelay OptionalDuration
ProviderSearchMaxResults OptionalInteger
WantHaveReplaceSize OptionalInteger
}
1 change: 1 addition & 0 deletions config/mounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ package config
type Mounts struct {
IPFS string
IPNS string
MFS string
FuseAllowOther bool
}
Loading
Loading