Commit Graph

1102 Commits

Author SHA1 Message Date
Gus Eggert
e550d9e476
ci: add stylecheck to golangci-lint (#9334) 2022-10-06 10:18:40 -04:00
Antonio Navarro Perez
d1b9e41fc2
feat: Delegated routing with custom configuration. (#9274)
New multi-router configuration system based on https://hackmd.io/G1KRDEX5T3qyfoBMkIrBew#Methods

- Added a new routing type: "custom"
- Added specific struct types for different Routers (instead of map[string]interface{})
- Added `Duration` config type, to make easier time string parsing
- Added config documentation.
- Use the latest go-delegated-routing library version with GET support.
- Added changelog notes for this feature.

It:
- closes #9157
- closes #9079
- closes #9186
2022-09-22 15:47:45 +02:00
Jorropo
74aaf37cec chore: bump go-libp2p v0.23.1
This does not include any WebTransport config code in Kubo, this will be done later in an other PR.
2022-09-21 23:16:03 +02:00
Jorropo
b8412efb80
Merge pull request #9244 from Jorropo/update/go-libp2p
bump go-libp2p v0.22.0 & go1.18&go1.19
2022-09-09 17:21:08 +02:00
Jorropo
196887cbe5 chore: bump go-libp2p v0.22.0 & go1.18&go1.19
Fixes: #9225
2022-09-09 17:09:38 +02:00
Winterhuman
0f3a1b3820
docs(cmds): daemon: update DHTClient description 2022-09-01 15:59:10 +02:00
Marcin Rataj
c9693edbc5 chore: remove Gateway.PathPrefixes
Closes #7702
2022-08-30 15:38:04 +02:00
Jorropo
954c6cc52e chore: fix undiallable api and gateway files
Fixes #9232
2022-08-30 11:03:17 +02:00
Marco Munizaga
27b046f98e Move register exporter to metrics file 2022-08-15 14:12:21 -07:00
Marcin Rataj
837f6ee92b chore: switch to dist.ipfs.tech
Part of https://github.com/protocol/bifrost-infra/issues/2018
ensures the domain used for fetching migrations is not
impacted by ipfs.io being blocked at DNS level by some ISPs.
2022-08-12 23:42:17 +02:00
Mark Gaiser
d419c0e95b
feat: add $IPFS_PATH/gateway file
The file contains the gateway your node is hosting in the http://<host>:<port> RFC 3986 format.
Structurally it works exactly the same as the API file.
2022-08-08 13:50:26 +02:00
Marcin Rataj
d30e71fa5a fix: kubo in daemon and cli stdout 2022-07-20 16:26:49 +02:00
Antonio Navarro Perez
92c4dc61a8
feat(routing): Delegated Routing (#8997)
* Delegated Routing.

Implementation of Reframe specs (https://github.com/ipfs/specs/blob/master/REFRAME.md) using go-delegated-routing library.

* Requested changes.

* Init using op string

* Separate possible ContentRouters for TopicDiscovery.

If we don't do this, we have a ciclic dependency creating TieredRouter.
Now we can create first all possible content routers, and after that,
create Routers.

* Set dht default routing type

* Add tests and remove uneeded code

* Add documentation.

* docs: Routing.Routers

* Requested changes.

Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>

* Add some documentation on new fx functions.

* Add changelog entry and integration tests

* test: sharness for 'dht' in 'routing' commands

Since 'routing' is currently the same as 'dht' (minus query command)
we need to test both, that way we won't have unnoticed divergence
in the default behavior.

* test(sharness): delegated routing via reframe URL

* Add more tests for delegated routing.

* If any put operation fails, the tiered router will fail.

* refactor: Routing.Routers: Parameters.Endpoint

As agreed  in https://github.com/ipfs/kubo/pull/8997#issuecomment-1175684716

* Try to improve CHANGELOG entry.

* chore: update reframe spec link

* Update go-delegated-routing dependency

* Fix config error test

* use new changelog format

* Remove port conflict

* go mod tidy

* ProviderManyWrapper to ProviderMany

* Update docs/changelogs/v0.14.md

Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>

Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>
2022-07-07 17:10:25 -04:00
Marcin Rataj
82467bc936 refactor: rename to kubo 2022-07-06 18:40:37 +02:00
Jorropo
6602dd704e
refactor: prealloc slices with known sizes (#8892)
Often those are small slices and that cuts down the number
of (small) allocations from 2~7 to 1. 
This is consistent too, always only gets 1.
2022-06-24 21:19:19 +01:00
Jorropo
a433064d72
chore: replace ioutil with io and os (#8969)
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
2022-06-14 12:37:02 -04:00
Marcin Rataj
53299e84e0
chore: mark fuse experimental (#8962)
It works only on some platforms, and does not work reliably.
This corrects our error of not setting expectations right.
2022-05-12 10:32:54 -07:00
Antonio Navarro Perez
7e488c1c16 Ensure that folder exists before moving ipfs binary.
On macOS Monterey there is no /usr/local/bin folder and we need to
create it.
2022-05-06 15:29:05 +02:00
Adin Schmahmann
1f37a1481b go fmt 2022-05-03 14:09:38 -04:00
Lucas Molas
6817fd4744 feat(cmds): allow to set the configuration file path 2022-04-22 13:03:28 -03:00
Gus Eggert
bb68a68525
feat: port collect-profiles.sh to 'ipfs diag profile' (#8786)
* feat: add block profiling to collect-profiles.sh

* feat: add more profiles to 'ipfs diag profile'

This adds mutex and block profiles, and brings the command up-to-par
with 'collect-profiles.sh', so that we can remove it.

Profiles are also now collected concurrently, which improves the
runtime from (profile_time * num_profiles) to just (profile_time).

Note that this has a backwards-incompatible change, removing
--cpu-profile-time in favor of the more general --profile-time, which
covers all sampling profiles.

* docs(cli): ipfs diag profile

* add CLI flag to select specific diag collectors

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2022-04-12 11:58:03 -04:00
Marcin Rataj
e309682545
fix: unknown fetcher type error (#8830)
match RetryFetcher as HttpFetcher
2022-04-06 02:10:13 +02:00
Gus Eggert
f855bfe6ef
feat: add basic gateway tracing (#8595)
* add deprecation warning when tracer plugins are loaded
* add response format attribute to span in gateway handler
* add note about tracing's experimental status in godoc
* add nil check for TTL when adding name span attrs
* add basic sharness test for integration with otel collector
* add nil check in UnixFSAPI.processLink
* test: sharness check all json objs for swarm span
* add env var docs to docs/environment-variables.md
* chore: pin the otel collector version
* add tracing spans per response type (#8841)
* docs: tracing with jaeger-ui

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2022-04-04 19:24:05 +02:00
Lucas Molas
d92887086f
fix(core/commands): do not cache config (#8824) 2022-03-27 08:11:45 -04:00
Lucas Molas
e14f580ba7
Merge pull request #8638 from ipfs/schomatis/fix/core/node/unwrap-fx-error
fix(core/node): unwrap fx error in node construction
2022-03-16 19:45:51 -03:00
Lucas Molas
519863ecab fix(core/node): unwrap fx error in node construction 2022-03-16 19:32:31 -03:00
Gus Eggert
5e1b2248c5
feat: add full goroutine stack dump (#8790) 2022-03-16 09:42:22 -04:00
Gus Eggert
0487f03eae
feat: add endpoint for enabling block profiling (#8469) 2022-03-11 14:32:59 -05:00
Laurent Senta
8d549f03f3 fix: rewrite dependencies over the go-ipfs-config package 2022-03-04 09:45:16 +01:00
Volker Mische
a049ba9d17
fix: installation without sudo (#8715)
* fix: installation without sudo

I think it's good practice that users don't need to run `sudo`
to install something just to try it out. With this change, the
local bin directory is tried first, which usually is also in the
`PATH`. This way the installation script can be run without
`sudo` and should still work.

* fix: try local path last and support spaces in $HOME

Try the `$HOME/.local/bin` path last, so that the script is backwards
compatible. Also make sure that it works even if there are spaces in
the directory set by `$HOME`.
2022-02-16 08:54:29 -05:00
jwh
029d82c4ea
feat: enabling pubsub and ipns-pubsub via config flags (#8510)
* Allow pubsub and namesys-pubsub to be enabled via config

Signed-off-by: Joe Holden <jwh@zorins.us>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>
2021-11-30 11:00:11 -08:00
Marcin Rataj
82c1bfa0e6 feat: hard deprecation of IPFS_REUSEPORT
Years passed and we still see it. Time to force users to switch to
LIBP2P_TCP_REUSEPORT.
2021-11-29 14:42:30 -05:00
Lucas Molas
3a84352f18
feat(cli): add daemon option --agent-version-suffix (#8419)
* feat(cli): add daemon option --agent-version-suffix
* fix sharness test when commit is empty (release)
2021-09-21 20:31:08 +02:00
Andrew Gillis
3b6f57788b
Expose additional migration APIs (#8153)
* Expose additional migration APIs

Expose migration APIs for reading migration config and creating migration fetchers.  This allows implementation of commands and external applications that want to retrieve migrations according to the Migration portion of the IPFS config.

This change also moves some functionality that is specific to fetching migrations via IPFS into the `ipfsfetcher` package.
2021-07-30 11:27:57 -07:00
Adin Schmahmann
f05f84a796
Merge pull request #8166 from ipfs/feat/bootstrap-error
feat: print error on bootstrap failure
2021-06-14 08:35:07 -07:00
Marcin Rataj
904cc73716
refactor: warning when bootstrap disabled by user
https://github.com/ipfs/go-ipfs/pull/8166#discussion_r646711067
2021-06-07 18:14:20 +02:00
Marcin Rataj
041de2aed1 fix: typo in migration error 2021-06-01 08:31:15 -07:00
Marcin Rataj
039e12a2da
feat: print error on bootstrap failure
This will print ERROR to log if daemon running in online mode has no
peers after one minute since start.
2021-05-31 15:33:21 +02:00
Bogdan Stirbat
075cc8f356
refactor(pinmfs): log error if pre-existing pin failed (#8056)
* pinmfs: log error if pin failed
* refactor: log pre-existing remote mfs pins

This cleans up debug logging and ensures we use %q for data read from
remote services. We log pre-existing pins for MFS root and print ERROR
if pin for current root has status "failed", otherwise, we log to debug.

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2021-05-17 18:13:07 +02:00
Andrew Gillis
c54cdaa1f8
Feat/migration ipfs download (#8064)
* Enable downloading migrations over IPFS

There are now options in the config file that control how migrations are downloaded. This includes enabling downloading migrations using IPFS by (when migrations are required) spinning up a temporary node for fetching the migrations before running them. There is also a config option to decide what to do with the migrations binaries once they are downloaded (e.g. cache or pin them in your node, or just throw out the data).

Co-authored-by: Steven Allen <steven@stebalien.com>
2021-05-12 09:33:14 -07:00
vyzo
aca3a20196 fix dns test 2021-05-10 21:04:55 -07:00
Marten Seemann
d91ff2102b update go-libp2p to v0.14.0 2021-05-10 20:02:45 -07:00
Adin Schmahmann
bb8260abe1 Merge pull request #7857 from ipfs/fix/separate-migrations-bins 2021-03-31 17:05:51 -04:00
Steven Allen
0a3f88823c
Merge pull request #7994 from ipfs/chore/deprecate-pathprefixes
chore: deprecate Gateway.PathPrefixes
2021-03-30 15:52:02 -07:00
Marcin Rataj
2f105f79b9
chore: deprecate Gateway.PathPrefixes
Context:
https://github.com/ipfs/go-ipfs/issues/7702#issuecomment-803136077
2021-03-30 21:17:41 +02:00
Hector Sanjuan
5ff3dd8e75 Feat: Re-import InitializeKeyspace code from go-namesys
The InitializeKeyspace functionality is go-ipfs specific but lives in the
go-namesys repo.

It is only called from initializeIpnsKeyspace, and therefore the code is
directly added to this function. The original function will be removed from
go-namesys.
2021-03-16 16:35:03 +01:00
gammazero
077266d3bd Review changes 2021-03-15 17:13:45 -07:00
Hector Sanjuan
3db9551f79 Extract the namesys and the keystore submodules
Namesys is a very useful submodule. Given a ValueStore and a Datastore it can
resolve and publish /ipns/ paths.

This functionality does not need to be sequestered inside go-ipfs as it can
and should be used without IPFS, for example, for implementing lightweight
IPNS publishing services or for resolving /ipns/ paths.

"keystore" extraction was necessary, as there is a dependency to it in
namesys. Keystore is also a useful module by itself within the stack.

Fixes #6537
2021-03-12 14:09:36 -05:00
gammazero
fcbe47bc4b Review changes 2021-02-26 11:10:56 -08:00
Steven Allen
ccc2d23730 feat: remove secio support
We've had a reliable and enabled by default TLS implementation since
0.4.23 (over a year ago) and turned off SECIO in September of last year.
We might as well remove support entirely in the next release and
encourage users to upgrade their networks.

Noise is faster, anyways.
2021-02-25 13:36:40 -08:00