From aa169520cd5cdad9810a095243d32b09e43e3339 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Tue, 26 May 2020 00:19:55 -0700 Subject: [PATCH 01/45] feat: bump version to 0.6.0-rc1 --- version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.go b/version.go index ef2eb93f4..fc3a15b95 100644 --- a/version.go +++ b/version.go @@ -4,7 +4,7 @@ package ipfs var CurrentCommit string // CurrentVersionNumber is the current application's version literal -const CurrentVersionNumber = "0.6.0-dev" +const CurrentVersionNumber = "0.6.0-rc1" const ApiVersion = "/go-ipfs/" + CurrentVersionNumber + "/" From e6c84577024a4271034d1901edc0390478d81129 Mon Sep 17 00:00:00 2001 From: Adin Schmahmann Date: Wed, 27 May 2020 18:38:45 -0400 Subject: [PATCH 02/45] chore: update deps --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index f30d8b217..9f220d4ff 100644 --- a/go.mod +++ b/go.mod @@ -66,7 +66,7 @@ require ( github.com/libp2p/go-libp2p-core v0.5.6 github.com/libp2p/go-libp2p-discovery v0.4.0 github.com/libp2p/go-libp2p-http v0.1.5 - github.com/libp2p/go-libp2p-kad-dht v0.8.0 + github.com/libp2p/go-libp2p-kad-dht v0.8.1 github.com/libp2p/go-libp2p-kbucket v0.4.2 github.com/libp2p/go-libp2p-loggables v0.1.0 github.com/libp2p/go-libp2p-mplex v0.2.3 diff --git a/go.sum b/go.sum index 8ef94f4f6..c25ecb2cd 100644 --- a/go.sum +++ b/go.sum @@ -637,6 +637,8 @@ github.com/libp2p/go-libp2p-interface-connmgr v0.0.5/go.mod h1:GarlRLH0LdeWcLnYM github.com/libp2p/go-libp2p-interface-pnet v0.0.1/go.mod h1:el9jHpQAXK5dnTpKA4yfCNBZXvrzdOU75zz+C6ryp3k= github.com/libp2p/go-libp2p-kad-dht v0.8.0 h1:vfqDTa/dUlNVlK3nL1b9pTMV9/hhIr4sDjUVk0VEtFQ= github.com/libp2p/go-libp2p-kad-dht v0.8.0/go.mod h1:u3rbYbp3CSraAHD5s81CJ3hHozKTud/UOXfAgh93Gek= +github.com/libp2p/go-libp2p-kad-dht v0.8.1 h1:PS/mgLSzFqH5lS3PnnxcqsIrHy+qbQ5GkhzcrT12LyA= +github.com/libp2p/go-libp2p-kad-dht v0.8.1/go.mod h1:u3rbYbp3CSraAHD5s81CJ3hHozKTud/UOXfAgh93Gek= github.com/libp2p/go-libp2p-kbucket v0.4.2 h1:wg+VPpCtY61bCasGRexCuXOmEmdKjN+k1w+JtTwu9gA= github.com/libp2p/go-libp2p-kbucket v0.4.2/go.mod h1:7sCeZx2GkNK1S6lQnGUW5JYZCFPnXzAZCCBBS70lytY= github.com/libp2p/go-libp2p-loggables v0.0.1/go.mod h1:lDipDlBNYbpyqyPX/KcoO+eq0sJYEVR2JgOexcivchg= From bd9382fe41e2946ac80ee4156ed4c11d3defc311 Mon Sep 17 00:00:00 2001 From: Shotaro Yamada Date: Thu, 28 May 2020 10:53:25 +0900 Subject: [PATCH 03/45] chore: update WebUI to 2.8.0 (cherry picked from commit 58aac04a53d60d683cbe64fc26f6b0abac4e855b) --- core/corehttp/webui.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/corehttp/webui.go b/core/corehttp/webui.go index 02f2da73a..22143e49a 100644 --- a/core/corehttp/webui.go +++ b/core/corehttp/webui.go @@ -1,11 +1,12 @@ package corehttp // TODO: move to IPNS -const WebUIPath = "/ipfs/bafybeidatpz2hli6fgu3zul5woi27ujesdf5o5a7bu622qj6ugharciwjq" +const WebUIPath = "/ipfs/bafybeicp23nbcxtt2k2twyfivcbrc6kr3l5lnaiv3ozvwbemtrb7v52r6i" // this is a list of all past webUI paths. var WebUIPaths = []string{ WebUIPath, + "/ipfs/bafybeidatpz2hli6fgu3zul5woi27ujesdf5o5a7bu622qj6ugharciwjq", "/ipfs/QmfQkD8pBSBCBxWEwFSu4XaDVSWK6bjnNuaWZjMyQbyDub", "/ipfs/QmXc9raDM1M5G5fpBnVyQ71vR4gbnskwnB9iMEzBuLgvoZ", "/ipfs/QmenEBWcAk3tN94fSKpKFtUMwty1qNwSYw3DMDFV6cPBXA", From 5be7e0f8dea4595496dcfa1e52a9380e1f83e551 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Thu, 28 May 2020 23:04:35 +0200 Subject: [PATCH 04/45] feat: webui v2.9.0 (cherry picked from commit 0f76ed79f97de7d2c886385ada0030b2e8ee42c8) --- core/corehttp/webui.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/corehttp/webui.go b/core/corehttp/webui.go index 22143e49a..f94df7850 100644 --- a/core/corehttp/webui.go +++ b/core/corehttp/webui.go @@ -1,11 +1,12 @@ package corehttp // TODO: move to IPNS -const WebUIPath = "/ipfs/bafybeicp23nbcxtt2k2twyfivcbrc6kr3l5lnaiv3ozvwbemtrb7v52r6i" +const WebUIPath = "/ipfs/bafybeigkbbjnltbd4ewfj7elajsbnjwinyk6tiilczkqsibf3o7dcr6nn4" // v2.9.0 // this is a list of all past webUI paths. var WebUIPaths = []string{ WebUIPath, + "/ipfs/bafybeicp23nbcxtt2k2twyfivcbrc6kr3l5lnaiv3ozvwbemtrb7v52r6i", "/ipfs/bafybeidatpz2hli6fgu3zul5woi27ujesdf5o5a7bu622qj6ugharciwjq", "/ipfs/QmfQkD8pBSBCBxWEwFSu4XaDVSWK6bjnNuaWZjMyQbyDub", "/ipfs/QmXc9raDM1M5G5fpBnVyQ71vR4gbnskwnB9iMEzBuLgvoZ", From cee60700b9208cf963dd4977db8deb7b3cdb80fc Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Thu, 28 May 2020 17:12:00 -0700 Subject: [PATCH 05/45] fix: use bitswap sessions for ipfs refs This isn't perfect (we only use sessions after resolving the root cid) but it's better than what we have. The real solution is #7198 so we can use sessions everywhere. (cherry picked from commit 62f61c588d75ceafa1974f0584ffbf35950be2ca) --- core/commands/refs.go | 22 ++++++++++++++-------- core/coreapi/dag.go | 10 ++++++++++ 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/core/commands/refs.go b/core/commands/refs.go index 4a7285cc9..828853e38 100644 --- a/core/commands/refs.go +++ b/core/commands/refs.go @@ -13,6 +13,7 @@ import ( cidenc "github.com/ipfs/go-cidutil/cidenc" cmds "github.com/ipfs/go-ipfs-cmds" ipld "github.com/ipfs/go-ipld-format" + merkledag "github.com/ipfs/go-merkledag" iface "github.com/ipfs/interface-go-ipfs-core" path "github.com/ipfs/interface-go-ipfs-core/path" ) @@ -102,6 +103,7 @@ NOTE: List all references recursively by using the flag '-r'. format = " -> " } + // TODO: use session for resolving as well. objs, err := objectsForPaths(ctx, api, req.Arguments) if err != nil { return err @@ -109,7 +111,7 @@ NOTE: List all references recursively by using the flag '-r'. rw := RefWriter{ res: res, - DAG: api.Dag(), + DAG: merkledag.NewSession(ctx, api.Dag()), Ctx: ctx, Unique: unique, PrintFmt: format, @@ -164,16 +166,16 @@ Displays the hashes of all local objects. Type: RefWrapper{}, } -func objectsForPaths(ctx context.Context, n iface.CoreAPI, paths []string) ([]ipld.Node, error) { - objects := make([]ipld.Node, len(paths)) +func objectsForPaths(ctx context.Context, n iface.CoreAPI, paths []string) ([]cid.Cid, error) { + roots := make([]cid.Cid, len(paths)) for i, sp := range paths { - o, err := n.ResolveNode(ctx, path.New(sp)) + o, err := n.ResolvePath(ctx, path.New(sp)) if err != nil { return nil, err } - objects[i] = o + roots[i] = o.Cid() } - return objects, nil + return roots, nil } type RefWrapper struct { @@ -183,7 +185,7 @@ type RefWrapper struct { type RefWriter struct { res cmds.ResponseEmitter - DAG ipld.DAGService + DAG ipld.NodeGetter Ctx context.Context Unique bool @@ -194,7 +196,11 @@ type RefWriter struct { } // WriteRefs writes refs of the given object to the underlying writer. -func (rw *RefWriter) WriteRefs(n ipld.Node, enc cidenc.Encoder) (int, error) { +func (rw *RefWriter) WriteRefs(c cid.Cid, enc cidenc.Encoder) (int, error) { + n, err := rw.DAG.Get(rw.Ctx, c) + if err != nil { + return 0, err + } return rw.writeRefsRecursive(n, 0, enc) } diff --git a/core/coreapi/dag.go b/core/coreapi/dag.go index ecc4a7408..7994842b8 100644 --- a/core/coreapi/dag.go +++ b/core/coreapi/dag.go @@ -6,6 +6,7 @@ import ( cid "github.com/ipfs/go-cid" "github.com/ipfs/go-ipfs-pinner" ipld "github.com/ipfs/go-ipld-format" + dag "github.com/ipfs/go-merkledag" ) type dagAPI struct { @@ -50,3 +51,12 @@ func (adder *pinningAdder) AddMany(ctx context.Context, nds []ipld.Node) error { func (api *dagAPI) Pinning() ipld.NodeAdder { return (*pinningAdder)(api.core) } + +func (api *dagAPI) Session(ctx context.Context) ipld.NodeGetter { + return dag.NewSession(ctx, api.DAGService) +} + +var ( + _ ipld.DAGService = (*dagAPI)(nil) + _ dag.SessionMaker = (*dagAPI)(nil) +) From 16b09131124c56377cdcb723587f2c1701469c56 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Fri, 29 May 2020 16:10:14 -0700 Subject: [PATCH 06/45] fix: update node to fix mocha tests (cherry picked from commit 4e14582c56f6ef90f4b6abcf5234a0ca6a72a064) --- .circleci/config.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 754bf98e6..ae52998aa 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -44,7 +44,7 @@ executors: TEST_VERBOSE: 1 node: docker: - - image: circleci/node:10 + - image: circleci/node:12 working_directory: ~/ipfs/go-ipfs environment: <<: *default_environment @@ -191,15 +191,14 @@ jobs: - run: name: Installing reporting tools command: | - npm install --save-dev mocha-junit-reporter@1.23.1 mocha-multi-reporters@1.1.0 + npm install --save-dev mocha-circleci-reporter@0.0.3 working_directory: ~/ipfs/go-ipfs/interop - run: name: Running tests command: | mkdir -p /tmp/test-results/interop/ export MOCHA_FILE="$(mktemp /tmp/test-results/interop/unit.XXXXXX.xml)" - echo '{"reporterEnabled": "mocha-junit-reporter, spec"}' > mocha-conf.json - node_modules/.bin/mocha -R mocha-multi-reporters --reporter-options "configFile=mocha-conf.json" \ + node_modules/.bin/mocha --reporter mocha-circleci-reporter \ $(sed -n -e "s|^require('\(.*\)')$|test/\1|p" test/node.js | circleci tests split) working_directory: ~/ipfs/go-ipfs/interop environment: From 10dfd9a3c2746d79a302b72f5e2516c35256a309 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Mon, 1 Jun 2020 14:46:35 -0700 Subject: [PATCH 07/45] chore: update quic transport This is a _protocol breaking_ change for the QUIC transport, the last one before we stabilize it. (cherry picked from commit 0865634f7535db3585739c69a848ba231af98c0d) --- go.mod | 2 +- go.sum | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index 9f220d4ff..55fe682a7 100644 --- a/go.mod +++ b/go.mod @@ -74,7 +74,7 @@ require ( github.com/libp2p/go-libp2p-peerstore v0.2.4 github.com/libp2p/go-libp2p-pubsub v0.3.1 github.com/libp2p/go-libp2p-pubsub-router v0.3.0 - github.com/libp2p/go-libp2p-quic-transport v0.4.1 + github.com/libp2p/go-libp2p-quic-transport v0.5.0 github.com/libp2p/go-libp2p-record v0.1.3 github.com/libp2p/go-libp2p-routing-helpers v0.2.3 github.com/libp2p/go-libp2p-secio v0.2.2 diff --git a/go.sum b/go.sum index c25ecb2cd..08de80934 100644 --- a/go.sum +++ b/go.sum @@ -635,8 +635,6 @@ github.com/libp2p/go-libp2p-interface-connmgr v0.0.1/go.mod h1:GarlRLH0LdeWcLnYM github.com/libp2p/go-libp2p-interface-connmgr v0.0.4/go.mod h1:GarlRLH0LdeWcLnYM/SaBykKFl9U5JFnbBGruAk/D5k= github.com/libp2p/go-libp2p-interface-connmgr v0.0.5/go.mod h1:GarlRLH0LdeWcLnYM/SaBykKFl9U5JFnbBGruAk/D5k= github.com/libp2p/go-libp2p-interface-pnet v0.0.1/go.mod h1:el9jHpQAXK5dnTpKA4yfCNBZXvrzdOU75zz+C6ryp3k= -github.com/libp2p/go-libp2p-kad-dht v0.8.0 h1:vfqDTa/dUlNVlK3nL1b9pTMV9/hhIr4sDjUVk0VEtFQ= -github.com/libp2p/go-libp2p-kad-dht v0.8.0/go.mod h1:u3rbYbp3CSraAHD5s81CJ3hHozKTud/UOXfAgh93Gek= github.com/libp2p/go-libp2p-kad-dht v0.8.1 h1:PS/mgLSzFqH5lS3PnnxcqsIrHy+qbQ5GkhzcrT12LyA= github.com/libp2p/go-libp2p-kad-dht v0.8.1/go.mod h1:u3rbYbp3CSraAHD5s81CJ3hHozKTud/UOXfAgh93Gek= github.com/libp2p/go-libp2p-kbucket v0.4.2 h1:wg+VPpCtY61bCasGRexCuXOmEmdKjN+k1w+JtTwu9gA= @@ -700,8 +698,8 @@ github.com/libp2p/go-libp2p-pubsub v0.3.1/go.mod h1:TxPOBuo1FPdsTjFnv+FGZbNbWYsp github.com/libp2p/go-libp2p-pubsub-router v0.3.0 h1:ghpHApTMXN+aZ+InYvpJa/ckBW4orypzNI0aWQDth3s= github.com/libp2p/go-libp2p-pubsub-router v0.3.0/go.mod h1:6kZb1gGV1yGzXTfyNsi4p+hyt1JnA1OMGHeExTOJR3A= github.com/libp2p/go-libp2p-quic-transport v0.3.7/go.mod h1:Kr4aDtnfHHNeENn5J+sZIVc+t8HpQn9W6BOxhVGHbgI= -github.com/libp2p/go-libp2p-quic-transport v0.4.1 h1:RyBy+0doNHYBgK8lKe7w9rXOx23mLiGJJNUp8GDGVkw= -github.com/libp2p/go-libp2p-quic-transport v0.4.1/go.mod h1:uDr5c1JgdqAfczV1lgiREnud0cr+k3rJcI3Eov/d7C8= +github.com/libp2p/go-libp2p-quic-transport v0.5.0 h1:BUN1lgYNUrtv4WLLQ5rQmC9MCJ6uEXusezGvYRNoJXE= +github.com/libp2p/go-libp2p-quic-transport v0.5.0/go.mod h1:IEcuC5MLxvZ5KuHKjRu+dr3LjCT1Be3rcD/4d8JrX8M= github.com/libp2p/go-libp2p-record v0.0.1/go.mod h1:grzqg263Rug/sRex85QrDOLntdFAymLDLm7lxMgU79Q= github.com/libp2p/go-libp2p-record v0.1.0/go.mod h1:ujNc8iuE5dlKWVy6wuL6dd58t0n7xI4hAIl8pE6wu5Q= github.com/libp2p/go-libp2p-record v0.1.2 h1:M50VKzWnmUrk/M5/Dz99qO9Xh4vs8ijsK+7HkJvRP+0= @@ -855,8 +853,8 @@ github.com/libp2p/go-yamux v1.3.7 h1:v40A1eSPJDIZwz2AvrV3cxpTZEGDP11QJbukmEhYyQI github.com/libp2p/go-yamux v1.3.7/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE= github.com/lucas-clemente/quic-go v0.15.7 h1:Pu7To5/G9JoP1mwlrcIvfV8ByPBlCzif3MCl8+1W83I= github.com/lucas-clemente/quic-go v0.15.7/go.mod h1:Myi1OyS0FOjL3not4BxT7KN29bRkcMUV5JVVFLKtDp8= -github.com/lucas-clemente/quic-go v0.15.8 h1:LkU5Fi+RswEOWIoHFDGkMRmmp4JLBZNGVGxjePso66s= -github.com/lucas-clemente/quic-go v0.15.8/go.mod h1:I0+fcNTdb9eS1ZcjQZbDVPGchJ86chcIxPALn9lEJqE= +github.com/lucas-clemente/quic-go v0.16.0 h1:jJw36wfzGJhmOhAOaOC2lS36WgeqXQszH47A7spo1LI= +github.com/lucas-clemente/quic-go v0.16.0/go.mod h1:I0+fcNTdb9eS1ZcjQZbDVPGchJ86chcIxPALn9lEJqE= github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329 h1:2gxZ0XQIU/5z3Z3bUBu+FXuk2pFbkN6tcwi/pjyaDic= From 5e6d8554558e6d1de23f078b63ad2df2f86906c6 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Wed, 3 Jun 2020 15:30:36 -0700 Subject: [PATCH 08/45] update libp2p --- go.mod | 8 ++++---- go.sum | 16 ++++++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 55fe682a7..52f53ede7 100644 --- a/go.mod +++ b/go.mod @@ -60,10 +60,10 @@ require ( github.com/jbenet/go-random v0.0.0-20190219211222-123a90aedc0c github.com/jbenet/go-temp-err-catcher v0.1.0 github.com/jbenet/goprocess v0.1.4 - github.com/libp2p/go-libp2p v0.9.2 + github.com/libp2p/go-libp2p v0.9.5 github.com/libp2p/go-libp2p-circuit v0.2.3 - github.com/libp2p/go-libp2p-connmgr v0.2.3 - github.com/libp2p/go-libp2p-core v0.5.6 + github.com/libp2p/go-libp2p-connmgr v0.2.4 + github.com/libp2p/go-libp2p-core v0.5.7 github.com/libp2p/go-libp2p-discovery v0.4.0 github.com/libp2p/go-libp2p-http v0.1.5 github.com/libp2p/go-libp2p-kad-dht v0.8.1 @@ -78,7 +78,7 @@ require ( github.com/libp2p/go-libp2p-record v0.1.3 github.com/libp2p/go-libp2p-routing-helpers v0.2.3 github.com/libp2p/go-libp2p-secio v0.2.2 - github.com/libp2p/go-libp2p-swarm v0.2.5 + github.com/libp2p/go-libp2p-swarm v0.2.6 github.com/libp2p/go-libp2p-testing v0.1.1 github.com/libp2p/go-libp2p-tls v0.1.3 github.com/libp2p/go-libp2p-yamux v0.2.8 diff --git a/go.sum b/go.sum index 08de80934..90c0c8ee8 100644 --- a/go.sum +++ b/go.sum @@ -51,6 +51,8 @@ github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYU github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/benbjohnson/clock v1.0.1 h1:lVM1R/o5khtrr7t3qAr+sS6uagZOP+7iprc7gS3V9CE= github.com/benbjohnson/clock v1.0.1/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= +github.com/benbjohnson/clock v1.0.2 h1:Z0CN0Yb4ig9sGPXkvAQcGJfnrrMQ5QYLCMPRi9iD7YE= +github.com/benbjohnson/clock v1.0.2/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -522,6 +524,8 @@ github.com/libp2p/go-eventbus v0.0.2/go.mod h1:Hr/yGlwxA/stuLnpMiu82lpNKpvRy3EaJ github.com/libp2p/go-eventbus v0.0.3/go.mod h1:Hr/yGlwxA/stuLnpMiu82lpNKpvRy3EaJxPu40XYOwk= github.com/libp2p/go-eventbus v0.1.0 h1:mlawomSAjjkk97QnYiEmHsLu7E136+2oCWSHRUvMfzQ= github.com/libp2p/go-eventbus v0.1.0/go.mod h1:vROgu5cs5T7cv7POWlWxBaVLxfSegC5UGQf8A2eEmx4= +github.com/libp2p/go-eventbus v0.2.1 h1:VanAdErQnpTioN2TowqNcOijf6YwhuODe4pPKSDpxGc= +github.com/libp2p/go-eventbus v0.2.1/go.mod h1:jc2S4SoEVPP48H9Wpzm5aiGwUCBMfGhVhhBjyhhCJs8= github.com/libp2p/go-flow-metrics v0.0.1 h1:0gxuFd2GuK7IIP5pKljLwps6TvcuYgvG7Atqi3INF5s= github.com/libp2p/go-flow-metrics v0.0.1/go.mod h1:Iv1GH0sG8DtYN3SVJ2eG221wMiNpZxBdp967ls1g+k8= github.com/libp2p/go-flow-metrics v0.0.2 h1:U5TvqfoyR6GVRM+bC15Ux1ltar1kbj6Zw6xOVR02CZs= @@ -546,8 +550,8 @@ github.com/libp2p/go-libp2p v0.8.2 h1:gVuk8nZGjnRagJ/mLpBCSJw7bW1yWJrq3EwOk/AC6F github.com/libp2p/go-libp2p v0.8.2/go.mod h1:NQDA/F/qArMHGe0J7sDScaKjW8Jh4y/ozQqBbYJ+BnA= github.com/libp2p/go-libp2p v0.8.3 h1:IFWeNzxkBaNO1N8stN9ayFGdC6RmVuSsKd5bou7qpK0= github.com/libp2p/go-libp2p v0.8.3/go.mod h1:EsH1A+8yoWK+L4iKcbPYu6MPluZ+CHWI9El8cTaefiM= -github.com/libp2p/go-libp2p v0.9.2 h1:5rViLwtjkaEWcIBbk6oII39cVjPTElo3F78SSLf9yho= -github.com/libp2p/go-libp2p v0.9.2/go.mod h1:cunHNLDVus66Ct9iXXcjKRLdmHdFdHVe1TAnbubJQqQ= +github.com/libp2p/go-libp2p v0.9.5 h1:BNF5p9iwCukccf1WBWrGGVHicMrFVe1+wkBo1c8/Jew= +github.com/libp2p/go-libp2p v0.9.5/go.mod h1:FiFGiems39cIOLqfoThr/5IEw+QAjBdCVAqv7rtTQGs= github.com/libp2p/go-libp2p-autonat v0.0.2/go.mod h1:fs71q5Xk+pdnKU014o2iq1RhMs9/PMaG5zXRFNnIIT4= github.com/libp2p/go-libp2p-autonat v0.0.6/go.mod h1:uZneLdOkZHro35xIhpbtTzLlgYturpu4J5+0cZK3MqE= github.com/libp2p/go-libp2p-autonat v0.1.0 h1:aCWAu43Ri4nU0ZPO7NyLzUvvfqd0nE3dX0R/ZGYVgOU= @@ -582,6 +586,8 @@ github.com/libp2p/go-libp2p-circuit v0.2.3 h1:3Uw1fPHWrp1tgIhBz0vSOxRUmnKL8L/NGU github.com/libp2p/go-libp2p-circuit v0.2.3/go.mod h1:nkG3iE01tR3FoQ2nMm06IUrCpCyJp1Eo4A1xYdpjfs4= github.com/libp2p/go-libp2p-connmgr v0.2.3 h1:v7skKI9n+0obPpzMIO6aIlOSdQOmhxTf40cbpzqaGMQ= github.com/libp2p/go-libp2p-connmgr v0.2.3/go.mod h1:Gqjg29zI8CwXX21zRxy6gOg8VYu3zVerJRt2KyktzH4= +github.com/libp2p/go-libp2p-connmgr v0.2.4 h1:TMS0vc0TCBomtQJyWr7fYxcVYYhx+q/2gF++G5Jkl/w= +github.com/libp2p/go-libp2p-connmgr v0.2.4/go.mod h1:YV0b/RIm8NGPnnNWM7hG9Q38OeQiQfKhHCCs1++ufn0= github.com/libp2p/go-libp2p-core v0.0.1/go.mod h1:g/VxnTZ/1ygHxH3dKok7Vno1VfpvGcGip57wjTU4fco= github.com/libp2p/go-libp2p-core v0.0.2/go.mod h1:9dAcntw/n46XycV4RnlBq3BpgrmyUi9LuoTNdPrbUco= github.com/libp2p/go-libp2p-core v0.0.3/go.mod h1:j+YQMNz9WNSkNezXOsahp9kwZBKBvxLpKD316QWSJXE= @@ -611,6 +617,8 @@ github.com/libp2p/go-libp2p-core v0.5.4/go.mod h1:uN7L2D4EvPCvzSH5SrhR72UWbnSGpt github.com/libp2p/go-libp2p-core v0.5.5/go.mod h1:vj3awlOr9+GMZJFH9s4mpt9RHHgGqeHCopzbYKZdRjM= github.com/libp2p/go-libp2p-core v0.5.6 h1:IxFH4PmtLlLdPf4fF/i129SnK/C+/v8WEX644MxhC48= github.com/libp2p/go-libp2p-core v0.5.6/go.mod h1:txwbVEhHEXikXn9gfC7/UDDw7rkxuX0bJvM49Ykaswo= +github.com/libp2p/go-libp2p-core v0.5.7 h1:QK3xRwFxqd0Xd9bSZL+8yZ8ncZZbl6Zngd/+Y+A6sgQ= +github.com/libp2p/go-libp2p-core v0.5.7/go.mod h1:txwbVEhHEXikXn9gfC7/UDDw7rkxuX0bJvM49Ykaswo= github.com/libp2p/go-libp2p-crypto v0.0.1/go.mod h1:yJkNyDmO341d5wwXxDUGO0LykUVT72ImHNUqh5D/dBE= github.com/libp2p/go-libp2p-crypto v0.0.2/go.mod h1:eETI5OUfBnvARGOHrJz2eWNyTUxEGZnBxMcbUjfIj4I= github.com/libp2p/go-libp2p-crypto v0.1.0 h1:k9MFy+o2zGDNGsaoZl0MA3iZ75qXxr9OOoAZF+sD5OQ= @@ -729,8 +737,8 @@ github.com/libp2p/go-libp2p-swarm v0.2.3 h1:uVkCb8Blfg7HQ/f30TyHn1g/uCwXsAET7pU0 github.com/libp2p/go-libp2p-swarm v0.2.3/go.mod h1:P2VO/EpxRyDxtChXz/VPVXyTnszHvokHKRhfkEgFKNM= github.com/libp2p/go-libp2p-swarm v0.2.4 h1:94XL76/tFeTdJNcIGugi+1uZo5O/a7y4i21PirwbgZI= github.com/libp2p/go-libp2p-swarm v0.2.4/go.mod h1:/xIpHFPPh3wmSthtxdGbkHZ0OET1h/GGZes8Wku/M5Y= -github.com/libp2p/go-libp2p-swarm v0.2.5 h1:PinJOL2Haz0USGg6Z7wGALe4E6tJmAaUmKPxYWQSi68= -github.com/libp2p/go-libp2p-swarm v0.2.5/go.mod h1:MjtwNQXQdmRLFCoRpIzi8psCeidfkPxRrVvDb3Ytjqo= +github.com/libp2p/go-libp2p-swarm v0.2.6 h1:UhMXIa+yCOALQyceENEIStMlbTCzOM6aWo6vw8QW17Q= +github.com/libp2p/go-libp2p-swarm v0.2.6/go.mod h1:F9hrkZjO7dDbcEiYii/fAB1QdpLuU6h1pa4P5VNsEgc= github.com/libp2p/go-libp2p-testing v0.0.1/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= github.com/libp2p/go-libp2p-testing v0.0.2/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= github.com/libp2p/go-libp2p-testing v0.0.3/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= From 2d72467d07d501ec859e7cb5fa74e780dc243b04 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Fri, 5 Jun 2020 17:27:30 -0700 Subject: [PATCH 09/45] chore: update kad dht --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 52f53ede7..ed4587e0a 100644 --- a/go.mod +++ b/go.mod @@ -66,7 +66,7 @@ require ( github.com/libp2p/go-libp2p-core v0.5.7 github.com/libp2p/go-libp2p-discovery v0.4.0 github.com/libp2p/go-libp2p-http v0.1.5 - github.com/libp2p/go-libp2p-kad-dht v0.8.1 + github.com/libp2p/go-libp2p-kad-dht v0.8.2 github.com/libp2p/go-libp2p-kbucket v0.4.2 github.com/libp2p/go-libp2p-loggables v0.1.0 github.com/libp2p/go-libp2p-mplex v0.2.3 diff --git a/go.sum b/go.sum index 90c0c8ee8..5f79939d9 100644 --- a/go.sum +++ b/go.sum @@ -643,8 +643,8 @@ github.com/libp2p/go-libp2p-interface-connmgr v0.0.1/go.mod h1:GarlRLH0LdeWcLnYM github.com/libp2p/go-libp2p-interface-connmgr v0.0.4/go.mod h1:GarlRLH0LdeWcLnYM/SaBykKFl9U5JFnbBGruAk/D5k= github.com/libp2p/go-libp2p-interface-connmgr v0.0.5/go.mod h1:GarlRLH0LdeWcLnYM/SaBykKFl9U5JFnbBGruAk/D5k= github.com/libp2p/go-libp2p-interface-pnet v0.0.1/go.mod h1:el9jHpQAXK5dnTpKA4yfCNBZXvrzdOU75zz+C6ryp3k= -github.com/libp2p/go-libp2p-kad-dht v0.8.1 h1:PS/mgLSzFqH5lS3PnnxcqsIrHy+qbQ5GkhzcrT12LyA= -github.com/libp2p/go-libp2p-kad-dht v0.8.1/go.mod h1:u3rbYbp3CSraAHD5s81CJ3hHozKTud/UOXfAgh93Gek= +github.com/libp2p/go-libp2p-kad-dht v0.8.2 h1:s7y38B+hdj1AkNR3PCTpvNqBsZHxOf7hoUy7+fNlSZQ= +github.com/libp2p/go-libp2p-kad-dht v0.8.2/go.mod h1:u3rbYbp3CSraAHD5s81CJ3hHozKTud/UOXfAgh93Gek= github.com/libp2p/go-libp2p-kbucket v0.4.2 h1:wg+VPpCtY61bCasGRexCuXOmEmdKjN+k1w+JtTwu9gA= github.com/libp2p/go-libp2p-kbucket v0.4.2/go.mod h1:7sCeZx2GkNK1S6lQnGUW5JYZCFPnXzAZCCBBS70lytY= github.com/libp2p/go-libp2p-loggables v0.0.1/go.mod h1:lDipDlBNYbpyqyPX/KcoO+eq0sJYEVR2JgOexcivchg= From 2bb093b4c2bd4f407ad9d4a37d47d04f81a72c10 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Mon, 8 Jun 2020 08:41:28 -0700 Subject: [PATCH 10/45] chore: update go-libp2p-peestore --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index ed4587e0a..7dd46d75d 100644 --- a/go.mod +++ b/go.mod @@ -71,7 +71,7 @@ require ( github.com/libp2p/go-libp2p-loggables v0.1.0 github.com/libp2p/go-libp2p-mplex v0.2.3 github.com/libp2p/go-libp2p-noise v0.1.1 - github.com/libp2p/go-libp2p-peerstore v0.2.4 + github.com/libp2p/go-libp2p-peerstore v0.2.6 github.com/libp2p/go-libp2p-pubsub v0.3.1 github.com/libp2p/go-libp2p-pubsub-router v0.3.0 github.com/libp2p/go-libp2p-quic-transport v0.5.0 diff --git a/go.sum b/go.sum index 5f79939d9..78521630c 100644 --- a/go.sum +++ b/go.sum @@ -695,6 +695,8 @@ github.com/libp2p/go-libp2p-peerstore v0.2.3 h1:MofRq2l3c15vQpEygTetV+zRRrncz+kt github.com/libp2p/go-libp2p-peerstore v0.2.3/go.mod h1:K8ljLdFn590GMttg/luh4caB/3g0vKuY01psze0upRw= github.com/libp2p/go-libp2p-peerstore v0.2.4 h1:jU9S4jYN30kdzTpDAR7SlHUD+meDUjTODh4waLWF1ws= github.com/libp2p/go-libp2p-peerstore v0.2.4/go.mod h1:ss/TWTgHZTMpsU/oKVVPQCGuDHItOpf2W8RxAi50P2s= +github.com/libp2p/go-libp2p-peerstore v0.2.6 h1:2ACefBX23iMdJU9Ke+dcXt3w86MIryes9v7In4+Qq3U= +github.com/libp2p/go-libp2p-peerstore v0.2.6/go.mod h1:ss/TWTgHZTMpsU/oKVVPQCGuDHItOpf2W8RxAi50P2s= github.com/libp2p/go-libp2p-pnet v0.2.0 h1:J6htxttBipJujEjz1y0a5+eYoiPcFHhSYHH6na5f0/k= github.com/libp2p/go-libp2p-pnet v0.2.0/go.mod h1:Qqvq6JH/oMZGwqs3N1Fqhv8NVhrdYcO0BW4wssv21LA= github.com/libp2p/go-libp2p-protocol v0.0.1/go.mod h1:Af9n4PiruirSDjHycM1QuiMi/1VZNHYcK8cLgFJLZ4s= From a76d80cf4c54bfde4452755b8752b8bb361c51a3 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Mon, 8 Jun 2020 09:20:38 -0700 Subject: [PATCH 11/45] chore: add migration to listen on QUIC by default --- repo/fsrepo/fsrepo.go | 2 +- repo/fsrepo/migrations/migrations.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/repo/fsrepo/fsrepo.go b/repo/fsrepo/fsrepo.go index 103597fea..b4292708a 100644 --- a/repo/fsrepo/fsrepo.go +++ b/repo/fsrepo/fsrepo.go @@ -36,7 +36,7 @@ const LockFile = "repo.lock" var log = logging.Logger("fsrepo") // version number that we are currently expecting to see -var RepoVersion = 9 +var RepoVersion = 10 var migrationInstructions = `See https://github.com/ipfs/fs-repo-migrations/blob/master/run.md Sorry for the inconvenience. In the future, these will run automatically.` diff --git a/repo/fsrepo/migrations/migrations.go b/repo/fsrepo/migrations/migrations.go index c7cec945e..890c8ae68 100644 --- a/repo/fsrepo/migrations/migrations.go +++ b/repo/fsrepo/migrations/migrations.go @@ -15,7 +15,7 @@ import ( "strings" ) -var DistPath = "https://ipfs.io/ipfs/QmXuKUDChMXkcq36CbaggvY3UaAtgpi7yyoAiNy5VD9Dfr" +var DistPath = "https://ipfs.io/ipfs/QmRnvRrRwto4QAMuwWeEU9GpNaHKqQPdvdrNeGaXg7yruC" func init() { if dist := os.Getenv("IPFS_DIST_PATH"); dist != "" { From a2cd58edf19f04c9554c271124462db701035a3a Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Mon, 8 Jun 2020 11:32:15 -0700 Subject: [PATCH 12/45] chore: update bitswap * Protect conns to peers actively giving us useful data. * Only count _useful_ received data in the ledger. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 7dd46d75d..02e098c54 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/gogo/protobuf v1.3.1 github.com/hashicorp/go-multierror v1.1.0 github.com/hashicorp/golang-lru v0.5.4 - github.com/ipfs/go-bitswap v0.2.15 + github.com/ipfs/go-bitswap v0.2.17 github.com/ipfs/go-block-format v0.0.2 github.com/ipfs/go-blockservice v0.1.3 github.com/ipfs/go-cid v0.0.6 diff --git a/go.sum b/go.sum index 78521630c..463d3ab65 100644 --- a/go.sum +++ b/go.sum @@ -261,8 +261,8 @@ github.com/ipfs/go-bitswap v0.1.0/go.mod h1:FFJEf18E9izuCqUtHxbWEvq+reg7o4CW5wSA github.com/ipfs/go-bitswap v0.1.2/go.mod h1:qxSWS4NXGs7jQ6zQvoPY3+NmOfHHG47mhkiLzBpJQIs= github.com/ipfs/go-bitswap v0.1.3/go.mod h1:YEQlFy0kkxops5Vy+OxWdRSEZIoS7I7KDIwoa5Chkps= github.com/ipfs/go-bitswap v0.1.8/go.mod h1:TOWoxllhccevbWFUR2N7B1MTSVVge1s6XSMiCSA4MzM= -github.com/ipfs/go-bitswap v0.2.15 h1:cUOwiNmlih4W6M04pI9QBZRMWxANWhmAz5c3nwu2SYI= -github.com/ipfs/go-bitswap v0.2.15/go.mod h1:IsK9Yb5iLUqGXxycARAH9f/QVVvsZLQCPIYMlKgzbL0= +github.com/ipfs/go-bitswap v0.2.17 h1:AcecEoTpRjuKZQVPLYCMzr/M8NW3UYDM+2KdwGRhmTQ= +github.com/ipfs/go-bitswap v0.2.17/go.mod h1:C7TwBgHnu89Q8sHsTJP7IhUqF9XYLe71P4tT5adgmYo= github.com/ipfs/go-block-format v0.0.1/go.mod h1:DK/YYcsSUIVAFNwo/KZCdIIbpN0ROH/baNLgayt4pFc= github.com/ipfs/go-block-format v0.0.2 h1:qPDvcP19izTjU8rgo6p7gTXZlkMkF5bz5G3fqIsSCPE= github.com/ipfs/go-block-format v0.0.2/go.mod h1:AWR46JfpcObNfg3ok2JHDUfdiHRgWhJgCQF+KIgOPJY= From 96677e00d6b1479e679faab587fd134536779bfe Mon Sep 17 00:00:00 2001 From: Adin Schmahmann Date: Mon, 8 Jun 2020 17:34:16 -0400 Subject: [PATCH 13/45] feat: bump version to v0.6.0-rc2 --- version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.go b/version.go index fc3a15b95..9549133b7 100644 --- a/version.go +++ b/version.go @@ -4,7 +4,7 @@ package ipfs var CurrentCommit string // CurrentVersionNumber is the current application's version literal -const CurrentVersionNumber = "0.6.0-rc1" +const CurrentVersionNumber = "0.6.0-rc2" const ApiVersion = "/go-ipfs/" + CurrentVersionNumber + "/" From 9467986a1d50f1387d64a3f95c2af1712dd47e88 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Tue, 9 Jun 2020 08:34:36 -0700 Subject: [PATCH 14/45] chore: update quic --- go.mod | 2 +- go.sum | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 02e098c54..7a2c2aa4e 100644 --- a/go.mod +++ b/go.mod @@ -74,7 +74,7 @@ require ( github.com/libp2p/go-libp2p-peerstore v0.2.6 github.com/libp2p/go-libp2p-pubsub v0.3.1 github.com/libp2p/go-libp2p-pubsub-router v0.3.0 - github.com/libp2p/go-libp2p-quic-transport v0.5.0 + github.com/libp2p/go-libp2p-quic-transport v0.5.1 github.com/libp2p/go-libp2p-record v0.1.3 github.com/libp2p/go-libp2p-routing-helpers v0.2.3 github.com/libp2p/go-libp2p-secio v0.2.2 diff --git a/go.sum b/go.sum index 463d3ab65..92f761339 100644 --- a/go.sum +++ b/go.sum @@ -708,8 +708,8 @@ github.com/libp2p/go-libp2p-pubsub v0.3.1/go.mod h1:TxPOBuo1FPdsTjFnv+FGZbNbWYsp github.com/libp2p/go-libp2p-pubsub-router v0.3.0 h1:ghpHApTMXN+aZ+InYvpJa/ckBW4orypzNI0aWQDth3s= github.com/libp2p/go-libp2p-pubsub-router v0.3.0/go.mod h1:6kZb1gGV1yGzXTfyNsi4p+hyt1JnA1OMGHeExTOJR3A= github.com/libp2p/go-libp2p-quic-transport v0.3.7/go.mod h1:Kr4aDtnfHHNeENn5J+sZIVc+t8HpQn9W6BOxhVGHbgI= -github.com/libp2p/go-libp2p-quic-transport v0.5.0 h1:BUN1lgYNUrtv4WLLQ5rQmC9MCJ6uEXusezGvYRNoJXE= -github.com/libp2p/go-libp2p-quic-transport v0.5.0/go.mod h1:IEcuC5MLxvZ5KuHKjRu+dr3LjCT1Be3rcD/4d8JrX8M= +github.com/libp2p/go-libp2p-quic-transport v0.5.1 h1:GTiM20P6aItAoCjZM8Mv0eCBk/ceSpfJn4Vlpvu6IXw= +github.com/libp2p/go-libp2p-quic-transport v0.5.1/go.mod h1:JxqKLaqz8fbNlTM8ptyhfbANiIDVEa9jC3TPrroEr0A= github.com/libp2p/go-libp2p-record v0.0.1/go.mod h1:grzqg263Rug/sRex85QrDOLntdFAymLDLm7lxMgU79Q= github.com/libp2p/go-libp2p-record v0.1.0/go.mod h1:ujNc8iuE5dlKWVy6wuL6dd58t0n7xI4hAIl8pE6wu5Q= github.com/libp2p/go-libp2p-record v0.1.2 h1:M50VKzWnmUrk/M5/Dz99qO9Xh4vs8ijsK+7HkJvRP+0= @@ -863,8 +863,8 @@ github.com/libp2p/go-yamux v1.3.7 h1:v40A1eSPJDIZwz2AvrV3cxpTZEGDP11QJbukmEhYyQI github.com/libp2p/go-yamux v1.3.7/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE= github.com/lucas-clemente/quic-go v0.15.7 h1:Pu7To5/G9JoP1mwlrcIvfV8ByPBlCzif3MCl8+1W83I= github.com/lucas-clemente/quic-go v0.15.7/go.mod h1:Myi1OyS0FOjL3not4BxT7KN29bRkcMUV5JVVFLKtDp8= -github.com/lucas-clemente/quic-go v0.16.0 h1:jJw36wfzGJhmOhAOaOC2lS36WgeqXQszH47A7spo1LI= -github.com/lucas-clemente/quic-go v0.16.0/go.mod h1:I0+fcNTdb9eS1ZcjQZbDVPGchJ86chcIxPALn9lEJqE= +github.com/lucas-clemente/quic-go v0.16.1 h1:hleW5QcJCNjGS10ggod6tQQy7XjVtagS6UIdzBMAWpg= +github.com/lucas-clemente/quic-go v0.16.1/go.mod h1:I0+fcNTdb9eS1ZcjQZbDVPGchJ86chcIxPALn9lEJqE= github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329 h1:2gxZ0XQIU/5z3Z3bUBu+FXuk2pFbkN6tcwi/pjyaDic= From b422c01a2a6540a04aa647cec238981f7796f4de Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Tue, 9 Jun 2020 08:53:50 -0700 Subject: [PATCH 15/45] fix(migration): correctly migrate quic addresses 1. Don't add quic addresses when they're already present (correctly detect quic addresses). 2. Correctly distinguish between quic addresses and quic + relay addresses. 3. Only add quic addresses to mirror tcp addresses, not tcp/ws addresses. fixes #7444 (cherry picked from commit f01c9625f337661b8de9b4e8db03bb5171e7d920) --- repo/fsrepo/migrations/migrations.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repo/fsrepo/migrations/migrations.go b/repo/fsrepo/migrations/migrations.go index 890c8ae68..6bd4ae3a1 100644 --- a/repo/fsrepo/migrations/migrations.go +++ b/repo/fsrepo/migrations/migrations.go @@ -15,7 +15,7 @@ import ( "strings" ) -var DistPath = "https://ipfs.io/ipfs/QmRnvRrRwto4QAMuwWeEU9GpNaHKqQPdvdrNeGaXg7yruC" +var DistPath = "https://ipfs.io/ipfs/QmQWvUrSwGHWKaoJnUrLQoBy9ikfiiyRrXKBFSHUTcS6aM" func init() { if dist := os.Getenv("IPFS_DIST_PATH"); dist != "" { From 9a06fdf0ccbacec2c621338265df2a70601e5f31 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Tue, 9 Jun 2020 11:05:59 -0700 Subject: [PATCH 16/45] fix(migration): migrate /ipfs/ bootstrappers to /p2p/ 1. We should have done this in 7-to-8 anyways, but didn't in some cases. 2. We assume these addresses use /p2p/ in the 9-to-10 migration. (cherry picked from commit ed1e54ebf8e4b52f34471de4ce7f40d0ba9a3240) --- repo/fsrepo/migrations/migrations.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repo/fsrepo/migrations/migrations.go b/repo/fsrepo/migrations/migrations.go index 6bd4ae3a1..b09921621 100644 --- a/repo/fsrepo/migrations/migrations.go +++ b/repo/fsrepo/migrations/migrations.go @@ -15,7 +15,7 @@ import ( "strings" ) -var DistPath = "https://ipfs.io/ipfs/QmQWvUrSwGHWKaoJnUrLQoBy9ikfiiyRrXKBFSHUTcS6aM" +var DistPath = "https://ipfs.io/ipfs/Qmdo5m6bpQXCayzfGghyvgXJdVHSsXsCKDUo9vWktDKq3K" func init() { if dist := os.Getenv("IPFS_DIST_PATH"); dist != "" { From 3ba1400bfed0ff161153c8016140421b53df3f63 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Tue, 9 Jun 2020 13:39:41 -0700 Subject: [PATCH 17/45] feat: bump version to 0.6.0-rc4 --- version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.go b/version.go index 9549133b7..cfdc9a7e8 100644 --- a/version.go +++ b/version.go @@ -4,7 +4,7 @@ package ipfs var CurrentCommit string // CurrentVersionNumber is the current application's version literal -const CurrentVersionNumber = "0.6.0-rc2" +const CurrentVersionNumber = "0.6.0-rc4" const ApiVersion = "/go-ipfs/" + CurrentVersionNumber + "/" From 70ccb7326d3e88b177cf5c158452b4480f52e720 Mon Sep 17 00:00:00 2001 From: Adin Schmahmann Date: Tue, 9 Jun 2020 19:17:59 -0400 Subject: [PATCH 18/45] chore: update deps --- go.mod | 6 +++--- go.sum | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 7a2c2aa4e..855d3c9ee 100644 --- a/go.mod +++ b/go.mod @@ -41,7 +41,7 @@ require ( github.com/ipfs/go-ipfs-posinfo v0.0.1 github.com/ipfs/go-ipfs-provider v0.4.3 github.com/ipfs/go-ipfs-routing v0.1.0 - github.com/ipfs/go-ipfs-util v0.0.1 + github.com/ipfs/go-ipfs-util v0.0.2 github.com/ipfs/go-ipld-cbor v0.0.4 github.com/ipfs/go-ipld-format v0.2.0 github.com/ipfs/go-ipld-git v0.0.3 @@ -60,7 +60,7 @@ require ( github.com/jbenet/go-random v0.0.0-20190219211222-123a90aedc0c github.com/jbenet/go-temp-err-catcher v0.1.0 github.com/jbenet/goprocess v0.1.4 - github.com/libp2p/go-libp2p v0.9.5 + github.com/libp2p/go-libp2p v0.9.6 github.com/libp2p/go-libp2p-circuit v0.2.3 github.com/libp2p/go-libp2p-connmgr v0.2.4 github.com/libp2p/go-libp2p-core v0.5.7 @@ -95,7 +95,7 @@ require ( github.com/opentracing/opentracing-go v1.1.0 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.6.0 - github.com/stretchr/testify v1.5.1 + github.com/stretchr/testify v1.6.1 github.com/syndtr/goleveldb v1.0.0 github.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc github.com/whyrusleeping/go-sysinfo v0.0.0-20190219211824-4a357d4b90b1 diff --git a/go.sum b/go.sum index 92f761339..81bba9eba 100644 --- a/go.sum +++ b/go.sum @@ -375,6 +375,8 @@ github.com/ipfs/go-ipfs-routing v0.1.0 h1:gAJTT1cEeeLj6/DlLX6t+NxD9fQe2ymTO6qWRD github.com/ipfs/go-ipfs-routing v0.1.0/go.mod h1:hYoUkJLyAUKhF58tysKpids8RNDPO42BVMgK5dNsoqY= github.com/ipfs/go-ipfs-util v0.0.1 h1:Wz9bL2wB2YBJqggkA4dD7oSmqB4cAnpNbGrlHJulv50= github.com/ipfs/go-ipfs-util v0.0.1/go.mod h1:spsl5z8KUnrve+73pOhSVZND1SIxPW5RyBCNzQxlJBc= +github.com/ipfs/go-ipfs-util v0.0.2 h1:59Sswnk1MFaiq+VcaknX7aYEyGyGDAA73ilhEK2POp8= +github.com/ipfs/go-ipfs-util v0.0.2/go.mod h1:CbPtkWJzjLdEcezDns2XYaehFVNXG9zrdrtMecczcsQ= github.com/ipfs/go-ipld-cbor v0.0.1/go.mod h1:RXHr8s4k0NE0TKhnrxqZC9M888QfsBN9rhS5NjfKzY8= github.com/ipfs/go-ipld-cbor v0.0.2/go.mod h1:wTBtrQZA3SoFKMVkp6cn6HMRteIB1VsmHA0AQFOn7Nc= github.com/ipfs/go-ipld-cbor v0.0.3 h1:ENsxvybwkmke7Z/QJOmeJfoguj6GH3Y0YOaGrfy9Q0I= @@ -552,6 +554,8 @@ github.com/libp2p/go-libp2p v0.8.3 h1:IFWeNzxkBaNO1N8stN9ayFGdC6RmVuSsKd5bou7qpK github.com/libp2p/go-libp2p v0.8.3/go.mod h1:EsH1A+8yoWK+L4iKcbPYu6MPluZ+CHWI9El8cTaefiM= github.com/libp2p/go-libp2p v0.9.5 h1:BNF5p9iwCukccf1WBWrGGVHicMrFVe1+wkBo1c8/Jew= github.com/libp2p/go-libp2p v0.9.5/go.mod h1:FiFGiems39cIOLqfoThr/5IEw+QAjBdCVAqv7rtTQGs= +github.com/libp2p/go-libp2p v0.9.6 h1:sDiuVhuLpWQOjSFmxOJEXVM9RHKIUTKgi8ArSS9nBtE= +github.com/libp2p/go-libp2p v0.9.6/go.mod h1:EA24aHpFs3BscMWvO286AiaKs3a7efQdLo+tbZ2tUSk= github.com/libp2p/go-libp2p-autonat v0.0.2/go.mod h1:fs71q5Xk+pdnKU014o2iq1RhMs9/PMaG5zXRFNnIIT4= github.com/libp2p/go-libp2p-autonat v0.0.6/go.mod h1:uZneLdOkZHro35xIhpbtTzLlgYturpu4J5+0cZK3MqE= github.com/libp2p/go-libp2p-autonat v0.1.0 h1:aCWAu43Ri4nU0ZPO7NyLzUvvfqd0nE3dX0R/ZGYVgOU= @@ -1108,6 +1112,7 @@ github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJy github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE= github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= @@ -1487,6 +1492,7 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5 h1:ymVxjfMaHvXD8RqPRmzHHsB3VvucivSkIAvJFDI5O3c= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= From 3d0899f4893a03fb20d95d93912d04c4d3af968a Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Tue, 9 Jun 2020 16:55:07 -0700 Subject: [PATCH 19/45] feat: release v0.6.0-rc5 --- version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.go b/version.go index cfdc9a7e8..ef9dcfbb6 100644 --- a/version.go +++ b/version.go @@ -4,7 +4,7 @@ package ipfs var CurrentCommit string // CurrentVersionNumber is the current application's version literal -const CurrentVersionNumber = "0.6.0-rc4" +const CurrentVersionNumber = "0.6.0-rc5" const ApiVersion = "/go-ipfs/" + CurrentVersionNumber + "/" From 1841691e45f9f2a96e1b6b4e519c1306e2f7880b Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Tue, 9 Jun 2020 19:12:28 -0700 Subject: [PATCH 20/45] chore: update bitswap Fixes a concurrent map access. --- go.mod | 2 +- go.sum | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index 855d3c9ee..b708b5675 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/gogo/protobuf v1.3.1 github.com/hashicorp/go-multierror v1.1.0 github.com/hashicorp/golang-lru v0.5.4 - github.com/ipfs/go-bitswap v0.2.17 + github.com/ipfs/go-bitswap v0.2.18 github.com/ipfs/go-block-format v0.0.2 github.com/ipfs/go-blockservice v0.1.3 github.com/ipfs/go-cid v0.0.6 diff --git a/go.sum b/go.sum index 81bba9eba..78faa6349 100644 --- a/go.sum +++ b/go.sum @@ -261,8 +261,8 @@ github.com/ipfs/go-bitswap v0.1.0/go.mod h1:FFJEf18E9izuCqUtHxbWEvq+reg7o4CW5wSA github.com/ipfs/go-bitswap v0.1.2/go.mod h1:qxSWS4NXGs7jQ6zQvoPY3+NmOfHHG47mhkiLzBpJQIs= github.com/ipfs/go-bitswap v0.1.3/go.mod h1:YEQlFy0kkxops5Vy+OxWdRSEZIoS7I7KDIwoa5Chkps= github.com/ipfs/go-bitswap v0.1.8/go.mod h1:TOWoxllhccevbWFUR2N7B1MTSVVge1s6XSMiCSA4MzM= -github.com/ipfs/go-bitswap v0.2.17 h1:AcecEoTpRjuKZQVPLYCMzr/M8NW3UYDM+2KdwGRhmTQ= -github.com/ipfs/go-bitswap v0.2.17/go.mod h1:C7TwBgHnu89Q8sHsTJP7IhUqF9XYLe71P4tT5adgmYo= +github.com/ipfs/go-bitswap v0.2.18 h1:ZuKb+hs4KMoJ0dMJrFcJyxhodT688MKEIyCAspFxqII= +github.com/ipfs/go-bitswap v0.2.18/go.mod h1:C7TwBgHnu89Q8sHsTJP7IhUqF9XYLe71P4tT5adgmYo= github.com/ipfs/go-block-format v0.0.1/go.mod h1:DK/YYcsSUIVAFNwo/KZCdIIbpN0ROH/baNLgayt4pFc= github.com/ipfs/go-block-format v0.0.2 h1:qPDvcP19izTjU8rgo6p7gTXZlkMkF5bz5G3fqIsSCPE= github.com/ipfs/go-block-format v0.0.2/go.mod h1:AWR46JfpcObNfg3ok2JHDUfdiHRgWhJgCQF+KIgOPJY= @@ -552,8 +552,6 @@ github.com/libp2p/go-libp2p v0.8.2 h1:gVuk8nZGjnRagJ/mLpBCSJw7bW1yWJrq3EwOk/AC6F github.com/libp2p/go-libp2p v0.8.2/go.mod h1:NQDA/F/qArMHGe0J7sDScaKjW8Jh4y/ozQqBbYJ+BnA= github.com/libp2p/go-libp2p v0.8.3 h1:IFWeNzxkBaNO1N8stN9ayFGdC6RmVuSsKd5bou7qpK0= github.com/libp2p/go-libp2p v0.8.3/go.mod h1:EsH1A+8yoWK+L4iKcbPYu6MPluZ+CHWI9El8cTaefiM= -github.com/libp2p/go-libp2p v0.9.5 h1:BNF5p9iwCukccf1WBWrGGVHicMrFVe1+wkBo1c8/Jew= -github.com/libp2p/go-libp2p v0.9.5/go.mod h1:FiFGiems39cIOLqfoThr/5IEw+QAjBdCVAqv7rtTQGs= github.com/libp2p/go-libp2p v0.9.6 h1:sDiuVhuLpWQOjSFmxOJEXVM9RHKIUTKgi8ArSS9nBtE= github.com/libp2p/go-libp2p v0.9.6/go.mod h1:EA24aHpFs3BscMWvO286AiaKs3a7efQdLo+tbZ2tUSk= github.com/libp2p/go-libp2p-autonat v0.0.2/go.mod h1:fs71q5Xk+pdnKU014o2iq1RhMs9/PMaG5zXRFNnIIT4= @@ -861,8 +859,6 @@ github.com/libp2p/go-yamux v1.3.3 h1:mWuzZRCAeTBFdynLlsYgA/EIeMOLr8XY04wa52NRhsE github.com/libp2p/go-yamux v1.3.3/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= github.com/libp2p/go-yamux v1.3.5 h1:ibuz4naPAully0pN6J/kmUARiqLpnDQIzI/8GCOrljg= github.com/libp2p/go-yamux v1.3.5/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= -github.com/libp2p/go-yamux v1.3.6 h1:O5qcBXRcfqecvQ/My9NqDNHB3/5t58yuJYqthcKhhgE= -github.com/libp2p/go-yamux v1.3.6/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= github.com/libp2p/go-yamux v1.3.7 h1:v40A1eSPJDIZwz2AvrV3cxpTZEGDP11QJbukmEhYyQI= github.com/libp2p/go-yamux v1.3.7/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE= github.com/lucas-clemente/quic-go v0.15.7 h1:Pu7To5/G9JoP1mwlrcIvfV8ByPBlCzif3MCl8+1W83I= @@ -1112,6 +1108,7 @@ github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJy github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE= github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= @@ -1492,6 +1489,7 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5 h1:ymVxjfMaHvXD8RqPRmzHHsB3VvucivSkIAvJFDI5O3c= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= From 2e0060c5d6f88b0c2827c20ab4c078d5be0f81a0 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Wed, 10 Jun 2020 14:21:34 -0700 Subject: [PATCH 21/45] chore: update bitswap Fixes another race condition and a metrics bug. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index b708b5675..70bf8ff8b 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/gogo/protobuf v1.3.1 github.com/hashicorp/go-multierror v1.1.0 github.com/hashicorp/golang-lru v0.5.4 - github.com/ipfs/go-bitswap v0.2.18 + github.com/ipfs/go-bitswap v0.2.19 github.com/ipfs/go-block-format v0.0.2 github.com/ipfs/go-blockservice v0.1.3 github.com/ipfs/go-cid v0.0.6 diff --git a/go.sum b/go.sum index 78faa6349..1711c2dc0 100644 --- a/go.sum +++ b/go.sum @@ -261,8 +261,8 @@ github.com/ipfs/go-bitswap v0.1.0/go.mod h1:FFJEf18E9izuCqUtHxbWEvq+reg7o4CW5wSA github.com/ipfs/go-bitswap v0.1.2/go.mod h1:qxSWS4NXGs7jQ6zQvoPY3+NmOfHHG47mhkiLzBpJQIs= github.com/ipfs/go-bitswap v0.1.3/go.mod h1:YEQlFy0kkxops5Vy+OxWdRSEZIoS7I7KDIwoa5Chkps= github.com/ipfs/go-bitswap v0.1.8/go.mod h1:TOWoxllhccevbWFUR2N7B1MTSVVge1s6XSMiCSA4MzM= -github.com/ipfs/go-bitswap v0.2.18 h1:ZuKb+hs4KMoJ0dMJrFcJyxhodT688MKEIyCAspFxqII= -github.com/ipfs/go-bitswap v0.2.18/go.mod h1:C7TwBgHnu89Q8sHsTJP7IhUqF9XYLe71P4tT5adgmYo= +github.com/ipfs/go-bitswap v0.2.19 h1:EhgRz8gqWQIBADY9gpqJOrfs5E1MtVfQFy1Vq8Z+Fq8= +github.com/ipfs/go-bitswap v0.2.19/go.mod h1:C7TwBgHnu89Q8sHsTJP7IhUqF9XYLe71P4tT5adgmYo= github.com/ipfs/go-block-format v0.0.1/go.mod h1:DK/YYcsSUIVAFNwo/KZCdIIbpN0ROH/baNLgayt4pFc= github.com/ipfs/go-block-format v0.0.2 h1:qPDvcP19izTjU8rgo6p7gTXZlkMkF5bz5G3fqIsSCPE= github.com/ipfs/go-block-format v0.0.2/go.mod h1:AWR46JfpcObNfg3ok2JHDUfdiHRgWhJgCQF+KIgOPJY= From a32f144fab5660a010ba6ddd3c72a6c4f2542dc3 Mon Sep 17 00:00:00 2001 From: "@RubenKelevra" Date: Wed, 10 Jun 2020 23:37:50 +0200 Subject: [PATCH 22/45] fix the minimal go version under 'Build from Source' --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 00548dbb0..ae3b36f20 100644 --- a/README.md +++ b/README.md @@ -160,7 +160,7 @@ PS> scoop install go-ipfs ### Build from Source -go-ipfs's build system requires Go 1.13 and some standard POSIX build tools: +go-ipfs's build system requires Go 1.14.2 and some standard POSIX build tools: * GNU make * Git From 444bb02abbb92a325bcc710418ce43016b4c31cb Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Wed, 10 Jun 2020 18:19:33 -0700 Subject: [PATCH 23/45] feat: bump version to 0.6.0-rc6 --- version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.go b/version.go index ef9dcfbb6..016713322 100644 --- a/version.go +++ b/version.go @@ -4,7 +4,7 @@ package ipfs var CurrentCommit string // CurrentVersionNumber is the current application's version literal -const CurrentVersionNumber = "0.6.0-rc5" +const CurrentVersionNumber = "0.6.0-rc6" const ApiVersion = "/go-ipfs/" + CurrentVersionNumber + "/" From fe2260184ec4e054106693f57f271e41b791f77d Mon Sep 17 00:00:00 2001 From: Mark Gaiser Date: Thu, 11 Jun 2020 17:11:10 +0200 Subject: [PATCH 24/45] Use the -p option which makes parents as needed. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5cd7d54b1..823240ddd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,7 @@ ARG IPFS_PLUGINS # Build the thing. # Also: fix getting HEAD commit hash via git rev-parse. RUN cd $SRC_DIR \ - && mkdir .git/objects \ + && mkdir -p .git/objects \ && make build GOTAGS=openssl IPFS_PLUGINS=$IPFS_PLUGINS # Get su-exec, a very minimal tool for dropping privileges, From eb1300c3a88db1f8fa0ad08f379fc4ad44ec6fef Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Fri, 12 Jun 2020 12:49:53 -0700 Subject: [PATCH 25/45] chore: update go-libp2p-quic-transport Adds support for draft 29. --- go.mod | 2 +- go.sum | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 70bf8ff8b..7bbb9998b 100644 --- a/go.mod +++ b/go.mod @@ -74,7 +74,7 @@ require ( github.com/libp2p/go-libp2p-peerstore v0.2.6 github.com/libp2p/go-libp2p-pubsub v0.3.1 github.com/libp2p/go-libp2p-pubsub-router v0.3.0 - github.com/libp2p/go-libp2p-quic-transport v0.5.1 + github.com/libp2p/go-libp2p-quic-transport v0.6.0 github.com/libp2p/go-libp2p-record v0.1.3 github.com/libp2p/go-libp2p-routing-helpers v0.2.3 github.com/libp2p/go-libp2p-secio v0.2.2 diff --git a/go.sum b/go.sum index 1711c2dc0..605c21636 100644 --- a/go.sum +++ b/go.sum @@ -710,8 +710,8 @@ github.com/libp2p/go-libp2p-pubsub v0.3.1/go.mod h1:TxPOBuo1FPdsTjFnv+FGZbNbWYsp github.com/libp2p/go-libp2p-pubsub-router v0.3.0 h1:ghpHApTMXN+aZ+InYvpJa/ckBW4orypzNI0aWQDth3s= github.com/libp2p/go-libp2p-pubsub-router v0.3.0/go.mod h1:6kZb1gGV1yGzXTfyNsi4p+hyt1JnA1OMGHeExTOJR3A= github.com/libp2p/go-libp2p-quic-transport v0.3.7/go.mod h1:Kr4aDtnfHHNeENn5J+sZIVc+t8HpQn9W6BOxhVGHbgI= -github.com/libp2p/go-libp2p-quic-transport v0.5.1 h1:GTiM20P6aItAoCjZM8Mv0eCBk/ceSpfJn4Vlpvu6IXw= -github.com/libp2p/go-libp2p-quic-transport v0.5.1/go.mod h1:JxqKLaqz8fbNlTM8ptyhfbANiIDVEa9jC3TPrroEr0A= +github.com/libp2p/go-libp2p-quic-transport v0.6.0 h1:d5bcq7y+t6IiumD9Ib0S4oHgWu66rRjQ1Y8ligii6G8= +github.com/libp2p/go-libp2p-quic-transport v0.6.0/go.mod h1:HR435saAZhTrFabI+adf3tVBY7ZJg5rKNoJ+CrIIg8c= github.com/libp2p/go-libp2p-record v0.0.1/go.mod h1:grzqg263Rug/sRex85QrDOLntdFAymLDLm7lxMgU79Q= github.com/libp2p/go-libp2p-record v0.1.0/go.mod h1:ujNc8iuE5dlKWVy6wuL6dd58t0n7xI4hAIl8pE6wu5Q= github.com/libp2p/go-libp2p-record v0.1.2 h1:M50VKzWnmUrk/M5/Dz99qO9Xh4vs8ijsK+7HkJvRP+0= @@ -863,8 +863,8 @@ github.com/libp2p/go-yamux v1.3.7 h1:v40A1eSPJDIZwz2AvrV3cxpTZEGDP11QJbukmEhYyQI github.com/libp2p/go-yamux v1.3.7/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE= github.com/lucas-clemente/quic-go v0.15.7 h1:Pu7To5/G9JoP1mwlrcIvfV8ByPBlCzif3MCl8+1W83I= github.com/lucas-clemente/quic-go v0.15.7/go.mod h1:Myi1OyS0FOjL3not4BxT7KN29bRkcMUV5JVVFLKtDp8= -github.com/lucas-clemente/quic-go v0.16.1 h1:hleW5QcJCNjGS10ggod6tQQy7XjVtagS6UIdzBMAWpg= -github.com/lucas-clemente/quic-go v0.16.1/go.mod h1:I0+fcNTdb9eS1ZcjQZbDVPGchJ86chcIxPALn9lEJqE= +github.com/lucas-clemente/quic-go v0.16.2 h1:A27xKWQtPTeOcIUF4EymmROkKlF/RbKBiMbflwv6RK0= +github.com/lucas-clemente/quic-go v0.16.2/go.mod h1:I0+fcNTdb9eS1ZcjQZbDVPGchJ86chcIxPALn9lEJqE= github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329 h1:2gxZ0XQIU/5z3Z3bUBu+FXuk2pFbkN6tcwi/pjyaDic= From e164af1f2ac6daaec78d56340e43333d9147e20d Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Tue, 16 Jun 2020 01:02:21 -0700 Subject: [PATCH 26/45] feat: add a transport config section This way, users can disable transports (especially QUIC), and set muxer/security transport priorities. --- cmd/ipfs/daemon.go | 8 +- core/node/groups.go | 27 ++- core/node/libp2p/libp2p.go | 31 +++ core/node/libp2p/relay.go | 9 +- core/node/libp2p/sec.go | 39 +++ core/node/libp2p/smux.go | 79 ++++--- core/node/libp2p/transport.go | 73 +++--- docs/config.md | 395 +++++++++++++++++++++++++++++-- docs/environment-variables.md | 2 + docs/experimental-features.md | 13 +- go.mod | 4 +- go.sum | 4 +- test/sharness/t0125-twonode.sh | 33 ++- test/sharness/t0130-multinode.sh | 23 +- test/sharness/t0190-quic-ping.sh | 4 +- test/sharness/t0191-noise.sh | 12 +- 16 files changed, 606 insertions(+), 150 deletions(-) create mode 100644 core/node/libp2p/sec.go diff --git a/cmd/ipfs/daemon.go b/cmd/ipfs/daemon.go index e5a9b922c..11769dbd0 100644 --- a/cmd/ipfs/daemon.go +++ b/cmd/ipfs/daemon.go @@ -174,7 +174,7 @@ Headers. cmds.BoolOption(migrateKwd, "If true, assume yes at the migrate prompt. If false, assume no."), cmds.BoolOption(enablePubSubKwd, "Instantiate the ipfs daemon with the experimental pubsub feature enabled."), cmds.BoolOption(enableIPNSPubSubKwd, "Enable IPNS record distribution through pubsub; enables pubsub."), - cmds.BoolOption(enableMultiplexKwd, "Add the experimental 'go-multiplex' stream muxer to libp2p on construction.").WithDefault(true), + cmds.BoolOption(enableMultiplexKwd, "DEPRECATED"), // TODO: add way to override addresses. tricky part: updating the config if also --init. // cmds.StringOption(apiAddrKwd, "Address for the daemon rpc API (overrides config)"), @@ -296,7 +296,10 @@ func daemonFunc(req *cmds.Request, re cmds.ResponseEmitter, env cmds.Environment offline, _ := req.Options[offlineKwd].(bool) ipnsps, _ := req.Options[enableIPNSPubSubKwd].(bool) pubsub, _ := req.Options[enablePubSubKwd].(bool) - mplex, _ := req.Options[enableMultiplexKwd].(bool) + if _, hasMplex := req.Options[enableMultiplexKwd]; hasMplex { + log.Errorf("The mplex multiplexer has been enabled by default and the experimental %s flag has been removed.") + log.Errorf("To disable this multiplexer, please configure `Swarm.Transports.Multiplexers'.") + } // Start assembling node config ncfg := &core.BuildCfg{ @@ -307,7 +310,6 @@ func daemonFunc(req *cmds.Request, re cmds.ResponseEmitter, env cmds.Environment ExtraOpts: map[string]bool{ "pubsub": pubsub, "ipnsps": ipnsps, - "mplex": mplex, }, //TODO(Kubuxu): refactor Online vs Offline by adding Permanent vs Ephemeral } diff --git a/core/node/groups.go b/core/node/groups.go index 823d9037b..90245ba05 100644 --- a/core/node/groups.go +++ b/core/node/groups.go @@ -9,6 +9,7 @@ import ( blockstore "github.com/ipfs/go-ipfs-blockstore" config "github.com/ipfs/go-ipfs-config" util "github.com/ipfs/go-ipfs-util" + log "github.com/ipfs/go-log" peer "github.com/libp2p/go-libp2p-core/peer" pubsub "github.com/libp2p/go-libp2p-pubsub" @@ -22,12 +23,12 @@ import ( "go.uber.org/fx" ) +var logger = log.Logger("core:constructor") + var BaseLibP2P = fx.Options( fx.Provide(libp2p.UserAgent), fx.Provide(libp2p.PNet), fx.Provide(libp2p.ConnectionManager), - fx.Provide(libp2p.Transports), - fx.Provide(libp2p.Host), fx.Provide(libp2p.DiscoveryHandler), @@ -108,19 +109,33 @@ func LibP2P(bcfg *BuildCfg, cfg *config.Config) fx.Option { autonat = fx.Provide(libp2p.AutoNATService(cfg.AutoNAT.Throttle)) } - // Gather all the options + // If `cfg.Swarm.DisableRelay` is set and `Network.Relay` isn't, use the former. + enableRelay := cfg.Swarm.Transports.Network.Relay.WithDefault(!cfg.Swarm.DisableRelay) //nolint + // Warn about a deprecated option. + //nolint + if cfg.Swarm.DisableRelay { + logger.Error("The `Swarm.DisableRelay' config field is deprecated.") + if enableRelay { + logger.Error("`Swarm.DisableRelay' has been overridden by `Swarm.Transports.Network.Relay'") + } else { + logger.Error("Use the `Swarm.Transports.Network.Relay' config field instead") + } + } + + // Gather all the options opts := fx.Options( BaseLibP2P, fx.Provide(libp2p.AddrFilters(cfg.Swarm.AddrFilters)), fx.Provide(libp2p.AddrsFactory(cfg.Addresses.Announce, cfg.Addresses.NoAnnounce)), - fx.Provide(libp2p.SmuxTransport(bcfg.getOpt("mplex"))), - fx.Provide(libp2p.Relay(cfg.Swarm.DisableRelay, cfg.Swarm.EnableRelayHop)), + fx.Provide(libp2p.SmuxTransport(cfg.Swarm.Transports)), + fx.Provide(libp2p.Relay(enableRelay, cfg.Swarm.EnableRelayHop)), + fx.Provide(libp2p.Transports(cfg.Swarm.Transports)), fx.Invoke(libp2p.StartListening(cfg.Addresses.Swarm)), fx.Invoke(libp2p.SetupDiscovery(cfg.Discovery.MDNS.Enabled, cfg.Discovery.MDNS.Interval)), - fx.Provide(libp2p.Security(!bcfg.DisableEncryptedConnections, cfg.Experimental.OverrideSecurityTransports)), + fx.Provide(libp2p.Security(!bcfg.DisableEncryptedConnections, cfg.Swarm.Transports)), fx.Provide(libp2p.Routing), fx.Provide(libp2p.BaseRouting), diff --git a/core/node/libp2p/libp2p.go b/core/node/libp2p/libp2p.go index d9b0b5f55..51183c954 100644 --- a/core/node/libp2p/libp2p.go +++ b/core/node/libp2p/libp2p.go @@ -1,9 +1,11 @@ package libp2p import ( + "sort" "time" version "github.com/ipfs/go-ipfs" + config "github.com/ipfs/go-ipfs-config" logging "github.com/ipfs/go-log" "github.com/libp2p/go-libp2p" @@ -48,3 +50,32 @@ func simpleOpt(opt libp2p.Option) func() (opts Libp2pOpts, err error) { return } } + +type priorityOption struct { + priority, defaultPriority config.Priority + opt libp2p.Option +} + +func prioritizeOptions(opts []priorityOption) libp2p.Option { + type popt struct { + priority int64 + opt libp2p.Option + } + enabledOptions := make([]popt, 0, len(opts)) + for _, o := range opts { + if prio, ok := o.priority.WithDefault(o.defaultPriority); ok { + enabledOptions = append(enabledOptions, popt{ + priority: prio, + opt: o.opt, + }) + } + } + sort.Slice(enabledOptions, func(i, j int) bool { + return enabledOptions[i].priority > enabledOptions[j].priority + }) + p2pOpts := make([]libp2p.Option, len(enabledOptions)) + for i, opt := range enabledOptions { + p2pOpts[i] = opt.opt + } + return libp2p.ChainOptions(p2pOpts...) +} diff --git a/core/node/libp2p/relay.go b/core/node/libp2p/relay.go index d27466dbf..e625b4d00 100644 --- a/core/node/libp2p/relay.go +++ b/core/node/libp2p/relay.go @@ -5,17 +5,16 @@ import ( relay "github.com/libp2p/go-libp2p-circuit" ) -func Relay(disable, enableHop bool) func() (opts Libp2pOpts, err error) { +func Relay(enableRelay, enableHop bool) func() (opts Libp2pOpts, err error) { return func() (opts Libp2pOpts, err error) { - if disable { - // Enabled by default. - opts.Opts = append(opts.Opts, libp2p.DisableRelay()) - } else { + if enableRelay { relayOpts := []relay.RelayOpt{} if enableHop { relayOpts = append(relayOpts, relay.OptHop) } opts.Opts = append(opts.Opts, libp2p.EnableRelay(relayOpts...)) + } else { + opts.Opts = append(opts.Opts, libp2p.DisableRelay()) } return } diff --git a/core/node/libp2p/sec.go b/core/node/libp2p/sec.go new file mode 100644 index 000000000..e129448c4 --- /dev/null +++ b/core/node/libp2p/sec.go @@ -0,0 +1,39 @@ +package libp2p + +import ( + config "github.com/ipfs/go-ipfs-config" + "github.com/libp2p/go-libp2p" + noise "github.com/libp2p/go-libp2p-noise" + secio "github.com/libp2p/go-libp2p-secio" + tls "github.com/libp2p/go-libp2p-tls" +) + +func Security(enabled bool, tptConfig config.Transports) interface{} { + if !enabled { + return func() (opts Libp2pOpts) { + // TODO: shouldn't this be Errorf to guarantee visibility? + log.Warnf(`Your IPFS node has been configured to run WITHOUT ENCRYPTED CONNECTIONS. + You will not be able to connect to any nodes configured to use encrypted connections`) + opts.Opts = append(opts.Opts, libp2p.NoSecurity) + return opts + } + } + + // Using the new config options. + return func() (opts Libp2pOpts) { + opts.Opts = append(opts.Opts, prioritizeOptions([]priorityOption{{ + priority: tptConfig.Security.TLS, + defaultPriority: 100, + opt: libp2p.Security(tls.ID, tls.New), + }, { + priority: tptConfig.Security.SECIO, + defaultPriority: 200, + opt: libp2p.Security(secio.ID, secio.New), + }, { + priority: tptConfig.Security.Noise, + defaultPriority: 300, + opt: libp2p.Security(noise.ID, noise.New), + }})) + return opts + } +} diff --git a/core/node/libp2p/smux.go b/core/node/libp2p/smux.go index e89e00956..8ce540109 100644 --- a/core/node/libp2p/smux.go +++ b/core/node/libp2p/smux.go @@ -1,54 +1,79 @@ package libp2p import ( + "fmt" "os" "strings" + config "github.com/ipfs/go-ipfs-config" "github.com/libp2p/go-libp2p" smux "github.com/libp2p/go-libp2p-core/mux" mplex "github.com/libp2p/go-libp2p-mplex" yamux "github.com/libp2p/go-libp2p-yamux" ) -func makeSmuxTransportOption(mplexExp bool) libp2p.Option { +func yamuxTransport() smux.Multiplexer { + tpt := *yamux.DefaultTransport + tpt.AcceptBacklog = 512 + if os.Getenv("YAMUX_DEBUG") != "" { + tpt.LogOutput = os.Stderr + } + + return &tpt +} + +func makeSmuxTransportOption(tptConfig config.Transports) (libp2p.Option, error) { const yamuxID = "/yamux/1.0.0" const mplexID = "/mplex/6.7.0" ymxtpt := *yamux.DefaultTransport ymxtpt.AcceptBacklog = 512 - if os.Getenv("YAMUX_DEBUG") != "" { - ymxtpt.LogOutput = os.Stderr - } - - muxers := map[string]smux.Multiplexer{yamuxID: &ymxtpt} - if mplexExp { - muxers[mplexID] = mplex.DefaultTransport - } - - // Allow muxer preference order overriding - order := []string{yamuxID, mplexID} if prefs := os.Getenv("LIBP2P_MUX_PREFS"); prefs != "" { - order = strings.Fields(prefs) - } + // Using legacy LIBP2P_MUX_PREFS variable. + log.Error("LIBP2P_MUX_PREFS is now deprecated.") + log.Error("Use the `Swarm.Transports.Multiplexers' config field.") + muxers := strings.Fields(prefs) + enabled := make(map[string]bool, len(muxers)) - opts := make([]libp2p.Option, 0, len(order)) - for _, id := range order { - tpt, ok := muxers[id] - if !ok { - log.Warn("unknown or duplicate muxer in LIBP2P_MUX_PREFS: %s", id) - continue + var opts []libp2p.Option + for _, tpt := range muxers { + if enabled[tpt] { + return nil, fmt.Errorf( + "duplicate muxer found in LIBP2P_MUX_PREFS: %s", + tpt, + ) + } + switch tpt { + case yamuxID: + opts = append(opts, libp2p.Muxer(tpt, yamuxTransport)) + case mplexID: + opts = append(opts, libp2p.Muxer(tpt, mplex.DefaultTransport)) + default: + return nil, fmt.Errorf("unknown muxer: %s", tpt) + } } - delete(muxers, id) - opts = append(opts, libp2p.Muxer(id, tpt)) + return libp2p.ChainOptions(opts...), nil + } else { + return prioritizeOptions([]priorityOption{{ + priority: tptConfig.Multiplexers.Yamux, + defaultPriority: 100, + opt: libp2p.Muxer(yamuxID, yamuxTransport), + }, { + priority: tptConfig.Multiplexers.Mplex, + defaultPriority: 200, + opt: libp2p.Muxer(mplexID, mplex.DefaultTransport), + }}), nil } - - return libp2p.ChainOptions(opts...) } -func SmuxTransport(mplex bool) func() (opts Libp2pOpts, err error) { +func SmuxTransport(tptConfig config.Transports) func() (opts Libp2pOpts, err error) { return func() (opts Libp2pOpts, err error) { - opts.Opts = append(opts.Opts, makeSmuxTransportOption(mplex)) - return + res, err := makeSmuxTransportOption(tptConfig) + if err != nil { + return opts, err + } + opts.Opts = append(opts.Opts, res) + return opts, nil } } diff --git a/core/node/libp2p/transport.go b/core/node/libp2p/transport.go index 0bbc7cf01..c5112e9c0 100644 --- a/core/node/libp2p/transport.go +++ b/core/node/libp2p/transport.go @@ -3,63 +3,44 @@ package libp2p import ( "fmt" - "github.com/libp2p/go-libp2p" + config "github.com/ipfs/go-ipfs-config" + libp2p "github.com/libp2p/go-libp2p" metrics "github.com/libp2p/go-libp2p-core/metrics" - noise "github.com/libp2p/go-libp2p-noise" libp2pquic "github.com/libp2p/go-libp2p-quic-transport" - secio "github.com/libp2p/go-libp2p-secio" - tls "github.com/libp2p/go-libp2p-tls" + tcp "github.com/libp2p/go-tcp-transport" + websocket "github.com/libp2p/go-ws-transport" "go.uber.org/fx" ) -// default security transports for libp2p -var defaultSecurityTransports = []string{"tls", "secio", "noise"} +func Transports(tptConfig config.Transports) interface{} { + return func(pnet struct { + fx.In + Fprint PNetFingerprint `optional:"true"` + }) (opts Libp2pOpts, err error) { + privateNetworkEnabled := pnet.Fprint != nil -func Transports(pnet struct { - fx.In - Fprint PNetFingerprint `optional:"true"` -}) (opts Libp2pOpts) { - opts.Opts = append(opts.Opts, libp2p.DefaultTransports) - if pnet.Fprint == nil { - opts.Opts = append(opts.Opts, libp2p.Transport(libp2pquic.NewTransport)) - } - return opts -} - -func Security(enabled bool, securityTransportOverride []string) interface{} { - if !enabled { - return func() (opts Libp2pOpts) { - // TODO: shouldn't this be Errorf to guarantee visibility? - log.Warnf(`Your IPFS node has been configured to run WITHOUT ENCRYPTED CONNECTIONS. - You will not be able to connect to any nodes configured to use encrypted connections`) - opts.Opts = append(opts.Opts, libp2p.NoSecurity) - return opts + if tptConfig.Network.TCP.WithDefault(true) { + opts.Opts = append(opts.Opts, libp2p.Transport(tcp.NewTCPTransport)) } - } - securityTransports := defaultSecurityTransports - if len(securityTransportOverride) > 0 { - securityTransports = securityTransportOverride - } - - var libp2pOpts []libp2p.Option - for _, tpt := range securityTransports { - switch tpt { - case "tls": - libp2pOpts = append(libp2pOpts, libp2p.Security(tls.ID, tls.New)) - case "secio": - libp2pOpts = append(libp2pOpts, libp2p.Security(secio.ID, secio.New)) - case "noise": - libp2pOpts = append(libp2pOpts, libp2p.Security(noise.ID, noise.New)) - default: - return fx.Error(fmt.Errorf("invalid security transport specified in config: %s", tpt)) + if tptConfig.Network.Websocket.WithDefault(true) { + opts.Opts = append(opts.Opts, libp2p.Transport(websocket.New)) } - } - return func() (opts Libp2pOpts) { - opts.Opts = append(opts.Opts, libp2p.ChainOptions(libp2pOpts...)) - return opts + if tptConfig.Network.QUIC.WithDefault(!privateNetworkEnabled) { + if privateNetworkEnabled { + // QUIC was force enabled while the private network was turned on. + // Fail and tell the user. + return opts, fmt.Errorf( + "The QUIC transport does not support private networks. " + + "Please disable Swarm.Transports.Network.QUIC.", + ) + } + opts.Opts = append(opts.Opts, libp2p.Transport(libp2pquic.NewTransport)) + } + + return opts, nil } } diff --git a/docs/config.md b/docs/config.md index ac5e01682..028251fe7 100644 --- a/docs/config.md +++ b/docs/config.md @@ -5,7 +5,7 @@ is read once at node instantiation, either for an offline command, or when starting the daemon. Commands that execute on a running daemon do not read the config file at runtime. -#### Profiles +## Profiles Configuration profiles allow to tweak configuration quickly. Profiles can be applied with `--profile` flag to `ipfs init` or with the `ipfs config profile @@ -89,6 +89,46 @@ documented in `ipfs config profile --help`. functionality - performance of content discovery and data fetching may be degraded. +## Types + +This document refers to the standard JSON types (e.g., `null`, `string`, +`number`, etc.), as well as a few custom types, described below. + +### `flag` + +Flags allow enabling and disabling features. However, unlike simple booleans, +they can also be `null` (or omitted) to indicate that the default value should +be chosen. This makes it easier for go-ipfs to change the defaults in the +future unless the user _explicitly_ sets the flag to either `true` (enabled) or +`false` (disabled). Flags have three possible states: + +- `null` or missing (apply the default value). +- `true` (enabled) +- `false` (disabled) + +### `priority` + +Priorities allow specifying the priority of a feature/protocol and disabling the +feature/protocol. Priorities can take one of the following values: + +- `null`/missing (apply the default priority, same as with flags) +- `false` (disabled) +- `1 - 2^63` (priority, lower is preferred) + +### `strings` + +Strings is a special type for conveniently specifying a single string, an array +of strings, or null: + +- `null` +- `"a single string"` +- `["an", "array", "of", "strings"]` + +### `duration` + +Duration is a type for describing lengths of time, using the same format go +does (e.g, `"1d2h4m40.01s"`). + ## Table of Contents - [`Addresses`](#addresses) @@ -176,6 +216,8 @@ Supported Transports: Default: `/ip4/127.0.0.1/tcp/5001` +Type: `strings` + ### `Addresses.Gateway` Multiaddr or array of multiaddrs describing the address to serve the local @@ -188,6 +230,8 @@ Supported Transports: Default: `/ip4/127.0.0.1/tcp/8080` +Type: `strings` + ### `Addresses.Swarm` Array of multiaddrs describing which addresses to listen on for p2p swarm @@ -209,6 +253,8 @@ Default: ] ``` +Type: `array[string]` + ### `Addresses.Announce` If non-empty, this array specifies the swarm addresses to announce to the @@ -216,11 +262,15 @@ network. If empty, the daemon will announce inferred swarm addresses. Default: `[]` +Type: `array[string]` + ### `Addresses.NoAnnounce` Array of swarm addresses not to announce to the network. Default: `[]` +Type: `array[string]` + ## `API` Contains information used by the API gateway. @@ -236,6 +286,8 @@ Example: Default: `null` +Type: `object[string -> array[string]]` + ## `AutoNAT` Contains the configuration options for the AutoNAT service. The AutoNAT service @@ -253,6 +305,8 @@ field can take one of two values: Additional modes may be added in the future. +Type: `string` (can only be "enabled" and "disabled") + ### `AutoNAT.Throttle` When set, this option configure's the AutoNAT services throttling behavior. By @@ -265,18 +319,24 @@ Configures how many AutoNAT requests to service per `AutoNAT.Throttle.Interval`. Default: 30 +Type: `integer` + ### `AutoNAT.Throttle.PeerLimit` Configures how many AutoNAT requests per-peer to service per `AutoNAT.Throttle.Interval`. Default: 3 +Type: `integer` + ### `AutoNAT.Throttle.Interval` Configures the interval for the above limits. Default: 1 Minute +Type: `duration` + ## `Bootstrap` Bootstrap is an array of multiaddrs of trusted nodes to connect to in order to @@ -284,6 +344,8 @@ initiate a connection to the network. Default: The ipfs.io bootstrap nodes +Type: `array[string]` + ## `Datastore` Contains information related to the construction and operation of the on-disk @@ -294,7 +356,9 @@ storage system. A soft upper limit for the size of the ipfs repository's datastore. With `StorageGCWatermark`, is used to calculate whether to trigger a gc run (only if `--enable-gc` flag is set). -Default: `10GB` +Default: `"10GB"` + +Type: `string` (size) ### `Datastore.StorageGCWatermark` @@ -304,6 +368,8 @@ option defaults to false currently). Default: `90` +Type: `integer` + ### `Datastore.GCPeriod` A time duration specifying how frequently to run a garbage collection. Only used @@ -311,6 +377,8 @@ if automatic gc is enabled. Default: `1h` +Type: `duration` or an empty string for the default value. + ### `Datastore.HashOnRead` A boolean value. If set to true, all block reads from disk will be hashed and @@ -318,6 +386,8 @@ verified. This will cause increased CPU utilization. Default: `false` +Type: `bool` + ### `Datastore.BloomFilterSize` A number representing the size in bytes of the blockstore's [bloom @@ -334,8 +404,9 @@ we'd want to use 1199120 bytes. As of writing, [7 hash functions](https://github.com/ipfs/go-ipfs-blockstore/blob/547442836ade055cc114b562a3cc193d4e57c884/caching.go#L22) are used, so the constant `k` is 7 in the formula. +Default: `0` (disabled) -Default: `0` +Type: `integer` ### `Datastore.Spec` @@ -381,6 +452,8 @@ Default: } ``` +Type: `object` + ## `Discovery` Contains options for configuring ipfs node discovery mechanisms. @@ -395,10 +468,14 @@ A boolean value for whether or not mdns should be active. Default: `true` +Type: `bool` + #### `Discovery.MDNS.Interval` A number of seconds to wait between discovery checks. +Type: `integer` (_not_ a duration) + ## `Gateway` Options for the HTTP gateway. @@ -410,6 +487,8 @@ and will not fetch files from the network. Default: `false` +Type: `bool` + ### `Gateway.NoDNSLink` A boolean to configure whether DNSLink lookup for value in `Host` HTTP header @@ -418,6 +497,8 @@ record becomes the `/` and respective payload is returned to the client. Default: `false` +Type: `bool` + ### `Gateway.HTTPHeaders` Headers to set on gateway responses. @@ -437,18 +518,24 @@ Default: } ``` +Type: `object[string -> array[string]]` + ### `Gateway.RootRedirect` A url to redirect requests for `/` to. Default: `""` +Type: `string` + ### `Gateway.Writable` A boolean to configure whether the gateway is writeable or not. Default: `false` +Type: `bool` + ### `Gateway.PathPrefixes` Array of acceptable url paths that a client can specify in X-Ipfs-Path-Prefix @@ -479,6 +566,7 @@ location /blog/ { Default: `[]` +Type: `array[string]` ### `Gateway.PublicGateways` @@ -505,6 +593,8 @@ Above enables `http://example.com/ipfs/*` and `http://example.com/ipns/*` but no Default: `[]` +Type: `array[string]` + #### `Gateway.PublicGateways: UseSubdomains` A boolean to configure whether the gateway at the hostname provides [Origin isolation](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy) @@ -542,6 +632,7 @@ between content roots. Default: `false` +Type: `bool` #### `Gateway.PublicGateways: NoDNSLink` @@ -551,6 +642,8 @@ If `Paths` are defined, they take priority over DNSLink. Default: `false` (DNSLink lookup enabled by default for every defined hostname) +Type: `bool` + #### Implicit defaults of `Gateway.PublicGateways` Default entries for `localhost` hostname and loopback IPs are always present. @@ -636,23 +729,33 @@ The unique PKI identity label for this configs peer. Set on init and never read, it's merely here for convenience. Ipfs will always generate the peerID from its keypair at runtime. +Type: `string` + ### `Identity.PrivKey` The base64 encoded protobuf describing (and containing) the nodes private key. +Type: `string` + ## `Ipns` ### `Ipns.RepublishPeriod` A time duration specifying how frequently to republish ipns records to ensure -they stay fresh on the network. If unset, we default to 4 hours. +they stay fresh on the network. + +Default: 4 hours. + +Type: `interval` or an empty string for the default. ### `Ipns.RecordLifetime` A time duration specifying the value to set on ipns records for their validity lifetime. -If unset, we default to 24 hours. +Default: 24 hours. + +Type: `interval` or an empty string for the default. ### `Ipns.ResolveCacheSize` @@ -661,6 +764,8 @@ will be kept cached until their lifetime is expired. Default: `128` +Type: `integer` + ## `Mounts` FUSE mount point configuration options. @@ -669,10 +774,18 @@ FUSE mount point configuration options. Mountpoint for `/ipfs/`. +Default: `/ipfs` + +Type: `string` + ### `Mounts.IPNS` Mountpoint for `/ipns/`. +Default: `/ipns` + +Type: `string` + ### `Mounts.FuseAllowOther` Sets the FUSE allow other option on the mountpoint. @@ -693,6 +806,8 @@ Sets the default router used by pubsub to route messages to peers. This can be o Default: `"gossipsub"` +Type: `string` + [gossipsub]: https://github.com/libp2p/specs/tree/master/pubsub/gossipsub ### `Pubsub.DisableSigning` @@ -706,6 +821,8 @@ intentionally re-using the real message's message ID. Default: `false` +Type: `bool` + ### `Peering` Configures the peering subsystem. The peering subsystem configures go-ipfs to @@ -756,6 +873,10 @@ The set of peers with which to peer. Each entry is of the form: Additional fields may be added in the future. +Default: empty. + +Type: `array[peering]` + ## `Reprovider` ### `Reprovider.Interval` @@ -769,12 +890,18 @@ not being able to discover that you have the objects that you have. If you want to have this disabled and keep the network aware of what you have, you must manually announce your content periodically. +Type: `array[peering]` + ### `Reprovider.Strategy` Tells reprovider what should be announced. Valid strategies are: - - "all" (default) - announce all stored data + - "all" - announce all stored data - "pinned" - only announce pinned data - "roots" - only announce directly pinned keys and root keys of recursive pins + +Default: all + +Type: `string` (or unset for the default) ## `Routing` @@ -817,6 +944,9 @@ unless you're sure your node is reachable from the public network. } ``` +Default: dht + +Type: `string` (or unset for the default) ## `Swarm` @@ -836,6 +966,9 @@ preventing dials to all non-routable IP addresses (e.g., `192.168.0.0/16`) but you should always check settings against your own network and/or hosting provider. +Default: `[]` + +Type: `array[string]` ### `Swarm.DisableBandwidthMetrics` @@ -843,6 +976,10 @@ A boolean value that when set to true, will cause ipfs to not keep track of bandwidth metrics. Disabling bandwidth metrics can lead to a slight performance improvement, as well as a reduction in memory usage. +Default: `false` + +Type: `bool` + ### `Swarm.DisableNatPortMap` Disable automatic NAT port forwarding. @@ -852,12 +989,22 @@ up an external port and forward it to the port go-ipfs is running on. When this works (i.e., when your router supports NAT port forwarding), it makes the local go-ipfs node accessible from the public internet. +Default: `false` + +Type: `bool` + ### `Swarm.DisableRelay` +Deprecated: Set `Swarm.Transports.Network.Relay` to `false`. + Disables the p2p-circuit relay transport. This will prevent this node from connecting to nodes behind relays, or accepting connections from nodes behind relays. +Default: `false` + +Type: `bool` + ### `Swarm.EnableRelayHop` Configures this node to act as a relay "hop". A relay "hop" relays traffic for other peers. @@ -866,12 +1013,20 @@ WARNING: Do not enable this option unless you know what you're doing. Other peers will randomly decide to use your node as a relay and consume _all_ available bandwidth. There is _no_ rate-limiting. +Default: `false` + +Type: `bool` + ### `Swarm.EnableAutoRelay` Enables "automatic relay" mode for this node. This option does two _very_ different things based on the `Swarm.EnableRelayHop`. See [#7228](https://github.com/ipfs/go-ipfs/issues/7228) for context. +Default: `false` + +Type: `bool` + #### Mode 1: `EnableRelayHop` is `false` If `Swarm.EnableAutoRelay` is enabled and `Swarm.EnableRelayHop` is disabled, @@ -906,30 +1061,24 @@ be configured to keep. Sets the type of connection manager to use, options are: `"none"` (no connection management) and `"basic"`. +Default: `"basic"` + +Type: `string` (one of `"basic"`, `"none"`, or `""` (default, i.e. `"basic"`). + #### Basic Connection Manager -##### `Swarm.ConnMgr.LowWater` +The basic connection manager uses a "high water", a "low water", and internal +scoring to periodically close connections to free up resources. When a node +using the basic connection manager reaches `HighWater` idle connections, it will +close the least useful ones until it reaches `LowWater` idle connections. -LowWater is the minimum number of connections to maintain. +The connection manager considers a connection idle if: -##### `Swarm.ConnMgr.HighWater` - -HighWater is the number of connections that, when exceeded, will trigger a -connection GC operation. - -##### `Swarm.ConnMgr.GracePeriod` - -GracePeriod is a time duration that new connections are immune from being closed -by the connection manager. - -The "basic" connection manager tries to keep between `LowWater` and `HighWater` -connections. It works by: - -1. Keeping all connections until `HighWater` connections is reached. -2. Once `HighWater` is reached, it closes connections until `LowWater` is - reached. -3. To prevent thrashing, it never closes connections established within the - `GracePeriod`. +* It has not been explicitly _protected_ by some subsystem. For example, Bitswap + will protect connections to peers from which it is actively downloading data, + the DHT will protect some peers for routing, and the peering subsystem will + protect all "peered" nodes. +* It has existed for longer than the `GracePeriod`. **Example:** @@ -945,3 +1094,197 @@ connections. It works by: } } ``` + +##### `Swarm.ConnMgr.LowWater` + +LowWater is the number of connections that the basic connection manager will +trim down to. + +Default: `600` + +Type: `integer` + +##### `Swarm.ConnMgr.HighWater` + +HighWater is the number of connections that, when exceeded, will trigger a +connection GC operation. Note: protected/recently formed connections don't count +towards this limit. + +Default: `900` + +Type: `integer` + +##### `Swarm.ConnMgr.GracePeriod` + +GracePeriod is a time duration that new connections are immune from being closed +by the connection manager. + +Default: `"20s"` + +Type: `duration` + +### `Swarm.Transports` + +Configuration section for libp2p transports. An empty configuration will apply +the defaults. + +### `Swarm.Transports.Network` + +Configuration section for libp2p _network_ transports. Transports enabled in +this section will be used for dialing. However, to receive connections on these +transports, multiaddrs for these transports must be added to `Addresses.Swarm`. + +Supported transports are: QUIC, TCP, WS, and Relay. + +Each field in this section is a `flag`. + +#### `Swarm.Transports.Network.TCP` + +[TCP](https://en.wikipedia.org/wiki/Transmission_Control_Protocol) is the most +widely used transport by go-ipfs nodes. It doesn't directly support encryption +and/or multiplexing, so libp2p will layer a security & multiplexing transport +over it. + +Default: Enabled + +Type: `flag` + +Listen Addresses: +* /ip4/0.0.0.0/tcp/4001 (default) +* /ip6/::/tcp/4001 (default) + +#### `Swarm.Transports.Network.Websocket` + +[Websocket](https://en.wikipedia.org/wiki/WebSocket) is a transport usually used +to connect to non-browser-based IPFS nodes from browser-based js-ipfs nodes. + +While it's enabled by default for dialing, go-ipfs doesn't listen on this +transport by default. + +Default: Enabled + +Type: `flag` + +Listen Addresses: +* /ip4/0.0.0.0/tcp/4002/ws +* /ip6/::/tcp/4002/ws + +#### `Swarm.Transports.Network.QUIC` + +[QUIC](https://en.wikipedia.org/wiki/QUIC) is a UDP-based transport with +built-in encryption and multiplexing. The primary benefits over TCP are: + +1. It doesn't require a file descriptor per connection, easing the load on the OS. +2. It currently takes 2 round trips to establish a connection (our TCP transport + currently takes 6). + +Default: Enabled + +Type: `flag` + +Listen Addresses: +* /ip4/0.0.0.0/udp/4001/quic (default) +* /ip6/::/udp/4001/quic (default) + +#### `Swarm.Transports.Network.Relay` + +[Libp2p Relay](https://github.com/libp2p/specs/tree/master/relay) proxy +transport that forms connections by hopping between multiple libp2p nodes. This +transport is primarily useful for bypassing firewalls and NATs. + +Default: Enabled + +Type: `flag` + +Listen Addresses: This transport is special. Any node that enables this +transport can receive inbound connections on this transport, without specifying +a listen address. + +### `Swarm.Transports.Security` + +Configuration section for libp2p _security_ transports. Transports enabled in +this section will be used to secure unencrypted connections. + +Security transports are configured with the `priority` type. + +When establishing an _outbound_ connection, go-ipfs will try each security +transport in priority order (lower first), until it finds a protocol that the +receiver supports. When establishing an _inbound_ connection, go-ipfs will let +the initiator choose the protocol, but will refuse to use any of the disabled +transports. + +Supported transports are: TLS (priority 100), SECIO (priority 200), Noise +(priority 300). + +No default priority will ever be less than 100. + +#### `Swarm.Transports.Security.TLS` + +[TLS](https://github.com/libp2p/specs/tree/master/tls) (1.3) is the default +security transport as of go-ipfs 0.5.0. It's also the most scrutinized and +trusted security transport. + +Default: `100` + +Type: `priority` + +#### `Swarm.Transports.Security.SECIO` + +[SECIO](https://github.com/libp2p/specs/tree/master/secio) is the most widely +supported IPFS & libp2p security transport. However, it is currently being +phased out in favor of more popular and better vetted protocols like TLS and +Noise. + +Default: `200` + +Type: `priority` + +#### `Swarm.Transports.Security.Noise` + +[Noise](https://github.com/libp2p/specs/tree/master/noise) is slated to replace +TLS as the cross-platform, default libp2p protocol due to ease of +implementation. It is currently enabled by default but with low priority as it's +not yet widely supported. + +Default: `300` + +Type: `priority` + +### `Swarm.Transports.Multiplexers` + +Configuration section for libp2p _multiplexer_ transports. Transports enabled in +this section will be used to multiplex duplex connections. + +Multiplexer transports are secured the same way security transports are, with +the `priority` type. Like with security transports, the initiator gets their +first choice. + +Supported transports are: Yamux (priority 100) and Mplex (priority 200) + +No default priority will ever be less than 100. + +### `Swarm.Transports.Multiplexers.Yamux` + +Yamux is the default multiplexer used when communicating between go-ipfs nodes. + +Default: `100` + +Type: `priority` + +### `Swarm.Transports.Multiplexers.Mplex` + +Mplex is the default multiplexer used when communicating between go-ipfs and all +other IPFS and libp2p implementations. Unlike Yamux: + +* Mplex is a simpler protocol. +* Mplex is more efficient. +* Mplex does not have built-in keepalives. +* Mplex does not support backpressure. Unfortunately, this means that, if a + single stream to a peer gets backed up for a period of time, the mplex + transport will kill the stream to allow the others to proceed. On the other + hand, the lack of backpressure means mplex can be significantly faster on some + high-latency connections. + +Default: `200` + +Type: `priority` diff --git a/docs/environment-variables.md b/docs/environment-variables.md index b2338ae3f..7f7d0f53b 100644 --- a/docs/environment-variables.md +++ b/docs/environment-variables.md @@ -98,6 +98,8 @@ $ ipfs resolve -r /ipns/dnslink-test2.example.com ## `LIBP2P_MUX_PREFS` +Deprecated: Use the `Swarm.Transports.Multiplexers` config field. + Tells go-ipfs which multiplexers to use in which order. Default: "/yamux/1.0.0 /mplex/6.7.0" diff --git a/docs/experimental-features.md b/docs/experimental-features.md index 6fd639e76..725ccd462 100644 --- a/docs/experimental-features.md +++ b/docs/experimental-features.md @@ -550,12 +550,17 @@ Experimental, enabled by default ### How to enable -While the Noise transport is now shipped and enabled by default in go-ipfs, it won't be used by default for most connections because TLS and SECIO are currently preferred. If you'd like to test out the Noise transport, you can use the `Experimental.OverrideSecurityTransports` option to enable, disable, and reorder security transports. - -For example, to prefer noise over TLS and disable SECIO, run: +While the Noise transport is now shipped and enabled by default in go-ipfs, it won't be used by default for most connections because TLS and SECIO are currently preferred. If you'd like to test out the Noise transport, you can increase the priority of the noise transport: ``` -ipfs config --json Experimental.OverrideSecurityTransports '["noise", "tls"]' +ipfs config --json Swarm.Transports.Security.Noise 1 +``` + +Or even disable TLS and/or SECIO (not recommended for the moment): + +``` +ipfs config --json Swarm.Transports.Security.TLS false +ipfs config --json Swarm.Transports.Security.SECIO false ``` ### Road to being a real feature diff --git a/go.mod b/go.mod index 7bbb9998b..0c1c39327 100644 --- a/go.mod +++ b/go.mod @@ -32,7 +32,7 @@ require ( github.com/ipfs/go-ipfs-blockstore v0.1.4 github.com/ipfs/go-ipfs-chunker v0.0.5 github.com/ipfs/go-ipfs-cmds v0.2.9 - github.com/ipfs/go-ipfs-config v0.7.1 + github.com/ipfs/go-ipfs-config v0.8.0 github.com/ipfs/go-ipfs-ds-help v0.1.1 github.com/ipfs/go-ipfs-exchange-interface v0.0.1 github.com/ipfs/go-ipfs-exchange-offline v0.0.1 @@ -83,6 +83,8 @@ require ( github.com/libp2p/go-libp2p-tls v0.1.3 github.com/libp2p/go-libp2p-yamux v0.2.8 github.com/libp2p/go-socket-activation v0.0.2 + github.com/libp2p/go-tcp-transport v0.2.0 + github.com/libp2p/go-ws-transport v0.3.1 github.com/mattn/go-runewidth v0.0.9 // indirect github.com/miekg/dns v1.1.29 // indirect github.com/mitchellh/go-homedir v1.1.0 diff --git a/go.sum b/go.sum index 605c21636..6e1dbddf2 100644 --- a/go.sum +++ b/go.sum @@ -342,8 +342,8 @@ github.com/ipfs/go-ipfs-chunker v0.0.5 h1:ojCf7HV/m+uS2vhUGWcogIIxiO5ubl5O57Q7Na github.com/ipfs/go-ipfs-chunker v0.0.5/go.mod h1:jhgdF8vxRHycr00k13FM8Y0E+6BoalYeobXmUyTreP8= github.com/ipfs/go-ipfs-cmds v0.2.9 h1:zQTENe9UJrtCb2bOtRoDGjtuo3rQjmuPdPnVlqoBV/M= github.com/ipfs/go-ipfs-cmds v0.2.9/go.mod h1:ZgYiWVnCk43ChwoH8hAmI1IRbuVtq3GSTHwtRB/Kqhk= -github.com/ipfs/go-ipfs-config v0.7.1 h1:57ZzoiUIbOIT01x1RconKtCv1MElV/6+kqW8hZY9NJ4= -github.com/ipfs/go-ipfs-config v0.7.1/go.mod h1:GQUxqb0NfkZmEU92PxqqqLVVFTLpoGGUlBaTyDaAqrE= +github.com/ipfs/go-ipfs-config v0.8.0 h1:4Tc7DC3dz4e7VadOjxXxFQGTQ1g7EYZClJ/ih8qOrxE= +github.com/ipfs/go-ipfs-config v0.8.0/go.mod h1:GQUxqb0NfkZmEU92PxqqqLVVFTLpoGGUlBaTyDaAqrE= github.com/ipfs/go-ipfs-delay v0.0.0-20181109222059-70721b86a9a8/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= github.com/ipfs/go-ipfs-delay v0.0.1 h1:r/UXYyRcddO6thwOnhiznIAiSvxMECGgtv35Xs1IeRQ= github.com/ipfs/go-ipfs-delay v0.0.1/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= diff --git a/test/sharness/t0125-twonode.sh b/test/sharness/t0125-twonode.sh index a3b1006a4..d8fb45e44 100755 --- a/test/sharness/t0125-twonode.sh +++ b/test/sharness/t0125-twonode.sh @@ -89,38 +89,47 @@ test_expect_success "set up tcp testbed" ' iptb testbed create -type localipfs -count 2 -force -init ' +addrs='"[\"/ip4/127.0.0.1/tcp/0\", \"/ip4/127.0.0.1/udp/0/quic\"]"' +test_expect_success "configure addresses" ' + ipfsi 0 config --json Addresses.Swarm '"${addrs}"' && + ipfsi 1 config --json Addresses.Swarm '"${addrs}"' +' + # Test TCP transport echo "Testing TCP" -tcp_addr='"[\"/ip4/127.0.0.1/tcp/0\"]"' test_expect_success "use TCP only" ' - ipfsi 0 config --json Addresses.Swarm '${tcp_addr}' && - ipfsi 1 config --json Addresses.Swarm '${tcp_addr}' + iptb run -- ipfs config --json Swarm.Transports.Network.QUIC false && + iptb run -- ipfs config --json Swarm.Transports.Network.Relay false && + iptb run -- ipfs config --json Swarm.Transports.Network.Websocket false ' run_advanced_test # test multiplex muxer echo "Running advanced tests with mplex" -export LIBP2P_MUX_PREFS="/mplex/6.7.0" -run_advanced_test "--enable-mplex-experiment" -unset LIBP2P_MUX_PREFS +test_expect_success "disable yamux" ' + iptb run -- ipfs config --json Swarm.Transports.Multiplexers.Yamux false +' +run_advanced_test + +test_expect_success "re-enable yamux" ' + iptb run -- ipfs config --json Swarm.Transports.Multiplexers.Yamux null +' # test Noise echo "Running advanced tests with NOISE" -noise_transports='"[\"noise\"]"' test_expect_success "use noise only" ' - ipfsi 0 config --json Experimental.OverrideSecurityTransports '${noise_transports}' && - ipfsi 1 config --json Experimental.OverrideSecurityTransports '${noise_transports}' + iptb run -- ipfs config --json Swarm.Transports.Security.TLS false && + iptb run -- ipfs config --json Swarm.Transports.Security.Secio false ' run_advanced_test # test QUIC echo "Running advanced tests over QUIC" -addr1='"[\"/ip4/127.0.0.1/udp/0/quic\"]"' test_expect_success "use QUIC only" ' - ipfsi 0 config --json Addresses.Swarm '${quic_addr}' && - ipfsi 1 config --json Addresses.Swarm '${quic_addr}' + iptb run -- ipfs config --json Swarm.Transports.Network.QUIC true && + iptb run -- ipfs config --json Swarm.Transports.Network.TCP false ' run_advanced_test diff --git a/test/sharness/t0130-multinode.sh b/test/sharness/t0130-multinode.sh index e0a27b666..c018908d1 100755 --- a/test/sharness/t0130-multinode.sh +++ b/test/sharness/t0130-multinode.sh @@ -88,25 +88,28 @@ test_expect_success "set up /tcp testbed" ' iptb testbed create -type localipfs -count 5 -force -init ' -# test multiplex muxer -export LIBP2P_MUX_PREFS="/mplex/6.7.0" -run_advanced_test -unset LIBP2P_MUX_PREFS - # test default configuration run_advanced_test +# test multiplex muxer +test_expect_success "disable yamux" ' + iptb run -- ipfs config --json Swarm.Transports.Multiplexers.Yamux false +' +run_advanced_test + test_expect_success "set up /ws testbed" ' iptb testbed create -type localipfs -count 5 -attr listentype,ws -force -init ' -# test multiplex muxer -export LIBP2P_MUX_PREFS="/mplex/6.7.0" -run_advanced_test "--enable-mplex-experiment" -unset LIBP2P_MUX_PREFS - # test default configuration run_advanced_test +# test multiplex muxer +test_expect_success "disable yamux" ' + iptb run -- ipfs config --json Swarm.Transports.Multiplexers.Yamux false +' + +run_advanced_test + test_done diff --git a/test/sharness/t0190-quic-ping.sh b/test/sharness/t0190-quic-ping.sh index ee0bf16ac..0c2970cb9 100755 --- a/test/sharness/t0190-quic-ping.sh +++ b/test/sharness/t0190-quic-ping.sh @@ -11,8 +11,8 @@ test_expect_success 'init iptb' ' iptb testbed create -type localipfs -count 2 -init ' -addr1='"[\"/ip4/127.0.0.1/udp/0/quic/\"]"' -addr2='"[\"/ip4/127.0.0.1/udp/0/quic/\"]"' +addr1='"[\"/ip4/127.0.0.1/udp/0/quic\"]"' +addr2='"[\"/ip4/127.0.0.1/udp/0/quic\"]"' test_expect_success "add QUIC swarm addresses" ' ipfsi 0 config --json Addresses.Swarm '$addr1' && ipfsi 1 config --json Addresses.Swarm '$addr2' diff --git a/test/sharness/t0191-noise.sh b/test/sharness/t0191-noise.sh index 4787dfc53..bffec2d80 100755 --- a/test/sharness/t0191-noise.sh +++ b/test/sharness/t0191-noise.sh @@ -11,14 +11,14 @@ test_expect_success 'init iptb' ' iptb testbed create -type localipfs -count 3 -init ' -noise_transports='"[\"noise\"]"' -other_transports='"[\"tls\",\"secio\"]"' tcp_addr='"[\"/ip4/127.0.0.1/tcp/0\"]"' test_expect_success "configure security transports" ' - ipfsi 0 config --json Experimental.OverrideSecurityTransports '${noise_transports}' && - ipfsi 1 config --json Experimental.OverrideSecurityTransports '${noise_transports}' && - ipfsi 2 config --json Experimental.OverrideSecurityTransports '${other_transports}' && - iptb run -- ipfs config --json Addresses.Swarm '${tcp_addr}' +iptb run < Date: Tue, 16 Jun 2020 11:10:43 -0700 Subject: [PATCH 27/45] doc(config): expand on config value limits --- docs/config.md | 58 ++++++++++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 25 deletions(-) diff --git a/docs/config.md b/docs/config.md index 028251fe7..658a90c25 100644 --- a/docs/config.md +++ b/docs/config.md @@ -216,7 +216,7 @@ Supported Transports: Default: `/ip4/127.0.0.1/tcp/5001` -Type: `strings` +Type: `strings` (multiaddrs) ### `Addresses.Gateway` @@ -230,7 +230,7 @@ Supported Transports: Default: `/ip4/127.0.0.1/tcp/8080` -Type: `strings` +Type: `strings` (multiaddrs) ### `Addresses.Swarm` @@ -253,7 +253,7 @@ Default: ] ``` -Type: `array[string]` +Type: `array[string]` (multiaddrs) ### `Addresses.Announce` @@ -262,14 +262,14 @@ network. If empty, the daemon will announce inferred swarm addresses. Default: `[]` -Type: `array[string]` +Type: `array[string]` (multiaddrs) ### `Addresses.NoAnnounce` Array of swarm addresses not to announce to the network. Default: `[]` -Type: `array[string]` +Type: `array[string]` (multiaddrs) ## `API` Contains information used by the API gateway. @@ -286,7 +286,7 @@ Example: Default: `null` -Type: `object[string -> array[string]]` +Type: `object[string -> array[string]]` (header names -> array of header values) ## `AutoNAT` @@ -305,7 +305,7 @@ field can take one of two values: Additional modes may be added in the future. -Type: `string` (can only be "enabled" and "disabled") +Type: `string` (one of `"enabled"` or `"disabled"`) ### `AutoNAT.Throttle` @@ -319,7 +319,7 @@ Configures how many AutoNAT requests to service per `AutoNAT.Throttle.Interval`. Default: 30 -Type: `integer` +Type: `integer` (non-negative, `0` means unlimited) ### `AutoNAT.Throttle.PeerLimit` @@ -327,7 +327,7 @@ Configures how many AutoNAT requests per-peer to service per `AutoNAT.Throttle.I Default: 3 -Type: `integer` +Type: `integer` (non-negative, `0` means unlimited) ### `AutoNAT.Throttle.Interval` @@ -335,7 +335,7 @@ Configures the interval for the above limits. Default: 1 Minute -Type: `duration` +Type: `duration` (when `0`/unset, the default value is used) ## `Bootstrap` @@ -344,7 +344,7 @@ initiate a connection to the network. Default: The ipfs.io bootstrap nodes -Type: `array[string]` +Type: `array[string]` (multiaddrs) ## `Datastore` @@ -368,7 +368,7 @@ option defaults to false currently). Default: `90` -Type: `integer` +Type: `integer` (0-100%) ### `Datastore.GCPeriod` @@ -377,7 +377,7 @@ if automatic gc is enabled. Default: `1h` -Type: `duration` or an empty string for the default value. +Type: `duration` (an empty string means the default value) ### `Datastore.HashOnRead` @@ -406,7 +406,7 @@ are used, so the constant `k` is 7 in the formula. Default: `0` (disabled) -Type: `integer` +Type: `integer` (non-negative, bytes) ### `Datastore.Spec` @@ -474,7 +474,9 @@ Type: `bool` A number of seconds to wait between discovery checks. -Type: `integer` (_not_ a duration) +Default: `5` + +Type: `integer` (integer seconds, 0 means the default) ## `Gateway` @@ -526,7 +528,7 @@ A url to redirect requests for `/` to. Default: `""` -Type: `string` +Type: `string` (url) ### `Gateway.Writable` @@ -729,13 +731,13 @@ The unique PKI identity label for this configs peer. Set on init and never read, it's merely here for convenience. Ipfs will always generate the peerID from its keypair at runtime. -Type: `string` +Type: `string` (peer ID) ### `Identity.PrivKey` The base64 encoded protobuf describing (and containing) the nodes private key. -Type: `string` +Type: `string` (base64 encoded) ## `Ipns` @@ -764,7 +766,7 @@ will be kept cached until their lifetime is expired. Default: `128` -Type: `integer` +Type: `integer` (non-negative, 0 means the default) ## `Mounts` @@ -776,7 +778,7 @@ Mountpoint for `/ipfs/`. Default: `/ipfs` -Type: `string` +Type: `string` (filesystem path) ### `Mounts.IPNS` @@ -784,7 +786,7 @@ Mountpoint for `/ipns/`. Default: `/ipns` -Type: `string` +Type: `string` (filesystem path) ### `Mounts.FuseAllowOther` @@ -806,7 +808,7 @@ Sets the default router used by pubsub to route messages to peers. This can be o Default: `"gossipsub"` -Type: `string` +Type: `string` (one of `"floodsub"`, `"gossipsub"`, or `""` (apply default)) [gossipsub]: https://github.com/libp2p/specs/tree/master/pubsub/gossipsub @@ -1054,16 +1056,22 @@ Please use [`AutoNAT.ServiceMode`][]. ### `Swarm.ConnMgr` The connection manager determines which and how many connections to keep and can -be configured to keep. +be configured to keep. Go-ipfs currently supports two connection managers: + +* none: never close idle connections. +* basic: the default connection manager. + +Default: basic #### `Swarm.ConnMgr.Type` Sets the type of connection manager to use, options are: `"none"` (no connection management) and `"basic"`. -Default: `"basic"` +Default: "basic". -Type: `string` (one of `"basic"`, `"none"`, or `""` (default, i.e. `"basic"`). +Type: `string` (when unset or `""`, the default connection manager is applied +and all `ConnMgr` fields are ignored). #### Basic Connection Manager From a37ff1fe2663b31d49d0c6a5c214955520657a11 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Tue, 16 Jun 2020 14:31:29 -0700 Subject: [PATCH 28/45] fix: remove pointless config type check This bug was pointed out in https://github.com/ipfs/go-ipfs/pull/1440#discussion_r33892559 but was ignored for some reason. --- repo/fsrepo/fsrepo.go | 39 ++------------------------------------- 1 file changed, 2 insertions(+), 37 deletions(-) diff --git a/repo/fsrepo/fsrepo.go b/repo/fsrepo/fsrepo.go index b4292708a..6cd312e40 100644 --- a/repo/fsrepo/fsrepo.go +++ b/repo/fsrepo/fsrepo.go @@ -7,7 +7,6 @@ import ( "io/ioutil" "os" "path/filepath" - "strconv" "strings" "sync" @@ -615,6 +614,7 @@ func (r *FSRepo) SetConfigKey(key string, value interface{}) error { if err != nil { return err } + // Load into a map so we don't end up writing any additional defaults to the config file. var mapconf map[string]interface{} if err := serialize.ReadConfigFile(filename, &mapconf); err != nil { return err @@ -628,42 +628,7 @@ func (r *FSRepo) SetConfigKey(key string, value interface{}) error { return err } - // Get the type of the value associated with the key - oldValue, err := common.MapGetKV(mapconf, key) - ok := true - if err != nil { - // key-value does not exist yet - switch v := value.(type) { - case string: - value, err = strconv.ParseBool(v) - if err != nil { - value, err = strconv.Atoi(v) - if err != nil { - value, err = strconv.ParseFloat(v, 32) - if err != nil { - value = v - } - } - } - default: - } - } else { - switch oldValue.(type) { - case bool: - value, ok = value.(bool) - case int: - value, ok = value.(int) - case float32: - value, ok = value.(float32) - case string: - value, ok = value.(string) - default: - } - if !ok { - return fmt.Errorf("wrong config type, expected %T", oldValue) - } - } - + // Set the key in the map. if err := common.MapSetKV(mapconf, key, value); err != nil { return err } From 3ce725dd965cf2a0736c9638aeed8a302b0b15d8 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Tue, 16 Jun 2020 10:40:56 -0700 Subject: [PATCH 29/45] fix: upgrade warning to error --- core/node/libp2p/sec.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/node/libp2p/sec.go b/core/node/libp2p/sec.go index e129448c4..9e4d6640e 100644 --- a/core/node/libp2p/sec.go +++ b/core/node/libp2p/sec.go @@ -11,8 +11,7 @@ import ( func Security(enabled bool, tptConfig config.Transports) interface{} { if !enabled { return func() (opts Libp2pOpts) { - // TODO: shouldn't this be Errorf to guarantee visibility? - log.Warnf(`Your IPFS node has been configured to run WITHOUT ENCRYPTED CONNECTIONS. + log.Errorf(`Your IPFS node has been configured to run WITHOUT ENCRYPTED CONNECTIONS. You will not be able to connect to any nodes configured to use encrypted connections`) opts.Opts = append(opts.Opts, libp2p.NoSecurity) return opts From 1a30dbd3ca991629095987323b736f94f0469c87 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Wed, 10 Jun 2020 17:45:59 -0700 Subject: [PATCH 30/45] doc(changelog): update changelog for 0.6.0 --- CHANGELOG.md | 359 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 359 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3762cc7df..6be2deec8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,364 @@ # go-ipfs changelog +## v0.6.0 2020-06-16 + +### Highlights + +This is a relatively small release in terms of code changes, but it contains some large changes with respect to the protocol. The highlights in this release include: + +* The QUIC transport is enabled by default. Furthermore, go-ipfs will automatically run a migration to listen on the QUIC transport (on the same address/port as the TCP transport) to make this upgrade process seamless. +* The new NOISE security transport is now supported but won't be selected by default. This transport will replace SECIO as the default cross-language interoperability security transport. TLS 1.3 will still remain the default go-ipfs to go-ipfs security transport for now. + +**MIGRATION:** This release contains a small config migration to enable QUIC by default. This migration will: + +* Normalize multiaddrs in the bootstrap list to use the `/p2p/Qm...` syntax for multiaddrs instead of the `/ipfs/Qm...` syntax. +* Add QUIC addresses for the default bootstrapers, as necessary. If you've removed the default bootstrappers from your bootstrap config, the migration won't add them back. +* Add a QUIC listener address to mirror any TCP addresses present in your config. For example, if you're listening on `/ip4/0.0.0.0/tcp/1234`, this migration will add a listen address for `/ip4/0.0.0.0/udp/1234/quic`. + +#### QUIC by default + +This release enables the QUIC transport (draft 28) by default for both inbound and outbound connections. When connecting to new peers, libp2p will continue to dial all advertised addresses (tcp + quic) in parallel so if the QUIC connection fails for some reason, the connection should still succeed. + +The QUIC transport has several key benefits over the current TCP based transports: + +* It takes fewer round-trips to establish a connection. With the QUIC transport, the IPFS handshake takes two round trips (one to establish the QUIC connection, one for the libp2p handshake). In the future, we should be able to reduce this to one round trip for the initial connection, and zero round trips for subsequent connections to a previously seen peer. This is especially important for DHT requests that contact many new peers. +* Because it's UDP based instead of TCP based, it uses fewer file descriptors. The QUIC transport will open one UDP socket per listen address instead of one socket per connection. This should, in the future, allow us to keep more connections open. +* Because QUIC connections don't consume file descriptors, we're able to remove the rate limit on outbound QUIC connections, further speeding up DHT queries. + +Unfortunately, this change isn't without drawbacks: the QUIC transport may not be able to max out some links (usually due to [poorly tuned kernel parameters](https://github.com/lucas-clemente/quic-go/issues/2586#issuecomment-639247615)). On the other hand, it may also be _faster_ in some cases + +If you hit this performance issue on Linux, you should tune the `net.core.rmem_default` and `net.core.rmem_max` sysctl parameters to increase your UDP receive buffer sizes. + +**NOTE:** The QUIC transport included in this release is backwards incompatible with the experimental QUIC transport included in previous releases. Unfortunately, the QUIC protocol underwent some significant breaking changes and supporting multiple versions wasn't an option. In practice, practice as go-ipfs will simply fall back on the TCP transport when dialing nodes with incompatible QUIC versions. + +#### NOISE Transport + +* Quick "why noise"? + +#### Gateway + +* Base36 support. +* 404 pages + +#### Gossipsub Upgrade + +* Summary paragraph and a link to the blog post? + +#### Connectivity + +* "Peering" support. + +#### Libp2p Changes + +* Advertise fewer addresses. +* Reduced allocations under load. +* Improved routing table refresh logic. + +### Changelog + +- github.com/ipfs/go-ipfs: + - fix(migration): migrate /ipfs/ bootstrappers to /p2p/ + - fix(migration): correctly migrate quic addresses + - chore: add migration to listen on QUIC by default + - backport fixes ([ipfs/go-ipfs#7405](https://github.com/ipfs/go-ipfs/pull/7405)) + - Use bitswap sessions for `ipfs refs`. + - Update to webui 2.9.0 + - feat: add noise support ([ipfs/go-ipfs#7365](https://github.com/ipfs/go-ipfs/pull/7365)) + - feat: implement peering service ([ipfs/go-ipfs#7362](https://github.com/ipfs/go-ipfs/pull/7362)) + - Include the git blob id of the dir-index bundle in the ETag ([ipfs/go-ipfs#7360](https://github.com/ipfs/go-ipfs/pull/7360)) + - feat: bootstrap in dht when the routing table is empty ([ipfs/go-ipfs#7340](https://github.com/ipfs/go-ipfs/pull/7340)) + - quic: remove experimental status and add it to the default config ([ipfs/go-ipfs#7349](https://github.com/ipfs/go-ipfs/pull/7349)) + - fix: support directory listings even if a 404 page is present ([ipfs/go-ipfs#7339](https://github.com/ipfs/go-ipfs/pull/7339)) + - doc(plugin): document plugin config ([ipfs/go-ipfs#7309](https://github.com/ipfs/go-ipfs/pull/7309)) + - test(sharness): fix fuse tests ([ipfs/go-ipfs#7320](https://github.com/ipfs/go-ipfs/pull/7320)) + - docs: update experimental-features doc with IPNS over pubsub changes. ([ipfs/go-ipfs#7334](https://github.com/ipfs/go-ipfs/pull/7334)) + - docs: cleanup config formatting ([ipfs/go-ipfs#7336](https://github.com/ipfs/go-ipfs/pull/7336)) + - fix(gateway): ensure directory listings have Content-Type text/html ([ipfs/go-ipfs#7330](https://github.com/ipfs/go-ipfs/pull/7330)) + - test(sharness): test the local symlink ([ipfs/go-ipfs#7332](https://github.com/ipfs/go-ipfs/pull/7332)) + - misc config/experimental-features doc fixes ([ipfs/go-ipfs#7333](https://github.com/ipfs/go-ipfs/pull/7333)) + - fix: correctly trim resolved IPNS addresses ([ipfs/go-ipfs#7331](https://github.com/ipfs/go-ipfs/pull/7331)) + - Gateway renders pretty 404 pages if available ([ipfs/go-ipfs#4233](https://github.com/ipfs/go-ipfs/pull/4233)) + - feat: add a dht stat command ([ipfs/go-ipfs#7221](https://github.com/ipfs/go-ipfs/pull/7221)) + - fix: update dists url for OpenBSD support ([ipfs/go-ipfs#7311](https://github.com/ipfs/go-ipfs/pull/7311)) + - docs: X-Forwarded-Proto: https ([ipfs/go-ipfs#7306](https://github.com/ipfs/go-ipfs/pull/7306)) + - fix(mkreleaselog): make robust against running in different working directories ([ipfs/go-ipfs#7310](https://github.com/ipfs/go-ipfs/pull/7310)) + - fix(mkreleasenotes): include commits directly to master ([ipfs/go-ipfs#7296](https://github.com/ipfs/go-ipfs/pull/7296)) + - write api file automically ([ipfs/go-ipfs#7282](https://github.com/ipfs/go-ipfs/pull/7282)) + - systemd: disable swap-usage for ipfs ([ipfs/go-ipfs#7299](https://github.com/ipfs/go-ipfs/pull/7299)) + - systemd: add helptext ([ipfs/go-ipfs#7265](https://github.com/ipfs/go-ipfs/pull/7265)) + - systemd: add the link to the docs ([ipfs/go-ipfs#7287](https://github.com/ipfs/go-ipfs/pull/7287)) + - systemd: add state directory setting ([ipfs/go-ipfs#7288](https://github.com/ipfs/go-ipfs/pull/7288)) + - Update go version required to build ([ipfs/go-ipfs#7289](https://github.com/ipfs/go-ipfs/pull/7289)) + - pin: implement pin/ls with only CoreApi ([ipfs/go-ipfs#6774](https://github.com/ipfs/go-ipfs/pull/6774)) + - update go-libp2p-quic-transport to v0.3.7 ([ipfs/go-ipfs#7278](https://github.com/ipfs/go-ipfs/pull/7278)) + - Docs: Delete section headers for removed features ([ipfs/go-ipfs#7277](https://github.com/ipfs/go-ipfs/pull/7277)) + - README.md: typo ([ipfs/go-ipfs#7061](https://github.com/ipfs/go-ipfs/pull/7061)) + - PR autocomment: Only comment for first-time contributors ([ipfs/go-ipfs#7270](https://github.com/ipfs/go-ipfs/pull/7270)) + - Fixed typo in config.md ([ipfs/go-ipfs#7267](https://github.com/ipfs/go-ipfs/pull/7267)) + - Fixes #7252 - Uses gabriel-vasile/mimetype to support additional content types ([ipfs/go-ipfs#7262](https://github.com/ipfs/go-ipfs/pull/7262)) + - update go-libp2p-quic-transport to v0.3.6 ([ipfs/go-ipfs#7266](https://github.com/ipfs/go-ipfs/pull/7266)) + - Updates bash completions to be compatible with zsh ([ipfs/go-ipfs#7261](https://github.com/ipfs/go-ipfs/pull/7261)) + - systemd service enhancements + run as system user ([ipfs/go-ipfs#7259](https://github.com/ipfs/go-ipfs/pull/7259)) + - upgrade to go 1.14.2 ([ipfs/go-ipfs#7130](https://github.com/ipfs/go-ipfs/pull/7130)) + - Add module files for go-ipfs-as-a-library example ([ipfs/go-ipfs#7146](https://github.com/ipfs/go-ipfs/pull/7146)) + - feat(gateway): show the absolute path and CID every time ([ipfs/go-ipfs#7219](https://github.com/ipfs/go-ipfs/pull/7219)) + - fix: do not use hard coded IPNS Publish maximum timeout duration ([ipfs/go-ipfs#7256](https://github.com/ipfs/go-ipfs/pull/7256)) + - Auto-comment on submitted PRs ([ipfs/go-ipfs#7248](https://github.com/ipfs/go-ipfs/pull/7248)) + - Fixes Github link. ([ipfs/go-ipfs#7239](https://github.com/ipfs/go-ipfs/pull/7239)) + - docs: fix subdomain examples in CHANGELOG ([ipfs/go-ipfs#7240](https://github.com/ipfs/go-ipfs/pull/7240)) + - doc: add snap to the release checklist ([ipfs/go-ipfs#7253](https://github.com/ipfs/go-ipfs/pull/7253)) + - Welcome message for users opening their first issue ([ipfs/go-ipfs#7247](https://github.com/ipfs/go-ipfs/pull/7247)) + - feat: bump to 0.6.0-dev ([ipfs/go-ipfs#7249](https://github.com/ipfs/go-ipfs/pull/7249)) +- github.com/ipfs/go-bitswap (v0.2.13 -> v0.2.19): + - fix want gauge calculation ([ipfs/go-bitswap#416](https://github.com/ipfs/go-bitswap/pull/416)) + - Fix PeerManager signalAvailabiity() race ([ipfs/go-bitswap#417](https://github.com/ipfs/go-bitswap/pull/417)) + - fix: avoid taking accessing the peerQueues without taking the lock ([ipfs/go-bitswap#412](https://github.com/ipfs/go-bitswap/pull/412)) + - fix: update circleci ci-go ([ipfs/go-bitswap#396](https://github.com/ipfs/go-bitswap/pull/396)) + - fix: only track useful received data in the ledger (#411) ([ipfs/go-bitswap#411](https://github.com/ipfs/go-bitswap/pull/411)) + - If peer is first to send a block to session, protect connection ([ipfs/go-bitswap#406](https://github.com/ipfs/go-bitswap/pull/406)) + - Ensure sessions register with PeerManager ([ipfs/go-bitswap#405](https://github.com/ipfs/go-bitswap/pull/405)) + - Total wants gauge (#402) ([ipfs/go-bitswap#402](https://github.com/ipfs/go-bitswap/pull/402)) + - Improve peer manager performance ([ipfs/go-bitswap#395](https://github.com/ipfs/go-bitswap/pull/395)) + - fix: return wants from engine.WantlistForPeer() ([ipfs/go-bitswap#390](https://github.com/ipfs/go-bitswap/pull/390)) + - Add autocomment configuration + - calculate message latency ([ipfs/go-bitswap#386](https://github.com/ipfs/go-bitswap/pull/386)) + - fix: use one less go-routine per session (#377) ([ipfs/go-bitswap#377](https://github.com/ipfs/go-bitswap/pull/377)) + - Add standard issue template +- github.com/ipfs/go-cid (v0.0.5 -> v0.0.6): + - feat: add Filecoin multicodecs ([ipfs/go-cid#104](https://github.com/ipfs/go-cid/pull/104)) + - Add autocomment configuration + - avoid calling the method WriteTo if we don't satisfy its contract ([ipfs/go-cid#103](https://github.com/ipfs/go-cid/pull/103)) + - add a couple useful methods ([ipfs/go-cid#102](https://github.com/ipfs/go-cid/pull/102)) + - Add standard issue template +- github.com/ipfs/go-fs-lock (v0.0.4 -> v0.0.5): + - chore: remove xerrors ([ipfs/go-fs-lock#15](https://github.com/ipfs/go-fs-lock/pull/15)) + - Add autocomment configuration + - Add standard issue template +- github.com/ipfs/go-ipfs-cmds (v0.2.2 -> v0.2.9): + - build(deps): bump github.com/ipfs/go-log from 1.0.3 to 1.0.4 ([ipfs/go-ipfs-cmds#194](https://github.com/ipfs/go-ipfs-cmds/pull/194)) + - Fix go-ipfs#7242: Remove "HEAD" from Allow methods ([ipfs/go-ipfs-cmds#195](https://github.com/ipfs/go-ipfs-cmds/pull/195)) + - Staticcheck fixes (#196) ([ipfs/go-ipfs-cmds#196](https://github.com/ipfs/go-ipfs-cmds/pull/196)) + - doc: update docs for interface changes ([ipfs/go-ipfs-cmds#197](https://github.com/ipfs/go-ipfs-cmds/pull/197)) + - Add standard issue template +- github.com/ipfs/go-ipfs-config (v0.5.3 -> v0.7.1): + - feat: add an option for security transport experiments ([ipfs/go-ipfs-config#97](https://github.com/ipfs/go-ipfs-config/pull/97)) + - feat: add peering service config section ([ipfs/go-ipfs-config#96](https://github.com/ipfs/go-ipfs-config/pull/96)) + - fix: include key size in key init method ([ipfs/go-ipfs-config#95](https://github.com/ipfs/go-ipfs-config/pull/95)) + - QUIC: remove experimental config option ([ipfs/go-ipfs-config#93](https://github.com/ipfs/go-ipfs-config/pull/93)) + - fix boostrap peers ([ipfs/go-ipfs-config#94](https://github.com/ipfs/go-ipfs-config/pull/94)) + - default config: add QUIC listening ports + quic to mars.i.ipfs.io ([ipfs/go-ipfs-config#91](https://github.com/ipfs/go-ipfs-config/pull/91)) + - feat: remove strict signing pubsub option. ([ipfs/go-ipfs-config#90](https://github.com/ipfs/go-ipfs-config/pull/90)) + - Add autocomment configuration + - Add Init Alternative allowing specification of ED25519 key ([ipfs/go-ipfs-config#78](https://github.com/ipfs/go-ipfs-config/pull/78)) +- github.com/ipfs/go-mfs (v0.1.1 -> v0.1.2): + - Fix incorrect mutex unlock call in File.Open ([ipfs/go-mfs#82](https://github.com/ipfs/go-mfs/pull/82)) + - Add autocomment configuration + - Add standard issue template + - test: add Directory.ListNames test ([ipfs/go-mfs#81](https://github.com/ipfs/go-mfs/pull/81)) + - doc: add a lead maintainer + - Update README.md with newer travis badge ([ipfs/go-mfs#78](https://github.com/ipfs/go-mfs/pull/78)) +- github.com/ipfs/interface-go-ipfs-core (v0.2.7 -> v0.3.0): + - add Pin.IsPinned(..) ([ipfs/interface-go-ipfs-core#50](https://github.com/ipfs/interface-go-ipfs-core/pull/50)) + - Add autocomment configuration + - Add standard issue template + - extra time for dht spin-up ([ipfs/interface-go-ipfs-core#61](https://github.com/ipfs/interface-go-ipfs-core/pull/61)) + - feat: make the CoreAPI expose a streaming pin interface ([ipfs/interface-go-ipfs-core#49](https://github.com/ipfs/interface-go-ipfs-core/pull/49)) + - test: fail early on err to avoid an unrelated panic ([ipfs/interface-go-ipfs-core#57](https://github.com/ipfs/interface-go-ipfs-core/pull/57)) +- github.com/jbenet/go-is-domain (v1.0.3 -> v1.0.5): + - Add OpenNIC domains to extended TLDs. ([jbenet/go-is-domain#15](https://github.com/jbenet/go-is-domain/pull/15)) + - feat: add .crypto and .zil from UnstoppableDomains ([jbenet/go-is-domain#17](https://github.com/jbenet/go-is-domain/pull/17)) + - chore: update IANA TLDs to version 2020051300 ([jbenet/go-is-domain#18](https://github.com/jbenet/go-is-domain/pull/18)) +- github.com/libp2p/go-addr-util (v0.0.1 -> v0.0.2): + - fix discuss badge + - add discuss link to readme + - fix: fdcostly should take only the prefix into account ([libp2p/go-addr-util#5](https://github.com/libp2p/go-addr-util/pull/5)) + - add gomod support // tag v0.0.1 ([libp2p/go-addr-util#17](https://github.com/libp2p/go-addr-util/pull/17)) +- github.com/libp2p/go-libp2p (v0.8.3 -> v0.9.6): + - fix(nat): use the right addresses when nat port mapping ([libp2p/go-libp2p#966](https://github.com/libp2p/go-libp2p/pull/966)) + - chore: update deps ([libp2p/go-libp2p#967](https://github.com/libp2p/go-libp2p/pull/967)) + - Fix peer handler race ([libp2p/go-libp2p#965](https://github.com/libp2p/go-libp2p/pull/965)) + - optimize numInbound count ([libp2p/go-libp2p#960](https://github.com/libp2p/go-libp2p/pull/960)) + - update go-libp2p-circuit ([libp2p/go-libp2p#962](https://github.com/libp2p/go-libp2p/pull/962)) + - Chunking large Identify responses with Signed Records ([libp2p/go-libp2p#958](https://github.com/libp2p/go-libp2p/pull/958)) + - gomod: update dependencies ([libp2p/go-libp2p#959](https://github.com/libp2p/go-libp2p/pull/959)) + - fixed compilation error (#956) ([libp2p/go-libp2p#956](https://github.com/libp2p/go-libp2p/pull/956)) + - Filter Interface Addresses (#936) ([libp2p/go-libp2p#936](https://github.com/libp2p/go-libp2p/pull/936)) + - fix: remove old addresses in identify immediately ([libp2p/go-libp2p#953](https://github.com/libp2p/go-libp2p/pull/953)) + - fix flaky test (#952) ([libp2p/go-libp2p#952](https://github.com/libp2p/go-libp2p/pull/952)) + - fix: group observations by zeroing port ([libp2p/go-libp2p#949](https://github.com/libp2p/go-libp2p/pull/949)) + - fix: fix connection gater in transport constructor ([libp2p/go-libp2p#948](https://github.com/libp2p/go-libp2p/pull/948)) + - Fix potential flakiness in TestIDService ([libp2p/go-libp2p#945](https://github.com/libp2p/go-libp2p/pull/945)) + - make the {F=>f}iltersConnectionGater private. (#946) ([libp2p/go-libp2p#946](https://github.com/libp2p/go-libp2p/pull/946)) + - Filter observed addresses (#917) ([libp2p/go-libp2p#917](https://github.com/libp2p/go-libp2p/pull/917)) + - fix: don't try to marshal a nil record ([libp2p/go-libp2p#943](https://github.com/libp2p/go-libp2p/pull/943)) + - add test to demo missing peer records after listen ([libp2p/go-libp2p#941](https://github.com/libp2p/go-libp2p/pull/941)) + - fix: don't leak a goroutine if a peer connects and immediately disconnects ([libp2p/go-libp2p#942](https://github.com/libp2p/go-libp2p/pull/942)) + - no signed peer records for mocknets (#934) ([libp2p/go-libp2p#934](https://github.com/libp2p/go-libp2p/pull/934)) + - implement connection gating at the top level (#881) ([libp2p/go-libp2p#881](https://github.com/libp2p/go-libp2p/pull/881)) + - various identify fixes and nits (#922) ([libp2p/go-libp2p#922](https://github.com/libp2p/go-libp2p/pull/922)) + - Remove race between ID, Push & Delta (#907) ([libp2p/go-libp2p#907](https://github.com/libp2p/go-libp2p/pull/907)) + - fix a compilation error introduced in 077a818. (#919) ([libp2p/go-libp2p#919](https://github.com/libp2p/go-libp2p/pull/919)) + - exchange signed routing records in identify (#747) ([libp2p/go-libp2p#747](https://github.com/libp2p/go-libp2p/pull/747)) +- github.com/libp2p/go-libp2p-autonat (v0.2.2 -> v0.2.3): + - react to incoming events ([libp2p/go-libp2p-autonat#65](https://github.com/libp2p/go-libp2p-autonat/pull/65)) +- github.com/libp2p/go-libp2p-blankhost (v0.1.4 -> v0.1.6): + - subscribe connmgr to net notifications ([libp2p/go-libp2p-blankhost#45](https://github.com/libp2p/go-libp2p-blankhost/pull/45)) + - add WithConnectionManager option to blankhost ([libp2p/go-libp2p-blankhost#44](https://github.com/libp2p/go-libp2p-blankhost/pull/44)) + - Blank host should support signed records ([libp2p/go-libp2p-blankhost#42](https://github.com/libp2p/go-libp2p-blankhost/pull/42)) +- github.com/libp2p/go-libp2p-circuit (v0.2.2 -> v0.2.3): + - Use a fixed connection manager weight for peers with relay connections ([libp2p/go-libp2p-circuit#119](https://github.com/libp2p/go-libp2p-circuit/pull/119)) +- github.com/libp2p/go-libp2p-connmgr (v0.2.1 -> v0.2.4): + - Implement IsProtected interface ([libp2p/go-libp2p-connmgr#76](https://github.com/libp2p/go-libp2p-connmgr/pull/76)) + - decaying tags: support removal and closure. (#72) ([libp2p/go-libp2p-connmgr#72](https://github.com/libp2p/go-libp2p-connmgr/pull/72)) + - implement decaying tags. (#61) ([libp2p/go-libp2p-connmgr#61](https://github.com/libp2p/go-libp2p-connmgr/pull/61)) +- github.com/libp2p/go-libp2p-core (v0.5.3 -> v0.5.7): + - connmgr: add IsProtected interface (#158) ([libp2p/go-libp2p-core#158](https://github.com/libp2p/go-libp2p-core/pull/158)) + - eventbus: add wildcard subscription type; getter to enumerate known types (#153) ([libp2p/go-libp2p-core#153](https://github.com/libp2p/go-libp2p-core/pull/153)) + - events: add a generic DHT event. (#154) ([libp2p/go-libp2p-core#154](https://github.com/libp2p/go-libp2p-core/pull/154)) + - decaying tags: support removal and closure. (#151) ([libp2p/go-libp2p-core#151](https://github.com/libp2p/go-libp2p-core/pull/151)) + - implement Stringer for network.{Direction,Connectedness,Reachability}. (#150) ([libp2p/go-libp2p-core#150](https://github.com/libp2p/go-libp2p-core/pull/150)) + - connmgr: introduce abstractions and functions for decaying tags. (#104) ([libp2p/go-libp2p-core#104](https://github.com/libp2p/go-libp2p-core/pull/104)) + - Interface to verify if a peer supports a protocol without making allocations. ([libp2p/go-libp2p-core#148](https://github.com/libp2p/go-libp2p-core/pull/148)) + - add connection gating interfaces and types. (#139) ([libp2p/go-libp2p-core#139](https://github.com/libp2p/go-libp2p-core/pull/139)) +- github.com/libp2p/go-libp2p-kad-dht (v0.7.11 -> v0.8.2): + - feat: protect all peers in low buckets, tag everyone else with 5 + - fix: lookup context cancellation race condition ([libp2p/go-libp2p-kad-dht#656](https://github.com/libp2p/go-libp2p-kad-dht/pull/656)) + - fix: protect useful peers in low buckets ([libp2p/go-libp2p-kad-dht#634](https://github.com/libp2p/go-libp2p-kad-dht/pull/634)) + - Double the usefulness interval for peers in the Routing Table (#651) ([libp2p/go-libp2p-kad-dht#651](https://github.com/libp2p/go-libp2p-kad-dht/pull/651)) + - enhancement/remove-unused-variable ([libp2p/go-libp2p-kad-dht#633](https://github.com/libp2p/go-libp2p-kad-dht/pull/633)) + - Put back TestSelfWalkOnAddressChange ([libp2p/go-libp2p-kad-dht#648](https://github.com/libp2p/go-libp2p-kad-dht/pull/648)) + - Routing Table Refresh manager (#601) ([libp2p/go-libp2p-kad-dht#601](https://github.com/libp2p/go-libp2p-kad-dht/pull/601)) + - Boostrap empty RT and Optimize allocs when we discover new peers (#631) ([libp2p/go-libp2p-kad-dht#631](https://github.com/libp2p/go-libp2p-kad-dht/pull/631)) + - fix all flaky tests ([libp2p/go-libp2p-kad-dht#628](https://github.com/libp2p/go-libp2p-kad-dht/pull/628)) + - Update default concurrency parameter ([libp2p/go-libp2p-kad-dht#605](https://github.com/libp2p/go-libp2p-kad-dht/pull/605)) + - clean up a channel that was dangling ([libp2p/go-libp2p-kad-dht#620](https://github.com/libp2p/go-libp2p-kad-dht/pull/620)) +- github.com/libp2p/go-libp2p-kbucket (v0.4.1 -> v0.4.2): + - Reduce allocs in AddPeer (#81) ([libp2p/go-libp2p-kbucket#81](https://github.com/libp2p/go-libp2p-kbucket/pull/81)) + - NPeersForCpl and collapse empty buckets (#77) ([libp2p/go-libp2p-kbucket#77](https://github.com/libp2p/go-libp2p-kbucket/pull/77)) +- github.com/libp2p/go-libp2p-peerstore (v0.2.3 -> v0.2.6): + - fix two bugs in signed address handling ([libp2p/go-libp2p-peerstore#155](https://github.com/libp2p/go-libp2p-peerstore/pull/155)) + - addrbook: fix races ([libp2p/go-libp2p-peerstore#154](https://github.com/libp2p/go-libp2p-peerstore/pull/154)) + - Implement the FirstSupportedProtocol API. ([libp2p/go-libp2p-peerstore#147](https://github.com/libp2p/go-libp2p-peerstore/pull/147)) +- github.com/libp2p/go-libp2p-pubsub (v0.2.7 -> v0.3.1): + - fix outbound constraint satisfaction in oversubscription pruning + - Gossipsub v0.3.0 + - set sendTo to remote peer id in trace events ([libp2p/go-libp2p-pubsub#268](https://github.com/libp2p/go-libp2p-pubsub/pull/268)) + - make wire protocol message size configurable. (#261) ([libp2p/go-libp2p-pubsub#261](https://github.com/libp2p/go-libp2p-pubsub/pull/261)) +- github.com/libp2p/go-libp2p-pubsub-router (v0.2.1 -> v0.3.0): + - feat: update pubsub ([libp2p/go-libp2p-pubsub-router#76](https://github.com/libp2p/go-libp2p-pubsub-router/pull/76)) +- github.com/libp2p/go-libp2p-quic-transport (v0.3.7 -> v0.5.1): + - close the connection when it is refused by InterceptSecured ([libp2p/go-libp2p-quic-transport#157](https://github.com/libp2p/go-libp2p-quic-transport/pull/157)) + - gate QUIC connections via new ConnectionGater (#152) ([libp2p/go-libp2p-quic-transport#152](https://github.com/libp2p/go-libp2p-quic-transport/pull/152)) +- github.com/libp2p/go-libp2p-record (v0.1.2 -> v0.1.3): + - feat: add a better record error ([libp2p/go-libp2p-record#39](https://github.com/libp2p/go-libp2p-record/pull/39)) +- github.com/libp2p/go-libp2p-swarm (v0.2.3 -> v0.2.6): + - Configure private key for test swarm ([libp2p/go-libp2p-swarm#223](https://github.com/libp2p/go-libp2p-swarm/pull/223)) + - Rank Dial addresses (#212) ([libp2p/go-libp2p-swarm#212](https://github.com/libp2p/go-libp2p-swarm/pull/212)) + - implement connection gating support: intercept peer, address dials, upgraded conns (#201) ([libp2p/go-libp2p-swarm#201](https://github.com/libp2p/go-libp2p-swarm/pull/201)) + - fix: avoid calling AddChild after the process may shutdown. ([libp2p/go-libp2p-swarm#207](https://github.com/libp2p/go-libp2p-swarm/pull/207)) +- github.com/libp2p/go-libp2p-transport-upgrader (v0.2.0 -> v0.3.0): + - call the connection gater when accepting connections and after crypto handshake (#55) ([libp2p/go-libp2p-transport-upgrader#55](https://github.com/libp2p/go-libp2p-transport-upgrader/pull/55)) +- github.com/libp2p/go-openssl (v0.0.4 -> v0.0.5): + - add binding for OBJ_create ([libp2p/go-openssl#5](https://github.com/libp2p/go-openssl/pull/5)) +- github.com/libp2p/go-yamux (v1.3.5 -> v1.3.7): + - tighten lock around appending new chunks of read data in stream ([libp2p/go-yamux#28](https://github.com/libp2p/go-yamux/pull/28)) + - fix: unlock recvLock in all cases. ([libp2p/go-yamux#25](https://github.com/libp2p/go-yamux/pull/25)) +- github.com/lucas-clemente/quic-go (v0.15.7 -> v0.16.1): + - fix closing of the http.Request.Body ([lucas-clemente/quic-go#2584](https://github.com/lucas-clemente/quic-go/pull/2584)) + - split PTO calculation into a separate function ([lucas-clemente/quic-go#2576](https://github.com/lucas-clemente/quic-go/pull/2576)) + - add a unit test using the ChaCha20 test vector from the draft ([lucas-clemente/quic-go#2585](https://github.com/lucas-clemente/quic-go/pull/2585)) + - fix seed generation in frame sorter tests ([lucas-clemente/quic-go#2583](https://github.com/lucas-clemente/quic-go/pull/2583)) + - make sure that ACK frames are bundled with data ([lucas-clemente/quic-go#2543](https://github.com/lucas-clemente/quic-go/pull/2543)) + - add a Changelog for v0.16 ([lucas-clemente/quic-go#2582](https://github.com/lucas-clemente/quic-go/pull/2582)) + - authenticate connection IDs ([lucas-clemente/quic-go#2567](https://github.com/lucas-clemente/quic-go/pull/2567)) + - don't switch to PTO mode after using early loss detection ([lucas-clemente/quic-go#2581](https://github.com/lucas-clemente/quic-go/pull/2581)) + - only create a single session for duplicate Initials ([lucas-clemente/quic-go#2580](https://github.com/lucas-clemente/quic-go/pull/2580)) + - fix broken unit test in ackhandler + - update the ALPN tokens to draft-28 ([lucas-clemente/quic-go#2570](https://github.com/lucas-clemente/quic-go/pull/2570)) + - drop duplicate packets ([lucas-clemente/quic-go#2569](https://github.com/lucas-clemente/quic-go/pull/2569)) + - remove noisy log statement in frame sorter test ([lucas-clemente/quic-go#2571](https://github.com/lucas-clemente/quic-go/pull/2571)) + - fix flaky qlog unit tests ([lucas-clemente/quic-go#2572](https://github.com/lucas-clemente/quic-go/pull/2572)) + - implement the 3x amplification limit ([lucas-clemente/quic-go#2536](https://github.com/lucas-clemente/quic-go/pull/2536)) + - rewrite the frame sorter ([lucas-clemente/quic-go#2561](https://github.com/lucas-clemente/quic-go/pull/2561)) + - retire conn IDs with sequence numbers smaller than the currently active ([lucas-clemente/quic-go#2563](https://github.com/lucas-clemente/quic-go/pull/2563)) + - remove unused readOffset member variable in receiveStream ([lucas-clemente/quic-go#2559](https://github.com/lucas-clemente/quic-go/pull/2559)) + - fix int overflow when parsing the transport parameters ([lucas-clemente/quic-go#2564](https://github.com/lucas-clemente/quic-go/pull/2564)) + - use struct{} instead of bool in window update queue ([lucas-clemente/quic-go#2555](https://github.com/lucas-clemente/quic-go/pull/2555)) + - update the protobuf library to google.golang.org/protobuf/proto ([lucas-clemente/quic-go#2554](https://github.com/lucas-clemente/quic-go/pull/2554)) + - use the correct error code for crypto stream errors ([lucas-clemente/quic-go#2546](https://github.com/lucas-clemente/quic-go/pull/2546)) + - bundle small writes on streams ([lucas-clemente/quic-go#2538](https://github.com/lucas-clemente/quic-go/pull/2538)) + - reduce the length of the unprocessed packet chan in the session ([lucas-clemente/quic-go#2534](https://github.com/lucas-clemente/quic-go/pull/2534)) + - fix flaky session unit test ([lucas-clemente/quic-go#2537](https://github.com/lucas-clemente/quic-go/pull/2537)) + - add a send stream test that randomly acknowledges and loses data ([lucas-clemente/quic-go#2535](https://github.com/lucas-clemente/quic-go/pull/2535)) + - fix size calculation for version negotiation packets ([lucas-clemente/quic-go#2542](https://github.com/lucas-clemente/quic-go/pull/2542)) + - run all unit tests with race detector ([lucas-clemente/quic-go#2528](https://github.com/lucas-clemente/quic-go/pull/2528)) + - add support for the ChaCha20 interop test case ([lucas-clemente/quic-go#2517](https://github.com/lucas-clemente/quic-go/pull/2517)) + - fix buffer use after it was released when sending an INVALID_TOKEN error ([lucas-clemente/quic-go#2524](https://github.com/lucas-clemente/quic-go/pull/2524)) + - run the internal and http3 tests with race detector on Travis ([lucas-clemente/quic-go#2385](https://github.com/lucas-clemente/quic-go/pull/2385)) + - reset the PTO when dropping a packet number space ([lucas-clemente/quic-go#2527](https://github.com/lucas-clemente/quic-go/pull/2527)) + - stop the deadline timer in Stream.Read and Write ([lucas-clemente/quic-go#2519](https://github.com/lucas-clemente/quic-go/pull/2519)) + - don't reset pto_count on Initial ACKs ([lucas-clemente/quic-go#2513](https://github.com/lucas-clemente/quic-go/pull/2513)) + - fix all race conditions in the session tests ([lucas-clemente/quic-go#2525](https://github.com/lucas-clemente/quic-go/pull/2525)) + - make sure that the server's run loop returned when closing ([lucas-clemente/quic-go#2526](https://github.com/lucas-clemente/quic-go/pull/2526)) + - fix flaky proxy test ([lucas-clemente/quic-go#2522](https://github.com/lucas-clemente/quic-go/pull/2522)) + - stop the timer when the session's run loop returns ([lucas-clemente/quic-go#2516](https://github.com/lucas-clemente/quic-go/pull/2516)) + - make it more likely that a STREAM frame is bundled with the FIN ([lucas-clemente/quic-go#2504](https://github.com/lucas-clemente/quic-go/pull/2504)) +- github.com/multiformats/go-multiaddr (v0.2.1 -> v0.2.2): + - absorb go-maddr-filter; rm stale Makefile targets; upgrade deps (#124) ([multiformats/go-multiaddr#124](https://github.com/multiformats/go-multiaddr/pull/124)) +- github.com/multiformats/go-multibase (v0.0.2 -> v0.0.3): + - Base36 implementation ([multiformats/go-multibase#36](https://github.com/multiformats/go-multibase/pull/36)) + - Even more tests/benchmarks, less repetition in-code ([multiformats/go-multibase#34](https://github.com/multiformats/go-multibase/pull/34)) + - Beef up tests before adding new codec ([multiformats/go-multibase#32](https://github.com/multiformats/go-multibase/pull/32)) + - Remove GX, bump spec submodule, fix tests ([multiformats/go-multibase#31](https://github.com/multiformats/go-multibase/pull/31)) + +### Contributors + +| Contributor | Commits | Lines ± | Files Changed | +|-------------------------|---------|-------------|---------------| +| vyzo | 224 | +8016/-2810 | 304 | +| Marten Seemann | 79 | +5858/-2514 | 178 | +| Aarsh Shah | 33 | +4619/-1634 | 128 | +| Dirk McCormick | 26 | +3596/-1156 | 69 | +| Steven Allen | 124 | +3283/-1339 | 215 | +| Yusef Napora | 66 | +2622/-785 | 98 | +| Raúl Kripalani | 24 | +2424/-782 | 61 | +| Louis Thibault | 2 | +1111/-4 | 4 | +| Hector Sanjuan | 28 | +904/-177 | 58 | +| Will Scott | 15 | +717/-219 | 31 | +| dependabot-preview[bot] | 53 | +640/-64 | 106 | +| Michael Muré | 7 | +456/-213 | 17 | +| David Dias | 11 | +426/-88 | 15 | +| Peter Rabbitson | 11 | +254/-189 | 31 | +| Lukasz Zimnoch | 9 | +361/-49 | 13 | +| Jakub Sztandera | 4 | +157/-104 | 9 | +| Rod Vagg | 1 | +91/-83 | 2 | +| RubenKelevra | 12 | +83/-83 | 29 | +| JP Hastings-Spital | 1 | +145/-0 | 2 | +| Adin Schmahmann | 11 | +67/-37 | 15 | +| Marcin Rataj | 10 | +27/-41 | 10 | +| Tiger | 5 | +53/-8 | 6 | +| Akira | 2 | +35/-19 | 2 | +| Casey Chance | 2 | +31/-22 | 2 | +| Alan Shaw | 1 | +44/-0 | 2 | +| Jessica Schilling | 4 | +20/-19 | 7 | +| Gowtham G | 4 | +22/-14 | 6 | +| Jeromy Johnson | 3 | +24/-6 | 3 | +| Edgar Aroutiounian | 3 | +16/-8 | 3 | +| Peter Wu | 2 | +12/-9 | 2 | +| Sawood Alam | 2 | +7/-7 | 2 | +| Eric Myhre | 1 | +9/-2 | 1 | +| mawei | 2 | +5/-5 | 2 | +| decanus | 1 | +5/-5 | 1 | +| Ignacio Hagopian | 2 | +7/-2 | 2 | +| Alfonso Montero | 1 | +1/-5 | 1 | +| Volker Mische | 1 | +2/-2 | 1 | +| Shotaro Yamada | 1 | +2/-1 | 1 | +| Johnny | 1 | +1/-1 | 1 | +| Ganesh Prasad Kumble | 1 | +1/-1 | 1 | +| Dominic Della Valle | 1 | +1/-1 | 1 | +| Corbin Page | 1 | +1/-1 | 1 | +| Bernhard M. Wiedemann | 1 | +1/-1 | 1 | + ## 0.5.1 2020-05-08 Hot on the heels of 0.5.0 is 0.5.1 with some important but small bug fixes. This release: From 2c52f79398b08e21ce398ce9ed736788ab9079a8 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Mon, 15 Jun 2020 17:40:53 +0200 Subject: [PATCH 31/45] docs(CHANGELOG): custom 404 and base36 --- CHANGELOG.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6be2deec8..eedab523e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,8 +37,20 @@ If you hit this performance issue on Linux, you should tune the `net.core.rmem_d #### Gateway -* Base36 support. -* 404 pages +##### Custom 404 + +It is now possible to customize `404 Not Found` error response by including `ipfs-404.html`. When a requested file isn't found `ipfs-404.html` is looked for in the same directory, rolling up through any of its parents, and displayed (without immutable cache headers) if present. + +##### Support for Base36 and ED25519 in subdomains + +DNS label has a maximum length of 63 characters. This was a problem for users who opted into using inlined ED25519 keys for IPNS publishing. Support for CIDv1 in Base36 enables subdomain gateway to load websites published with those keys without the need for re-hashing. + +ED25519 key can be converted to Base36 via `ipfs cid` command: + +```sh +$ ipfs cid format -v 1 --codec libp2p-key -b base36 bafzaajaiaejca4syrpdu6gdx4wsdnokxkprgzxf4wrstuc34gxw5k5jrag2so5gk +k51qzi5uqu5dj16qyiq0tajolkojyl9qdkr254920wxv7ghtuwcz593tp69z9m +``` #### Gossipsub Upgrade From bae2624329e3c4394dd33ca33ee4d0470829c772 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Tue, 16 Jun 2020 21:02:03 -0700 Subject: [PATCH 32/45] doc(changelog): ribasushi fixes Co-authored-by: Peter Rabbitson --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eedab523e..7e758b96d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,9 +7,9 @@ This is a relatively small release in terms of code changes, but it contains some large changes with respect to the protocol. The highlights in this release include: * The QUIC transport is enabled by default. Furthermore, go-ipfs will automatically run a migration to listen on the QUIC transport (on the same address/port as the TCP transport) to make this upgrade process seamless. -* The new NOISE security transport is now supported but won't be selected by default. This transport will replace SECIO as the default cross-language interoperability security transport. TLS 1.3 will still remain the default go-ipfs to go-ipfs security transport for now. +* The new NOISE security transport is now supported but won't be selected by default. This transport will replace SECIO as the default cross-language interoperability security transport. TLS 1.3 will still remain the default security transport between go-ipfs nodes for now. -**MIGRATION:** This release contains a small config migration to enable QUIC by default. This migration will: +**MIGRATION:** This release contains a small config migration to enable QUIC alongside the configured TCP transport. This migration will: * Normalize multiaddrs in the bootstrap list to use the `/p2p/Qm...` syntax for multiaddrs instead of the `/ipfs/Qm...` syntax. * Add QUIC addresses for the default bootstrapers, as necessary. If you've removed the default bootstrappers from your bootstrap config, the migration won't add them back. @@ -29,7 +29,7 @@ Unfortunately, this change isn't without drawbacks: the QUIC transport may not b If you hit this performance issue on Linux, you should tune the `net.core.rmem_default` and `net.core.rmem_max` sysctl parameters to increase your UDP receive buffer sizes. -**NOTE:** The QUIC transport included in this release is backwards incompatible with the experimental QUIC transport included in previous releases. Unfortunately, the QUIC protocol underwent some significant breaking changes and supporting multiple versions wasn't an option. In practice, practice as go-ipfs will simply fall back on the TCP transport when dialing nodes with incompatible QUIC versions. +**NOTE:** The QUIC transport included in this release is backwards incompatible with the experimental QUIC transport included in previous releases. Unfortunately, the QUIC protocol underwent some significant breaking changes and supporting multiple versions wasn't an option. In practice this degrades gracefully, as go-ipfs will simply fall back on the TCP transport when dialing nodes with incompatible QUIC versions. #### NOISE Transport From 43f17c2bf7c09b9f08afb2efe2b90689417883e5 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Tue, 16 Jun 2020 21:16:06 -0700 Subject: [PATCH 33/45] doc(changelog): additional nits --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e758b96d..24e2899b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,12 +4,12 @@ ### Highlights -This is a relatively small release in terms of code changes, but it contains some large changes with respect to the protocol. The highlights in this release include: +This is a relatively small release in terms of code changes, but it contains some significant changes to the IPFS protocol. The highlights in this release include: * The QUIC transport is enabled by default. Furthermore, go-ipfs will automatically run a migration to listen on the QUIC transport (on the same address/port as the TCP transport) to make this upgrade process seamless. * The new NOISE security transport is now supported but won't be selected by default. This transport will replace SECIO as the default cross-language interoperability security transport. TLS 1.3 will still remain the default security transport between go-ipfs nodes for now. -**MIGRATION:** This release contains a small config migration to enable QUIC alongside the configured TCP transport. This migration will: +**MIGRATION:** This release contains a small config migration to enable listening on the QUIC transport in addition the TCP transport. This migration will: * Normalize multiaddrs in the bootstrap list to use the `/p2p/Qm...` syntax for multiaddrs instead of the `/ipfs/Qm...` syntax. * Add QUIC addresses for the default bootstrapers, as necessary. If you've removed the default bootstrappers from your bootstrap config, the migration won't add them back. @@ -29,7 +29,7 @@ Unfortunately, this change isn't without drawbacks: the QUIC transport may not b If you hit this performance issue on Linux, you should tune the `net.core.rmem_default` and `net.core.rmem_max` sysctl parameters to increase your UDP receive buffer sizes. -**NOTE:** The QUIC transport included in this release is backwards incompatible with the experimental QUIC transport included in previous releases. Unfortunately, the QUIC protocol underwent some significant breaking changes and supporting multiple versions wasn't an option. In practice this degrades gracefully, as go-ipfs will simply fall back on the TCP transport when dialing nodes with incompatible QUIC versions. +**NOTE:** The QUIC transport included in this release is backwards incompatible with the experimental QUIC transport included in previous releases. Unfortunately, the QUIC protocol underwent some significant breaking changes and supporting multiple versions wasn't an option. In practice this degrades gracefully as go-ipfs will simply fall back on the TCP transport when dialing nodes with incompatible QUIC versions. #### NOISE Transport From 357a248b5d42f98c794cba60d84cba3f9e17a375 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Tue, 16 Jun 2020 21:31:15 -0700 Subject: [PATCH 34/45] doc(changelog): cleanup 404 text --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 24e2899b7..5079b62a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,7 +39,7 @@ If you hit this performance issue on Linux, you should tune the `net.core.rmem_d ##### Custom 404 -It is now possible to customize `404 Not Found` error response by including `ipfs-404.html`. When a requested file isn't found `ipfs-404.html` is looked for in the same directory, rolling up through any of its parents, and displayed (without immutable cache headers) if present. +You can now customize `404 Not Found` error pages by including an `ipfs-404.html` file somewhere in the request path. When a requested file isn't found, go-ipfs will look for an `ipfs-404.html` in the same directory as the requested file, and in each ancestor directory. If found, this file will be returned (with a 404 status code) instead of the usual error message. ##### Support for Base36 and ED25519 in subdomains From e457aa74fd24cb244f0f032280f60747cf4b96b2 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Tue, 16 Jun 2020 21:31:20 -0700 Subject: [PATCH 35/45] doc(changelog): cleanup base36 section * make it clear that we don't use it by default (yet) * focus on what the user cares about --- CHANGELOG.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5079b62a3..46bddd5e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,15 +41,16 @@ If you hit this performance issue on Linux, you should tune the `net.core.rmem_d You can now customize `404 Not Found` error pages by including an `ipfs-404.html` file somewhere in the request path. When a requested file isn't found, go-ipfs will look for an `ipfs-404.html` in the same directory as the requested file, and in each ancestor directory. If found, this file will be returned (with a 404 status code) instead of the usual error message. -##### Support for Base36 and ED25519 in subdomains +##### Support for Base36 -DNS label has a maximum length of 63 characters. This was a problem for users who opted into using inlined ED25519 keys for IPNS publishing. Support for CIDv1 in Base36 enables subdomain gateway to load websites published with those keys without the need for re-hashing. +This release adds support for a new multibase encoding: base36. Base36 is an optimally efficient case-insensitive alphanumeric encoding. Case-insensitive alphanumeric encodings are important for the subdomain gateway as domain names are case insensitive. -ED25519 key can be converted to Base36 via `ipfs cid` command: +While base32 (the current default encoding used in subdomains) is simpler than base36, it's not optimally efficient and base36 Ed25519 IPNS keys are 2 characters too big to fit into the 63 character subdomain length limit. The extra efficiency from base36 brings us under this limit and allows Ed25519 IPNS keys to work with the subdomain gateway. + +This release adds support for base36 but won't use it by default. If you'd like to re-encode an Ed25519 IPNS key into base36, you can use the `ipfs cid format` command: ```sh -$ ipfs cid format -v 1 --codec libp2p-key -b base36 bafzaajaiaejca4syrpdu6gdx4wsdnokxkprgzxf4wrstuc34gxw5k5jrag2so5gk -k51qzi5uqu5dj16qyiq0tajolkojyl9qdkr254920wxv7ghtuwcz593tp69z9m +$ ipfs cid format -v 1 --codec libp2p-key -b base36 bafzaajaiaejca4syrpdu6gdx4wsdnokxkprgzxf4wrstuc34gxw5k5jrag2so5gk k51qzi5uqu5dj16qyiq0tajolkojyl9qdkr254920wxv7ghtuwcz593tp69z9m ``` #### Gossipsub Upgrade From ae5ef6de0849fdbaa3dd7a5cbf1e577bfecf9598 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Tue, 16 Jun 2020 21:57:58 -0700 Subject: [PATCH 36/45] doc(changelog): finish fleshing out the changelog --- CHANGELOG.md | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 46bddd5e8..7fc0b2755 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,14 +29,26 @@ Unfortunately, this change isn't without drawbacks: the QUIC transport may not b If you hit this performance issue on Linux, you should tune the `net.core.rmem_default` and `net.core.rmem_max` sysctl parameters to increase your UDP receive buffer sizes. +If necessary, you can disable the QUIC transport by running: + +```bash +> ipfs config --json Swarm.Transports.Network.QUIC false +``` + **NOTE:** The QUIC transport included in this release is backwards incompatible with the experimental QUIC transport included in previous releases. Unfortunately, the QUIC protocol underwent some significant breaking changes and supporting multiple versions wasn't an option. In practice this degrades gracefully as go-ipfs will simply fall back on the TCP transport when dialing nodes with incompatible QUIC versions. -#### NOISE Transport +#### Noise Transport -* Quick "why noise"? +This go-ipfs release introduces a new security transport: [libp2p Noise](https://github.com/libp2p/specs/tree/master/noise) (built from the [Noise Protocol Framework](http://www.noiseprotocol.org/)). While TLS1.3 remains the default go-ipfs security transport, Noise is simpler to implement from scratch and will be the standard cross-platform libp2p security transport going forward. + +This brings us one step closer to deprecating and removing support for SECIO. + +While enabled by default, Noise won't actually be _used_ by default it's negotiated. Given that TLS1.3 is still the default security transport for go-ipfs, this usually won't happen. If you'd like to prefer Noise over other security transports, you can change its priority in the [config](./docs/config.md) (`Swarm.Transports.Security.Noise`). #### Gateway +This release brings two gateway-relevant features: custom 404 pages and base36 support. + ##### Custom 404 You can now customize `404 Not Found` error pages by including an `ipfs-404.html` file somewhere in the request path. When a requested file isn't found, go-ipfs will look for an `ipfs-404.html` in the same directory as the requested file, and in each ancestor directory. If found, this file will be returned (with a 404 status code) instead of the usual error message. @@ -55,17 +67,17 @@ $ ipfs cid format -v 1 --codec libp2p-key -b base36 bafzaajaiaejca4syrpdu6gdx4ws #### Gossipsub Upgrade -* Summary paragraph and a link to the blog post? +This release brings a new gossipsub protocol version: 1.1. You can read about it in the [blog post](https://blog.ipfs.io/2020-05-20-gossipsub-v1.1/). #### Connectivity -* "Peering" support. +This release introduces a new ["peering"](./docs/config.md#peering) feature. The peering subsystem configures go-ipfs to connect to, remain connected to, and reconnect to a set of nodes. Nodes should use this subsystem to create "sticky" links between frequently useful peers to improve reliability. -#### Libp2p Changes +Use-cases: -* Advertise fewer addresses. -* Reduced allocations under load. -* Improved routing table refresh logic. +* An IPFS gateway connected to an IPFS cluster should peer to ensure that the gateway can always fetch content from the cluster. +* A dapp may peer embedded go-ipfs nodes with a set of pinning services or textile cafes/hubs. +* A set of friends may peer to ensure that they can always fetch each other's content. ### Changelog From 0cef475b2d83ffb627eafe3c72563e83dfcb19d5 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Tue, 16 Jun 2020 22:04:09 -0700 Subject: [PATCH 37/45] docs(config): update toc --- docs/config.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/config.md b/docs/config.md index 658a90c25..d509915d5 100644 --- a/docs/config.md +++ b/docs/config.md @@ -198,7 +198,19 @@ does (e.g, `"1d2h4m40.01s"`). - [`Swarm.ConnMgr.LowWater`](#swarmconnmgrlowwater) - [`Swarm.ConnMgr.HighWater`](#swarmconnmgrhighwater) - [`Swarm.ConnMgr.GracePeriod`](#swarmconnmgrgraceperiod) - + - [`Swarm.Transports`](#swarmtransports) + - [`Swarm.Transports.Security`](#swarmtransportssecurity) + - [`Swarm.Transports.Security.TLS`](#swarmtransportssecuritytls) + - [`Swarm.Transports.Security.SECIO`](#swarmtransportssecuritysecio) + - [`Swarm.Transports.Security.Noise`](#swarmtransportssecuritynoise) + - [`Swarm.Transports.Multiplexers`](#swarmtransportsmultiplexers) + - [`Swarm.Transports.Multiplexers.Yamux`](#swarmtransportsmultiplexersyamux) + - [`Swarm.Transports.Multiplexers.Mplex`](#swarmtransportsmultiplexersmplex) + - [`Swarm.Transports.Network`](#swarmtransportsnetwork) + - [`Swarm.Transports.Network.TCP`](#swarmtransportsnetworktcp) + - [`Swarm.Transports.Network.QUIC`](#swarmtransportsnetworkquic) + - [`Swarm.Transports.Network.Websocket`](#swarmtransportsnetworkwebsocket) + - [`Swarm.Transports.Network.Relay`](#swarmtransportsnetworkrelay) ## `Addresses` From 5fb3a3e4f5ddd83360168d3f6dd0104c6685c856 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Tue, 16 Jun 2020 22:40:42 -0700 Subject: [PATCH 38/45] doc(changelog): update for final patches --- CHANGELOG.md | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fc0b2755..50efa9f79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -82,6 +82,9 @@ Use-cases: ### Changelog - github.com/ipfs/go-ipfs: + - docs(config): update toc ([ipfs/go-ipfs#7483](https://github.com/ipfs/go-ipfs/pull/7483)) + - feat: transport config ([ipfs/go-ipfs#7479](https://github.com/ipfs/go-ipfs/pull/7479)) + - fix the minimal go version under 'Build from Source' ([ipfs/go-ipfs#7459](https://github.com/ipfs/go-ipfs/pull/7459)) - fix(migration): migrate /ipfs/ bootstrappers to /p2p/ - fix(migration): correctly migrate quic addresses - chore: add migration to listen on QUIC by default @@ -165,7 +168,8 @@ Use-cases: - Staticcheck fixes (#196) ([ipfs/go-ipfs-cmds#196](https://github.com/ipfs/go-ipfs-cmds/pull/196)) - doc: update docs for interface changes ([ipfs/go-ipfs-cmds#197](https://github.com/ipfs/go-ipfs-cmds/pull/197)) - Add standard issue template -- github.com/ipfs/go-ipfs-config (v0.5.3 -> v0.7.1): +- github.com/ipfs/go-ipfs-config (v0.5.3 -> v0.8.0): + - feat: add a transports section for enabling/disabling transports ([ipfs/go-ipfs-config#102](https://github.com/ipfs/go-ipfs-config/pull/102)) - feat: add an option for security transport experiments ([ipfs/go-ipfs-config#97](https://github.com/ipfs/go-ipfs-config/pull/97)) - feat: add peering service config section ([ipfs/go-ipfs-config#96](https://github.com/ipfs/go-ipfs-config/pull/96)) - fix: include key size in key init method ([ipfs/go-ipfs-config#95](https://github.com/ipfs/go-ipfs-config/pull/95)) @@ -288,7 +292,15 @@ Use-cases: - github.com/libp2p/go-yamux (v1.3.5 -> v1.3.7): - tighten lock around appending new chunks of read data in stream ([libp2p/go-yamux#28](https://github.com/libp2p/go-yamux/pull/28)) - fix: unlock recvLock in all cases. ([libp2p/go-yamux#25](https://github.com/libp2p/go-yamux/pull/25)) -- github.com/lucas-clemente/quic-go (v0.15.7 -> v0.16.1): +- github.com/lucas-clemente/quic-go (v0.15.7 -> v0.16.2): + - make it possible to use the transport with both draft-28 and draft-29 + - update the ALPN for draft-29 ([lucas-clemente/quic-go#2600](https://github.com/lucas-clemente/quic-go/pull/2600)) + - update initial salts and test vectors for draft-29 ([lucas-clemente/quic-go#2587](https://github.com/lucas-clemente/quic-go/pull/2587)) + - rename the SERVER_BUSY error to CONNECTION_REFUSED ([lucas-clemente/quic-go#2596](https://github.com/lucas-clemente/quic-go/pull/2596)) + - reduce calls to time.Now() from the flow controller ([lucas-clemente/quic-go#2591](https://github.com/lucas-clemente/quic-go/pull/2591)) + - remove redundant parenthesis and type conversion in flow controller ([lucas-clemente/quic-go#2592](https://github.com/lucas-clemente/quic-go/pull/2592)) + - use the receipt of a Retry packet to get a first RTT estimate ([lucas-clemente/quic-go#2588](https://github.com/lucas-clemente/quic-go/pull/2588)) + - fix debug message when returning an early session ([lucas-clemente/quic-go#2594](https://github.com/lucas-clemente/quic-go/pull/2594)) - fix closing of the http.Request.Body ([lucas-clemente/quic-go#2584](https://github.com/lucas-clemente/quic-go/pull/2584)) - split PTO calculation into a separate function ([lucas-clemente/quic-go#2576](https://github.com/lucas-clemente/quic-go/pull/2576)) - add a unit test using the ChaCha20 test vector from the draft ([lucas-clemente/quic-go#2585](https://github.com/lucas-clemente/quic-go/pull/2585)) @@ -341,14 +353,14 @@ Use-cases: | Contributor | Commits | Lines ± | Files Changed | |-------------------------|---------|-------------|---------------| | vyzo | 224 | +8016/-2810 | 304 | -| Marten Seemann | 79 | +5858/-2514 | 178 | +| Marten Seemann | 87 | +6081/-2607 | 215 | +| Steven Allen | 151 | +4726/-1607 | 260 | | Aarsh Shah | 33 | +4619/-1634 | 128 | | Dirk McCormick | 26 | +3596/-1156 | 69 | -| Steven Allen | 124 | +3283/-1339 | 215 | | Yusef Napora | 66 | +2622/-785 | 98 | | Raúl Kripalani | 24 | +2424/-782 | 61 | +| Hector Sanjuan | 30 | +999/-177 | 61 | | Louis Thibault | 2 | +1111/-4 | 4 | -| Hector Sanjuan | 28 | +904/-177 | 58 | | Will Scott | 15 | +717/-219 | 31 | | dependabot-preview[bot] | 53 | +640/-64 | 106 | | Michael Muré | 7 | +456/-213 | 17 | @@ -357,10 +369,10 @@ Use-cases: | Lukasz Zimnoch | 9 | +361/-49 | 13 | | Jakub Sztandera | 4 | +157/-104 | 9 | | Rod Vagg | 1 | +91/-83 | 2 | -| RubenKelevra | 12 | +83/-83 | 29 | +| RubenKelevra | 13 | +84/-84 | 30 | | JP Hastings-Spital | 1 | +145/-0 | 2 | | Adin Schmahmann | 11 | +67/-37 | 15 | -| Marcin Rataj | 10 | +27/-41 | 10 | +| Marcin Rataj | 11 | +41/-43 | 11 | | Tiger | 5 | +53/-8 | 6 | | Akira | 2 | +35/-19 | 2 | | Casey Chance | 2 | +31/-22 | 2 | @@ -371,6 +383,7 @@ Use-cases: | Edgar Aroutiounian | 3 | +16/-8 | 3 | | Peter Wu | 2 | +12/-9 | 2 | | Sawood Alam | 2 | +7/-7 | 2 | +| Command | 1 | +12/-0 | 1 | | Eric Myhre | 1 | +9/-2 | 1 | | mawei | 2 | +5/-5 | 2 | | decanus | 1 | +5/-5 | 1 | @@ -378,10 +391,12 @@ Use-cases: | Alfonso Montero | 1 | +1/-5 | 1 | | Volker Mische | 1 | +2/-2 | 1 | | Shotaro Yamada | 1 | +2/-1 | 1 | +| Mark Gaiser | 1 | +1/-1 | 1 | | Johnny | 1 | +1/-1 | 1 | | Ganesh Prasad Kumble | 1 | +1/-1 | 1 | | Dominic Della Valle | 1 | +1/-1 | 1 | | Corbin Page | 1 | +1/-1 | 1 | +| Bryan Stenson | 1 | +1/-1 | 1 | | Bernhard M. Wiedemann | 1 | +1/-1 | 1 | ## 0.5.1 2020-05-08 From 63ff04c4cf6547ad5ecc1048463f2c3b5019419c Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Tue, 16 Jun 2020 22:41:31 -0700 Subject: [PATCH 39/45] feat: bump version to 0.6.0-rc7 --- version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.go b/version.go index 016713322..7b02d0bf0 100644 --- a/version.go +++ b/version.go @@ -4,7 +4,7 @@ package ipfs var CurrentCommit string // CurrentVersionNumber is the current application's version literal -const CurrentVersionNumber = "0.6.0-rc6" +const CurrentVersionNumber = "0.6.0-rc7" const ApiVersion = "/go-ipfs/" + CurrentVersionNumber + "/" From 00de344318e60f2872e53c35240db92ae6f82727 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Wed, 17 Jun 2020 19:42:14 -0700 Subject: [PATCH 40/45] fix: close resolve channel before returning it --- namesys/namesys.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/namesys/namesys.go b/namesys/namesys.go index 933ce789d..bf028c099 100644 --- a/namesys/namesys.go +++ b/namesys/namesys.go @@ -86,16 +86,19 @@ func (ns *mpns) Resolve(ctx context.Context, name string, options ...opts.Resolv } func (ns *mpns) ResolveAsync(ctx context.Context, name string, options ...opts.ResolveOpt) <-chan Result { - res := make(chan Result, 1) if strings.HasPrefix(name, "/ipfs/") { p, err := path.ParsePath(name) + res := make(chan Result, 1) res <- Result{p, err} + close(res) return res } if !strings.HasPrefix(name, "/") { p, err := path.ParsePath("/ipfs/" + name) + res := make(chan Result, 1) res <- Result{p, err} + close(res) return res } From 5f19f3bbe86cf709d503720ebacf86f4c9faf63c Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Wed, 17 Jun 2020 19:43:20 -0700 Subject: [PATCH 41/45] fix: cancel resolve search context We probably don't need to do this, but it can't hurt. --- core/coreapi/name.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/coreapi/name.go b/core/coreapi/name.go index 4792196b6..ec653a394 100644 --- a/core/coreapi/name.go +++ b/core/coreapi/name.go @@ -120,6 +120,9 @@ func (api *NameAPI) Search(ctx context.Context, name string, opts ...caopts.Name // Resolve attempts to resolve the newest version of the specified name and // returns its path. func (api *NameAPI) Resolve(ctx context.Context, name string, opts ...caopts.NameResolveOption) (path.Path, error) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + results, err := api.Search(ctx, name, opts...) if err != nil { return nil, err From 84341d0c5a66fdf88278ccfba8f1d9703b8fc8e1 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Wed, 17 Jun 2020 19:44:28 -0700 Subject: [PATCH 42/45] fix: use the correct context when resolving dnsaddr links --- core/corehttp/hostname.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/corehttp/hostname.go b/core/corehttp/hostname.go index 143435106..d8656da23 100644 --- a/core/corehttp/hostname.go +++ b/core/corehttp/hostname.go @@ -124,7 +124,7 @@ func HostnameOption() ServeOption { // Not a whitelisted path // Try DNSLink, if it was not explicitly disabled for the hostname - if !gw.NoDNSLink && isDNSLinkRequest(n.Context(), coreApi, r) { + if !gw.NoDNSLink && isDNSLinkRequest(r.Context(), coreApi, r) { // rewrite path and handle as DNSLink r.URL.Path = "/ipns/" + stripPort(r.Host) + r.URL.Path childMux.ServeHTTP(w, r) @@ -176,7 +176,7 @@ func HostnameOption() ServeOption { // 1. is wildcard DNSLink enabled (Gateway.NoDNSLink=false)? // 2. does Host header include a fully qualified domain name (FQDN)? // 3. does DNSLink record exist in DNS? - if !cfg.Gateway.NoDNSLink && isDNSLinkRequest(n.Context(), coreApi, r) { + if !cfg.Gateway.NoDNSLink && isDNSLinkRequest(r.Context(), coreApi, r) { // rewrite path and handle as DNSLink r.URL.Path = "/ipns/" + stripPort(r.Host) + r.URL.Path childMux.ServeHTTP(w, r) From 0f3bc6552f6a09bddf369e67393a95b546159136 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Wed, 17 Jun 2020 19:50:51 -0700 Subject: [PATCH 43/45] fix: return results from resolve once Previously, we'd return the error + result, then the result. --- namesys/namesys.go | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/namesys/namesys.go b/namesys/namesys.go index bf028c099..ac7fb0383 100644 --- a/namesys/namesys.go +++ b/namesys/namesys.go @@ -123,15 +123,12 @@ func (ns *mpns) resolveOnceAsync(ctx context.Context, name string, options opts. key := segments[2] if p, ok := ns.cacheGet(key); ok { + var err error if len(segments) > 3 { - var err error p, err = path.FromSegments("", strings.TrimRight(p.String(), "/"), segments[3]) - if err != nil { - emitOnceResult(ctx, out, onceResult{value: p, err: err}) - } } - out <- onceResult{value: p} + out <- onceResult{value: p, err: err} close(out) return out } @@ -183,17 +180,15 @@ func (ns *mpns) resolveOnceAsync(ctx context.Context, name string, options opts. best = res } p := res.value + err := res.err + ttl := res.ttl // Attach rest of the path if len(segments) > 3 { - var err error p, err = path.FromSegments("", strings.TrimRight(p.String(), "/"), segments[3]) - if err != nil { - emitOnceResult(ctx, out, onceResult{value: p, ttl: res.ttl, err: err}) - } } - emitOnceResult(ctx, out, onceResult{value: p, ttl: res.ttl, err: res.err}) + emitOnceResult(ctx, out, onceResult{value: p, ttl: ttl, err: err}) case <-ctx.Done(): return } From 3f2421c318def8242cae4ce2c8d4dd5cb6227c4e Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Fri, 19 Jun 2020 14:29:34 -0700 Subject: [PATCH 44/45] doc(changelog): final update for release --- CHANGELOG.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 50efa9f79..e803b2a2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,12 @@ # go-ipfs changelog -## v0.6.0 2020-06-16 +## v0.6.0 2020-06-19 + +This is a relatively small release in terms of code changes, but it contains some significant changes to the IPFS protocol. ### Highlights -This is a relatively small release in terms of code changes, but it contains some significant changes to the IPFS protocol. The highlights in this release include: +The highlights in this release include: * The QUIC transport is enabled by default. Furthermore, go-ipfs will automatically run a migration to listen on the QUIC transport (on the same address/port as the TCP transport) to make this upgrade process seamless. * The new NOISE security transport is now supported but won't be selected by default. This transport will replace SECIO as the default cross-language interoperability security transport. TLS 1.3 will still remain the default security transport between go-ipfs nodes for now. @@ -82,6 +84,7 @@ Use-cases: ### Changelog - github.com/ipfs/go-ipfs: + - fix 3 bugs responsible for a goroutine leak (plus one other bug) ([ipfs/go-ipfs#7491](https://github.com/ipfs/go-ipfs/pull/7491)) - docs(config): update toc ([ipfs/go-ipfs#7483](https://github.com/ipfs/go-ipfs/pull/7483)) - feat: transport config ([ipfs/go-ipfs#7479](https://github.com/ipfs/go-ipfs/pull/7479)) - fix the minimal go version under 'Build from Source' ([ipfs/go-ipfs#7459](https://github.com/ipfs/go-ipfs/pull/7459)) @@ -354,7 +357,7 @@ Use-cases: |-------------------------|---------|-------------|---------------| | vyzo | 224 | +8016/-2810 | 304 | | Marten Seemann | 87 | +6081/-2607 | 215 | -| Steven Allen | 151 | +4726/-1607 | 260 | +| Steven Allen | 157 | +4763/-1628 | 266 | | Aarsh Shah | 33 | +4619/-1634 | 128 | | Dirk McCormick | 26 | +3596/-1156 | 69 | | Yusef Napora | 66 | +2622/-785 | 98 | From 5a19539223fa5b65eb491b5e2180c369e7ed1137 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Fri, 19 Jun 2020 14:50:45 -0700 Subject: [PATCH 45/45] feat: release v0.6.0 --- version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.go b/version.go index 7b02d0bf0..1cecf68d6 100644 --- a/version.go +++ b/version.go @@ -4,7 +4,7 @@ package ipfs var CurrentCommit string // CurrentVersionNumber is the current application's version literal -const CurrentVersionNumber = "0.6.0-rc7" +const CurrentVersionNumber = "0.6.0" const ApiVersion = "/go-ipfs/" + CurrentVersionNumber + "/"