fix: hint people to changing from RSA peer ids
Jorropo committed
Dec 14, 2022 at 18:56 UTC
f54b2bcf6061219f7f481e8660e6707ae3bc3c38
2 files changed
+18
-1
cmd/ipfs/daemon.go
+17
@@ -30,6 +30,7 @@ import (
30
fsrepo "github.com/ipfs/kubo/repo/fsrepo"
31
"github.com/ipfs/kubo/repo/fsrepo/migrations"
32
"github.com/ipfs/kubo/repo/fsrepo/migrations/ipfsfetcher"
33
+ p2pcrypto "github.com/libp2p/go-libp2p/core/crypto"
34
pnet "github.com/libp2p/go-libp2p/core/pnet"
35
sockets "github.com/libp2p/go-socket-activation"
36
@@ -459,6 +460,22 @@ func daemonFunc(req *cmds.Request, re cmds.ResponseEmitter, env cmds.Environment
460
461
printSwarmAddrs(node)
462
463
+ if node.PrivateKey.Type() == p2pcrypto.RSA {
464
+ fmt.Print(`
465
+Warning: You are using an RSA Peer ID, which was replaced by Ed25519
466
+as the default recommended in Kubo since September 2020. Signing with
467
+RSA Peer IDs is more CPU-intensive than with other key types.
468
+It is recommended that you change your public key type to ed25519
469
+by using the following command:
470
+
471
+ ipfs key rotate -o rsa-key-backup -t ed25519
472
+
473
+After changing your key type, restart your node for the changes to
474
+take effect.
475
+
476
+`)
477
+ }
478
+
479
defer func() {
480
// We wait for the node to close first, as the node has children
481
// that it will wait for before closing, such as the API server.
docs/changelogs/v0.18.md
+1
-1
@@ -159,7 +159,7 @@ To support QUICv1 and WebTransport by default a new config migration (`v13`) is
159
To help protect nodes from DoS (resource exhaustion) and eclipse attacks,
160
Kubo enabled the [go-libp2p Network Resource Manager](https://github.com/libp2p/go-libp2p/tree/master/p2p/host/resource-manager)
161
by default in [Kubo 0.17](https://github.com/ipfs/kubo/blob/master/docs/changelogs/v0.17.md#libp2p-resource-management-enabled-by-default).
162
-
162
+
163
Introducing limits like this by default after the fact is tricky,
164
and various improvements have been made to improve the UX including:
165
1. [Dedicated docs concerning the resource manager integration](https://github.com/ipfs/kubo/blob/master/docs/libp2p-resource-management.md). This is a great place to go to learn more or get your FAQs answered.