1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-05-17 23:16:11 +08:00

2282 Commits

Author SHA1 Message Date
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
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
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
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
095cc0d731 Nonfunctional (#10753)
* fix typos
* fix func name in docstring
* use t.TempDir instead of os.MkdirTemp
* fix typo
* unique option names
2025-03-11 14:04:16 -07:00
e221e941c7 fix(mfs): basic UnixFS sanity checks in files cp (#10701)
Signed-off-by: Abhinav Prakash <abhinav.prakash319@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Andrew Gillis <11790789+gammazero@users.noreply.github.com>
2025-03-05 20:40:33 +01:00
40a7a388a4 fix: switch away from IPFS_LOG_LEVEL (#10694) 2025-02-14 18:25:31 +00:00
d137d7a4ad Remove unused TimeParts struct (#10708) 2025-02-11 14:35:19 -08:00
e77a484aa8 fix(rpc): restore and reprecate bitswap reprovide (#10699)
https://github.com/ipfs/kubo/pull/10677 removed command without properly
deprecating it first, this restores it and marks as deprecated

we can remove it after at least 1 release with deprecation being
announced
2025-02-10 16:12:53 +01:00
b35555978d feat: Better self-service commands for DHT providing (#10677)
* Add lastRun, NextRun, move reprovide cmd to routing.
* acceleratedDHT logic
* changelog
* depend on latest boxo

---------

Co-authored-by: guillaumemichel <guillaume@michel.id>
Co-authored-by: Guillaume Michel <guillaumemichel@users.noreply.github.com>
2025-01-31 16:33:11 +01:00
5d143a25c1 fix: config help (#10686) 2025-01-30 21:01:37 +01:00
9adab295e0 feat: Add CI for Spell Checking (#10637)
* Create spellcheck.yml
* Create .codespell-ignore
---------

Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Guillaume Michel <guillaumemichel@users.noreply.github.com>
2025-01-30 17:50:51 +01:00
7383e1ecbb chore: fix typos and comment formatting (#10653)
* fix typos and comment formatting
2025-01-06 18:17:39 -08:00
a4d13e3f6b Add example of setting array to config command help
Closes #10645
2025-01-02 10:55:19 -10:00
9425421114 collection of typo fixes (#10647) 2024-12-29 21:27:41 -08:00
519ae27dce feat: expose BlockKeyCacheSize and enable WriteThrough datastore options (#10614)
* feat: expose BlockKeyCacheSize and enable WriteThrough when bloom filter disabled
* import/config: add BatchMaxSize and BatchMaxNodes
* config: make BlockKeyCacheSize an OptionalInteger
* config: add and wire datastore.WriteThrough option
* config: omitempty on BlockKeyCacheSize
* changelog: rewrite entry about new options for the datastore
* config: add docs for BatchMaxNodes and BatchMaxSize
* config: make WriteThrough an optional Flag
* changelog: improve description of new datastore/import options
* refactor: DefaultWriteThrough as bool
* chore: boxo v0.26.0
* docs: config and changelog fixes
2024-12-19 23:12:05 +00:00
ecb25581c6 cmd/files: flush parent folders (#10630)
* cmd/files: flush parent folders

This is a mitigation to increased MFS memory usage in the course of many writes operations.

The underlying issue is the unbounded growth of the mfs directory cache in
boxo. In the latest boxo version, this cache can be cleared by calling Flush()
on the folder. In order to trigger that, we call Flush() on the parent folder
of the file/folder where the write-operations are happening.

To flushing the parent folder allows it to grow unbounded. Then, any read
operation to that folder or parents (i.e. stat), will trigger a sync-operation to match
the cache to the underlying unixfs structure (and obtain the correct node-cid).

This sync operation must visit every item in the cache. When the cache has grown too much,
and the underlying unixfs-folder has switched into a HAMT, the operation can take minutes.

Thus, we should clear the cache often and the Flush flag is a good indicator
that we can let it go. Users can always run with --flush=false and flush at
regular intervals during their MFS writes if they want to extract some performance.

Fixes #8694, #10588.

* cmd/files: docs and changelog for --flush changes
2024-12-19 14:07:17 -08:00
642e58ef3b chore: use errors.New to replace fmt.Errorf with no parameters (#10617) 2024-12-10 13:50:35 -08:00
433444b609 fix(cmds/add): disallow --wrap with --to-files (#10612)
Close #10611
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2024-12-03 21:49:18 +01:00
224d6a3ba4 refactor(cmds): do not return errors embedded in result type (#10527)
incl. https://github.com/ipfs/boxo/pull/738
2024-12-03 20:15:33 +01:00
37c5060742 Update to boxo with refactored providerQueryManager. (#10595) 2024-11-26 03:34:06 -08:00
ca4f486781 refactor: simplify logic for MFS pinning (#10506) 2024-09-27 15:37:47 +02:00
2260e35df2 chore: upgrade to go 1.23 (#10486)
* chore: upgrade to go 1.23

https://tip.golang.org/doc/go1.23

* refactor: golangci-lint v1.60.2
2024-08-28 18:56:45 +02:00
263edb251e feat: Support storing UnixFS 1.5 Mode and ModTime (#10478)
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2024-08-21 02:02:46 +02:00
225dbe6c03 feat: periodic version check and json config (#10438)
Co-authored-by: Lucas Molas <schomatis@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2024-07-24 23:42:19 +02:00
a07852a3f0 fix(cli): unify --name param in ls and add (#10439)
This is a cosmetic fix for bug found during testing 0.29.0-rc2.
pin add --name had shorthand -n
pin ls --name had no shorthand, and --names had -n

This unifies -n making it a shorthand for the same parameter in both
`pin ls` and `pin add`.
2024-06-06 22:19:23 +02:00
75df4e8173 refactor: stop using github.com/pkg/errors (#10431) 2024-05-26 11:04:40 +00:00
bde3a42940 chore: fix --help text
https://github.com/ipfs/kubo/pull/10412 changed to be partial match
but we forgot to update --help text
2024-05-14 16:20:00 +02:00
8022e13a6b config: introduce Import section (#10421)
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2024-05-14 14:17:04 +00:00
IGP
ae05085644 feat: enables searching pins by name (#10412)
Co-authored-by: Henrique Dias <mail@hacdias.com>
2024-05-14 11:05:35 +00:00
9047fed8d5 core/commands!: remove deprecated object APIs (#10375) 2024-03-22 09:32:30 +01:00
0bdfe94272 docs: remove repetitive words (#10370)
Signed-off-by: shuangcui <fliter@qq.com>
2024-03-19 12:10:34 +01:00
e22f47ae4b core/corehttp!: remove /api/v0 from gateway port 2024-03-05 08:21:13 +00:00
eb7f663514 commands/add: return an error when using --only-hash and --to-files
In that situation, the data is not written to permanent storage, so a reference in MFS would be to p2p blocks at best.

The /add command in that situation is also likely to hang as it reads immediately the root node without being able to get it (it falls back to bitswap).
2024-02-08 17:49:43 +01:00
1ef8f83a41 core/commands: remove 'ipfs dht' commands, except 'query' (#10328) 2024-02-07 09:56:30 +00:00
c0d7da22a2 docs(cli): name inspect --verify (#10308)
Co-authored-by: Daniel Norman <1992255+2color@users.noreply.github.com>
2024-01-17 14:59:02 +00:00
2738b49c1a profile: add trace 2024-01-12 14:55:55 +01:00
8a421868f0 feat(pinning): allow for overwriting pin name 2024-01-09 10:25:35 +01:00
a8a6bbe929 feat: support optional pin names (#10261) 2024-01-04 14:25:06 +01:00
5c31db3a3d commands: remove several deprecated commands
Removes the following commands: ipfs tar, ipfs urlstore, ipfs repo fsck, ipfs file ls, ipfs dns.
2023-12-12 18:21:52 +01:00
8ab2de5ff0 feat: ipfs key sign|verify (#10235) 2023-12-04 09:51:26 +01:00
7b05b5dd33 docs(cli): fix spelling
this fixes lint errors in RPC docs that were raised by vole in
https://github.com/ipfs/ipfs-docs/pull/1772
so we don't get them in kubo 0.25
2023-12-04 09:40:21 +01:00
58c29399cf chore: clean migration 2023-11-29 12:29:59 +01:00
01cc5eab57 feat(rpc): Opt-in HTTP RPC API Authorization (#10218)
Context: https://github.com/ipfs/kubo/issues/10187
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2023-11-17 01:29:29 +01:00
670ce7043e fix: regression in 'ipfs dns'
this command used to work with domain without `/ipns/` prefix.

we've switched it to the same backend as `resolve` command,
which requires the prefix, so we add it if it is missing
2023-11-09 10:23:25 +01:00
846310e5ac fix: allow event emitting to happen in parallel with getting the query channel 2023-11-08 10:03:55 +01:00
9371d18b53 fixes to routing put command (#10205)
* fix(commands): routing put command returns the IPNS ID rather than the host's ID

* fix(commands): routing put command errors with the allow-offline hint if the error is an offline error

* fix: test expects correct error message

---------

Co-authored-by: Henrique Dias <hacdias@gmail.com>
2023-11-08 01:07:10 -05:00
a0f34b16dd feat: built-in content blocking based on IPIP-383 (#10161)
Fixes #8492

This introduces "nopfs" as a preloaded plugin into Kubo
with support for denylists from https://github.com/ipfs/specs/pull/383

It automatically makes Kubo watch *.deny files found in:

- /etc/ipfs/denylists
- $XDG_CONFIG_HOME/ipfs/denylists
- $IPFS_PATH/denylists

* test: Gateway.NoFetch and GatewayOverLibp2p

adds missing tests for "no fetch" gateways one can expose,
in both cases the offline mode is done by passing custom
blockservice/exchange into path resolver, which means
global path resolver that has nopfs intercept is not used,
and the content blocking does not happen on these gateways.

* fix: use offline path resolvers where appropriate

this fixes the problem described in
https://github.com/ipfs/kubo/pull/10161#issuecomment-1782175955
by adding explicit offline path resolvers that are backed
by offline exchange, and using them in NoFetch gateways
instead of the default online ones

---------

Co-authored-by: Henrique Dias <hacdias@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2023-10-28 05:34:14 +02:00
4695fd9fed refactor: namesys cleanup, gateway /ipns/ ttl (#10115) 2023-10-18 10:23:50 +02:00