Commit Graph

1072 Commits

Author SHA1 Message Date
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
gammazero
e22413ab92 go-ipfs fetches migrations using specific IPFS path 2021-02-17 19:12:09 -08:00
gammazero
e37d08f210 Migration downloads individual migration binaries
The code in this PR finds the necessary mirgations, downloads the latest version of them from the distribution site, unpacks the executables, and runs the migrations in order.

This code is also used to build the ipfs-update tool and the fs-repo-migrations tool.  Note: the fs-repo-migrations tool is only used to run stand-alone migrations now and is not used by either go-ipfs or ipfs-update.

Additional utility is provided by this PR, that is not specific to migrations:
- Find local ipfs directory
- Get current repo version
- Check for ipfs daemon availability
- Get version information about any distribution on distribution site
- Fetch and unpack any binary executable over ipfs or http
2021-01-29 13:10:44 -08:00
Petar Maymounkov
8794928c31
add remote pinning policy for mfs (#7798)
* remote pinning service MFS policy
* update go-ipfs-config
* hardening secret sanitization in `ipfs config` commands

Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2021-01-28 18:58:44 -05:00
Andrew Gillis
6f6f04543b
Improve error message when running key command that locks repo (#7821)
* Improve error message when running key commands that must be run when the daemon is not already running

Fixes Issue #7814

`ipfs key export` now does a PreRun check like `ipfs key rotate` was to give a better error to the user then "someone else has the lock" in the event that the daemon is running while trying to execute these offline-only commands.

While unlikely the "someone else has the lock" error can still be shown if two processes try and grab the repo lock at the same time.

This PreRun function is also exported so it can be used by `ipfs init` where it was originally copied from.

* Added more `ipfs key` command tests

When daemon is running:
- Test that import works
- Test that export fails
- Test that rotate fails
2021-01-28 15:15:49 -05:00
lanzafame
3d9821260a register quic opencensus metrics 2020-12-08 20:22:38 -05:00
Adin Schmahmann
91c1aaa1b5 fix: do not create and print out an unused new peerID when initializing from a config 2020-10-19 18:24:13 -04:00
Fazlul Shahriar
cac753bb18
fix build on Plan 9
Fixes #7575
Fixes #7671
2020-09-23 22:27:01 -04:00
Adin Schmahmann
b88bdfeb9d chore: update go-multiaddr and go-multiaddr-net 2020-08-25 15:24:48 -04:00
Petar Maymounkov
ece0cda10d switch ipfs init default key 2020-08-19 08:31:44 -07:00
Adin Schmahmann
0f658484d1 move key rotation command to ipfs key rotate 2020-08-17 07:26:47 -04:00
Adin Schmahmann
692e9f59ff refactor: get rid of cmdDetails awkwardness 2020-08-04 18:28:40 -04:00
Petar Maymounkov
2c255eab24 feat: implement ipfs rotate command for rotating the ID keys for the node 2020-07-15 19:04:34 -04:00
Petar Maymounkov
4674f770b7 Choosable key types at initialization
* add support for choosing a peer key type (e.g. RSA or Ed25519) when initializing the repo
* test all variants of ipfs init: RSA, Ed25519 and default
* update subdomain gateway sharness test to publish IPNS using RSA and
Ed25519 keys
* use default identity bit lengths defined in config repo instead of
having separate defaults in go-ipfs
* update config repo dependency

Co-authored-by: Will Scott <will@cypherpunk.email>
Co-authored-by: Petar Maymounkov <petarm@gmail.com>
2020-07-14 14:42:49 -04:00
Steven Allen
e164af1f2a feat: add a transport config section
This way, users can disable transports (especially QUIC), and set muxer/security
transport priorities.
2020-06-16 15:15:47 -07:00
Dimitris Apostolou
1e437c7e97
Fix typos and cleanup 2020-04-20 22:00:01 +03:00
Roman Khafizianov
90b7b53a40
fix the typo in the serveHTTPApi
It looks like the incorrect address passed into the logger in case of error
2020-04-14 13:24:49 +03:00
Steven Allen
56e0e18294 feat: add a dhtserver option 2020-04-06 18:53:16 -07:00
Peter Rabbitson
5be6e26f7b Forgotten go-fmt
Not sure why CI didn't catch this
2020-03-25 15:03:17 +01:00
Marcin Rataj
3ecccd6e1d feat(gateway): subdomain and proxy gateway
License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
2020-03-18 08:50:38 -07:00
Steven Allen
11c229bb14 rename ProxyOption to P2PProxyOption
(we're implementing an _actual_ proxy)

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2020-03-17 19:34:44 -07:00
Dominic Della Valle
3c9039a00b cmd: ipfs handle GUI environment on Windows 2020-03-12 16:15:23 -07:00
Hector Sanjuan
7c6e212b2d Update the license distributed with dist builds to the dual one
This was an old leftover
2020-02-06 22:27:15 +01:00
Steven Allen
a53d48059b fix: migrate from deprecated warning function 2020-01-28 21:20:21 -08:00
Steven Allen
c2d1f3a6a3 chore(dep): update deps
Update all deps.
2020-01-28 21:20:17 -08:00
flowed
07cbba7c40 Fix Typos 2019-12-25 03:12:41 +00:00
Steven Allen
9f1249c65b fix: use libp2p keysizes 2019-12-05 13:26:46 -05:00
Michael Muré
2a9e5005da
plugins: introduce PluginDaemonInternal to directly interact with IpfsNode 2019-11-22 13:18:44 +01:00
Steven Allen
460c2119e4 daemon: support unix domain sockets for the API/gateway
All the work was client-side. Unix domain socket multiaddrs already worked
server-side.

fixes #4218
2019-09-30 17:21:28 -07:00
Steven Allen
164dd287be
Merge pull request #6675 from ipfs/feat/systemd-activation
add systemd support
2019-09-30 15:22:44 -07:00
Oli Evans
bbe2f5077e
feat: add ipfs version info to prometheus metrics
Adds `ipfs_info` prometheus metric with version and commit info

```prometheus
ipfs_info{commit="9ea7c6a11-dirty",version="0.5.0-dev"} 1
```

This follows the same pattern as go and other systems, adding a gauge metric that is set to 1, with the version info addeds as labels.

This is a common pattern for prometheus. It lets operators merge version info into other prometheus metrics by multiplying it with the other stat, as described in https://www.robustperception.io/exposing-the-software-version-to-prometheus

For example, we already expose the go version info as

```prometheus
go_info{version="go1.12.9"} 1
```

License: MIT
Signed-off-by: Oli Evans <oli@tableflip.io>
2019-09-30 15:41:29 +01:00