1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-08-06 19:44:01 +08:00

71 Commits

Author SHA1 Message Date
889f73e90e Add 'ipfs repo migrate' command (#8428)
* Add 'ipfs repo migrate' command

This PR replaces #7658 that was originally contributed by zaibons, in order to move code into a branch and avoid some CI problem.

The command allows the user to run the repo migration without starting the daemon.

resolves #7471

* return non-ErrNeedMigration errors from fsrepo.Open()

Co-authored-by: Gus Eggert <gus@gus.dev>
2022-05-06 17:34:51 -04:00
514411bedb feat: opt-in Swarm.ResourceMgr (go-libp2p v0.18) (#8680)
* update go-libp2p to v0.18.0

* initialize the resource manager

* add resource manager stats/limit commands

* load limit file when building resource manager

* log absent limit file

* write rcmgr to file when IPFS_DEBUG_RCMGR is set

* fix: mark swarm limit|stats as experimental

* feat(cfg): opt-in Swarm.ResourceMgr

This ensures we can safely test the resource manager without impacting
default behavior.

- Resource manager is disabled by default
    - Default for Swarm.ResourceMgr.Enabled is false for now
- Swarm.ResourceMgr.Limits allows user to tweak limits per specific
  scope in a way that is persisted across restarts
- 'ipfs swarm limit system' outputs human-readable json
- 'ipfs swarm limit system new-limits.json' sets new runtime limits
  (but does not change Swarm.ResourceMgr.Limits in the config)

Conventions to make libp2p devs life easier:
- 'IPFS_RCMGR=1 ipfs daemon' overrides the config and enables resource manager
- 'limit.json' overrides implicit defaults from libp2p (if present)

* docs(config): small tweaks

* fix: skip libp2p.ResourceManager if disabled

This ensures 'ipfs swarm limit|stats' work only when enabled.

* fix: use NullResourceManager when disabled

This reverts commit b19f7c9eca4cee4187f8cba3389dc2c930258512.
after clarification feedback from
https://github.com/ipfs/go-ipfs/pull/8680#discussion_r841680182

* style: rename IPFS_RCMGR to LIBP2P_RCMGR

preexisting libp2p toggles use LIBP2P_ prefix

* test: Swarm.ResourceMgr

* fix: location of opt-in limit.json and rcmgr.json.gz

Places these files inside of IPFS_PATH

* Update docs/config.md

* feat: expose rcmgr metrics when enabled (#8785)

* add metrics for the resource manager
* export protocol and service name in Prometheus metrics
* fix: expose rcmgr metrics only when enabled

Co-authored-by: Marcin Rataj <lidel@lidel.org>

* refactor: rcmgr_metrics.go

* refactor: rcmgr_defaults.go

This file defines implicit limit defaults used when Swarm.ResourceMgr.Enabled

We keep vendored copy to ensure go-ipfs is not impacted when go-libp2p
decides to change defaults in any of the future releases.

* refactor: adjustedDefaultLimits

Cleans up the way we initialize defaults and adds a fix for case
when connection manager runs with high limits.

It also hides `Swarm.ResourceMgr.Limits` until we have a better
understanding what syntax makes sense.

* chore: cleanup after a review

* fix: restore go-ipld-prime v0.14.2

* fix: restore go-ds-flatfs v0.5.1

Co-authored-by: Lucas Molas <schomatis@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2022-04-07 21:06:35 -04:00
c89110920e feat: multibase transcode command (#8403)
* Add a transcoder command to multibase

In order to more easily facilitate the conversion
between multibase formats, include a transcode command
to avoid `multibase decode | multibase encode`

* Example code needed go mod tidy

Co-authored-by: gammazero <gammazero@users.noreply.github.com>
2021-09-21 20:19:40 +02:00
a651045c50 feature: 'ipfs swarm peering' command (#8147)
* feat: added swarm peering command supporting add, ls and rm

Co-authored-by: Steven Allen <steven@stebalien.com>
2021-09-15 07:46:16 -07:00
7db27bf83a feat: add 'ipfs multibase' commands (#8180)
* add multibase helper commands (encode, decode, list)

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2021-08-18 16:48:39 -04:00
77f3fed5a1 feat(ipfs diag profile): help text 2021-07-21 15:50:29 -07:00
0060d5f7c8 feat: programmatic shell completions
These are missing some of the features of the current hand-rolled
completions, but:

1. Are less buggy.
2. Cover _all_ commands.
3. Don't need to be manually maintained (which we never do anyways).

fixes #4551
fixes #8033
2021-07-01 08:46:49 -07:00
cf45f1a862 added support for an experimental batched provider system
The batched provider system is enabled when the experimental AcceleratedDHTClient is enabled

There is also an `ipfs stats provide` command which gives stats about the providing/reproviding system when the batched provider system is enabled
2021-05-14 01:47:48 -07:00
7406b83990 test: dag export in TestROCommands on gateway 2021-05-05 22:32:28 +02:00
a8c7980721 add remote pinning to ipfs command (#7661)
Added support for remote pinning services

A pinning service is a service that accepts CIDs from a user in order to host the data associated with them.
The spec for these services is defined at https://github.com/ipfs/pinning-services-api-spec

Support is available via the `ipfs pin remote` CLI and the corresponding HTTP API

Co-authored-by: Petar Maymounkov <petarm@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>
2020-12-08 20:32:33 -05:00
8ae5aa56d1 add ipfs dag stat command (#7553)
* commands: add ipfs dag stat command
* sharness: add ipfs dag stat tests
2020-08-17 14:29:36 -04:00
0f658484d1 move key rotation command to ipfs key rotate 2020-08-17 07:26:47 -04:00
a70d04b68f remove ipfs key identify command 2020-07-30 16:26:40 -04:00
a0656402ed Key import and export cli commands 2020-07-16 22:25:37 +09:00
5751917f49 feat: add a stats dht command
Currently, it just prints out the routing tables.
2020-05-14 23:32:18 -07:00
90c58d6cac Dag import functionality only ( no progress )
This still works over "loosely defined" .car files
Please refer to the sharness tests for extra info

We can tighten this up if the sentiment is "Postel was wrong"
2020-04-08 14:54:49 -07:00
1a85fddfeb For now remove export from the gateway whitelist 2020-04-08 14:54:49 -07:00
635e333d60 Dag export command, silent, no progress 2020-04-08 14:54:49 -07:00
28fc6a1be0 test: remove version/deps from ro commands test
Because steb did a bad thing and pushed to master. Not sure _why_ my pre-commit
hook didn't catch this but...

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-04-04 14:55:07 -07:00
5a1a03bd8f feat: add version deps command
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2019-04-04 21:50:16 +02:00
42e191c017 gx: unrewrite
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2019-03-05 18:33:56 +01:00
3fa1bfe1bc gx: update cmds and flatfs
fixes #6028, fixes crash when writing after closing on flatfs.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-03-01 12:17:49 -08:00
f227862e88 gx: update go-ipfs-cmds, go-bitswap, go-libp2p-kad-dht, and go-mplex
Fixes the latest batch of bugs found in RC testing.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-02-27 12:39:24 -08:00
3c2536dd81 gx: update go-ipfs-cmds
fixes #6021

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-02-25 16:45:43 -07:00
2f17b951c2 gx: update deps
* Updates go-ipfs-cmds to try to get the tests to pass on travis.
* While we're at it, fix duplicate gx deps.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-02-19 13:12:21 -08:00
28cf3de0f9 Update protobuf
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2019-02-18 20:46:22 +01:00
e97a60b073 gx: update go-ipfs-files
fix compatibility issue with js-ipfs

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-02-11 10:48:58 -08:00
7c2aa0e9a9 gx: update go-unixfs to propagate archive changes
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2019-01-30 20:58:32 +01:00
ab270fbaa7 Bubble go-ipfs-cmds 2.0.10
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2019-01-10 21:31:11 +01:00
0618fd77be gx: update go-ipfs-files to 2.0
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2018-12-20 13:52:20 +01:00
90926ca5c7 gx: update go-ipfs-cmds
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-12-12 16:35:42 -08:00
0d80fc54c3 gx: update go-log and sha256
fixes #5709

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-11-02 21:17:20 -07:00
38cae95f30 gx: update go-ipfs-cmds to 2.0.5
License: MIT
Signed-off-by: Dominic Della Valle <ddvpublic@gmail.com>
2018-10-26 19:50:32 -04:00
37f0fd92c7 gx: update go-ipfs-cmds
(no code changes)

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-10-26 09:26:53 -07:00
59e5a9c652 gx: update to use extracted go-ipfs-files
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2018-10-18 10:16:31 +02:00
57f96019f7 Provide new "cid" sub-command.
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2018-10-01 14:05:27 -04:00
dac058f8be gx: update go-log go-ipld-cbor
(and friends)

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-09-24 05:36:29 -07:00
b7484c1bca gx: update go-ipfs-cmds to the final release
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-09-19 14:36:08 -07:00
f4b32e36f4 update cmds to 2.0.0-rc1
License: MIT
Signed-off-by: keks <keks@cryptoscope.co>
2018-09-19 14:35:54 -07:00
ef21c3bfab update go-ipfs-cmds to 2.0.0-beta2
License: MIT
Signed-off-by: keks <keks@cryptoscope.co>
2018-09-19 14:35:54 -07:00
908ffddc1b big squash commit
excerpt of commit messages:
- update postrun functions in core/commands
- sharness: allow setting -i with TEST_IMMEDIATE=1
- cmds Run func returns error now
- gx update cmdkit to 1.1.2 and cmds to 2.0.0-beta1

License: MIT
Signed-off-by: keks <keks@cryptoscope.co>
2018-09-19 14:35:54 -07:00
f5ab137fc0 p2p: split forward into 2 commands
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2018-09-11 04:57:40 +02:00
0465079f35 p2p: fix ci
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2018-09-11 04:57:40 +02:00
db45c4d0d9 remove bitswap unwant
This command messes with internal state and doesn't even work at the moment. If
you don't want a block, you should cancel the request that's trying to fetch it.

fixes #5295

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-08-28 10:21:10 -07:00
656d7cc1a6 gx: update go-cid, go-libp2p-peer, go-ipfs-cmds, go-ipfs-cmdkit
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-08-21 17:39:56 -07:00
f0769366f1 update cmdkit to fix the progress bar
The progressbar should now correctly calculate the size of a directory (by
ignoring the directory sizes).

fixes #5288

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-08-10 17:21:28 -07:00
594d95af5d update gogo-protobuf
fixes #3214

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-08-08 18:56:13 -07:00
1a835202b2 filestore: add URLStore
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2018-07-13 09:04:22 -04:00
3eba14aa24 gx update
Updates:

* go-kad-dht: Query performance improvements, DHT client fixes, validates
  records on *local* put.
* go-libp2p-swarm/go-libp2p-transport: Timeout improvements.
* go-multiaddr-net: Exposes useful Conn methods (CloseWrite, CloseRead, etc.)
* go-log: fixes possible panic when enabling/disabling events.
* go-multiaddr: fixes possible panic when stringifying malformed multiaddrs,
  adds support for consuming /p2p/ multiaddrs.

fixes #5113
unblocks #4895

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-06-26 17:11:33 -07:00
85acad9a01 gx update go-log, sys, go-crypto
* go-log
* sys
* go-crypto

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-06-08 22:36:24 -07:00