1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-05-16 22:47:18 +08:00

15431 Commits

Author SHA1 Message Date
f84fb2849b fix(fuse): ipns error handling and friendly errors (#10807)
* fix(fusei/ux): check if paths exist, print err

* fix(fuse): ipns 'could not resolve'

error type changed when code got extracted to boxo, but it was not
caught because of FUSE tests do not cover IPNS in online mode

Closes #8095
Closes #2167
Closes #3013

* docs: clarify opt-in
2025-05-15 23:43:43 +02:00
2ab3f58c99 fix(config): wire up Provider.Enabled flag (#10804)
* fix(config): explicit Provider.Enabled flag

Adds missing config option described in
https://github.com/ipfs/kubo/issues/10803

* refactor: remove Experimental.StrategicProviding

removing experiment, replaced with Provider.Enabled

* test(cli): routing [re]provide

updated and added tests for manually triggering provide and reprovide
and making them respect global configuration flag to avoid
inconsistent behaviors

* docs: improve DelegatedRouters

* refactor: default DefaultProviderWorkerCount=16

- simplified default for both
- 16 is safer for non-accelerated DHT client
- acceletated DHT performs better without limit anyway - updated docs
2025-05-15 19:19:18 +02:00
6f37df7787 ci: uci/copy-templates (#10787)
* chore: add or force update .github/workflows/stale.yml

* chore: add or force update .github/workflows/generated-pr.yml
2025-05-09 21:53:37 +02:00
8c2c5009d5 chore(deps): bump codecov/codecov-action from 5.4.0 to 5.4.2 (#10783)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5.4.0 to 5.4.2.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](0565863a31...ad3126e916)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-version: 5.4.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-07 17:44:37 -07:00
925a4d1b4c chore: bump version to 0.36.0-dev 2025-05-07 16:39:40 +02:00
f7e0568a50 feat: IPFS_WAIT_REPO_LOCK (#10797)
* repo: optionally wait to acquire repo lock

Retry acquiring repo lock for a specified amount of time. Retry once per second until time is expired ro lock is acquired.

Lock wait timeout is specified using the environment variable `IPFS_WAIT_REPO_LOCK` and assigning it a value that is parsable as a golang `time.Duration`. For example:

```
IPFS_WAIT_REPO_LOCK="5s"
```

Closes #10482

* document IPFS_WAIT_REPO_LOCK

---------

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2025-05-07 14:28:43 +00:00
4e32677538 logging: upgrade to go-log/v2 v2.6.0 (#10798) 2025-05-07 05:37:22 -07:00
fffdec3584 chore: ensure /mfs is present in docker 2025-05-06 21:56:49 +02:00
7c844bacea feat(fuse): Expose MFS as FUSE mount point (#10781)
* Add MFS command line options, extend existing mount functions for MFS, set defaults.

* Directory listing and file stat.

* Add a read-only MFS view.

* Add mkdir and interface checks.

* Add remove and rename functionality.

* Implement all required write interfaces.

* Adjust mount  functions for other architechtures.

* Merge branch 'master' into feat/10710-mfs-fuse-mount

* Write a basic read/write test.

* Write more basic tests, add a mutex to the file object, fix modtime.

* Add a concurrency test, remove mutexes from file and directory structures.

* Refactor naming(mfdir -> mfsdir) and add documentation.

* Add CID retrieval through ipfs_cid xattr.

* Add docs, add xattr listing, fix bugs for mv and stat, refactor.

* Add MFS command line options, extend existing mount functions for MFS, set defaults.

* docs phrasing

* docs: Mounts.MFS

* docs: warn about lazy-loaded DAGs

* test: TEST_FUSE=1 ./t0030-mount.sh -v

---------

Co-authored-by: Guillaume Michel <guillaumemichel@users.noreply.github.com>
Co-authored-by: guillaumemichel <guillaume@michel.id>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2025-05-06 21:55:53 +02:00
b5d73695ba feat: opt-in http retrieval client (#10772)
* Feat: http retrieval as experimental feature

This introduces the http-retrieval capability as an experimental feature.

It can be enabled in the configuration `Experimental.HTTPRetrieval.Enabled = true`.

Documentation and changelog to be added later.

* refactor: HTTPRetrieval.Enabled as Flag

* docs(config): HTTPRetrieval section

* refactor: reusable MockHTTPContentRouter

* feat: HTTPRetrieval.TLSInsecureSkipVerify

allows self-signed certificates in tests

* feat(config): HTTPRetrieval.MaxBlockSize

* test: end-to-end HTTPRetrieval.Enabled

this spawns two http services on localhost:
1. HTTP router that returns HTTP provider when /routing/v1/providers/cid  i queried
2. HTTP provider that returns a block when /ipfs/cid is queried
3. Configures Kubo to use (1) instead of cid.contact

this seems to work (running test with DEBUG=true shows (1) was queried
for the test CID and returned multiaddr of (2), but Kubo never requested
test CID block from (2) – needs investigation

* fix: enable /routing/v1/peers for non-cid.contact

we artificially limited every delegated routing endpoint because of
cid.contact being limited to one endpoint

* feat: Routing.DelegatedRouters

make it easy to override the hardcoded implicit HTTP routeur URL
without having to set the entire custom Router.Routers and
Router.Methods

(http_retrieval_client_test.go still needs to be fixed in future commit)

* test: flag remaining work

* docs: review feedback

* refactor: providerQueryMgr with bitswapNetworks

this fixes two regressions:

(1) introduced in https://github.com/ipfs/kubo/issues/10717
    where we only used bitswapLib2p query manager
    (this is why E2E did not act on http provider)

(2) introduced in https://github.com/ipfs/kubo/pull/10765
    where it was not possible to set binary peerID in IgnoreProviders
    (we changed to []string)

* refactor: Bitswap.Libp2pEnabled

replaces Bitswap.Enabled with Bitswap.Libp2pEnabled
adds tests that confirm it is possible to disable libp2p bitswap fully
and only keep http in client mode

also, removes the need for passing empty blockstore in client-only mode

* docs: changelog

---------

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2025-05-06 19:06:40 +02:00
7059620181 Update go-libp2p-pubsub to v0.13.1 (#10795) 2025-04-30 13:40:34 -07:00
IGP
e8ff2d59de feat(config): ability to disable Bitswap fully or just server (#10782)
* feat: add Bitswap configuration and related tests
* fix: update Bitswap function to use 'provide' parameter for server enablement
* docs: update changelog for Bitswap functionality changes
* fix: update Bitswap server enablement logic and improve related tests
* fix: rename BitswapConfig to Bitswap and update references
* docs: config and changelog
* fix: `ipfs cat` panic when `Bitswap.Enabled=false`

Fixes panic described in:
https://github.com/ipfs/kubo/pull/10782#discussion_r2069116219

---------

Co-authored-by: gystemd <gystemd@gmail.com>
Co-authored-by: gammazero <11790789+gammazero@users.noreply.github.com>
Co-authored-by: Giulio Piva <giulio.piva@dedicated.world>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2025-04-30 22:23:51 +02:00
b3973fa016 refactor: make datastore metrics opt-in (#10788)
* datastore: metrics optional and off by default

When ipfs is initialized, the datastore metrics wrapper is not configured by default as it previously was. To enable datastore metrics during initialization, specifying the appropriate `--profile` option.

To enable datastore metrics tracking wrapper, initialize with datastore profile name + "-measure" suffix. For example:
```
ipfs init --profile flatfs-measure
```

Closes #10767

* fix sharness tests for new datastore dafaults

* Add sharness test to check metrics added by flatfs-measure profile

* Document updated metrics in changelog

* update config doc with new profiles

* docs(changelog): separate section

* initialize non-measure pebbleds with FormatMajorVersion config

* docs: fix typos, add docs link

---------

Co-authored-by: gammazero <gammazero@users.noreply.github.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2025-04-30 22:01:24 +02:00
de168619a5 feat(pebble): support pinning FormatMajorVersion (#10789)
* Upgrade to pebble v2.0.3

- Configure latest pebble database format at init
- Do not automatically ratchet database format if set in config
- Daemon messge about new available pebble format
- Document pebble config with formatMajorVersion
- Add warning to users running badger, nudging them to switch to flatfs or pebble
- docs: explain Pebble's `FormatMajorVersion`
- Use pebbleds instead of badgerds in t0060-daemon.sh
- Print badgerds warning message to stderr
2025-04-30 12:15:55 -07:00
472674fd62 feat(pebble): support pinning FormatMajorVersion (#10789)
* Upgrade to pebble v2.0.3

- Configure latest pebble database format at init
- Do not automatically ratchet database format if set in config
- Daemon messge about new available pebble format
- Document pebble config with formatMajorVersion
- Add warning to users running badger, nudging them to switch to flatfs or pebble
- docs: explain Pebble's `FormatMajorVersion`
- Use pebbleds instead of badgerds in t0060-daemon.sh
- Print badgerds warning message to stderr
2025-04-30 12:13:56 -07:00
a5997375db feat: Provider.WorkerCount and stats reprovide (#10779)
* adjust ipfs stats provide
* update boxo dep
* bump boxo
* fixing tests
* docs/chore: mark stat reprovide as experimental
* docs: Provider.Strategy

explicitly document it is not used - without this legacy users will have
it in their config and be very confused

---------

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2025-04-30 15:32:03 +02:00
05565083df Upgrade to Boxo v0.30.0 (#10794)
* Upgrade to Boxo v0.30.0
2025-04-30 06:07:09 -07:00
ef399655d6 docs: use latest fuse package (#10791) 2025-04-29 16:26:50 +02:00
ee5665d37a remove duplicate workds (#10790) 2025-04-24 08:14:10 -07:00
6b55e64918 feat(config): ipfs add and Import options for controling UnixFS DAG Width (#10774)
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2025-04-15 22:56:38 +02:00
fe3106f9a6 feat(config): expose ProviderSearchMaxResults (#10773)
Replacing hardcoded integer with named default and expose
config option for adjusting it, like we do in Rainbow
https://github.com/ipfs/kubo/pull/10765/files#r2025455848
2025-04-09 21:17:19 +02:00
ee7fef251c feat: ipfs-webui v4.7.0 (#10780)
https://github.com/ipfs/ipfs-webui/releases/tag/v4.7.0
2025-04-09 20:58:32 +02:00
996bcf30a6 feat: partial DAG provides with Reprovider.Strategy=mfs|pinned+mfs (#10754)
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2025-04-09 18:28:29 +02:00
19b591da9f chore: update url 2025-04-08 15:17:34 +02:00
d7f0266068 docs: known issues with file/urlstores (#10768)
Co-authored-by: Andrew Gillis <11790789+gammazero@users.noreply.github.com>
2025-04-04 01:07:40 +02:00
fd50eb0fc3 fix: Add IPFS & IPNS path details to error (re. #10762) (#10770) 2025-04-01 07:28:12 -07:00
ef7cc60a5b docs: Fix typo in v0.34 changelog (#10771) 2025-04-01 07:26:38 -07:00
8b54407df1 Merge pull request #10765 from ipfs/ignore-providers
Support WithIgnoreProviders() in provider query manager
2025-04-01 10:03:08 +02:00
112eb61f66 changelog: add mention to IgnoreProviders 2025-04-01 09:53:28 +02:00
370bb9feca Merge pull request #10766 from ipfs/merge-release-v0.34.1
Merge release v0.34.1
2025-03-25 19:54:14 +01:00
2d720d4c55 Merge branch 'master' into merge-release-v0.34.1 2025-03-25 19:41:36 +01:00
4649554b71 Merge pull request #10764 from ipfs/release-v0.34.1
Release v0.34.1
v0.34.1
2025-03-25 18:32:38 +01:00
1d9e3d6c4f fix: reprovides warning (#10761) 2025-03-25 16:48:10 +01:00
d28dae2b9f fix: go-libp2p v0.41.1
https://github.com/libp2p/go-libp2p/releases/tag/v0.41.1
2025-03-25 13:52:14 +01:00
ecca2eba8e Support WithIgnoreProviders() in provider query manager
Adds `Routing.IgnoreProviders`.

This requires initializing a custom providerQueryManager and using it instead
of the default created internally in Bitswap. Since the default is created
with some internal default configuration options (MaxProviders), this hardcodes it.
2025-03-24 16:25:54 +01:00
8bf2aac931 chore: 0.34.1 2025-03-24 01:45:08 +01:00
ca2090e760 fix: quic-go v0.50.1
https://github.com/quic-go/quic-go/releases/tag/v0.50.1
2025-03-24 01:41:42 +01:00
b339490381 Merge pull request #10759 from ipfs/merge-release-v0.34.0
Merge release v0.34.0
2025-03-20 23:10:43 +01:00
4ea12c5dfb Merge branch 'master' into merge-release-v0.34.0 2025-03-20 23:09:01 +01:00
a9eb546cc4 chore: start changelog for v0.35 2025-03-20 23:05:57 +01:00
5cca561085 Merge pull request #10745 from ipfs/release-v0.34.0
Release v0.34.0
v0.34.0
2025-03-20 21:14:46 +01:00
38f255e3c4 chore: v0.34.0 2025-03-20 21:12:02 +01:00
3d875968b5 chore: v0.34.0-rc2 v0.34.0-rc2 2025-03-14 20:34:14 +01:00
0fcc990482 docs: mention Reprovider.Strategy config 2025-03-14 20:34:14 +01:00
180f6224e3 docs: ipns ttl change 2025-03-14 20:06:20 +01:00
ca4b6121ef feat: ipfs-webui v4.6 (#10756)
https://github.com/ipfs/ipfs-webui/releases/tag/v4.6.0
(cherry picked from commit b2efaa992f979f4053eee8decbb6d918da3fa247)
2025-03-14 18:21:50 +01:00
f994d94025 docs(readme): update min. requirements + cleanup (#10750)
* docs(readme): update min. requirements + cleanup

Adding note about extra memory requirement due to
ba22102a64

* docs(config): memory cost of buffered provider

Co-authored-by: Daniel Norman <1992255+2color@users.noreply.github.com>
(cherry picked from commit 96f3007b55169d5b178b4e0563ec2dda6e29d3f5)
2025-03-14 18:21:31 +01:00
441c0f590f Upgrade to Boxo v0.29.1 (#10755)
* Upgrade to Boxo v0.29.1

(cherry picked from commit 183dc7d40afb2326b11e052c8b90aab847592d5b)
2025-03-14 18:21:16 +01:00
e89d86b824 Nonfunctional (#10753)
* fix typos
* fix func name in docstring
* use t.TempDir instead of os.MkdirTemp
* fix typo
* unique option names

(cherry picked from commit 095cc0d731e3addfc2b7505763dee7a67ba895ab)
2025-03-14 18:21:08 +01:00
8af7f131e7 Update docs/changelogs/v0.34.md
(cherry picked from commit 9de938479cca7c223bf87cba17b54ce59245e207)
2025-03-14 18:20:14 +01:00