diff --git a/.circleci/config.yml b/.circleci/config.yml index 0761018c7..fa7c4d7e2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -37,10 +37,8 @@ executors: working_directory: ~/ipfs/go-ipfs environment: <<: *default_environment - GO111MODULE: "on" TEST_NO_DOCKER: 1 TEST_NO_FUSE: 1 - GOPATH: /home/circleci/go TEST_VERBOSE: 1 node: docker: @@ -123,10 +121,8 @@ jobs: working_directory: ~/ipfs/go-ipfs environment: <<: *default_environment - GO111MODULE: "on" TEST_NO_DOCKER: 1 TEST_NO_FUSE: 1 - GOPATH: /home/circleci/go TEST_VERBOSE: 1 steps: - run: sudo apt update @@ -151,10 +147,10 @@ jobs: - run: name: Setup Environment Variables # we need the docker host IP; all ports exported by child containers can be accessed there. - command: echo "export DOCKER_HOST=$(ip -4 addr show docker0 | grep -Po 'inet \K[\d.]+')" >> $BASH_ENV + command: echo "export TEST_DOCKER_HOST=$(ip -4 addr show docker0 | grep -Po 'inet \K[\d.]+')" >> $BASH_ENV - run: - echo DOCKER_HOST=$DOCKER_HOST && - make -O -j 3 coverage/sharness_tests.coverprofile test/sharness/test-results/sharness.xml TEST_GENERATE_JUNIT=1 CONTINUE_ON_S_FAILURE=1 DOCKER_HOST=$DOCKER_HOST + echo TEST_DOCKER_HOST=$TEST_DOCKER_HOST && + make -O -j 3 coverage/sharness_tests.coverprofile test/sharness/test-results/sharness.xml TEST_GENERATE_JUNIT=1 CONTINUE_ON_S_FAILURE=1 TEST_DOCKER_HOST=$TEST_DOCKER_HOST - run: when: always diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md deleted file mode 100644 index 72d014c8f..000000000 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -name: 'Bug Report' -about: 'Report a bug in go-ipfs.' -labels: kind/bug, need/triage ---- - - - -#### Version information: - - -#### Description: - diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml new file mode 100644 index 000000000..96b29dc8b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -0,0 +1,62 @@ +name: Bug Report +description: Report a bug in go-ipfs. +labels: + - kind/bug + - need/triage +body: + - type: markdown + attributes: + value: | + - Make sure you are running the [latest version of go-ipfs][releases] before reporting an issue. + - If you have an enhancement or feature request for go-ipfs, please select [a different option][issues]. + - Please report possible security issues by email to security@ipfs.io + + [issues]: https://github.com/ipfs/go-ipfs/issues/new/choose + [releases]: https://github.com/ipfs/go-ipfs/releases + - type: checkboxes + attributes: + label: Checklist + description: Please verify that you've followed these steps + options: + - label: This is a bug report, not a question. Ask questions on [discuss.ipfs.io](https://discuss.ipfs.io). + required: true + - label: I have searched on the [issue tracker](https://github.com/ipfs/go-ipfs/issues?q=is%3Aissue) for my bug. + required: true + - label: I am running the latest [go-ipfs version](https://dist.ipfs.io/#go-ipfs) or have an issue updating. + required: true + - type: dropdown + id: install + validations: + required: true + attributes: + label: Installation method + description: Please select your installation method + options: + - ipfs-desktop + - ipfs-update or dist.ipfs.io + - third-party binary + - built from source + - type: textarea + id: version + attributes: + label: Version + render: Text + description: | + Enter the output of `ipfs version --all`. If you can't run that command, please include a copy of your [gateway's version page](http://localhost:8080/api/v0/version?enc=text&all=true). + - type: textarea + id: config + attributes: + label: Config + render: json + description: | + Enter the output of `ipfs config show`. + - type: textarea + attributes: + label: Description + description: | + This is where you get to tell us what went wrong. When doing so, please make sure to include *all* relevant information. + + Please try to include: + * What you were doing when you experienced the bug. + * Any error messages you saw, *where* you saw them, and what you believe may have caused them (if you have any ideas). + * When possible, steps to reliably produce the bug. diff --git a/.github/ISSUE_TEMPLATE/doc.md b/.github/ISSUE_TEMPLATE/doc.md deleted file mode 100644 index 0a5432f57..000000000 --- a/.github/ISSUE_TEMPLATE/doc.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -name: 'Documentation Issue' -about: 'Report missing, erroneous docs, broken links or propose new go-ipfs docs' -labels: topic/docs-ipfs, need/triage ---- - - -#### Location - - - -#### Description - - diff --git a/.github/ISSUE_TEMPLATE/doc.yml b/.github/ISSUE_TEMPLATE/doc.yml new file mode 100644 index 000000000..dc9034fae --- /dev/null +++ b/.github/ISSUE_TEMPLATE/doc.yml @@ -0,0 +1,29 @@ +name: Documentation Issue +description: Report missing, erroneous docs, broken links or propose new go-ipfs docs. +labels: + - topic/docs-ipfs + - need/triage +body: + - type: markdown + attributes: + value: | + Problems with documentation on https://docs.ipfs.io should be reported to https://github.com/ipfs/ipfs-docs + - type: checkboxes + attributes: + label: Checklist + description: Please verify the following. + options: + - label: I am reporting a documentation issue in this repo, not https://docs.ipfs.io. + required: true + - label: I have searched on the [issue tracker](https://github.com/ipfs/go-ipfs/issues?q=is%3Aissue) for my issue. + required: true + - type: input + attributes: + label: Location + description: | + If possible, please provide a link to the documentation issue. + - type: textarea + attributes: + label: Description + description: | + Please describe your issue. diff --git a/.github/ISSUE_TEMPLATE/enhancement.md b/.github/ISSUE_TEMPLATE/enhancement.md deleted file mode 100644 index 8c1c31c0d..000000000 --- a/.github/ISSUE_TEMPLATE/enhancement.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -name: 'Enhancement' -about: 'Suggest an improvement to an existing go-ipfs feature.' -labels: kind/enhancement ---- - - diff --git a/.github/ISSUE_TEMPLATE/enhancement.yml b/.github/ISSUE_TEMPLATE/enhancement.yml new file mode 100644 index 000000000..f1be06c35 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/enhancement.yml @@ -0,0 +1,33 @@ +name: Enhancement +description: Suggest an improvement to an existing go-ipfs feature. +labels: + - kind/enhancement +body: + - type: markdown + attributes: + value: | + Suggest an enhancement to go-ipfs (the program). If you'd like to suggest an improvement to the IPFS protocol, please discuss it on [the forum](https://discuss.ipfs.io). + + Issues in this repo must be specific, actionable, and well motivated. They should be starting points for _building_ new features, not brainstorming ideas. + + If you have an idea you'd like to discuss, please open a new thread on [the forum](https://discuss.ipfs.io). + + **Example:** + + > Reduce memory usage of `ipfs cat` (specific) by buffering less in ... (actionable). This would let me run go-ipfs on my Raspberry Pi (motivated). + - type: checkboxes + attributes: + label: Checklist + description: Please verify the following. + options: + - label: My issue is specific & actionable. + required: true + - label: I am not suggesting a protocol enhancement. + required: true + - label: I have searched on the [issue tracker](https://github.com/ipfs/go-ipfs/issues?q=is%3Aissue) for my issue. + required: true + - type: textarea + attributes: + label: Description + description: | + Please describe your idea. When requesting an enhancement, please be sure to include your motivation and try to be as specific as possible. diff --git a/.github/ISSUE_TEMPLATE/feature.md b/.github/ISSUE_TEMPLATE/feature.md deleted file mode 100644 index 0cd141dc7..000000000 --- a/.github/ISSUE_TEMPLATE/feature.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -name: 'Feature' -about: 'Suggest a new feature in go-ipfs.' -labels: kind/feature, need/triage ---- - - diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml new file mode 100644 index 000000000..62414cabb --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature.yml @@ -0,0 +1,34 @@ +name: Feature +description: Suggest a new feature in go-ipfs. +labels: + - kind/feature +body: + - type: markdown + attributes: + value: | + Suggest a new feature in go-ipfs (the program). If you'd like to suggest an improvement to the IPFS protocol, please discuss it on [the forum](https://discuss.ipfs.io). + + Issues in this repo must be specific, actionable, and well motivated. They should be starting points for _building_ new features, not brainstorming ideas. + + If you have an idea you'd like to discuss, please open a new thread on [the forum](https://discuss.ipfs.io). + + **Example:** + + > Add deduplication-optimized chunking of tar files in `ipfs add` (specific) by examining tar headers ... (actionable). This would let me efficiently store and update many versions of code archives (motivated). + + - type: checkboxes + attributes: + label: Checklist + description: Please verify the following. + options: + - label: My issue is specific & actionable. + required: true + - label: I am not suggesting a protocol enhancement. + required: true + - label: I have searched on the [issue tracker](https://github.com/ipfs/go-ipfs/issues?q=is%3Aissue) for my issue. + required: true + - type: textarea + attributes: + label: Description + description: | + Please describe your idea. When requesting a feature, please be sure to include your motivation and and a concrete description of how the feature should work. diff --git a/CHANGELOG.md b/CHANGELOG.md index b2807e20f..c1fac6a71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,776 @@ # go-ipfs changelog +## v0.9.1 2021-07-20 + +This is a small bug fix release resolving the following issues: +1. A regression where the empty CID bafkqaaa could not resolve on gateways [#8230](https://github.com/ipfs/go-ipfs/issues/8230) +2. A panic on OpenBSD [#8211](https://github.com/ipfs/go-ipfs/issues/8211) +3. High CPU usage with QUIC [#8256](https://github.com/ipfs/go-ipfs/issues/8256) +4. High memory usage with TCP [#8219](https://github.com/ipfs/go-ipfs/issues/8219) +5. Some pubsub issues ([libp2p/go-libp2p-pubsub#427](https://github.com/libp2p/go-libp2p-pubsub/pull/427), [libp2p/go-libp2p-pubsub#430](https://github.com/libp2p/go-libp2p-pubsub/pull/430)) +6. Updated WebUI to [v2.12.4](https://github.com/ipfs/ipfs-webui/releases/tag/v2.12.4) +7. Fixed the snap deployment [#8212](https://github.com/ipfs/go-ipfs/pull/8212) + +### Changelog + +- github.com/ipfs/go-ipfs: + - chore: update deps + - feat: webui v2.12.4 + - test: gateway response for bafkqaaa + - fix: downgrade mimetype dependency + - update go-libp2p to v0.14.3 + - bump snap to build with Go 1.16 +- github.com/libp2p/go-libp2p (v0.14.2 -> v0.14.3): + - update go-tcp-transport to v0.2.3 and go-multiaddr to v0.3.3 ([libp2p/go-libp2p#1121](https://github.com/libp2p/go-libp2p/pull/1121)) +- github.com/libp2p/go-libp2p-pubsub (v0.4.1 -> v0.4.2): + - release priority locks early when handling batches + - don't respawn writer if we fail to open a stream; declare it a peer error + - batch process dead peer notifications + - use a priority lock instead of a semaphore + - do the notification in a goroutine + - emit new peer notification without holding the semaphore + - use a semaphore for new peer notifications so that we don't block the event loop + - don't accumulate pending goroutines from new connections + - Make close concurrent safe + - Fix close of closed channel +- github.com/libp2p/go-libp2p-quic-transport (v0.11.1 -> v0.11.2): + - update quic-go to v0.21.2 +- github.com/libp2p/go-tcp-transport (v0.2.2 -> v0.2.4): + - collect metrics in a separate go routine ([libp2p/go-tcp-transport#82](https://github.com/libp2p/go-tcp-transport/pull/82)) + - fix: avoid logging "invalid argument" errors when setting keepalive ([libp2p/go-tcp-transport#83](https://github.com/libp2p/go-tcp-transport/pull/83)) + - Skip SetKeepAlivePeriod call on OpenBSD ([libp2p/go-tcp-transport#80](https://github.com/libp2p/go-tcp-transport/pull/80)) + - sync: update CI config files (#79) ([libp2p/go-tcp-transport#79](https://github.com/libp2p/go-tcp-transport/pull/79)) +- github.com/lucas-clemente/quic-go (v0.21.1 -> v0.21.2): + - update qtls to include the crypto/tls fix of Go 1.16.6 / 1.15.14 + - cancel the PTO timer when all Handshake packets are acknowledged + - update to Go 1.17rc1 + - update Ginkgo to v1.16.4 and Gomega to v1.13.0 ([lucas-clemente/quic-go#3139](https://github.com/lucas-clemente/quic-go/pull/3139)) +- github.com/multiformats/go-multiaddr (v0.3.2 -> v0.3.3): + - guard against nil {Local,Remote}Addr() return values ([multiformats/go-multiaddr#155](https://github.com/multiformats/go-multiaddr/pull/155)) + - sync: update CI config files (#154) ([multiformats/go-multiaddr#154](https://github.com/multiformats/go-multiaddr/pull/154)) + +### Contributors + +| Contributor | Commits | Lines Β± | Files Changed | +|-------------|---------|---------|---------------| +| vyzo | 8 | +205/-141 | 12 | +| Marten Seemann | 7 | +127/-74 | 11 | +| gammazero | 2 | +43/-5 | 3 | +| Steven Allen | 1 | +13/-2 | 1 | +| Adin Schmahmann | 3 | +13/-2 | 3 | +| Marcin Rataj | 2 | +9/-1 | 2 | +| Aaron Bieber | 1 | +6/-2 | 1 | + +## v0.9.0 2021-06-22 + +We're happy to announce go-ipfs 0.9.0. This release makes go-ipfs even more configurable with some fun experiments to boot. We're also deprecating or removing some uncommonly used features to make it easier for users to discover the easy ways to use go-ipfs safely and efficiently. + +As usual, this release includes important fixes, some of which may be critical for security. Unless the fix addresses a bug being exploited in the wild, the fix will _not_ be called out in the release notes. Please make sure to update ASAP. See our [release process](https://github.com/ipfs/go-ipfs/tree/master/docs/releases.md#security-fix-policy) for details. + +### πŸ”¦ Highlights + +#### πŸ“¦ Exporting of DAGs via Gateways + +Gateways now support downloading arbitrary IPLD graphs via the `/api/v0/dag/export` endpoint. This endpoint works in the same way as the `ipfs dag export` command. + +One major thing this enables is ability to verify data downloaded from public gateways. If you go to `https://somegateway.example.net/ipfs/bafyexample` you are using the old school HTTP transport, and trusting that the gateway is being well behaved. However, if you download the graph as a [DAG archive](https://github.com/ipld/specs/blob/master/block-layer/content-addressable-archives.md) then it is possible to verify that the data you downloaded does in fact match `bafyexample`. + +Additionally, it was previously quite painful to download things other than UnixFS (files + directories) using gateways. It is now possible to download arbitrary IPLD graphs from gateways, making them useful as a general-purpose alternative to p2p transports. + +This opens exciting opportunities in areas like thin clients, mobile browsers and IoT devices, which now can delegate IPFS resolution to any public gateway, and have ability to verify that the data received matches the requested hash. + +#### ☁ Custom DNS Resolvers + +Resolution of DNS records for DNSLink and DNSAddrs means that names are sent in cleartext between the operating system and the DNS server provided by an ISP. In the past, the only way to customize DNS resolution in IPFS stack was to set up own DNS proxy server. + +There is now the ability to [customize DNS resolution](https://github.com/ipfs/go-ipfs/blob/master/docs/config.md#dns) and override the default resolver from the OS with [DNS over HTTPS](https://en.wikipedia.org/wiki/DNS_over_HTTPS) (DoH) one. We made it really flexible: override can be applied globally, or per specific [TLD](https://en.wikipedia.org/wiki/Top-level_domain)/[FQDN](https://en.wikipedia.org/wiki/Fully_qualified_domain_name). Examples can be found in the [documentation](https://github.com/ipfs/go-ipfs/blob/master/docs/config.md#dns). + +#### πŸ‘ͺ Support for non-ICANN DNSLink names + +Building off of the support for custom DNS resolvers it is now possible to create DNSLink names not handled by ICANN and choose how that domain name will be resolved. An example of this is how ENS is supported, despite `.eth` not being an ICANN TLD you can point `.eth` to any ENS resolver you want (including a local one). + +While go-ipfs may have some DoH defaults for a few popular non-ICANN DNSLink names (e.g. ENS), you are free to use any protocol for a naming system and as long as it exposes a DNSLink record via a DNS endpoint you can make it work. + +#### πŸ–₯️ Updated to the latest WebUI + +Our web interface now includes experimental support for pinning services, and various updates to _Files_ and _Peers_ screens. + +Remote pinning services added via the `ipfs pin remote service add` command are already detected, one can also add one from _Settings_ screen, and it will appear in _Set pinning_ interface on the _Files_ screen. + +Data presented on the _Peers_ screen can now be copied by simply clicking on a specific cell, and a list of open streams gives better insight into how a local node interacts with a specific peer. + +See release notes for [ipfs-webui v2.12](https://github.com/ipfs/ipfs-webui/releases/tag/v2.12.0) for screenshots and more details. + +#### πŸ”‘ IPNS keys can now be exported via the CLI without stopping the daemon + +`ipfs key export` no longer requires interrupting `ipfs daemon` ✨ + +#### πŸ•Έ Experimental DHT Client and Provider System + +An area of go-ipfs that has been historically tricky is how go-ipfs finds who has the data they are looking for. While the IPFS Public DHT is only one of the ways go-ipfs can find data it tends to be an important one. While since go-ipfs v0.5.0 the time to find content in the network has dropped significantly the time to put/get IPNS records or for a node to advertise the content it has still has much room for improvement. + +We have been doing some experimenting and have an alternative DHT client that essentially trades off some resources and in return is much more performant. We have also included with the experimental DHT client a bulk provider system that takes advantage of the new client to more efficiently do many advertisements at a time + +This work is quite new and still under development, however, the results so far have been promising especially for users with lots of data who have otherwise been having difficulty advertising their data into the IPFS Public DHT + +As described in the experimental features [documentation](https://github.com/ipfs/go-ipfs/blob/master/docs/experimental-features.md#accelerated-dht-client) the experimental client can be enabled using the command below (or modifying the config file). + +``` +ipfs config --json Experimental.AcceleratedDHTClient true +``` + +A few things to take note of when `AcceleratedDHTClient` is enabled: +- go-ipfs will likely use more resources then previously +- DHT queries will not be usable (i.e. finding which peers have some data, finding where a particular peer is, etc.) for the first 5-10 minutes of operation depending on your network conditions +- There is an `ipfs stats provide` command that will help you track your provide/reprovide usage, if you are providing lots of data you may want to consider how to reduce the amount you are providing (e.g. [Reprovider Strategies](https://github.com/ipfs/go-ipfs/blob/master/docs/config.md#reproviderstrategy) and/or [Strategic Providing](https://github.com/ipfs/go-ipfs/blob/master/docs/experimental-features.md#strategic-providing)) + +See the [documentation](https://github.com/ipfs/go-ipfs/blob/master/docs/experimental-features.md#accelerated-dht-client) for more details. + +#### πŸšΆβ€β™€οΈ Migrations + +##### Migrations are now individually packaged + +While previously the go-ipfs [repo migration](https://github.com/ipfs/fs-repo-migrations) binary was monolithic and contained all migrations from previous go-ipfs versions the binaries are now packaged individually. However, the fs-repo-migrations binary is still there to help those who manually upgrade their repos to download all the individual migrations. + +This means faster download times for upgrades, a much easier time building migrations for those who make use of custom plugins, and an easier time developing new migrations going forward. + +##### Configurable migration downloads enable downloading over IPFS + +Previously the migration downloader built into go-ipfs downloaded the migrations from [dist.ipfs.io](https://dist.ipfs.io). While users could use tools like [ipfs-update](https://github.com/ipfs/ipfs-update) to download the migrations over IPFS or manually download the migrations (over IPFS or otherwise) themselves, this is now automated and configurable. Users can choose to download the migrations over IPFS or from any specified IPFS Gateway. + +The configurable migration options are described in the config file [documentation](https://github.com/ipfs/go-ipfs/blob/master/docs/config.md#migration), although most users should not need to change the default settings. + +The main benefit here is that users behind restrictive firewalls, or in offline/private deployments, won't have to run migrations manually, which is especially important for desktop use cases where go-ipfs is running inside of [IPFS Desktop](https://github.com/ipfs-shipyard/ipfs-desktop#readme) and [Brave](https://brave.com/ipfs-support/). + +#### 🍎 Published builds for Apple M1 hardware + +Go now supports building for Darwin ARM64, and we are now publishing those builds + +#### πŸ‘‹ Deprecations and Feature Removals + +##### The `ipfs object` commands are now deprecated + +In the last couple years most of the Object API's commands have become fulfillable using alternative APIs. + +The utility of Object API's is limited to data in UnixFS-v1 (`dag-pb`) format. If you are still using it, it is highly recommended that you switch to the DAG `ipfs dag` (supports modern data types like `dag-cbor`) or Files `ipfs files` (more intuitive for working with `dag-pb`) APIs. + +While the Object API and commands are still usable they are now marked as deprecated and hidden from users on the command line to discourage further use. We also updated their `--help` text to point at the modern replacements. + + +##### `X-Ipfs-Gateway-Prefix` is now deprecated + +IPFS community moved towards dedicated Origins (DNSLink and [subdomain gateways](https://docs.ipfs.io/how-to/address-ipfs-on-web/#subdomain-gateway)) which are much easier to isolate and reason about. + +Setting up `Gateway.PathPrefixes` and `X-Ipfs-Gateway-Prefix` is no longer necessary and support [will be removed in near future](https://github.com/ipfs/go-ipfs/issues/7702). + +##### Proquints support removed + +A little known feature that was not well used or documented and was more well known for the error message `Error: not a valid proquint string` users received when trying to download invalid IPNS or DNSLink names (e.g. `https://dweb.link/ipns/badname`). We have removed support for proquints as they were out of place and largely unused, however proquints are [valid multibases](https://github.com/multiformats/multibase/pull/78) so if there is renewed interest in them there is a way forward. + +##### SECIO support removed + +SECIO was deprecated and turned off by default given the prevalence of TLS and Noise support, SECIO support is now removed entirely. + +### Changelog + +- github.com/ipfs/go-ipfs: + - chore: switch tar-utils dep to ipfs org + - chore: update CHANGELOG + - refactor: warning when bootstrap disabled by user + - feat: print error on bootstrap failure + - fix: typo in migration error + - Release v0.9.0-rc2 + - refactor: improved humanNumber and humanSI + - feat: humanized durations in stat provide + - feat: humanized numbers in stat provide + - feat: add a text output encoding for the stats provide command + - fix: webui-2.12.3 + - refactor(pinmfs): log error if pre-existing pin failed (#8056) ([ipfs/go-ipfs#8056](https://github.com/ipfs/go-ipfs/pull/8056)) + - Release v0.9.0-rc1 + - Added support for an experimental DHT client and provider system via the Experiments.AcceleratedDHTClient config option ([ipfs/go-ipfs#8061](https://github.com/ipfs/go-ipfs/pull/8061)) + - feat: support DNSLink on non-ICANN DNS names ([ipfs/go-ipfs#8071](https://github.com/ipfs/go-ipfs/pull/8071)) + - update go-tcp-transport to v0.2.2 ([ipfs/go-ipfs#8129](https://github.com/ipfs/go-ipfs/pull/8129)) + - update quic-go to v0.21.0-rc.1 ([ipfs/go-ipfs#8125](https://github.com/ipfs/go-ipfs/pull/8125)) + - chore: bump minimum go version to 1.15 ([ipfs/go-ipfs#7944](https://github.com/ipfs/go-ipfs/pull/7944)) + - chore: update deps ([ipfs/go-ipfs#8128](https://github.com/ipfs/go-ipfs/pull/8128)) + - feat: allow key export in online mode ([ipfs/go-ipfs#8113](https://github.com/ipfs/go-ipfs/pull/8113)) + - Feat/migration ipfs download (#8064) ([ipfs/go-ipfs#8064](https://github.com/ipfs/go-ipfs/pull/8064)) + - feat: support custom DoH resolvers ([ipfs/go-ipfs#8068](https://github.com/ipfs/go-ipfs/pull/8068)) + - update go-libp2p to v0.14.0 ([ipfs/go-ipfs#8122](https://github.com/ipfs/go-ipfs/pull/8122)) + - feat(gw): expose /api/v0/dag/export on gateway port ([ipfs/go-ipfs#8111](https://github.com/ipfs/go-ipfs/pull/8111)) + - chore: update webui to 2.12.2 ([ipfs/go-ipfs#8097](https://github.com/ipfs/go-ipfs/pull/8097)) + - docs: deprecate object commands ([ipfs/go-ipfs#8098](https://github.com/ipfs/go-ipfs/pull/8098)) + - fix: omit empty pins slice when reporting pin progress ([ipfs/go-ipfs#8023](https://github.com/ipfs/go-ipfs/pull/8023)) + - Fix typo in comment ([ipfs/go-ipfs#8087](https://github.com/ipfs/go-ipfs/pull/8087)) + - fix: set systemd startup timeout to infinity ([ipfs/go-ipfs#8040](https://github.com/ipfs/go-ipfs/pull/8040)) + - fix(mkreleaselog): partially handle v2 modules ([ipfs/go-ipfs#8073](https://github.com/ipfs/go-ipfs/pull/8073)) + - Update migration sharness tests for new migrations (#8053) ([ipfs/go-ipfs#8053](https://github.com/ipfs/go-ipfs/pull/8053)) + - fix: make migrations log output to stdout ([ipfs/go-ipfs#8054](https://github.com/ipfs/go-ipfs/pull/8054)) + - fix(gw): remove hardcoded hostnames ([ipfs/go-ipfs#8069](https://github.com/ipfs/go-ipfs/pull/8069)) + - Fix transposed words in docs/config.md ([ipfs/go-ipfs#8051](https://github.com/ipfs/go-ipfs/pull/8051)) + - fix: update root help ([ipfs/go-ipfs#8052](https://github.com/ipfs/go-ipfs/pull/8052)) + - chore: dont docker tag rc as latest ([ipfs/go-ipfs#8055](https://github.com/ipfs/go-ipfs/pull/8055)) + - Add info to "pin rm" help about how to tell if pin is indirect ([ipfs/go-ipfs#8044](https://github.com/ipfs/go-ipfs/pull/8044)) + - build(deps): bump contrib.go.opencensus.io/exporter/prometheus from 0.2.0 to 0.3.0 ([ipfs/go-ipfs#8020](https://github.com/ipfs/go-ipfs/pull/8020)) + - fix(gw): remove use of Clear-Site-Data in subdomain router ([ipfs/go-ipfs#7890](https://github.com/ipfs/go-ipfs/pull/7890)) + - ([ipfs/go-ipfs#7857](https://github.com/ipfs/go-ipfs/pull/7857)) + - docs: clarification of the Strategic Providing functionality ([ipfs/go-ipfs#8035](https://github.com/ipfs/go-ipfs/pull/8035)) + - docs: cosmetic fixes of help text ([ipfs/go-ipfs#8010](https://github.com/ipfs/go-ipfs/pull/8010)) + - chore: deprecate Gateway.PathPrefixes ([ipfs/go-ipfs#7994](https://github.com/ipfs/go-ipfs/pull/7994)) + - Fix text contrast for dark mode ([ipfs/go-ipfs#8027](https://github.com/ipfs/go-ipfs/pull/8027)) + - Do not fetch recursive pins from pinner unnecessarily ([ipfs/go-ipfs#7883](https://github.com/ipfs/go-ipfs/pull/7883)) + - test(sharness): verify the list of exported metrics ([ipfs/go-ipfs#7987](https://github.com/ipfs/go-ipfs/pull/7987)) + - fix: return an error if repo verify is canceled ([ipfs/go-ipfs#7973](https://github.com/ipfs/go-ipfs/pull/7973)) + - doc: document security fix policy ([ipfs/go-ipfs#7991](https://github.com/ipfs/go-ipfs/pull/7991)) + - feat(gw): /ipfs/ipfs/{cid} β†’ /ipfs/{cid} ([ipfs/go-ipfs#7930](https://github.com/ipfs/go-ipfs/pull/7930)) + - Fix: innacuracies in MFS command documentation. ([ipfs/go-ipfs#8001](https://github.com/ipfs/go-ipfs/pull/8001)) + - Feat: Re-import InitializeKeyspace code from go-namesys ([ipfs/go-ipfs#7984](https://github.com/ipfs/go-ipfs/pull/7984)) + - revert registration of metrics against unexposed prom registry ([ipfs/go-ipfs#7986](https://github.com/ipfs/go-ipfs/pull/7986)) + - Extract the namesys and the keystore submodules ([ipfs/go-ipfs#7925](https://github.com/ipfs/go-ipfs/pull/7925)) + - split core/commands/dag into individual files for different subcommands ([ipfs/go-ipfs#7970](https://github.com/ipfs/go-ipfs/pull/7970)) + - test(sharness): pass correct timeout format to go-timeout ([ipfs/go-ipfs#7971](https://github.com/ipfs/go-ipfs/pull/7971)) + - fix race condition when logging requests ([ipfs/go-ipfs#7953](https://github.com/ipfs/go-ipfs/pull/7953)) + - fix some sharness-in-CI issues ([ipfs/go-ipfs#7946](https://github.com/ipfs/go-ipfs/pull/7946)) + - chore: update deps ([ipfs/go-ipfs#7941](https://github.com/ipfs/go-ipfs/pull/7941)) + - fix: correctly return pin ls errors ([ipfs/go-ipfs#7942](https://github.com/ipfs/go-ipfs/pull/7942)) + - feat: remove secio support ([ipfs/go-ipfs#7943](https://github.com/ipfs/go-ipfs/pull/7943)) + - Set supported platforms by go-version ([ipfs/go-ipfs#7927](https://github.com/ipfs/go-ipfs/pull/7927)) + - docs: tips on debugging Policies.MFS (#7929) ([ipfs/go-ipfs#7929](https://github.com/ipfs/go-ipfs/pull/7929)) + - docs: fix DNSLink gw recipe ([ipfs/go-ipfs#7932](https://github.com/ipfs/go-ipfs/pull/7932)) + - Merge branch 'release' + - docs: RepinInterval + - style: docs/config.md + - style: improved MFS PinName example + - docs: Pinning.RemoteServices.Policies + - peering: add logs before many-second waits ([ipfs/go-ipfs#7904](https://github.com/ipfs/go-ipfs/pull/7904)) + - all: gofmt -s ([ipfs/go-ipfs#7900](https://github.com/ipfs/go-ipfs/pull/7900)) +- github.com/ipfs/go-bitswap (v0.3.3 -> v0.3.4): + - remove Makefile ([ipfs/go-bitswap#483](https://github.com/ipfs/go-bitswap/pull/483)) + - test: deflake engine test ([ipfs/go-bitswap#480](https://github.com/ipfs/go-bitswap/pull/480)) + - test: deflake large-message test ([ipfs/go-bitswap#479](https://github.com/ipfs/go-bitswap/pull/479)) + - fix: fix alignment of stats struct in virtual network ([ipfs/go-bitswap#478](https://github.com/ipfs/go-bitswap/pull/478)) + - fix(network): impl: add timeout in newStreamToPeer call ([ipfs/go-bitswap#477](https://github.com/ipfs/go-bitswap/pull/477)) + - fix staticcheck ([ipfs/go-bitswap#474](https://github.com/ipfs/go-bitswap/pull/474)) + - ignore transient connections ([ipfs/go-bitswap#470](https://github.com/ipfs/go-bitswap/pull/470)) + - fix a startup race by creating the blockstoremanager process on init ([ipfs/go-bitswap#465](https://github.com/ipfs/go-bitswap/pull/465)) +- github.com/ipfs/go-block-format (v0.0.2 -> v0.0.3): + - doc: add a lead maintainer ([ipfs/go-block-format#16](https://github.com/ipfs/go-block-format/pull/16)) +- github.com/ipfs/go-graphsync (v0.6.0 -> v0.8.0): + - docs(CHANGELOG): update for v0.8.0 + - Update for LinkSystem (#161) ([ipfs/go-graphsync#161](https://github.com/ipfs/go-graphsync/pull/161)) + - Round out diagnostic parameters (#157) ([ipfs/go-graphsync#157](https://github.com/ipfs/go-graphsync/pull/157)) + - map response codes to names (#148) ([ipfs/go-graphsync#148](https://github.com/ipfs/go-graphsync/pull/148)) + - Discard http output (#156) ([ipfs/go-graphsync#156](https://github.com/ipfs/go-graphsync/pull/156)) + - Add debug logging (#121) ([ipfs/go-graphsync#121](https://github.com/ipfs/go-graphsync/pull/121)) + - Add optional HTTP comparison (#153) ([ipfs/go-graphsync#153](https://github.com/ipfs/go-graphsync/pull/153)) + - docs(architecture): update architecture docs (#154) ([ipfs/go-graphsync#154](https://github.com/ipfs/go-graphsync/pull/154)) + - release v0.7.0 ([ipfs/go-graphsync#152](https://github.com/ipfs/go-graphsync/pull/152)) + - chore: update deps (#151) ([ipfs/go-graphsync#151](https://github.com/ipfs/go-graphsync/pull/151)) + - Automatically record heap profiles in testplans (#147) ([ipfs/go-graphsync#147](https://github.com/ipfs/go-graphsync/pull/147)) + - feat(deps): update go-ipld-prime v0.7.0 (#145) ([ipfs/go-graphsync#145](https://github.com/ipfs/go-graphsync/pull/145)) + - Release/v0.6.0 ([ipfs/go-graphsync#144](https://github.com/ipfs/go-graphsync/pull/144)) +- github.com/ipfs/go-ipfs-blockstore (v0.1.4 -> v0.1.6): + - use bloom filter in GetSize +- github.com/ipfs/go-ipfs-config (v0.12.0 -> v0.14.0): + - Added Experiments.AcceleratedDHTClient option ([ipfs/go-ipfs-config#125](https://github.com/ipfs/go-ipfs-config/pull/125)) + - Add config for downloading repo migrations ([ipfs/go-ipfs-config#128](https://github.com/ipfs/go-ipfs-config/pull/128)) + - remove duplicate entries in defaultServerFilters ([ipfs/go-ipfs-config#121](https://github.com/ipfs/go-ipfs-config/pull/121)) + - add custom DNS Resolver configuration ([ipfs/go-ipfs-config#126](https://github.com/ipfs/go-ipfs-config/pull/126)) +- github.com/ipfs/go-ipfs-provider (v0.4.3 -> v0.5.1): + - Fix batched providing of empty keys ([ipfs/go-ipfs-provider#37](https://github.com/ipfs/go-ipfs-provider/pull/37)) + - Bulk Provide/Reproviding System (#34) ([ipfs/go-ipfs-provider#34](https://github.com/ipfs/go-ipfs-provider/pull/34)) + - chore: update the Usage part of readme ([ipfs/go-ipfs-provider#33](https://github.com/ipfs/go-ipfs-provider/pull/33)) + - Retract and revert 1.0.0 ([ipfs/go-ipfs-provider#31](https://github.com/ipfs/go-ipfs-provider/pull/31)) + - replace go-merkledag with go-fetcher ([ipfs/go-ipfs-provider#30](https://github.com/ipfs/go-ipfs-provider/pull/30)) +- github.com/ipfs/go-ipld-git (v0.0.3 -> v0.0.4): + - add license file so it can be found by go-licenses ([ipfs/go-ipld-git#42](https://github.com/ipfs/go-ipld-git/pull/42)) +- github.com/ipfs/go-ipns (v0.0.2 -> v0.1.0): + - Add support for extensible records (and v2 signature) +- github.com/ipfs/go-log (v1.0.4 -> v1.0.5): + - chore: update v1 deps ([ipfs/go-log#108](https://github.com/ipfs/go-log/pull/108)) +- github.com/ipfs/go-log/v2 (v2.1.1 -> v2.1.3): + - doc(README): use circle-ci badge ([ipfs/go-log#106](https://github.com/ipfs/go-log/pull/106)) + - feat: add ability to specify labels for all loggers ([ipfs/go-log#105](https://github.com/ipfs/go-log/pull/105)) + - Add an option to pass URL to zap ([ipfs/go-log#101](https://github.com/ipfs/go-log/pull/101)) + - enable configuring several log outputs ([ipfs/go-log#98](https://github.com/ipfs/go-log/pull/98)) + - Fix caller not being added ([ipfs/go-log#96](https://github.com/ipfs/go-log/pull/96)) +- github.com/ipfs/go-unixfs (v0.2.4 -> v0.2.5): + - correct file size for raw node ([ipfs/go-unixfs#88](https://github.com/ipfs/go-unixfs/pull/88)) +- github.com/ipld/go-car (v0.1.1-0.20201015032735-ff6ccdc46acc -> v0.3.1): + - chore: make sure we get an error where we expect one + - chore: refactor header tests to iterate over a struct + - chore: add header error tests + - fix: lint errors + - fix: go mod tidy + - chore: update go.mod to 1.15 + - fix: ReadHeader return value mismatch + - Updates for ipld linksystem branch ([ipld/go-car#56](https://github.com/ipld/go-car/pull/56)) + - replace go-ipld-prime-proto with go-codec-dagpb + - fix staticcheck errors ([ipld/go-car#67](https://github.com/ipld/go-car/pull/67)) + - chore: switch to a single license file ([ipld/go-car#59](https://github.com/ipld/go-car/pull/59)) + - chore: remove LICENSE ([ipld/go-car#58](https://github.com/ipld/go-car/pull/58)) + - chore: relicense ([ipld/go-car#57](https://github.com/ipld/go-car/pull/57)) + - ci: remove travis support ([ipld/go-car#55](https://github.com/ipld/go-car/pull/55)) + - run gofmt -s + - Allow user defined block hooks when using two step write for selective cars ([ipld/go-car#37](https://github.com/ipld/go-car/pull/37)) + - feat: handle mid-varint EOF case as UnexpectedEOF + - fix: main NewReader call +- github.com/ipld/go-ipld-prime (v0.5.1-0.20201021195245-109253e8a018 -> v0.9.1-0.20210324083106-dc342a9917db): + - Add option to tell link system storage is trusted and we can skip hash on read ([ipld/go-ipld-prime#149](https://github.com/ipld/go-ipld-prime/pull/149)) + - implement non-dag cbor codec ([ipld/go-ipld-prime#153](https://github.com/ipld/go-ipld-prime/pull/153)) + - add non-dag json codec ([ipld/go-ipld-prime#152](https://github.com/ipld/go-ipld-prime/pull/152)) + - typo fixes + - mark v0.9.0 + - Changelog: more backfill :) + - hackme: about merge strategies. + - Dropping .gopath and other unmaintained scripts. + - introduce LinkSystem ([ipld/go-ipld-prime#143](https://github.com/ipld/go-ipld-prime/pull/143)) + - Readme updates. + - codec/raw: implement the raw codec + - add an ADL interface type + - schema/gen/go: cache genned code in os.TempDir + - fluent/qp: finish writing all data model helpers + - fluent: add qp, a different spin on quip + - schema/gen/go: prevent some unkeyed literal vet errors + - schema/gen/go: remove two common subtest levels + - use %q in error strings + - schema/gen/go: please vet a bit more + - Introduce 'quip' data building helpers. ([ipld/go-ipld-prime#134](https://github.com/ipld/go-ipld-prime/pull/134)) + - gengo: support for unions with stringprefix representation. ([ipld/go-ipld-prime#133](https://github.com/ipld/go-ipld-prime/pull/133)) + - target of opporunity DRY improvement: use more shared templates for structs with stringjoin representations. + - fix small consistency typo in gen function names. + - drop old generation mechanisms that were already deprecated. + - error type cleanup, and helpers. + - v0.7.0 and changelog update + - Revert "rename AssignNode to ConvertFrom" + - Implement traversal.FocusedTransform. ([ipld/go-ipld-prime#130](https://github.com/ipld/go-ipld-prime/pull/130)) + - Update a few more lingering ReprKind references. + - all: rename schema.Kind to TypeKind, ipld.ReprKind to Kind ([ipld/go-ipld-prime#127](https://github.com/ipld/go-ipld-prime/pull/127)) + - all: rename AssignNode to ConvertFrom + - all: rewrite interfaces and APIs to support int64 + - mark v0.6.0 + - clean up node/gendemo regeneration ([ipld/go-ipld-prime#123](https://github.com/ipld/go-ipld-prime/pull/123)) + - cleanup: drop orphaned gitignore file. + - Schema types rebased to use codegen types for the data ([ipld/go-ipld-prime#107](https://github.com/ipld/go-ipld-prime/pull/107)) + - codegen: assembler for struct with map representation validates all non-optional fields are present ([ipld/go-ipld-prime#121](https://github.com/ipld/go-ipld-prime/pull/121)) + - changelog: backfill. + - fluent: finish out matrix of helper methods, and fix error handling of the non-Must methods. + - all: fix a lot of "unkeyed literal" vet warnings + - node/mixins: use simpler filenames + - node/gendemo: use the new code generator + - Merge pull request #96 , originally known as ipld/cidlink-only-usable-as-ptr + - Codec revamp ([ipld/go-ipld-prime#112](https://github.com/ipld/go-ipld-prime/pull/112)) + - Allow overriden types (#116) ([ipld/go-ipld-prime#116](https://github.com/ipld/go-ipld-prime/pull/116)) + - add import to ipld in ipldsch_types.go ([ipld/go-ipld-prime#115](https://github.com/ipld/go-ipld-prime/pull/115)) + - Codegen output rearrange ([ipld/go-ipld-prime#105](https://github.com/ipld/go-ipld-prime/pull/105)) + - Validate struct builder sufficiency ([ipld/go-ipld-prime#111](https://github.com/ipld/go-ipld-prime/pull/111)) + - Fresh take on codec APIs, and some tokenization utilities. ([ipld/go-ipld-prime#101](https://github.com/ipld/go-ipld-prime/pull/101)) + - Add a demo ADL (rot13adl) ([ipld/go-ipld-prime#98](https://github.com/ipld/go-ipld-prime/pull/98)) + - Introduce traversal function that selects links out of a tree. ([ipld/go-ipld-prime#110](https://github.com/ipld/go-ipld-prime/pull/110)) + - Codegen various improvements ([ipld/go-ipld-prime#106](https://github.com/ipld/go-ipld-prime/pull/106)) +- github.com/libp2p/go-conn-security-multistream (v0.2.0 -> v0.2.1): + - Implement support for simultaneous open (#14) ([libp2p/go-conn-security-multistream#14](https://github.com/libp2p/go-conn-security-multistream/pull/14)) +- github.com/libp2p/go-libp2p (v0.13.0 -> v0.14.2): + - Fix race in adding connections to connsByPeer ([libp2p/go-libp2p#1116](https://github.com/libp2p/go-libp2p/pull/1116)) + - speed up the mock tests ([libp2p/go-libp2p#1103](https://github.com/libp2p/go-libp2p/pull/1103)) + - remove slow ObservedAddrManager test that doesn't test anything ([libp2p/go-libp2p#1104](https://github.com/libp2p/go-libp2p/pull/1104)) + - remove Codecov config ([libp2p/go-libp2p#1100](https://github.com/libp2p/go-libp2p/pull/1100)) + - doc: document standard connection manager ([libp2p/go-libp2p#1099](https://github.com/libp2p/go-libp2p/pull/1099)) + - run go mod tidy in the examples ([libp2p/go-libp2p#1098](https://github.com/libp2p/go-libp2p/pull/1098)) + - Cleanup some remaining examples nits ([libp2p/go-libp2p#1097](https://github.com/libp2p/go-libp2p/pull/1097)) + - chore: bring examples back into repository and add tests ([libp2p/go-libp2p#1092](https://github.com/libp2p/go-libp2p/pull/1092)) + - fix(mkreleasenotes): handle first commit ([libp2p/go-libp2p#1095](https://github.com/libp2p/go-libp2p/pull/1095)) + - doc: add a basic release process ([libp2p/go-libp2p#1080](https://github.com/libp2p/go-libp2p/pull/1080)) + - chore: update yamux ([libp2p/go-libp2p#1089](https://github.com/libp2p/go-libp2p/pull/1089)) + - fix: re-expose AutoNAT service on BasicHost ([libp2p/go-libp2p#1088](https://github.com/libp2p/go-libp2p/pull/1088)) + - remove NEWS.md ([libp2p/go-libp2p#1086](https://github.com/libp2p/go-libp2p/pull/1086)) + - test: deflake TestProtoDowngrade ([libp2p/go-libp2p#1084](https://github.com/libp2p/go-libp2p/pull/1084)) + - sync: update CI config files (and fix tests) ([libp2p/go-libp2p#1083](https://github.com/libp2p/go-libp2p/pull/1083)) + - static check fixes ([libp2p/go-libp2p#1076](https://github.com/libp2p/go-libp2p/pull/1076)) + - fix go vet ([libp2p/go-libp2p#1075](https://github.com/libp2p/go-libp2p/pull/1075)) + - option for custom dns resolver ([libp2p/go-libp2p#1073](https://github.com/libp2p/go-libp2p/pull/1073)) + - chore: update deps ([libp2p/go-libp2p#1066](https://github.com/libp2p/go-libp2p/pull/1066)) + - fix autonat race ([libp2p/go-libp2p#1062](https://github.com/libp2p/go-libp2p/pull/1062)) + - use transient connections in identify streams ([libp2p/go-libp2p#1061](https://github.com/libp2p/go-libp2p/pull/1061)) + - Emit event for User's NAT Type i.e. Hard NAT or Easy NAT (#1042) ([libp2p/go-libp2p#1042](https://github.com/libp2p/go-libp2p/pull/1042)) + - Finish and Test the simultaneous connect problem in libp2p peers (#1041) ([libp2p/go-libp2p#1041](https://github.com/libp2p/go-libp2p/pull/1041)) + - Close peerstore and document Host Close (#1037) ([libp2p/go-libp2p#1037](https://github.com/libp2p/go-libp2p/pull/1037)) + - Timeout all Identify stream reads (#1032) ([libp2p/go-libp2p#1032](https://github.com/libp2p/go-libp2p/pull/1032)) +- github.com/libp2p/go-libp2p-autonat (v0.4.0 -> v0.4.2): + - Fix: Stream read timeout ([libp2p/go-libp2p-autonat#99](https://github.com/libp2p/go-libp2p-autonat/pull/99)) + - fix: simplify address replacement ([libp2p/go-libp2p-autonat#102](https://github.com/libp2p/go-libp2p-autonat/pull/102)) + - replace the port number for double NAT mapping ([libp2p/go-libp2p-autonat#101](https://github.com/libp2p/go-libp2p-autonat/pull/101)) +- github.com/libp2p/go-libp2p-core (v0.8.0 -> v0.8.5): + - mind the dot. + - context option for simultaneous connect + - Event for user's NAT Device Type: Tell user if the node is behind an Easy or Hard NAT (#173) ([libp2p/go-libp2p-core#173](https://github.com/libp2p/go-libp2p-core/pull/173)) + - address aarshian nitpicks + - make UseTransient context option take a reason argument, for consistency with other options + - abstract Conn Stat interface for threading + - Update network/context.go + - add ErrTransientConn error + - add support for transient connections + - more docs for stream fncs (#183) ([libp2p/go-libp2p-core#183](https://github.com/libp2p/go-libp2p-core/pull/183)) + - refactor: use a helper type to decode AddrInfo from JSON (#178) ([libp2p/go-libp2p-core#178](https://github.com/libp2p/go-libp2p-core/pull/178)) + - fix stream docs (#182) ([libp2p/go-libp2p-core#182](https://github.com/libp2p/go-libp2p-core/pull/182)) + - context to force direct dial (#181) ([libp2p/go-libp2p-core#181](https://github.com/libp2p/go-libp2p-core/pull/181)) + - Secure Muxer Interface (#180) ([libp2p/go-libp2p-core#180](https://github.com/libp2p/go-libp2p-core/pull/180)) +- github.com/libp2p/go-libp2p-discovery (v0.5.0 -> v0.5.1): + - Fix hang in BackoffDiscovery.FindPeers when requesting limit lower than number of peers available ([libp2p/go-libp2p-discovery#69](https://github.com/libp2p/go-libp2p-discovery/pull/69)) + - fix staticcheck ([libp2p/go-libp2p-discovery#70](https://github.com/libp2p/go-libp2p-discovery/pull/70)) +- github.com/libp2p/go-libp2p-kad-dht (v0.11.1 -> v0.12.2): + - fullrt rework batching (#720) ([libp2p/go-libp2p-kad-dht#720](https://github.com/libp2p/go-libp2p-kad-dht/pull/720)) + - sync: update CI config files ([libp2p/go-libp2p-kad-dht#712](https://github.com/libp2p/go-libp2p-kad-dht/pull/712)) + - fix staticcheck ([libp2p/go-libp2p-kad-dht#721](https://github.com/libp2p/go-libp2p-kad-dht/pull/721)) + - fix: fullrt dht bug fixes ([libp2p/go-libp2p-kad-dht#719](https://github.com/libp2p/go-libp2p-kad-dht/pull/719)) + - Crawler based DHT client (#709) ([libp2p/go-libp2p-kad-dht#709](https://github.com/libp2p/go-libp2p-kad-dht/pull/709)) + - test: fix unique addr check ([libp2p/go-libp2p-kad-dht#714](https://github.com/libp2p/go-libp2p-kad-dht/pull/714)) + - chore: update deps ([libp2p/go-libp2p-kad-dht#713](https://github.com/libp2p/go-libp2p-kad-dht/pull/713)) + - Add basic crawler (#663) ([libp2p/go-libp2p-kad-dht#663](https://github.com/libp2p/go-libp2p-kad-dht/pull/663)) + - various staticcheck fixes ([libp2p/go-libp2p-kad-dht#710](https://github.com/libp2p/go-libp2p-kad-dht/pull/710)) + - findpeer should work even on peers that are not part of DHT queries ([libp2p/go-libp2p-kad-dht#711](https://github.com/libp2p/go-libp2p-kad-dht/pull/711)) + - Extract DHT message sender from the DHT ([libp2p/go-libp2p-kad-dht#659](https://github.com/libp2p/go-libp2p-kad-dht/pull/659)) +- github.com/libp2p/go-libp2p-noise (v0.1.2 -> v0.2.0): + - Update github.com/flynn/noise to address nonce handling security issues ([libp2p/go-libp2p-noise#95](https://github.com/libp2p/go-libp2p-noise/pull/95)) + - fix staticcheck ([libp2p/go-libp2p-noise#96](https://github.com/libp2p/go-libp2p-noise/pull/96)) + - chore: update deps ([libp2p/go-libp2p-noise#94](https://github.com/libp2p/go-libp2p-noise/pull/94)) + - chore: relicense MIT/Apache-2.0 ([libp2p/go-libp2p-noise#93](https://github.com/libp2p/go-libp2p-noise/pull/93)) +- github.com/libp2p/go-libp2p-peerstore (v0.2.6 -> v0.2.7): + - fix: delete addrs when "updating" them to zero ([libp2p/go-libp2p-peerstore#157](https://github.com/libp2p/go-libp2p-peerstore/pull/157)) +- github.com/libp2p/go-libp2p-quic-transport (v0.10.0 -> v0.11.1): + - update quic-go, enable QUIC v1 (RFC 9000) ([libp2p/go-libp2p-quic-transport#207](https://github.com/libp2p/go-libp2p-quic-transport/pull/207)) + - update quic-go to v0.21.0-rc2 ([libp2p/go-libp2p-quic-transport#206](https://github.com/libp2p/go-libp2p-quic-transport/pull/206)) + - increase test timeout to reduce flakiness of test on Windows ([libp2p/go-libp2p-quic-transport#204](https://github.com/libp2p/go-libp2p-quic-transport/pull/204)) + - correctly export version negotiation failures to Prometheus ([libp2p/go-libp2p-quic-transport#205](https://github.com/libp2p/go-libp2p-quic-transport/pull/205)) + - update quic-go to v0.20.1 ([libp2p/go-libp2p-quic-transport#201](https://github.com/libp2p/go-libp2p-quic-transport/pull/201)) + - expose some Prometheus metrics ([libp2p/go-libp2p-quic-transport#200](https://github.com/libp2p/go-libp2p-quic-transport/pull/200)) + - update quic-go to v0.20.0 ([libp2p/go-libp2p-quic-transport#198](https://github.com/libp2p/go-libp2p-quic-transport/pull/198)) + - reduce the zstd window size from 8 MB to 32 KB ([libp2p/go-libp2p-quic-transport#195](https://github.com/libp2p/go-libp2p-quic-transport/pull/195)) + - compress qlogs when the QUIC connection is closed ([libp2p/go-libp2p-quic-transport#193](https://github.com/libp2p/go-libp2p-quic-transport/pull/193)) + - switch from gzip to zstd for qlog compression ([libp2p/go-libp2p-quic-transport#190](https://github.com/libp2p/go-libp2p-quic-transport/pull/190)) +- github.com/libp2p/go-libp2p-swarm (v0.4.0 -> v0.5.0): + - run connection gating tests on both TCP and QUIC ([libp2p/go-libp2p-swarm#258](https://github.com/libp2p/go-libp2p-swarm/pull/258)) + - fix: avoid returning typed nils ([libp2p/go-libp2p-swarm#257](https://github.com/libp2p/go-libp2p-swarm/pull/257)) + - fix staticcheck ([libp2p/go-libp2p-swarm#255](https://github.com/libp2p/go-libp2p-swarm/pull/255)) + - fix go vet ([libp2p/go-libp2p-swarm#253](https://github.com/libp2p/go-libp2p-swarm/pull/253)) + - New Dialer ([libp2p/go-libp2p-swarm#243](https://github.com/libp2p/go-libp2p-swarm/pull/243)) + - fix: use 64bit stream/conn IDs ([libp2p/go-libp2p-swarm#247](https://github.com/libp2p/go-libp2p-swarm/pull/247)) + - feat: close transports that implement io.Closer ([libp2p/go-libp2p-swarm#227](https://github.com/libp2p/go-libp2p-swarm/pull/227)) + - fix swarm transient conn (#241) ([libp2p/go-libp2p-swarm#241](https://github.com/libp2p/go-libp2p-swarm/pull/241)) + - Support for Hole punching (#233) ([libp2p/go-libp2p-swarm#233](https://github.com/libp2p/go-libp2p-swarm/pull/233)) + - Treat transient connections as opt-in when opening new streams ([libp2p/go-libp2p-swarm#236](https://github.com/libp2p/go-libp2p-swarm/pull/236)) + - avoid assigning a function to a variable ([libp2p/go-libp2p-swarm#239](https://github.com/libp2p/go-libp2p-swarm/pull/239)) + - only listen on localhost in tests ([libp2p/go-libp2p-swarm#238](https://github.com/libp2p/go-libp2p-swarm/pull/238)) + - prevent dialing addresses that we're listening on ([libp2p/go-libp2p-swarm#237](https://github.com/libp2p/go-libp2p-swarm/pull/237)) + - Enable QUIC in Test Swarm (#235) ([libp2p/go-libp2p-swarm#235](https://github.com/libp2p/go-libp2p-swarm/pull/235)) +- github.com/libp2p/go-libp2p-transport-upgrader (v0.4.0 -> v0.4.2): + - Expose underlying transport connection stat where available ([libp2p/go-libp2p-transport-upgrader#71](https://github.com/libp2p/go-libp2p-transport-upgrader/pull/71)) + - Implement support for simultaneous open (#25) ([libp2p/go-libp2p-transport-upgrader#25](https://github.com/libp2p/go-libp2p-transport-upgrader/pull/25)) +- github.com/libp2p/go-libp2p-yamux (v0.5.1 -> v0.5.4): + - remove Makefile ([libp2p/go-libp2p-yamux#35](https://github.com/libp2p/go-libp2p-yamux/pull/35)) +- github.com/libp2p/go-netroute (v0.1.3 -> v0.1.6): + - add js stub impl +- github.com/libp2p/go-sockaddr (v0.0.2 -> v0.1.1): + - fix: allocate "any" socket type then cast ([libp2p/go-sockaddr#20](https://github.com/libp2p/go-sockaddr/pull/20)) + - fix: remove CGO functions ([libp2p/go-sockaddr#18](https://github.com/libp2p/go-sockaddr/pull/18)) +- github.com/libp2p/go-tcp-transport (v0.2.1 -> v0.2.2): + - use log.Warn instead of log.Warning ([libp2p/go-tcp-transport#77](https://github.com/libp2p/go-tcp-transport/pull/77)) + - add bandwidth-related metrics (for Linux and OSX) ([libp2p/go-tcp-transport#76](https://github.com/libp2p/go-tcp-transport/pull/76)) + - expose some Prometheus metrics ([libp2p/go-tcp-transport#75](https://github.com/libp2p/go-tcp-transport/pull/75)) + - enable TCP keepalives ([libp2p/go-tcp-transport#73](https://github.com/libp2p/go-tcp-transport/pull/73)) + - stop using the deprecated go-multiaddr-net package ([libp2p/go-tcp-transport#72](https://github.com/libp2p/go-tcp-transport/pull/72)) +- github.com/libp2p/go-yamux/v2 (v2.0.0 -> v2.2.0): + - make the initial stream receive window configurable ([libp2p/go-yamux#59](https://github.com/libp2p/go-yamux/pull/59)) + - set initial window size to spec value (256 kB), remove config option ([libp2p/go-yamux#57](https://github.com/libp2p/go-yamux/pull/57)) + - fix: don't change the receive window if we're forcing an update ([libp2p/go-yamux#56](https://github.com/libp2p/go-yamux/pull/56)) + - sync: update CI config files ([libp2p/go-yamux#55](https://github.com/libp2p/go-yamux/pull/55)) + - increase the receive window size if we're sending updates to frequently ([libp2p/go-yamux#54](https://github.com/libp2p/go-yamux/pull/54)) + - remove unused Stream.Shrink() method ([libp2p/go-yamux#52](https://github.com/libp2p/go-yamux/pull/52)) + - remove misleading comment about the MaxMessageSize ([libp2p/go-yamux#50](https://github.com/libp2p/go-yamux/pull/50)) + - clean up the receive window check ([libp2p/go-yamux#49](https://github.com/libp2p/go-yamux/pull/49)) + - don't reslice byte slices taking from the buffer ([libp2p/go-yamux#48](https://github.com/libp2p/go-yamux/pull/48)) + - don't reimplement io.ReadFull ([libp2p/go-yamux#38](https://github.com/libp2p/go-yamux/pull/38)) + - remove the recvLock in the stream ([libp2p/go-yamux#42](https://github.com/libp2p/go-yamux/pull/42)) + - remove the sendLock in the stream ([libp2p/go-yamux#41](https://github.com/libp2p/go-yamux/pull/41)) + - remove misleading statement about NAT traversal ([libp2p/go-yamux#45](https://github.com/libp2p/go-yamux/pull/45)) + - remove .gx directory, add last gx version to README ([libp2p/go-yamux#43](https://github.com/libp2p/go-yamux/pull/43)) + - reduce usage of goto ([libp2p/go-yamux#40](https://github.com/libp2p/go-yamux/pull/40)) + - remove unused error return value in Stream.processFlags ([libp2p/go-yamux#39](https://github.com/libp2p/go-yamux/pull/39)) +- github.com/lucas-clemente/quic-go (v0.19.3 -> v0.21.1): + - add support for Go 1.17 Beta 1 ([lucas-clemente/quic-go#3203](https://github.com/lucas-clemente/quic-go/pull/3203)) + - add a CI test that go mod vendor works ([lucas-clemente/quic-go#3202](https://github.com/lucas-clemente/quic-go/pull/3202)) + - prevent go mod vendor from stumbling over the Go 1.18 file ([lucas-clemente/quic-go#3195](https://github.com/lucas-clemente/quic-go/pull/3195)) + - remove CipherSuiteName and HkdfExtract for Go 1.17 ([lucas-clemente/quic-go#3192](https://github.com/lucas-clemente/quic-go/pull/3192)) + - fix relocation target for cipherSuiteTLS13ByID in Go 1.17 + - use HkdfExtract from x/crypto ([lucas-clemente/quic-go#3173](https://github.com/lucas-clemente/quic-go/pull/3173)) + - add support for QUIC v1, RFC 9000 ([lucas-clemente/quic-go#3190](https://github.com/lucas-clemente/quic-go/pull/3190)) + - use tls.CipherSuiteName, instead of wrapping it in the qtls package ([lucas-clemente/quic-go#3174](https://github.com/lucas-clemente/quic-go/pull/3174)) + - use a pre-generated test vectors to test hkdfExpandLabel ([lucas-clemente/quic-go#3175](https://github.com/lucas-clemente/quic-go/pull/3175)) + - reduce flakiness of packet number generation test ([lucas-clemente/quic-go#3181](https://github.com/lucas-clemente/quic-go/pull/3181)) + - simplify the qtls tests ([lucas-clemente/quic-go#3185](https://github.com/lucas-clemente/quic-go/pull/3185)) + - add support for Go 1.17 (tip) ([lucas-clemente/quic-go#3182](https://github.com/lucas-clemente/quic-go/pull/3182)) + - prevent quic-go from building on Go 1.17 ([lucas-clemente/quic-go#3180](https://github.com/lucas-clemente/quic-go/pull/3180)) + - fix DONT_FRAGMENT error when using a IPv6 connection on Windows ([lucas-clemente/quic-go#3178](https://github.com/lucas-clemente/quic-go/pull/3178)) + - use net.ErrClosed (for Go 1.16) ([lucas-clemente/quic-go#3163](https://github.com/lucas-clemente/quic-go/pull/3163)) + - use the new error types to log the reason why a connection is closed ([lucas-clemente/quic-go#3166](https://github.com/lucas-clemente/quic-go/pull/3166)) + - fix race condition in deadline integration test ([lucas-clemente/quic-go#3165](https://github.com/lucas-clemente/quic-go/pull/3165)) + - add support for QUIC v1 ([lucas-clemente/quic-go#3160](https://github.com/lucas-clemente/quic-go/pull/3160)) + - rework error return values ([lucas-clemente/quic-go#3159](https://github.com/lucas-clemente/quic-go/pull/3159)) + - declare Path MTU probe packets lost with the early retransmit timer ([lucas-clemente/quic-go#3152](https://github.com/lucas-clemente/quic-go/pull/3152)) + - declare the handshake confirmed when receiving an ACK for a 1-RTT packet ([lucas-clemente/quic-go#3148](https://github.com/lucas-clemente/quic-go/pull/3148)) + - trace and qlog version selection / negotiation ([lucas-clemente/quic-go#3153](https://github.com/lucas-clemente/quic-go/pull/3153)) + - set the don't fragment (DF) bit on Windows (#3155) ([lucas-clemente/quic-go#3155](https://github.com/lucas-clemente/quic-go/pull/3155)) + - fix doc comment for Tracer.TracerForConnection ([lucas-clemente/quic-go#3154](https://github.com/lucas-clemente/quic-go/pull/3154)) + - make it possible to associate a ConnectionTracer with a Session ([lucas-clemente/quic-go#3146](https://github.com/lucas-clemente/quic-go/pull/3146)) + - remove the .editorconfig ([lucas-clemente/quic-go#3147](https://github.com/lucas-clemente/quic-go/pull/3147)) + - don't use a lower RTT than 5ms after receiving a Retry packet ([lucas-clemente/quic-go#3129](https://github.com/lucas-clemente/quic-go/pull/3129)) + - don't pass the QUIC version to the StartedConnection event ([lucas-clemente/quic-go#3109](https://github.com/lucas-clemente/quic-go/pull/3109)) + - update the packet numbers in decoding test to the ones from the draft ([lucas-clemente/quic-go#3137](https://github.com/lucas-clemente/quic-go/pull/3137)) + - various amplification limit fixes ([lucas-clemente/quic-go#3132](https://github.com/lucas-clemente/quic-go/pull/3132)) + - fix calculation of the handshake idle timeout ([lucas-clemente/quic-go#3120](https://github.com/lucas-clemente/quic-go/pull/3120)) + - only start PMTUD after handshake confirmation ([lucas-clemente/quic-go#3138](https://github.com/lucas-clemente/quic-go/pull/3138)) + - don't regard PMTU probe packets as outstanding ([lucas-clemente/quic-go#3126](https://github.com/lucas-clemente/quic-go/pull/3126)) + - expose the draft-34 version ([lucas-clemente/quic-go#3100](https://github.com/lucas-clemente/quic-go/pull/3100)) + - clean up the testutils ([lucas-clemente/quic-go#3104](https://github.com/lucas-clemente/quic-go/pull/3104)) + - initialize the congestion controller with the actual max datagram size ([lucas-clemente/quic-go#3107](https://github.com/lucas-clemente/quic-go/pull/3107)) + - make it possible to trace acknowledged packets ([lucas-clemente/quic-go#3134](https://github.com/lucas-clemente/quic-go/pull/3134)) + - avoid type confusion between protocol.PacketType and logging.PacketType ([lucas-clemente/quic-go#3108](https://github.com/lucas-clemente/quic-go/pull/3108)) + - fix duplicate logging of errors when the first error was a timeout error ([lucas-clemente/quic-go#3112](https://github.com/lucas-clemente/quic-go/pull/3112)) + - use a tracer to make the packetization test more useful ([lucas-clemente/quic-go#3136](https://github.com/lucas-clemente/quic-go/pull/3136)) + - improve string representation of timeout errors ([lucas-clemente/quic-go#3118](https://github.com/lucas-clemente/quic-go/pull/3118)) + - fix flaky timeout test ([lucas-clemente/quic-go#3105](https://github.com/lucas-clemente/quic-go/pull/3105)) + - fix calculation of the time for the next keep alive + - add a 0-RTT test with different connecton ID lengths ([lucas-clemente/quic-go#3098](https://github.com/lucas-clemente/quic-go/pull/3098)) + - only run Ginkgo focus detection in staged files in pre-commit hook ([lucas-clemente/quic-go#3099](https://github.com/lucas-clemente/quic-go/pull/3099)) + - allow 0-RTT when flow control windows are increased ([lucas-clemente/quic-go#3096](https://github.com/lucas-clemente/quic-go/pull/3096)) + - improve the 0-RTT rejection integration test ([lucas-clemente/quic-go#3097](https://github.com/lucas-clemente/quic-go/pull/3097)) + - rename config values for flow control limits ([lucas-clemente/quic-go#3089](https://github.com/lucas-clemente/quic-go/pull/3089)) + - allow 0-RTT resumption if the server's stream limit was increased ([lucas-clemente/quic-go#3086](https://github.com/lucas-clemente/quic-go/pull/3086)) + - cache the serialized OOB in the conn, not in the packet info ([lucas-clemente/quic-go#3093](https://github.com/lucas-clemente/quic-go/pull/3093)) + - use code points from x/sys/unix for PKTINFO syscalls ([lucas-clemente/quic-go#3094](https://github.com/lucas-clemente/quic-go/pull/3094)) + - make it possible to detect version negotiation failures in logging, fix qlogging of those ([lucas-clemente/quic-go#3092](https://github.com/lucas-clemente/quic-go/pull/3092)) + - make the initial stream / connection flow control windows configurable ([lucas-clemente/quic-go#3083](https://github.com/lucas-clemente/quic-go/pull/3083)) + - only apply server's transport parameters after handshake completion ([lucas-clemente/quic-go#3085](https://github.com/lucas-clemente/quic-go/pull/3085)) + - fix documentation for baseFlowController.UpdateSendWindow ([lucas-clemente/quic-go#3087](https://github.com/lucas-clemente/quic-go/pull/3087)) + - set the Content-Length for HTTP/3 responses ([lucas-clemente/quic-go#3091](https://github.com/lucas-clemente/quic-go/pull/3091)) + - update the flow control windows of streams opened in 0-RTT ([lucas-clemente/quic-go#3088](https://github.com/lucas-clemente/quic-go/pull/3088)) + - Use the correct source IP when binding multiple IPs ([lucas-clemente/quic-go#3067](https://github.com/lucas-clemente/quic-go/pull/3067)) + - fix race condition when receiving 0-RTT packets ([lucas-clemente/quic-go#3074](https://github.com/lucas-clemente/quic-go/pull/3074)) + - require the application to handle 0-RTT rejection ([lucas-clemente/quic-go#3066](https://github.com/lucas-clemente/quic-go/pull/3066)) + - add an internal queue to signal that a datagram frame has been dequeued ([lucas-clemente/quic-go#3081](https://github.com/lucas-clemente/quic-go/pull/3081)) + - increase the maximum size of DATAGRAM frames ([lucas-clemente/quic-go#2966](https://github.com/lucas-clemente/quic-go/pull/2966)) + - remove non-functioning 0-RTT test with different conn ID lengths ([lucas-clemente/quic-go#3079](https://github.com/lucas-clemente/quic-go/pull/3079)) + - remove stray struct equality check ([lucas-clemente/quic-go#3078](https://github.com/lucas-clemente/quic-go/pull/3078)) + - fix issuing of connection IDs when dialing a 0-RTT connections ([lucas-clemente/quic-go#3058](https://github.com/lucas-clemente/quic-go/pull/3058)) + - only accept 0-RTT it the active_connection_id_limit didn't change ([lucas-clemente/quic-go#3060](https://github.com/lucas-clemente/quic-go/pull/3060)) + - remove unused error return value from HandleMaxStreamsFrame ([lucas-clemente/quic-go#3072](https://github.com/lucas-clemente/quic-go/pull/3072)) + - fix flaky accept queue integration test ([lucas-clemente/quic-go#3068](https://github.com/lucas-clemente/quic-go/pull/3068)) + - don't reset the QPACK encoder / decoder streams ([lucas-clemente/quic-go#3063](https://github.com/lucas-clemente/quic-go/pull/3063)) + - remove incorrect logging for client side retry packet ([lucas-clemente/quic-go#3071](https://github.com/lucas-clemente/quic-go/pull/3071)) + - allow sending 1xx responses (#3047) ([lucas-clemente/quic-go#3047](https://github.com/lucas-clemente/quic-go/pull/3047)) + - fix retry key and nonce for draft-34 ([lucas-clemente/quic-go#3062](https://github.com/lucas-clemente/quic-go/pull/3062)) + - implement DPLPMTUD ([lucas-clemente/quic-go#3028](https://github.com/lucas-clemente/quic-go/pull/3028)) + - only read multiple packets at a time after handshake completion ([lucas-clemente/quic-go#3041](https://github.com/lucas-clemente/quic-go/pull/3041)) + - make the certificate verificiation integration tests more explicit ([lucas-clemente/quic-go#3040](https://github.com/lucas-clemente/quic-go/pull/3040)) + - update gomock to v1.5.0, use mockgen source mode ([lucas-clemente/quic-go#3049](https://github.com/lucas-clemente/quic-go/pull/3049)) + - trace dropping of 0-RTT keys ([lucas-clemente/quic-go#3054](https://github.com/lucas-clemente/quic-go/pull/3054)) + - improve timeout measurement in the timeout test ([lucas-clemente/quic-go#3042](https://github.com/lucas-clemente/quic-go/pull/3042)) + - add a randomized test for the received_packet_history ([lucas-clemente/quic-go#3052](https://github.com/lucas-clemente/quic-go/pull/3052)) + - fix documentation of default values for MaxReceive{Stream, Connection}FlowControlWindow ([lucas-clemente/quic-go#3055](https://github.com/lucas-clemente/quic-go/pull/3055)) + - refactor merge packet number ranges ([lucas-clemente/quic-go#3051](https://github.com/lucas-clemente/quic-go/pull/3051)) + - add draft-34 to support versions in README + - update README to reflect dropped Go 1.14 support + - remove redundant nil-check in the packet packer ([lucas-clemente/quic-go#3048](https://github.com/lucas-clemente/quic-go/pull/3048)) + - avoid using rand.Source ([lucas-clemente/quic-go#3046](https://github.com/lucas-clemente/quic-go/pull/3046)) + - update Go to 1.16, drop support for 1.14 ([lucas-clemente/quic-go#3045](https://github.com/lucas-clemente/quic-go/pull/3045)) + - fix error message when the UDP receive buffer size can't be increased ([lucas-clemente/quic-go#3039](https://github.com/lucas-clemente/quic-go/pull/3039)) + - add the time_format field to qlog common_fields ([lucas-clemente/quic-go#3038](https://github.com/lucas-clemente/quic-go/pull/3038)) + - log connection IDs without the 0x prefix ([lucas-clemente/quic-go#3036](https://github.com/lucas-clemente/quic-go/pull/3036)) + - add support for QUIC draft-34 ([lucas-clemente/quic-go#3031](https://github.com/lucas-clemente/quic-go/pull/3031)) + - fix qtls imports in mockgen generated mocks ([lucas-clemente/quic-go#3037](https://github.com/lucas-clemente/quic-go/pull/3037)) + - improve error message when the read buffer size can't be set ([lucas-clemente/quic-go#3030](https://github.com/lucas-clemente/quic-go/pull/3030)) + - qlog the quic-go version ([lucas-clemente/quic-go#3033](https://github.com/lucas-clemente/quic-go/pull/3033)) + - remove the metrics package ([lucas-clemente/quic-go#3032](https://github.com/lucas-clemente/quic-go/pull/3032)) + - expose the constructor for the qlog connection tracer ([lucas-clemente/quic-go#3034](https://github.com/lucas-clemente/quic-go/pull/3034)) + - expose the constructor for the multipexed connection tracer ([lucas-clemente/quic-go#3035](https://github.com/lucas-clemente/quic-go/pull/3035)) + - make sure the server is stopped before closing all server sessions ([lucas-clemente/quic-go#3020](https://github.com/lucas-clemente/quic-go/pull/3020)) + - increase the size of the send queue ([lucas-clemente/quic-go#3016](https://github.com/lucas-clemente/quic-go/pull/3016)) + - prioritize receiving packets over sending out more packets ([lucas-clemente/quic-go#3015](https://github.com/lucas-clemente/quic-go/pull/3015)) + - reenable key updates for HTTP/3 ([lucas-clemente/quic-go#3017](https://github.com/lucas-clemente/quic-go/pull/3017)) + - check for errors after handling each previously undecryptable packet ([lucas-clemente/quic-go#3011](https://github.com/lucas-clemente/quic-go/pull/3011)) + - fix flaky streams map test on Windows ([lucas-clemente/quic-go#3013](https://github.com/lucas-clemente/quic-go/pull/3013)) + - fix flaky stream cancelation integration test ([lucas-clemente/quic-go#3014](https://github.com/lucas-clemente/quic-go/pull/3014)) + - preallocate a slice of one frame when packing a packet ([lucas-clemente/quic-go#3018](https://github.com/lucas-clemente/quic-go/pull/3018)) + - allow sending of ACKs when pacing limited ([lucas-clemente/quic-go#3010](https://github.com/lucas-clemente/quic-go/pull/3010)) + - fix qlogging of the packet payload length ([lucas-clemente/quic-go#3004](https://github.com/lucas-clemente/quic-go/pull/3004)) + - corrupt more ACKs in the MITM test ([lucas-clemente/quic-go#3007](https://github.com/lucas-clemente/quic-go/pull/3007)) + - fix flaky key update integration test ([lucas-clemente/quic-go#3005](https://github.com/lucas-clemente/quic-go/pull/3005)) + - immediately complete streams that were canceled, drop retransmissions ([lucas-clemente/quic-go#3003](https://github.com/lucas-clemente/quic-go/pull/3003)) + - stop generating new packets when the send queue is full ([lucas-clemente/quic-go#2971](https://github.com/lucas-clemente/quic-go/pull/2971)) + - allow access to the underlying quic.Stream from a http.ResponseWriter ([lucas-clemente/quic-go#2993](https://github.com/lucas-clemente/quic-go/pull/2993)) + - remove stay print statement from session test + - allow receiving of multiple packets before sending a packet ([lucas-clemente/quic-go#2984](https://github.com/lucas-clemente/quic-go/pull/2984)) + - use cryptographic random for determining skipped packet numbers ([lucas-clemente/quic-go#2940](https://github.com/lucas-clemente/quic-go/pull/2940)) + - fix interpretation of time.Time{} as a pacing deadline ([lucas-clemente/quic-go#2980](https://github.com/lucas-clemente/quic-go/pull/2980)) + - qlog restored transport parameters ([lucas-clemente/quic-go#2991](https://github.com/lucas-clemente/quic-go/pull/2991)) + - use a pkg.go.dev instead of a GoDoc badge ([lucas-clemente/quic-go#2982](https://github.com/lucas-clemente/quic-go/pull/2982)) + - introduce a separate queue for undecryptable packets ([lucas-clemente/quic-go#2988](https://github.com/lucas-clemente/quic-go/pull/2988)) + - improve 0-RTT queue ([lucas-clemente/quic-go#2990](https://github.com/lucas-clemente/quic-go/pull/2990)) + - simplify switch statement in the transport parameter parser ([lucas-clemente/quic-go#2995](https://github.com/lucas-clemente/quic-go/pull/2995)) + - remove unneeded overflow check when parsing the max_ack_delay ([lucas-clemente/quic-go#2996](https://github.com/lucas-clemente/quic-go/pull/2996)) + - remove unneeded check in receivedPacketHandler.IsPotentiallyDuplicate ([lucas-clemente/quic-go#2998](https://github.com/lucas-clemente/quic-go/pull/2998)) + - qlog the max_datagram_frame_size transport parameter ([lucas-clemente/quic-go#2997](https://github.com/lucas-clemente/quic-go/pull/2997)) + - qlog draft-02 fixes ([lucas-clemente/quic-go#2987](https://github.com/lucas-clemente/quic-go/pull/2987)) + - fix flaky qlog test ([lucas-clemente/quic-go#2981](https://github.com/lucas-clemente/quic-go/pull/2981)) + - only run gofumpt on .go files in pre-commit hook ([lucas-clemente/quic-go#2983](https://github.com/lucas-clemente/quic-go/pull/2983)) + - fix outdated comment for the http3.Server + - make the OpenStreamSync cancelation test less flaky ([lucas-clemente/quic-go#2978](https://github.com/lucas-clemente/quic-go/pull/2978)) + - add some useful pre-commit hooks ([lucas-clemente/quic-go#2979](https://github.com/lucas-clemente/quic-go/pull/2979)) + - publicize QUIC varint reading and writing ([lucas-clemente/quic-go#2973](https://github.com/lucas-clemente/quic-go/pull/2973)) + - add a http3.RoundTripOpt to skip the request scheme check ([lucas-clemente/quic-go#2962](https://github.com/lucas-clemente/quic-go/pull/2962)) + - use the standard quic.Config in the deadline tests ([lucas-clemente/quic-go#2970](https://github.com/lucas-clemente/quic-go/pull/2970)) + - update golangci-lint to v1.34.1 ([lucas-clemente/quic-go#2964](https://github.com/lucas-clemente/quic-go/pull/2964)) + - update text about QUIC versions in the README ([lucas-clemente/quic-go#2975](https://github.com/lucas-clemente/quic-go/pull/2975)) + - remove stray TODO in the http3.Server + - add support for Go 1.16 ([lucas-clemente/quic-go#2953](https://github.com/lucas-clemente/quic-go/pull/2953)) + - cancel reading on unidirectional streams when the stream type is unknown ([lucas-clemente/quic-go#2952](https://github.com/lucas-clemente/quic-go/pull/2952)) + - remove duplicate check of the URL scheme in the HTTP/3 client ([lucas-clemente/quic-go#2956](https://github.com/lucas-clemente/quic-go/pull/2956)) + - increase queueing duration in 0-RTT queue test to reduce flakiness ([lucas-clemente/quic-go#2954](https://github.com/lucas-clemente/quic-go/pull/2954)) + - implement the HTTP/3 Datagram negotiation ([lucas-clemente/quic-go#2951](https://github.com/lucas-clemente/quic-go/pull/2951)) + - implement HTTP/3 control stream handling ([lucas-clemente/quic-go#2949](https://github.com/lucas-clemente/quic-go/pull/2949)) + - fix flaky sentPacketHandler test ([lucas-clemente/quic-go#2950](https://github.com/lucas-clemente/quic-go/pull/2950)) + - don't retransmit PING frames added to ACK-only packets ([lucas-clemente/quic-go#2942](https://github.com/lucas-clemente/quic-go/pull/2942)) + - move the transport parameter stream limit check to the parser ([lucas-clemente/quic-go#2944](https://github.com/lucas-clemente/quic-go/pull/2944)) + - remove unused initialVersion variable in session ([lucas-clemente/quic-go#2946](https://github.com/lucas-clemente/quic-go/pull/2946)) + - remove unneeded check for the peer's transport parameters ([lucas-clemente/quic-go#2945](https://github.com/lucas-clemente/quic-go/pull/2945)) + - add the H3_MESSAGE_ERROR ([lucas-clemente/quic-go#2947](https://github.com/lucas-clemente/quic-go/pull/2947)) + - simplify Read and Write mock calls in http3 tests ([lucas-clemente/quic-go#2948](https://github.com/lucas-clemente/quic-go/pull/2948)) + - implement the datagram draft ([lucas-clemente/quic-go#2162](https://github.com/lucas-clemente/quic-go/pull/2162)) + - fix logging of bytes_in_flight when receiving an ACK ([lucas-clemente/quic-go#2937](https://github.com/lucas-clemente/quic-go/pull/2937)) + - trace when a packet is dropped because the receivedPackets chan is full ([lucas-clemente/quic-go#2939](https://github.com/lucas-clemente/quic-go/pull/2939)) + - various improvements to the packet number generator ([lucas-clemente/quic-go#2905](https://github.com/lucas-clemente/quic-go/pull/2905)) + - introduce a quic.Config.HandshakeIdleTimeout, remove HandshakeTimeout ([lucas-clemente/quic-go#2930](https://github.com/lucas-clemente/quic-go/pull/2930)) + - allow up to 20 byte for the initial connection IDs ([lucas-clemente/quic-go#2936](https://github.com/lucas-clemente/quic-go/pull/2936)) + - reduce memory footprint of undecryptable packet handling ([lucas-clemente/quic-go#2932](https://github.com/lucas-clemente/quic-go/pull/2932)) + - use a buffer from the pool for composing Retry packets ([lucas-clemente/quic-go#2934](https://github.com/lucas-clemente/quic-go/pull/2934)) + - release the packet buffer after sending a CONNECTION_CLOSE in the server ([lucas-clemente/quic-go#2935](https://github.com/lucas-clemente/quic-go/pull/2935)) + - move integration tests to GitHub Actions, disable Travis ([lucas-clemente/quic-go#2891](https://github.com/lucas-clemente/quic-go/pull/2891)) + - use golang.org/x/sys/unix instead of syscall ([lucas-clemente/quic-go#2927](https://github.com/lucas-clemente/quic-go/pull/2927)) + - add support for the connection_closed qlog event ([lucas-clemente/quic-go#2921](https://github.com/lucas-clemente/quic-go/pull/2921)) + - qlog tokens in NEW_TOKEN frames, Retry packets and Initial packets ([lucas-clemente/quic-go#2863](https://github.com/lucas-clemente/quic-go/pull/2863)) + - qlog the packet_type as part of the packet header, not the event itself ([lucas-clemente/quic-go#2758](https://github.com/lucas-clemente/quic-go/pull/2758)) + - use the new, streaming-friendly NDJSON-based qlog encoding ([lucas-clemente/quic-go#2736](https://github.com/lucas-clemente/quic-go/pull/2736)) + - add a generic Debug() function to the connection tracer ([lucas-clemente/quic-go#2909](https://github.com/lucas-clemente/quic-go/pull/2909)) + - remove unnecessary call to time.Now() when sending a packet ([lucas-clemente/quic-go#2911](https://github.com/lucas-clemente/quic-go/pull/2911)) + - remove support for quic-trace ([lucas-clemente/quic-go#2913](https://github.com/lucas-clemente/quic-go/pull/2913)) + - reduce the maximum number of ACK ranges ([lucas-clemente/quic-go#2887](https://github.com/lucas-clemente/quic-go/pull/2887)) + - don't allocate for acked packets ([lucas-clemente/quic-go#2899](https://github.com/lucas-clemente/quic-go/pull/2899)) + - avoid allocating when detecting lost packets ([lucas-clemente/quic-go#2898](https://github.com/lucas-clemente/quic-go/pull/2898)) + - use the string optimization for map keys in the packet handler map ([lucas-clemente/quic-go#2892](https://github.com/lucas-clemente/quic-go/pull/2892)) + - use a single map in the incoming streams map ([lucas-clemente/quic-go#2890](https://github.com/lucas-clemente/quic-go/pull/2890)) +- github.com/marten-seemann/qtls-go1-15 (v0.1.1 -> v0.1.4): + - use a prefix for client session cache keys + - add callbacks to store and restore app data along a session state + - don't use TLS 1.3 compatibility mode when using alternative record layer + - delete the session ticket after attempting 0-RTT + - reject 0-RTT when a different ALPN is chosen + - encode the ALPN into the session ticket + - add a field to the ConnectionState to tell if 0-RTT was used + - add a callback to tell the client about rejection of 0-RTT + - don't offer 0-RTT after a HelloRetryRequest + - add Accept0RTT to Config callback to decide if 0-RTT should be accepted +- github.com/marten-seemann/qtls-go1-16 (null -> v0.1.3): + - use a prefix for client session cache keys + - add callbacks to store and restore app data along a session state + - don't use TLS 1.3 compatibility mode when using alternative record layer + - delete the session ticket after attempting 0-RTT + - reject 0-RTT when a different ALPN is chosen +- github.com/multiformats/go-multiaddr (v0.3.1 -> v0.3.2): + - fix(net): export new net.Addr conversion registration functions ([multiformats/go-multiaddr#152](https://github.com/multiformats/go-multiaddr/pull/152)) + - sync: run go mod tidy (and set Go 1.15) and gofmt -s in copy workflow (#146) ([multiformats/go-multiaddr#146](https://github.com/multiformats/go-multiaddr/pull/146)) + - more linter fixes ([multiformats/go-multiaddr#145](https://github.com/multiformats/go-multiaddr/pull/145)) + - fix go vet and staticcheck failures ([multiformats/go-multiaddr#143](https://github.com/multiformats/go-multiaddr/pull/143)) + - don't listen on all interfaces in tests, unless on CI ([multiformats/go-multiaddr#136](https://github.com/multiformats/go-multiaddr/pull/136)) + - Fix Local Address on TCP connections ([multiformats/go-multiaddr#135](https://github.com/multiformats/go-multiaddr/pull/135)) +- github.com/multiformats/go-multiaddr-dns (v0.2.0 -> v0.3.1): + - Normalize domains to fqdn for resolver selection ([multiformats/go-multiaddr-dns#27](https://github.com/multiformats/go-multiaddr-dns/pull/27)) + - refactor Resolver to support custom per-TLD resolvers ([multiformats/go-multiaddr-dns#26](https://github.com/multiformats/go-multiaddr-dns/pull/26)) + - feat: exposes backend ([multiformats/go-multiaddr-dns#25](https://github.com/multiformats/go-multiaddr-dns/pull/25)) +- github.com/multiformats/go-multihash (v0.0.14 -> v0.0.15): + - Refactor registry system: no direct dependencies; expose standard hash.Hash; be a data carrier. ([multiformats/go-multihash#136](https://github.com/multiformats/go-multihash/pull/136)) +- github.com/multiformats/go-multistream (v0.2.0 -> v0.2.2): + - change the simultaneous open protocol to /libp2p/simultaneous-connect ([multiformats/go-multistream#66](https://github.com/multiformats/go-multistream/pull/66)) + - fix the lazy stress read test on Windows ([multiformats/go-multistream#61](https://github.com/multiformats/go-multistream/pull/61)) + - fix go vet and staticcheck errors ([multiformats/go-multistream#60](https://github.com/multiformats/go-multistream/pull/60)) + - Implement simultaneous open extension ([multiformats/go-multistream#42](https://github.com/multiformats/go-multistream/pull/42)) + - reduce the number of streams in the stress tests, fix error handling ([multiformats/go-multistream#54](https://github.com/multiformats/go-multistream/pull/54)) +- github.com/whyrusleeping/cbor-gen (v0.0.0-20200710004633-5379fc63235d -> v0.0.0-20210219115102-f37d292932f2): + - feat: allow unmarshaling of struct with more fields than marshaled struct ([whyrusleeping/cbor-gen#50](https://github.com/whyrusleeping/cbor-gen/pull/50)) + - chore: add a license file ([whyrusleeping/cbor-gen#49](https://github.com/whyrusleeping/cbor-gen/pull/49)) + - fix: enforce maxlen in ReadByteArray() ([whyrusleeping/cbor-gen#43](https://github.com/whyrusleeping/cbor-gen/pull/43)) + - use unix nanoseconds for encoding Cbortime ([whyrusleeping/cbor-gen#41](https://github.com/whyrusleeping/cbor-gen/pull/41)) + - add json marshalers to CborTime + - add a helper for roundtripping time.time objects ([whyrusleeping/cbor-gen#40](https://github.com/whyrusleeping/cbor-gen/pull/40)) + - Add a validate function. ([whyrusleeping/cbor-gen#39](https://github.com/whyrusleeping/cbor-gen/pull/39)) + - Fix import handling ([whyrusleeping/cbor-gen#38](https://github.com/whyrusleeping/cbor-gen/pull/38)) + - Optimize discarding in ScanForLinks ([whyrusleeping/cbor-gen#36](https://github.com/whyrusleeping/cbor-gen/pull/36)) + - Always allocate scratch space when marshalling into a map. ([whyrusleeping/cbor-gen#37](https://github.com/whyrusleeping/cbor-gen/pull/37)) + - optimize byte reading ([whyrusleeping/cbor-gen#35](https://github.com/whyrusleeping/cbor-gen/pull/35)) + - Optimize decoding ([whyrusleeping/cbor-gen#34](https://github.com/whyrusleeping/cbor-gen/pull/34)) + - Fix named string issue ([whyrusleeping/cbor-gen#30](https://github.com/whyrusleeping/cbor-gen/pull/30)) + - Fix encoding/decoding fixed byte arrays ([whyrusleeping/cbor-gen#29](https://github.com/whyrusleeping/cbor-gen/pull/29)) + - fix overread on scanforlinks ([whyrusleeping/cbor-gen#28](https://github.com/whyrusleeping/cbor-gen/pull/28)) + +### ❀️ Contributors + +| Contributor | Commits | Lines Β± | Files Changed | +|-------------|---------|---------|---------------| +| Marten Seemann | 358 | +17444/-12000 | 1268 | +| Eric Myhre | 82 | +9672/-2459 | 328 | +| Ian Davis | 7 | +8421/-737 | 116 | +| Daniel MartΓ­ | 18 | +2733/-4377 | 313 | +| Adin Schmahmann | 46 | +5387/-1289 | 125 | +| Steven Allen | 95 | +3278/-1861 | 200 | +| hannahhoward | 14 | +1380/-3667 | 84 | +| gammazero | 29 | +2520/-1161 | 88 | +| Hector Sanjuan | 12 | +511/-3129 | 52 | +| vyzo | 77 | +2198/-940 | 117 | +| Will Scott | 12 | +912/-593 | 37 | +| Dirk McCormick | 3 | +1384/-63 | 14 | +| Andrew Gillis | 3 | +1231/-39 | 19 | +| Marcin Rataj | 37 | +549/-308 | 72 | +| Aarsh Shah | 13 | +668/-86 | 30 | +| Olivier Poitrey | 1 | +469/-182 | 15 | +| Rod Vagg | 9 | +364/-184 | 14 | +| whyrusleeping | 5 | +253/-32 | 11 | +| Cory Schwartz | 10 | +162/-115 | 37 | +| Adrian Lanzafame | 8 | +212/-60 | 11 | +| aarshkshah1992 | 7 | +102/-110 | 9 | +| Jakub Sztandera | 7 | +126/-75 | 16 | +| huoju | 4 | +127/-41 | 6 | +| acruikshank | 6 | +32/-24 | 7 | +| Toby | 1 | +41/-1 | 2 | +| Naveen | 1 | +40/-0 | 1 | +| Bogdan Stirbat | 1 | +22/-16 | 2 | +| KΓ©vin Dunglas | 1 | +32/-2 | 2 | +| Nicholas Bollweg | 1 | +22/-0 | 1 | +| q191201771 | 2 | +4/-11 | 2 | +| Mathis Engelbart | 1 | +12/-2 | 1 | +| requilence | 1 | +13/-0 | 1 | +| divingpetrel | 1 | +7/-4 | 2 | +| Oli Evans | 2 | +9/-2 | 3 | +| Lucas Molas | 3 | +7/-3 | 3 | +| RubenKelevra | 3 | +2/-6 | 3 | +| Will | 1 | +1/-5 | 1 | +| Jorropo | 1 | +4/-2 | 1 | +| Ju Huo | 1 | +2/-2 | 1 | +| zhoujiajie | 1 | +1/-1 | 1 | +| Luflosi | 1 | +1/-1 | 1 | +| Jonathan Rudenberg | 1 | +1/-1 | 1 | +| David Pflug | 1 | +1/-1 | 1 | +| Ari Mattila | 1 | +1/-1 | 1 | +| Yingrong Zhao | 1 | +0/-1 | 1 | + ## v0.8.0 2021-02-18 We're happy to announce go-ipfs 0.8.0! This is planned to be a fairly small release focused on integrating in the new pinning service/remote pinning [API](https://github.com/ipfs/pinning-services-api-spec) that makes the experience of managing pins across pinning services easier and more uniform. diff --git a/README.md b/README.md index 67f229ee0..9cebf8e13 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,8 @@ ![banner](https://ipfs.io/ipfs/bafykbzacecaesuqmivkauix25v6i6xxxsvsrtxknhgb5zak3xxsg2nb4dhs2u/ipfs.go.png) -[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) -[![Matrix](https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat-square)](https://matrix.to/#/room/#ipfs:matrix.org) -[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) -[![Discord](https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat-square)](https://discord.gg/24fmuwR) +[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](https://protocol.ai) [![GoDoc](https://img.shields.io/badge/godoc-reference-5272B4.svg?style=flat-square)](https://godoc.org/github.com/ipfs/go-ipfs) -[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) [![CircleCI](https://img.shields.io/circleci/build/github/ipfs/go-ipfs?style=flat-square)](https://circleci.com/gh/ipfs/go-ipfs) ## What is IPFS? @@ -22,6 +18,7 @@ Before opening an issue, consider using one of the following locations to ensure - IPFS _design_ in [ipfs/specs issues](https://github.com/ipfs/specs/issues). - Exploration of new ideas in [ipfs/notes issues](https://github.com/ipfs/notes/issues). - Ask questions and meet the rest of the community at the [IPFS Forum](https://discuss.ipfs.io). + - Or [chat with us](https://docs.ipfs.io/community/chat/). ## Table of Contents @@ -144,10 +141,10 @@ $ sudo snap install ipfs #### Chocolatey -The package [ipfs](https://chocolatey.org/packages/ipfs) currently points to go-ipfs and is being maintained. +The package name is [go-ipfs](https://chocolatey.org/packages/go-ipfs): ```Powershell -PS> choco install ipfs +PS> choco install go-ipfs ``` #### Scoop @@ -222,8 +219,8 @@ dependencies as well. - _WARNING_: Older versions of OSX FUSE (for Mac OS X) can cause kernel panics when mounting!- We strongly recommend you use the [latest version of OSX FUSE](http://osxfuse.github.io/). (See https://github.com/ipfs/go-ipfs/issues/177) -- For more details on setting up FUSE (so that you can mount the filesystem), see the docs folder. -- Shell command completion is available in `misc/completion/ipfs-completion.bash`. Read [docs/command-completion.md](docs/command-completion.md) to learn how to install it. +- Read [docs/fuse.md](docs/fuse.md) for more details on setting up FUSE (so that you can mount the filesystem). +- Shell command completions can be generated with one of the `ipfs commands completion` subcommands. Read [docs/command-completion.md](docs/command-completion.md) to learn more. - See the [misc folder](https://github.com/ipfs/go-ipfs/tree/master/misc) for how to connect IPFS to systemd or whatever init system your distro uses. ### Updating go-ipfs @@ -532,8 +529,7 @@ We ❀️ all [our contributors](docs/AUTHORS); this project wouldn’t be what This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). -You can contact us on the freenode #ipfs-dev channel or attend one of our -[weekly calls](https://github.com/ipfs/team-mgmt/issues/674). +Please reach out to us in one [chat](https://docs.ipfs.io/community/chat/) rooms. ## License diff --git a/bin/mkreleaselog b/bin/mkreleaselog index 49c457053..78a11b48a 100755 --- a/bin/mkreleaselog +++ b/bin/mkreleaselog @@ -1,40 +1,78 @@ #!/bin/zsh -#set -x +# +# Invocation: mkreleaselog [FIRST_REF [LAST_REF]] + set -euo pipefail export GO111MODULE=on export GOPATH="$(go env GOPATH)" -alias jq="jq --unbuffered" - -AUTHORS=( +# List of PCRE regular expressions to match "included" modules. +INCLUDE_MODULES=( # orgs - ipfs - ipld - libp2p - multiformats - filecoin-project - ipfs-shipyard + "^github.com/ipfs/" + "^github.com/ipld/" + "^github.com/libp2p/" + "^github.com/multiformats/" + "^github.com/filecoin-project/" + "^github.com/ipfs-shipyard/" - # Authors of personal repos used by go-ipfs that should be mentioned in the + # Authors of personal modules used by go-ipfs that should be mentioned in the # release notes. - whyrusleeping - Kubuxu - jbenet - Stebalien - marten-seemann - hsanjuan - lucas-clemente - warpfork + "^github.com/whyrusleeping/" + "^github.com/Kubuxu/" + "^github.com/jbenet/" + "^github.com/Stebalien/" + "^github.com/marten-seemann/" + "^github.com/hsanjuan/" + "^github.com/lucas-clemente/" + "^github.com/warpfork/" ) -[[ -n "${REPO_FILTER+x}" ]] || REPO_FILTER="github.com/(${$(printf "|%s" "${AUTHORS[@]}"):1})" +# List of PCRE regular expressions to match "excluded" modules. Applied after includes. +EXCLUDE_MODULES=( + "^github.com/marten-seemann/qtls" +) + +# Ignored files as git pathspecs. These patters will match any full path component. +IGNORE_FILES=( + ".gx" + "package.json" + ".travis.yml" + "go.mod" + "go.sum" + ".github" + ".circleci" + "*.pb.go" + "cbor_gen.go" + "ipldsch_*.go" +) + +########################################################################################## + +if [[ ${#INCLUDE_MODULES[@]} -gt 0 ]]; then + INCLUDE_REGEX="(${$(printf "|%s" "${INCLUDE_MODULES[@]}"):1})" +else + INCLUDE_REGEX="" # "match anything" +fi + +if [[ ${#EXCLUDE_MODULES[@]} -gt 0 ]]; then + EXCLUDE_REGEX="(${$(printf "|%s" "${EXCLUDE_MODULES[@]}"):1})" +else + EXCLUDE_REGEX='$^' # "match nothing" +fi + +IGNORE_FILES_PATHSPEC=() +for f in "${IGNORE_FILES[@]}"; do + IGNORE_FILES_PATHSPEC+=(":^:**/$f" ":^:$f") # Prepend the magic "ignore this" sequence. +done -[[ -n "${IGNORED_FILES+x}" ]] || IGNORED_FILES='^\(\.gx\|package\.json\|\.travis\.yml\|go\.mod\|go\.sum\|\.github\|\.circleci\|.*\.pb\.go\|cbor_gen\.go\|.*ipldsch.*\.go\)$' NL=$'\n' ROOT_DIR="$(git rev-parse --show-toplevel)" +alias jq="jq --unbuffered" + msg() { echo "$*" >&2 } @@ -49,13 +87,15 @@ statlog() { mailmap_file="$ROOT_DIR/.mailmap" fi - git -C "$rpath" -c mailmap.file="$mailmap_file" log --use-mailmap --shortstat --no-merges --pretty="tformat:%H%n%aN%n%aE" "$start..$end" -- . ':^*\.pb\.go' ':^*ipldsch*\.go' ':^cbor_gen\.go\' ':^go\.mod' ':^go\.sum' | while - read hash - read name - read email - read _ # empty line - read changes - do + local stack=() + git -C "$rpath" -c mailmap.file="$mailmap_file" log --use-mailmap --shortstat --no-merges --pretty="tformat:%H%x09%aN%x09%aE" "$start..$end" -- . "${IGNORE_FILES_PATHSPEC[@]}" | while read -r line; do + if [[ -n "$line" ]]; then + stack+=("$line") + continue + fi + + read -r changes + changed=0 insertions=0 deletions=0 @@ -72,14 +112,18 @@ statlog() { fi done<<<"${changes//,/$NL}" - jq -n \ - --arg "hash" "$hash" \ - --arg "name" "$name" \ - --arg "email" "$email" \ - --argjson "changed" "$changed" \ - --argjson "insertions" "$insertions" \ - --argjson "deletions" "$deletions" \ - '{Commit: $hash, Author: $name, Email: $email, Files: $changed, Insertions: $insertions, Deletions: $deletions}' + for author in "${stack[@]}"; do + IFS=$'\t' read -r hash name email <<<"$author" + jq -n \ + --arg "hash" "$hash" \ + --arg "name" "$name" \ + --arg "email" "$email" \ + --argjson "changed" "$changed" \ + --argjson "insertions" "$insertions" \ + --argjson "deletions" "$deletions" \ + '{Commit: $hash, Author: $name, Email: $email, Files: $changed, Insertions: $insertions, Deletions: $deletions}' + done + stack=() done } @@ -103,6 +147,16 @@ pr_link() { printf -- "[%s#%s](https://%s/pull/%s)" "$ghname" "$prnum" "$repo" "$prnum" } +ignored_commit() { + local commit="$1" + local matches + + # Check to see if this commit includes any non-ignored files. + matches=$(git -C "$dir" diff-tree --no-commit-id --name-only -r "$commit" \ + -- "${IGNORE_FILES_PATHSPEC[@]}" | wc -l) + [[ "$matches" -eq 0 ]] +} + # Generate a release log for a range of commits in a single repo. release_log() { setopt local_options BASH_REMATCH @@ -119,9 +173,10 @@ release_log() { --first-parent \ "$start..$end" | while read commit subject; do - # Skip gx-only PRs. - git -C "$dir" diff-tree --no-commit-id --name-only "$commit^" "$commit" | - grep -v "${IGNORED_FILES}" >/dev/null || continue + # Skip commits that only touch ignored files. + if ignored_commit "$commit"; then + continue + fi if [[ "$subject" =~ '^Merge pull request #([0-9]+) from' ]]; then local prnum="${BASH_REMATCH[2]}" @@ -211,7 +266,8 @@ recursive_release_log() { statlog "$module" "$start" "$end" > statlog.json dep_changes old_deps.json new_deps.json | - jq --arg filter "$REPO_FILTER" 'select(.Path | match($filter))' | + jq --arg inc "$INCLUDE_REGEX" --arg exc "$EXCLUDE_REGEX" \ + 'select(.Path | test($inc)) | select(.Path | test($exc) | not)' | # Compute changelogs jq -r '"\(.Path) \(.New.Version) \(.New.Ref) \(.Old.Version) \(.Old.Ref // "")"' | while read module new new_ref old old_ref; do diff --git a/cmd/ipfs/migration.go b/cmd/ipfs/add_migrations.go similarity index 52% rename from cmd/ipfs/migration.go rename to cmd/ipfs/add_migrations.go index d4e3e15b9..b5b6c31a1 100644 --- a/cmd/ipfs/migration.go +++ b/cmd/ipfs/add_migrations.go @@ -2,17 +2,13 @@ package main import ( "context" - "encoding/json" "errors" "fmt" "io" "io/ioutil" - "net/url" "os" "path/filepath" - "strings" - config "github.com/ipfs/go-ipfs-config" "github.com/ipfs/go-ipfs-files" "github.com/ipfs/go-ipfs/core" "github.com/ipfs/go-ipfs/core/coreapi" @@ -24,140 +20,7 @@ import ( "github.com/libp2p/go-libp2p-core/peer" ) -// readMigrationConfig reads the migration config out of the config, avoiding -// reading anything other than the migration section. That way, we're free to -// make arbitrary changes to all _other_ sections in migrations. -func readMigrationConfig(repoRoot string) (*config.Migration, error) { - var cfg struct { - Migration config.Migration - } - - cfgPath, err := config.Filename(repoRoot) - if err != nil { - return nil, err - } - - cfgFile, err := os.Open(cfgPath) - if err != nil { - return nil, err - } - defer cfgFile.Close() - - err = json.NewDecoder(cfgFile).Decode(&cfg) - if err != nil { - return nil, err - } - - switch cfg.Migration.Keep { - case "": - cfg.Migration.Keep = config.DefaultMigrationKeep - case "discard", "cache", "keep": - default: - return nil, errors.New("unknown config value, Migrations.Keep must be 'cache', 'pin', or 'discard'") - } - - if len(cfg.Migration.DownloadSources) == 0 { - cfg.Migration.DownloadSources = config.DefaultMigrationDownloadSources - } - - return &cfg.Migration, nil -} - -func readIpfsConfig(repoRoot *string) (bootstrap []string, peers []peer.AddrInfo) { - if repoRoot == nil { - return - } - - cfgPath, err := config.Filename(*repoRoot) - if err != nil { - fmt.Fprintln(os.Stderr, err) - return - } - - cfgFile, err := os.Open(cfgPath) - if err != nil { - fmt.Fprintln(os.Stderr, err) - return - } - defer cfgFile.Close() - - // Attempt to read bootstrap addresses - var bootstrapCfg struct { - Bootstrap []string - } - err = json.NewDecoder(cfgFile).Decode(&bootstrapCfg) - if err != nil { - fmt.Fprintln(os.Stderr, "cannot read bootstrap peers from config") - } else { - bootstrap = bootstrapCfg.Bootstrap - } - - if _, err = cfgFile.Seek(0, 0); err != nil { - fmt.Fprintln(os.Stderr, err) - } - - // Attempt to read peers - var peeringCfg struct { - Peering config.Peering - } - err = json.NewDecoder(cfgFile).Decode(&peeringCfg) - if err != nil { - fmt.Fprintln(os.Stderr, "cannot read peering from config") - } else { - peers = peeringCfg.Peering.Peers - } - - return -} - -// getMigrationFetcher creates one or more fetchers according to -// config.Migration.DownloadSources. If an IpfsFetcher is required, then -// bootstrap and peer information in read from the config file in repoRoot, -// unless repoRoot is nil. -func getMigrationFetcher(cfg *config.Migration, repoRoot *string) (migrations.Fetcher, error) { - const httpUserAgent = "go-ipfs" - - // Fetch migrations from current distribution, or location from environ - fetchDistPath := migrations.GetDistPathEnv(migrations.CurrentIpfsDist) - - var fetchers []migrations.Fetcher - for _, src := range cfg.DownloadSources { - src := strings.TrimSpace(src) - switch src { - case "IPFS", "ipfs": - bootstrap, peers := readIpfsConfig(repoRoot) - fetchers = append(fetchers, ipfsfetcher.NewIpfsFetcher(fetchDistPath, 0, bootstrap, peers)) - case "HTTPS", "https", "HTTP", "http": - fetchers = append(fetchers, migrations.NewHttpFetcher(fetchDistPath, "", httpUserAgent, 0)) - default: - u, err := url.Parse(src) - if err != nil { - return nil, fmt.Errorf("bad gateway address: %s", err) - } - switch u.Scheme { - case "": - u.Scheme = "https" - case "https", "http": - default: - return nil, errors.New("bad gateway address: url scheme must be http or https") - } - fetchers = append(fetchers, migrations.NewHttpFetcher(fetchDistPath, u.String(), httpUserAgent, 0)) - case "": - // Ignore empty string - } - } - if len(fetchers) == 0 { - return nil, errors.New("no sources specified") - } - - if len(fetchers) == 1 { - return fetchers[0], nil - } - - // Wrap fetchers in a MultiFetcher to try them in order - return migrations.NewMultiFetcher(fetchers...), nil -} - +// addMigrations adds any migration downloaded by the fetcher to the IPFS node func addMigrations(ctx context.Context, node *core.IpfsNode, fetcher migrations.Fetcher, pin bool) error { var fetchers []migrations.Fetcher if mf, ok := fetcher.(*migrations.MultiFetcher); ok { diff --git a/cmd/ipfs/daemon.go b/cmd/ipfs/daemon.go index d8461c9a8..f430fcdd2 100644 --- a/cmd/ipfs/daemon.go +++ b/cmd/ipfs/daemon.go @@ -12,6 +12,7 @@ import ( "runtime" "sort" "sync" + "time" multierror "github.com/hashicorp/go-multierror" @@ -22,12 +23,14 @@ import ( oldcmds "github.com/ipfs/go-ipfs/commands" "github.com/ipfs/go-ipfs/core" commands "github.com/ipfs/go-ipfs/core/commands" + "github.com/ipfs/go-ipfs/core/coreapi" corehttp "github.com/ipfs/go-ipfs/core/corehttp" corerepo "github.com/ipfs/go-ipfs/core/corerepo" libp2p "github.com/ipfs/go-ipfs/core/node/libp2p" nodeMount "github.com/ipfs/go-ipfs/fuse/node" fsrepo "github.com/ipfs/go-ipfs/repo/fsrepo" "github.com/ipfs/go-ipfs/repo/fsrepo/migrations" + "github.com/ipfs/go-ipfs/repo/fsrepo/migrations/ipfsfetcher" sockets "github.com/libp2p/go-socket-activation" cmds "github.com/ipfs/go-ipfs-cmds" @@ -292,12 +295,26 @@ func daemonFunc(req *cmds.Request, re cmds.ResponseEmitter, env cmds.Environment return fmt.Errorf("fs-repo requires migration") } - migrationCfg, err := readMigrationConfig(cctx.ConfigRoot) + // Read Migration section of IPFS config + migrationCfg, err := migrations.ReadMigrationConfig(cctx.ConfigRoot) if err != nil { return err } - fetcher, err = getMigrationFetcher(migrationCfg, &cctx.ConfigRoot) + // Define function to create IPFS fetcher. Do not supply an + // already-constructed IPFS fetcher, because this may be expensive and + // not needed according to migration config. Instead, supply a function + // to construct the particular IPFS fetcher implementation used here, + // which is called only if an IPFS fetcher is needed. + newIpfsFetcher := func(distPath string) migrations.Fetcher { + return ipfsfetcher.NewIpfsFetcher(distPath, 0, &cctx.ConfigRoot) + } + + // Fetch migrations from current distribution, or location from environ + fetchDistPath := migrations.GetDistPathEnv(migrations.CurrentIpfsDist) + + // Create fetchers according to migrationCfg.DownloadSources + fetcher, err = migrations.GetMigrationFetcher(migrationCfg.DownloadSources, fetchDistPath, newIpfsFetcher) if err != nil { return err } @@ -458,7 +475,7 @@ func daemonFunc(req *cmds.Request, re cmds.ResponseEmitter, env cmds.Environment if cacheMigrations || pinMigrations { err = addMigrations(cctx.Context(), node, fetcher, pinMigrations) if err != nil { - fmt.Fprintln(os.Stderr, "Could not add migragion to IPFS:", err) + fmt.Fprintln(os.Stderr, "Could not add migration to IPFS:", err) } // Remove download directory so that it does not remain for lifetime of // daemon or get left behind if daemon has a hard exit @@ -510,6 +527,33 @@ func daemonFunc(req *cmds.Request, re cmds.ResponseEmitter, env cmds.Environment fmt.Println("(Hit ctrl-c again to force-shutdown the daemon.)") }() + // Give the user heads up if daemon running in online mode has no peers after 1 minute + if !offline { + time.AfterFunc(1*time.Minute, func() { + cfg, err := cctx.GetConfig() + if err != nil { + log.Errorf("failed to access config: %s", err) + } + if len(cfg.Bootstrap) == 0 && len(cfg.Peering.Peers) == 0 { + // Skip peer check if Bootstrap and Peering lists are empty + // (means user disabled them on purpose) + log.Warn("skipping bootstrap: empty Bootstrap and Peering lists") + return + } + ipfs, err := coreapi.NewCoreAPI(node) + if err != nil { + log.Errorf("failed to access CoreAPI: %v", err) + } + peers, err := ipfs.Swarm().Peers(cctx.Context()) + if err != nil { + log.Errorf("failed to read swarm peers: %v", err) + } + if len(peers) == 0 { + log.Error("failed to bootstrap (no peers found): consider updating Bootstrap or Peering section of your config") + } + }) + } + // collect long-running errors and block for shutdown // TODO(cryptix): our fuse currently doesn't follow this pattern for graceful shutdown var errs error diff --git a/cmd/ipfs/migration_test.go b/cmd/ipfs/migration_test.go deleted file mode 100644 index da35bf302..000000000 --- a/cmd/ipfs/migration_test.go +++ /dev/null @@ -1,312 +0,0 @@ -package main - -import ( - "io/ioutil" - "os" - "path/filepath" - "strings" - "testing" - - config "github.com/ipfs/go-ipfs-config" - "github.com/ipfs/go-ipfs/repo/fsrepo/migrations" - "github.com/ipfs/go-ipfs/repo/fsrepo/migrations/ipfsfetcher" -) - -var testConfig = ` -{ - "Bootstrap": [ - "/dnsaddr/bootstrap.libp2p.io/p2p/QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt", - "/ip4/104.131.131.82/tcp/4001/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ" - ], - "Migration": { - "DownloadSources": ["IPFS", "HTTP", "127.0.0.1", "https://127.0.1.1"], - "Keep": "cache" - }, - "Peering": { - "Peers": [ - { - "ID": "12D3KooWGC6TvWhfapngX6wvJHMYvKpDMXPb3ZnCZ6dMoaMtimQ5", - "Addrs": ["/ip4/127.0.0.1/tcp/4001", "/ip4/127.0.0.1/udp/4001/quic"] - } - ] - } -} -` - -func TestReadMigrationConfigDefaults(t *testing.T) { - tmpDir := makeConfig("{}") - defer os.RemoveAll(tmpDir) - - cfg, err := readMigrationConfig(tmpDir) - if err != nil { - t.Fatal(err) - } - - if cfg.Keep != config.DefaultMigrationKeep { - t.Error("expected default value for Keep") - } - - if len(cfg.DownloadSources) != len(config.DefaultMigrationDownloadSources) { - t.Fatal("expected default number of download sources") - } - for i, src := range config.DefaultMigrationDownloadSources { - if cfg.DownloadSources[i] != src { - t.Errorf("wrong DownloadSource: %s", cfg.DownloadSources[i]) - } - } -} - -func TestReadMigrationConfigErrors(t *testing.T) { - tmpDir := makeConfig(`{"Migration": {"Keep": "badvalue"}}`) - defer os.RemoveAll(tmpDir) - - _, err := readMigrationConfig(tmpDir) - if err == nil { - t.Fatal("expected error") - } - if !strings.HasPrefix(err.Error(), "unknown") { - t.Fatal("did not get expected error:", err) - } - - os.RemoveAll(tmpDir) - _, err = readMigrationConfig(tmpDir) - if err == nil { - t.Fatal("expected error") - } - - bootstrap, peers := readIpfsConfig(&tmpDir) - if bootstrap != nil { - t.Error("expected nil bootstrap") - } - if peers != nil { - t.Error("expected nil peers") - } - - tmpDir = makeConfig(`}{`) - defer os.RemoveAll(tmpDir) - _, err = readMigrationConfig(tmpDir) - if err == nil { - t.Fatal("expected error") - } -} - -func TestReadMigrationConfig(t *testing.T) { - tmpDir := makeConfig(testConfig) - defer os.RemoveAll(tmpDir) - - cfg, err := readMigrationConfig(tmpDir) - if err != nil { - t.Fatal(err) - } - - if len(cfg.DownloadSources) != 4 { - t.Fatal("wrong number of DownloadSources") - } - expect := []string{"IPFS", "HTTP", "127.0.0.1", "https://127.0.1.1"} - for i := range expect { - if cfg.DownloadSources[i] != expect[i] { - t.Errorf("wrong DownloadSource at %d", i) - } - } - - if cfg.Keep != "cache" { - t.Error("wrong value for Keep") - } -} - -func TestReadIpfsConfig(t *testing.T) { - tmpDir := makeConfig(testConfig) - defer os.RemoveAll(tmpDir) - - bootstrap, peers := readIpfsConfig(nil) - if bootstrap != nil || peers != nil { - t.Fatal("expected nil ipfs config items") - } - - bootstrap, peers = readIpfsConfig(&tmpDir) - if len(bootstrap) != 2 { - t.Fatal("wrong number of bootstrap addresses") - } - if bootstrap[0] != "/dnsaddr/bootstrap.libp2p.io/p2p/QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt" { - t.Fatal("wrong bootstrap address") - } - - if len(peers) != 1 { - t.Fatal("wrong number of peers") - } - - peer := peers[0] - if peer.ID.String() != "12D3KooWGC6TvWhfapngX6wvJHMYvKpDMXPb3ZnCZ6dMoaMtimQ5" { - t.Errorf("wrong ID for first peer") - } - if len(peer.Addrs) != 2 { - t.Error("wrong number of addrs for first peer") - } -} - -func TestReadPartialIpfsConfig(t *testing.T) { - const ( - configBadBootstrap = ` -{ - "Bootstrap": "unreadable", - "Migration": { - "DownloadSources": ["IPFS", "HTTP", "127.0.0.1"], - "Keep": "cache" - }, - "Peering": { - "Peers": [ - { - "ID": "12D3KooWGC6TvWhfapngX6wvJHMYvKpDMXPb3ZnCZ6dMoaMtimQ5", - "Addrs": ["/ip4/127.0.0.1/tcp/4001", "/ip4/127.0.0.1/udp/4001/quic"] - } - ] - } -} -` - configBadPeers = ` -{ - "Bootstrap": [ - "/dnsaddr/bootstrap.libp2p.io/p2p/QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt", - "/ip4/104.131.131.82/tcp/4001/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ" - ], - "Migration": { - "DownloadSources": ["IPFS", "HTTP", "127.0.0.1"], - "Keep": "cache" - }, - "Peering": "Unreadable-data" -} -` - ) - - tmpDir := makeConfig(configBadBootstrap) - defer os.RemoveAll(tmpDir) - - bootstrap, peers := readIpfsConfig(&tmpDir) - if bootstrap != nil { - t.Fatal("expected nil bootstrap") - } - if len(peers) != 1 { - t.Fatal("wrong number of peers") - } - if len(peers[0].Addrs) != 2 { - t.Error("wrong number of addrs for first peer") - } - os.RemoveAll(tmpDir) - - tmpDir = makeConfig(configBadPeers) - defer os.RemoveAll(tmpDir) - - bootstrap, peers = readIpfsConfig(&tmpDir) - if peers != nil { - t.Fatal("expected nil peers") - } - if len(bootstrap) != 2 { - t.Fatal("wrong number of bootstrap addresses") - } - if bootstrap[0] != "/dnsaddr/bootstrap.libp2p.io/p2p/QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt" { - t.Fatal("wrong bootstrap address") - } -} - -func makeConfig(configData string) string { - tmpDir, err := ioutil.TempDir("", "migration_test") - if err != nil { - panic(err) - } - - cfgFile, err := os.Create(filepath.Join(tmpDir, "config")) - if err != nil { - panic(err) - } - if _, err = cfgFile.Write([]byte(configData)); err != nil { - panic(err) - } - if err = cfgFile.Close(); err != nil { - panic(err) - } - return tmpDir -} - -func TestGetMigrationFetcher(t *testing.T) { - var f migrations.Fetcher - var err error - - cfg := &config.Migration{} - - cfg.DownloadSources = []string{"ftp://bad.gateway.io"} - _, err = getMigrationFetcher(cfg, nil) - if err == nil || !strings.HasPrefix(err.Error(), "bad gateway addr") { - t.Fatal("Expected bad gateway address error, got:", err) - } - - cfg.DownloadSources = []string{"::bad.gateway.io"} - _, err = getMigrationFetcher(cfg, nil) - if err == nil || !strings.HasPrefix(err.Error(), "bad gateway addr") { - t.Fatal("Expected bad gateway address error, got:", err) - } - - cfg.DownloadSources = []string{"http://localhost"} - f, err = getMigrationFetcher(cfg, nil) - if err != nil { - t.Fatal(err) - } - if _, ok := f.(*migrations.HttpFetcher); !ok { - t.Fatal("expected HttpFetcher") - } - - cfg.DownloadSources = []string{"ipfs"} - f, err = getMigrationFetcher(cfg, nil) - if err != nil { - t.Fatal(err) - } - if _, ok := f.(*ipfsfetcher.IpfsFetcher); !ok { - t.Fatal("expected IpfsFetcher") - } - - cfg.DownloadSources = []string{"http"} - f, err = getMigrationFetcher(cfg, nil) - if err != nil { - t.Fatal(err) - } - if _, ok := f.(*migrations.HttpFetcher); !ok { - t.Fatal("expected HttpFetcher") - } - - cfg.DownloadSources = []string{"IPFS", "HTTPS"} - f, err = getMigrationFetcher(cfg, nil) - if err != nil { - t.Fatal(err) - } - mf, ok := f.(*migrations.MultiFetcher) - if !ok { - t.Fatal("expected MultiFetcher") - } - if mf.Len() != 2 { - t.Fatal("expected 2 fetchers in MultiFetcher") - } - - cfg.DownloadSources = []string{"ipfs", "https", "some.domain.io"} - f, err = getMigrationFetcher(cfg, nil) - if err != nil { - t.Fatal(err) - } - mf, ok = f.(*migrations.MultiFetcher) - if !ok { - t.Fatal("expected MultiFetcher") - } - if mf.Len() != 3 { - t.Fatal("expected 3 fetchers in MultiFetcher") - } - - cfg.DownloadSources = nil - _, err = getMigrationFetcher(cfg, nil) - if err == nil { - t.Fatal("expected error when no sources specified") - } - - cfg.DownloadSources = []string{"", ""} - _, err = getMigrationFetcher(cfg, nil) - if err == nil { - t.Fatal("expected error when empty string fetchers specified") - } -} diff --git a/cmd/ipfs/pinmfs.go b/cmd/ipfs/pinmfs.go index 5d17f3013..8ea9d2dcc 100644 --- a/cmd/ipfs/pinmfs.go +++ b/cmd/ipfs/pinmfs.go @@ -138,9 +138,9 @@ func pinAllMFS(ctx context.Context, node pinMFSNode, cfg *config.Config, rootCid for svcName_, svcConfig_ := range cfg.Pinning.RemoteServices { // skip services where MFS is not enabled svcName, svcConfig := svcName_, svcConfig_ - mfslog.Debugf("pinning considering service %s for mfs pinning", svcName) + mfslog.Debugf("pinning MFS root considering service %q", svcName) if !svcConfig.Policies.MFS.Enable { - mfslog.Debugf("pinning service %s is not enabled", svcName) + mfslog.Debugf("pinning service %q is not enabled", svcName) ch <- lastPin{} continue } @@ -153,7 +153,7 @@ func pinAllMFS(ctx context.Context, node pinMFSNode, cfg *config.Config, rootCid repinInterval, err = time.ParseDuration(svcConfig.Policies.MFS.RepinInterval) if err != nil { select { - case errCh <- fmt.Errorf("remote pinning service %s has invalid MFS.RepinInterval (%v)", svcName, err): + case errCh <- fmt.Errorf("remote pinning service %q has invalid MFS.RepinInterval (%v)", svcName, err): case <-ctx.Done(): } ch <- lastPin{} @@ -165,20 +165,20 @@ func pinAllMFS(ctx context.Context, node pinMFSNode, cfg *config.Config, rootCid if last, ok := lastPins[svcName]; ok { if last.ServiceConfig == svcConfig && (last.CID == rootCid || time.Since(last.Time) < repinInterval) { if last.CID == rootCid { - mfslog.Debugf("pinning MFS root to %s: pin for %s exists since %s, skipping", svcName, rootCid, last.Time.String()) + mfslog.Debugf("pinning MFS root to %q: pin for %q exists since %s, skipping", svcName, rootCid, last.Time.String()) } else { - mfslog.Debugf("pinning MFS root to %s: skipped due to MFS.RepinInterval=%s (remaining: %s)", svcName, repinInterval.String(), (repinInterval - time.Since(last.Time)).String()) + mfslog.Debugf("pinning MFS root to %q: skipped due to MFS.RepinInterval=%s (remaining: %s)", svcName, repinInterval.String(), (repinInterval - time.Since(last.Time)).String()) } ch <- lastPin{} continue } } - mfslog.Debugf("pinning MFS root %s to %s", rootCid, svcName) + mfslog.Debugf("pinning MFS root %q to %q", rootCid, svcName) go func() { if r, err := pinMFS(ctx, node, rootCid, svcName, svcConfig); err != nil { select { - case errCh <- fmt.Errorf("pinning MFS root %s to %s (%v)", rootCid, svcName, err): + case errCh <- fmt.Errorf("pinning MFS root %q to %q (%v)", rootCid, svcName, err): case <-ctx.Done(): } ch <- lastPin{} @@ -212,12 +212,18 @@ func pinMFS( pinStatuses := []pinclient.Status{pinclient.StatusQueued, pinclient.StatusPinning, pinclient.StatusPinned, pinclient.StatusFailed} lsPinCh, lsErrCh := c.Ls(ctx, pinclient.PinOpts.FilterName(pinName), pinclient.PinOpts.FilterStatus(pinStatuses...)) existingRequestID := "" // is there any pre-existing MFS pin with pinName (for any CID)? - alreadyPinned := false // is CID for current MFS already pinned? + pinning := false // is CID for current MFS already being pinned? pinTime := time.Now().UTC() + pinStatusMsg := "pinning to %q: received pre-existing %q status for %q (requestid=%q)" for ps := range lsPinCh { existingRequestID = ps.GetRequestId() + if ps.GetPin().GetCid() == cid && ps.GetStatus() == pinclient.StatusFailed { + mfslog.Errorf(pinStatusMsg, svcName, pinclient.StatusFailed, cid, existingRequestID) + } else { + mfslog.Debugf(pinStatusMsg, svcName, ps.GetStatus(), ps.GetPin().GetCid(), existingRequestID) + } if ps.GetPin().GetCid() == cid && ps.GetStatus() != pinclient.StatusFailed { - alreadyPinned = true + pinning = true pinTime = ps.GetCreated().UTC() break } @@ -228,9 +234,9 @@ func pinMFS( return lastPin{}, fmt.Errorf("error while listing remote pins: %v", err) } - // CID of the current MFS root is already pinned, nothing to do - if alreadyPinned { - mfslog.Debugf("pinning MFS to %s: pin for %s exists since %s, skipping", svcName, cid, pinTime.String()) + // CID of the current MFS root is already being pinned, nothing to do + if pinning { + mfslog.Debugf("pinning MFS to %q: pin for %q exists since %s, skipping", svcName, cid, pinTime.String()) return lastPin{Time: pinTime, ServiceName: svcName, ServiceConfig: svcConfig, CID: cid}, nil } @@ -250,13 +256,13 @@ func pinMFS( // Create or replace pin for MFS root if existingRequestID != "" { - mfslog.Debugf("pinning to %s: replacing existing MFS root pin with %s", svcName, cid) + mfslog.Debugf("pinning to %q: replacing existing MFS root pin with %q", svcName, cid) _, err := c.Replace(ctx, existingRequestID, cid, addOpts...) if err != nil { return lastPin{}, err } } else { - mfslog.Debugf("pinning to %s: creating a new MFS root pin for %s", svcName, cid) + mfslog.Debugf("pinning to %q: creating a new MFS root pin for %q", svcName, cid) _, err := c.Add(ctx, cid, addOpts...) if err != nil { return lastPin{}, err diff --git a/cmd/ipfs/pinmfs_test.go b/cmd/ipfs/pinmfs_test.go index 42ffe9d40..e38e196be 100644 --- a/cmd/ipfs/pinmfs_test.go +++ b/cmd/ipfs/pinmfs_test.go @@ -9,7 +9,7 @@ import ( config "github.com/ipfs/go-ipfs-config" ipld "github.com/ipfs/go-ipld-format" - "github.com/ipfs/go-merkledag" + merkledag "github.com/ipfs/go-merkledag" "github.com/libp2p/go-libp2p-core/host" peer "github.com/libp2p/go-libp2p-core/peer" ) @@ -149,7 +149,7 @@ func TestPinMFSService(t *testing.T) { }, }, } - testPinMFSServiceWithError(t, cfg_invalid_interval, "remote pinning service invalid_interval has invalid MFS.RepinInterval") + testPinMFSServiceWithError(t, cfg_invalid_interval, "remote pinning service \"invalid_interval\" has invalid MFS.RepinInterval") testPinMFSServiceWithError(t, cfg_valid_unnamed, "error while listing remote pins: empty response from remote pinning service") testPinMFSServiceWithError(t, cfg_valid_named, "error while listing remote pins: empty response from remote pinning service") } diff --git a/core/commands/commands.go b/core/commands/commands.go index b45ac54c6..27be029c0 100644 --- a/core/commands/commands.go +++ b/core/commands/commands.go @@ -6,6 +6,7 @@ package commands import ( + "bytes" "fmt" "io" "os" @@ -63,6 +64,9 @@ func CommandsCmd(root *cmds.Command) *cmds.Command { Tagline: "List all available commands.", ShortDescription: `Lists all available commands (and subcommands) and exits.`, }, + Subcommands: map[string]*cmds.Command{ + "completion": CompletionCmd(root), + }, Options: []cmds.Option{ cmds.BoolOption(flagsOptionName, "f", "Show command flags"), }, @@ -131,6 +135,44 @@ func cmdPathStrings(cmd *Command, showOptions bool) []string { return cmds } +func CompletionCmd(root *cmds.Command) *cmds.Command { + return &cmds.Command{ + Helptext: cmds.HelpText{ + Tagline: "Generate shell completions.", + }, + NoRemote: true, + Subcommands: map[string]*cmds.Command{ + "bash": { + Helptext: cmds.HelpText{ + Tagline: "Generate bash shell completions.", + ShortDescription: "Generates command completions for the bash shell.", + LongDescription: ` +Generates command completions for the bash shell. + +The simplest way to see it working is write the completions +to a file and then source it: + + > ipfs commands completion bash > ipfs-completion.bash + > source ./ipfs-completion.bash + +To install the completions permanently, they can be moved to +/etc/bash_completion.d or sourced from your ~/.bashrc file. +`, + }, + NoRemote: true, + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + var buf bytes.Buffer + if err := writeBashCompletions(root, &buf); err != nil { + return err + } + res.SetLength(uint64(buf.Len())) + return res.Emit(&buf) + }, + }, + }, + } +} + type nonFatalError string // streamResult is a helper function to stream results that possibly diff --git a/core/commands/commands_test.go b/core/commands/commands_test.go index 81f07c01b..77a448a50 100644 --- a/core/commands/commands_test.go +++ b/core/commands/commands_test.go @@ -22,6 +22,8 @@ func TestROCommands(t *testing.T) { "/block/stat", "/cat", "/commands", + "/commands/completion", + "/commands/completion/bash", "/dag", "/dag/get", "/dag/resolve", @@ -89,6 +91,8 @@ func TestCommands(t *testing.T) { "/bootstrap/rm/all", "/cat", "/commands", + "/commands/completion", + "/commands/completion/bash", "/config", "/config/edit", "/config/replace", @@ -113,6 +117,7 @@ func TestCommands(t *testing.T) { "/diag/cmds", "/diag/cmds/clear", "/diag/cmds/set-time", + "/diag/profile", "/diag/sys", "/dns", "/file", diff --git a/core/commands/completion.go b/core/commands/completion.go new file mode 100644 index 000000000..ed1865d26 --- /dev/null +++ b/core/commands/completion.go @@ -0,0 +1,142 @@ +package commands + +import ( + "io" + "sort" + "text/template" + + cmds "github.com/ipfs/go-ipfs-cmds" +) + +type completionCommand struct { + Name string + Subcommands []*completionCommand + ShortFlags []string + ShortOptions []string + LongFlags []string + LongOptions []string +} + +func commandToCompletions(name string, cmd *cmds.Command) *completionCommand { + parsed := &completionCommand{ + Name: name, + } + for name, subCmd := range cmd.Subcommands { + parsed.Subcommands = append(parsed.Subcommands, commandToCompletions(name, subCmd)) + } + sort.Slice(parsed.Subcommands, func(i, j int) bool { + return parsed.Subcommands[i].Name < parsed.Subcommands[j].Name + }) + + for _, opt := range cmd.Options { + if opt.Type() == cmds.Bool { + parsed.LongFlags = append(parsed.LongFlags, opt.Name()) + for _, name := range opt.Names() { + if len(name) == 1 { + parsed.ShortFlags = append(parsed.ShortFlags, name) + break + } + } + } else { + parsed.LongOptions = append(parsed.LongOptions, opt.Name()) + for _, name := range opt.Names() { + if len(name) == 1 { + parsed.ShortOptions = append(parsed.ShortOptions, name) + break + } + } + } + } + sort.Slice(parsed.LongFlags, func(i, j int) bool { + return parsed.LongFlags[i] < parsed.LongFlags[j] + }) + sort.Slice(parsed.ShortFlags, func(i, j int) bool { + return parsed.ShortFlags[i] < parsed.ShortFlags[j] + }) + sort.Slice(parsed.LongOptions, func(i, j int) bool { + return parsed.LongOptions[i] < parsed.LongOptions[j] + }) + sort.Slice(parsed.ShortOptions, func(i, j int) bool { + return parsed.ShortOptions[i] < parsed.ShortOptions[j] + }) + return parsed +} + +var bashCompletionTemplate *template.Template + +func init() { + commandTemplate := template.Must(template.New("command").Parse(` +while [[ ${index} -lt ${COMP_CWORD} ]]; do + case "${COMP_WORDS[index]}" in + -*) + let index++ + continue + ;; + {{ range .Subcommands }} + "{{ .Name }}") + let index++ + {{ template "command" . }} + return 0 + ;; + {{ end }} + esac + break +done + +if [[ "${word}" == -* ]]; then +{{ if .ShortFlags -}} + _ipfs_compgen -W $'{{ range .ShortFlags }}-{{.}} \n{{end}}' -- "${word}" +{{ end -}} +{{- if .ShortOptions -}} + _ipfs_compgen -S = -W $'{{ range .ShortOptions }}-{{.}}\n{{end}}' -- "${word}" +{{ end -}} +{{- if .LongFlags -}} + _ipfs_compgen -W $'{{ range .LongFlags }}--{{.}} \n{{end}}' -- "${word}" +{{ end -}} +{{- if .LongOptions -}} + _ipfs_compgen -S = -W $'{{ range .LongOptions }}--{{.}}\n{{end}}' -- "${word}" +{{ end -}} + return 0 +fi + +while [[ ${index} -lt ${COMP_CWORD} ]]; do + if [[ "${COMP_WORDS[index]}" != -* ]]; then + let argidx++ + fi + let index++ +done + +{{- if .Subcommands }} +if [[ "${argidx}" -eq 0 ]]; then + _ipfs_compgen -W $'{{ range .Subcommands }}{{.Name}} \n{{end}}' -- "${word}" +fi +{{ end -}} +`)) + + bashCompletionTemplate = template.Must(commandTemplate.New("root").Parse(`#!/bin/bash + +_ipfs_compgen() { + local oldifs="$IFS" + IFS=$'\n' + while read -r line; do + COMPREPLY+=("$line") + done < <(compgen "$@") + IFS="$oldifs" +} + +_ipfs() { + COMPREPLY=() + local index=1 + local argidx=0 + local word="${COMP_WORDS[COMP_CWORD]}" + {{ template "command" . }} +} +complete -o nosort -o nospace -o default -F _ipfs ipfs +`)) +} + +// writeBashCompletions generates a bash completion script for the given command tree. +func writeBashCompletions(cmd *cmds.Command, out io.Writer) error { + cmds := commandToCompletions("ipfs", cmd) + return bashCompletionTemplate.Execute(out, cmds) +} diff --git a/core/commands/diag.go b/core/commands/diag.go index d7ddb6dfd..89b46381f 100644 --- a/core/commands/diag.go +++ b/core/commands/diag.go @@ -10,7 +10,8 @@ var DiagCmd = &cmds.Command{ }, Subcommands: map[string]*cmds.Command{ - "sys": sysDiagCmd, - "cmds": ActiveReqsCmd, + "sys": sysDiagCmd, + "cmds": ActiveReqsCmd, + "profile": sysProfileCmd, }, } diff --git a/core/commands/get.go b/core/commands/get.go index 7087c71ca..7fb53467f 100644 --- a/core/commands/get.go +++ b/core/commands/get.go @@ -18,7 +18,7 @@ import ( cmds "github.com/ipfs/go-ipfs-cmds" files "github.com/ipfs/go-ipfs-files" "github.com/ipfs/interface-go-ipfs-core/path" - "github.com/whyrusleeping/tar-utils" + "github.com/ipfs/tar-utils" ) var ErrInvalidCompressionLevel = errors.New("compression level must be between 1 and 9") diff --git a/core/commands/pin/remotepin.go b/core/commands/pin/remotepin.go index cd5e0c428..6548f29c3 100644 --- a/core/commands/pin/remotepin.go +++ b/core/commands/pin/remotepin.go @@ -167,13 +167,19 @@ NOTE: a comma-separated notation is supported in CLI for convenience: } // Prepare Pin.origins - // Add own multiaddrs to the 'origins' array, so Pinning Service can - // use that as a hint and connect back to us (if possible) + // If CID in blockstore, add own multiaddrs to the 'origins' array + // so pinning service can use that as a hint and connect back to us. node, err := cmdenv.GetNode(env) if err != nil { return err } - if node.PeerHost != nil { + + isInBlockstore, err := node.Blockstore.Has(rp.Cid()) + if err != nil { + return err + } + + if isInBlockstore && node.PeerHost != nil { addrs, err := peer.AddrInfoToP2pAddrs(host.InfoFromHost(node.PeerHost)) if err != nil { return err diff --git a/core/commands/profile.go b/core/commands/profile.go new file mode 100644 index 000000000..46c3ee19b --- /dev/null +++ b/core/commands/profile.go @@ -0,0 +1,237 @@ +package commands + +import ( + "archive/zip" + "context" + "encoding/json" + "fmt" + "io" + "os" + "runtime" + "runtime/pprof" + "strings" + "time" + + cmds "github.com/ipfs/go-ipfs-cmds" + "github.com/ipfs/go-ipfs/core/commands/e" +) + +// time format that works in filenames on windows. +var timeFormat = strings.ReplaceAll(time.RFC3339, ":", "_") + +type profileResult struct { + File string +} + +const cpuProfileTimeOption = "cpu-profile-time" + +var sysProfileCmd = &cmds.Command{ + Helptext: cmds.HelpText{ + Tagline: "Collect a performance profile for debugging.", + ShortDescription: ` +Collects cpu, heap, and goroutine profiles from a running go-ipfs daemon +into a single zip file. To aid in debugging, this command also attempts to +include a copy of the running go-ipfs binary. +`, + LongDescription: ` +Collects cpu, heap, and goroutine profiles from a running go-ipfs daemon +into a single zipfile. To aid in debugging, this command also attempts to +include a copy of the running go-ipfs binary. + +Profile's can be examined using 'go tool pprof', some tips can be found at +https://github.com/ipfs/go-ipfs/blob/master/docs/debug-guide.md. + +Privacy Notice: + +The output file includes: + +- A list of running goroutines. +- A CPU profile. +- A heap profile. +- Your copy of go-ipfs. +- The output of 'ipfs version --all'. + +It does not include: + +- Any of your IPFS data or metadata. +- Your config or private key. +- Your IP address. +- The contents of your computer's memory, filesystem, etc. + +However, it could reveal: + +- Your build path, if you built go-ipfs yourself. +- If and how a command/feature is being used (inferred from running functions). +- Memory offsets of various data structures. +- Any modifications you've made to go-ipfs. +`, + }, + NoLocal: true, + Options: []cmds.Option{ + cmds.StringOption(outputOptionName, "o", "The path where the output should be stored."), + cmds.StringOption(cpuProfileTimeOption, "The amount of time spent profiling CPU usage.").WithDefault("30s"), + }, + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { + cpuProfileTimeStr, _ := req.Options[cpuProfileTimeOption].(string) + cpuProfileTime, err := time.ParseDuration(cpuProfileTimeStr) + if err != nil { + return fmt.Errorf("failed to parse CPU profile duration %q: %w", cpuProfileTimeStr, err) + } + + r, w := io.Pipe() + go func() { + _ = w.CloseWithError(writeProfiles(req.Context, cpuProfileTime, w)) + }() + return res.Emit(r) + }, + PostRun: cmds.PostRunMap{ + cmds.CLI: func(res cmds.Response, re cmds.ResponseEmitter) error { + v, err := res.Next() + if err != nil { + return err + } + + outReader, ok := v.(io.Reader) + if !ok { + return e.New(e.TypeErr(outReader, v)) + } + + outPath, _ := res.Request().Options[outputOptionName].(string) + if outPath == "" { + outPath = "ipfs-profile-" + time.Now().Format(timeFormat) + ".zip" + } + fi, err := os.Create(outPath) + if err != nil { + return err + } + defer fi.Close() + + _, err = io.Copy(fi, outReader) + if err != nil { + return err + } + return re.Emit(&profileResult{File: outPath}) + }, + }, + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *profileResult) error { + fmt.Fprintf(w, "Wrote profiles to: %s\n", out.File) + return nil + }), + }, +} + +func writeProfiles(ctx context.Context, cpuProfileTime time.Duration, w io.Writer) error { + archive := zip.NewWriter(w) + + // Take some profiles. + type profile struct { + name string + file string + debug int + } + + profiles := []profile{{ + name: "goroutine", + file: "goroutines.stacks", + debug: 2, + }, { + name: "goroutine", + file: "goroutines.pprof", + }, { + name: "heap", + file: "heap.pprof", + }} + + for _, profile := range profiles { + prof := pprof.Lookup(profile.name) + out, err := archive.Create(profile.file) + if err != nil { + return err + } + err = prof.WriteTo(out, profile.debug) + if err != nil { + return err + } + } + + // Take a CPU profile. + if cpuProfileTime != 0 { + out, err := archive.Create("cpu.pprof") + if err != nil { + return err + } + + err = writeCPUProfile(ctx, cpuProfileTime, out) + if err != nil { + return err + } + } + + // Collect version info + // I'd use diag sysinfo, but that includes some more sensitive information + // (GOPATH, etc.). + { + out, err := archive.Create("version.json") + if err != nil { + return err + } + + err = json.NewEncoder(out).Encode(getVersionInfo()) + if err != nil { + return err + } + } + + // Collect binary + if fi, err := openIPFSBinary(); err == nil { + fname := "ipfs" + if runtime.GOOS == "windows" { + fname += ".exe" + } + + out, err := archive.Create(fname) + if err != nil { + return err + } + + _, err = io.Copy(out, fi) + _ = fi.Close() + if err != nil { + return err + } + } + return archive.Close() +} + +func writeCPUProfile(ctx context.Context, d time.Duration, w io.Writer) error { + if err := pprof.StartCPUProfile(w); err != nil { + return err + } + defer pprof.StopCPUProfile() + + timer := time.NewTimer(d) + defer timer.Stop() + + select { + case <-timer.C: + case <-ctx.Done(): + return ctx.Err() + } + return nil +} + +func openIPFSBinary() (*os.File, error) { + if runtime.GOOS == "linux" { + pid := os.Getpid() + fi, err := os.Open(fmt.Sprintf("/proc/%d/exe", pid)) + if err == nil { + return fi, nil + } + } + path, err := os.Executable() + if err != nil { + return nil, err + } + return os.Open(path) +} diff --git a/core/commands/stat_provide.go b/core/commands/stat_provide.go index ac02c344c..4224efcaf 100644 --- a/core/commands/stat_provide.go +++ b/core/commands/stat_provide.go @@ -2,7 +2,11 @@ package commands import ( "fmt" + "io" + "text/tabwriter" + "time" + humanize "github.com/dustin/go-humanize" cmds "github.com/ipfs/go-ipfs-cmds" "github.com/ipfs/go-ipfs/core/commands/cmdenv" @@ -46,6 +50,40 @@ This interface is not stable and may change from release to release. return nil }, - Encoders: cmds.EncoderMap{}, - Type: batched.BatchedProviderStats{}, + Encoders: cmds.EncoderMap{ + cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, s *batched.BatchedProviderStats) error { + wtr := tabwriter.NewWriter(w, 1, 2, 1, ' ', 0) + defer wtr.Flush() + + fmt.Fprintf(wtr, "TotalProvides:\t%s\n", humanNumber(s.TotalProvides)) + fmt.Fprintf(wtr, "AvgProvideDuration:\t%s\n", humanDuration(s.AvgProvideDuration)) + fmt.Fprintf(wtr, "LastReprovideDuration:\t%s\n", humanDuration(s.LastReprovideDuration)) + fmt.Fprintf(wtr, "LastReprovideBatchSize:\t%s\n", humanNumber(s.LastReprovideBatchSize)) + return nil + }), + }, + Type: batched.BatchedProviderStats{}, +} + +func humanDuration(val time.Duration) string { + return val.Truncate(time.Microsecond).String() +} + +func humanNumber(n int) string { + nf := float64(n) + str := humanSI(nf, 0) + fullStr := humanFull(nf, 0) + if str != fullStr { + return fmt.Sprintf("%s\t(%s)", str, fullStr) + } + return str +} + +func humanSI(val float64, decimals int) string { + v, unit := humanize.ComputeSI(val) + return fmt.Sprintf("%s%s", humanFull(v, decimals), unit) +} + +func humanFull(val float64, decimals int) string { + return humanize.CommafWithDigits(val, decimals) } diff --git a/core/commands/sysdiag.go b/core/commands/sysdiag.go index 050b61c13..9ab2578b2 100644 --- a/core/commands/sysdiag.go +++ b/core/commands/sysdiag.go @@ -6,6 +6,7 @@ import ( "runtime" version "github.com/ipfs/go-ipfs" + "github.com/ipfs/go-ipfs/core" cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" cmds "github.com/ipfs/go-ipfs-cmds" @@ -21,42 +22,51 @@ Prints out information about your computer to aid in easier debugging. `, }, Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { - info := make(map[string]interface{}) - err := runtimeInfo(info) - if err != nil { - return err - } - - err = envVarInfo(info) - if err != nil { - return err - } - - err = diskSpaceInfo(info) - if err != nil { - return err - } - - err = memInfo(info) - if err != nil { - return err - } nd, err := cmdenv.GetNode(env) if err != nil { return err } - err = netInfo(nd.IsOnline, info) + info, err := getInfo(nd) if err != nil { return err } - - info["ipfs_version"] = version.CurrentVersionNumber - info["ipfs_commit"] = version.CurrentCommit return cmds.EmitOnce(res, info) }, } +func getInfo(nd *core.IpfsNode) (map[string]interface{}, error) { + info := make(map[string]interface{}) + err := runtimeInfo(info) + if err != nil { + return nil, err + } + + err = envVarInfo(info) + if err != nil { + return nil, err + } + + err = diskSpaceInfo(info) + if err != nil { + return nil, err + } + + err = memInfo(info) + if err != nil { + return nil, err + } + + err = netInfo(nd.IsOnline, info) + if err != nil { + return nil, err + } + + info["ipfs_version"] = version.CurrentVersionNumber + info["ipfs_commit"] = version.CurrentCommit + return info, nil +} + func runtimeInfo(out map[string]interface{}) error { rt := make(map[string]interface{}) rt["os"] = runtime.GOOS diff --git a/core/commands/version.go b/core/commands/version.go index a36935452..ecdda594b 100644 --- a/core/commands/version.go +++ b/core/commands/version.go @@ -28,6 +28,16 @@ const ( versionAllOptionName = "all" ) +func getVersionInfo() *VersionOutput { + return &VersionOutput{ + Version: version.CurrentVersionNumber, + Commit: version.CurrentCommit, + Repo: fmt.Sprint(fsrepo.RepoVersion), + System: runtime.GOARCH + "/" + runtime.GOOS, //TODO: Precise version here + Golang: runtime.Version(), + } +} + var VersionCmd = &cmds.Command{ Helptext: cmds.HelpText{ Tagline: "Show IPFS version information.", @@ -46,13 +56,7 @@ var VersionCmd = &cmds.Command{ // must be permitted to run before init Extra: CreateCmdExtras(SetDoesNotUseRepo(true), SetDoesNotUseConfigAsInput(true)), Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { - return cmds.EmitOnce(res, &VersionOutput{ - Version: version.CurrentVersionNumber, - Commit: version.CurrentCommit, - Repo: fmt.Sprint(fsrepo.RepoVersion), - System: runtime.GOARCH + "/" + runtime.GOOS, //TODO: Precise version here - Golang: runtime.Version(), - }) + return cmds.EmitOnce(res, getVersionInfo()) }, Encoders: cmds.EncoderMap{ cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, version *VersionOutput) error { diff --git a/core/corehttp/webui.go b/core/corehttp/webui.go index 6191119ca..298163e3a 100644 --- a/core/corehttp/webui.go +++ b/core/corehttp/webui.go @@ -1,11 +1,12 @@ package corehttp // TODO: move to IPNS -const WebUIPath = "/ipfs/bafybeifuexpvt6g4bkbmsrlb7rnudskfakn6vdrtoja4ml4zbxne2hu6bq" // v2.12.2 +const WebUIPath = "/ipfs/bafybeiflkjt66aetfgcrgvv75izymd5kc47g6luepqmfq6zsf5w6ueth6y" // v2.12.4 // this is a list of all past webUI paths. var WebUIPaths = []string{ WebUIPath, + "/ipfs/bafybeid26vjplsejg7t3nrh7mxmiaaxriebbm4xxrxxdunlk7o337m5sqq", "/ipfs/bafybeif4zkmu7qdhkpf3pnhwxipylqleof7rl6ojbe7mq3fzogz6m4xk3i", "/ipfs/bafybeianwe4vy7sprht5sm3hshvxjeqhwcmvbzq73u55sdhqngmohkjgs4", "/ipfs/bafybeicitin4p7ggmyjaubqpi3xwnagrwarsy6hiihraafk5rcrxqxju6m", diff --git a/core/node/core.go b/core/node/core.go index cb757d819..48e37d600 100644 --- a/core/node/core.go +++ b/core/node/core.go @@ -3,7 +3,6 @@ package node import ( "context" "fmt" - "time" "github.com/ipfs/go-bitswap" "github.com/ipfs/go-bitswap/network" @@ -11,11 +10,11 @@ import ( "github.com/ipfs/go-cid" "github.com/ipfs/go-datastore" "github.com/ipfs/go-filestore" - "github.com/ipfs/go-ipfs-blockstore" - "github.com/ipfs/go-ipfs-exchange-interface" - "github.com/ipfs/go-ipfs-pinner" + blockstore "github.com/ipfs/go-ipfs-blockstore" + exchange "github.com/ipfs/go-ipfs-exchange-interface" + pin "github.com/ipfs/go-ipfs-pinner" "github.com/ipfs/go-ipfs-pinner/dspinner" - "github.com/ipfs/go-ipld-format" + format "github.com/ipfs/go-ipld-format" "github.com/ipfs/go-merkledag" "github.com/ipfs/go-mfs" "github.com/ipfs/go-unixfs" @@ -52,8 +51,7 @@ func Pinning(bstore blockstore.Blockstore, ds format.DAGService, repo repo.Repo) } syncDs := &syncDagService{ds, syncFn} - ctx, cancel := context.WithTimeout(context.TODO(), 2*time.Minute) - defer cancel() + ctx := context.TODO() pinning, err := dspinner.New(ctx, rootDS, syncDs) if err != nil { diff --git a/docs/PATCH_RELEASE_TEMPLATE.md b/docs/PATCH_RELEASE_TEMPLATE.md new file mode 100644 index 000000000..cd2a1819d --- /dev/null +++ b/docs/PATCH_RELEASE_TEMPLATE.md @@ -0,0 +1,27 @@ +# Patch Release Checklist + +This process handles patch releases from version `vX.Y.Z` to `vX.Y.Z+1` assuming that `vX.Y.Z` is the latest released version of go-ipfs. + +- [ ] Fork a new branch (`release-vX.Y.Z`) from `release` and cherry-pick the relevant commits from master (or custom fixes) onto this branch +- [ ] Make a minimal changelog update tracking the relevant fixes to CHANGELOG. +- [ ] version string in `version.go` has been updated (in the `release-vX.Y.Z+1` branch). +- [ ] Make a PR merging `release-vX.Y.Z+1` into the release branch +- [ ] tag the merge commit in the `release` branch with `vX.Y.Z+1` +- [ ] upload to dist.ipfs.io + 1. Build: https://github.com/ipfs/distributions#usage. + 2. Pin the resulting release. + 3. Make a PR against ipfs/distributions with the updated versions, including the new hash in the PR comment. + 4. Ask the infra team to update the DNSLink record for dist.ipfs.io to point to the new distribution. +- [ ] cut a release on [github](https://github.com/ipfs/go-ipfs/releases) and upload the result of the ipfs/distributions build in the previous step. +- Announce the Release: + - [ ] On IRC/Matrix (both #ipfs and #ipfs-dev) + - [ ] On discuss.ipfs.io +- [ ] Release published + - [ ] to [dist.ipfs.io](https://dist.ipfs.io) + - [ ] to [npm-go-ipfs](https://github.com/ipfs/npm-go-ipfs) + - [ ] to [chocolatey](https://chocolatey.org/packages/ipfs) + - [ ] to [snap](https://snapcraft.io/ipfs) + - [ ] to [github](https://github.com/ipfs/go-ipfs/releases) + - [ ] to [arch](https://www.archlinux.org/packages/community/x86_64/go-ipfs/) (flag it out of date) +- [ ] Cut a new ipfs-desktop release +- [ ] Merge the `release` branch back into `master`, ignoring the changes to `version.go` (keep the `-dev` version from master). diff --git a/docs/command-completion.md b/docs/command-completion.md index 73394d41a..5ca1edd16 100644 --- a/docs/command-completion.md +++ b/docs/command-completion.md @@ -1,29 +1,13 @@ -Command Completion -================== +# Command Completion -Shell command completion is provided by the script at -[/misc/completion/ipfs-completion.bash](../misc/completion/ipfs-completion.bash). +Shell command completions can be generated by running one of the `ipfs commands completions` +sub-commands. +The simplest way to "eval" the completions logic: -Installation ------------- -The simplest way to see it working is to run -`source misc/completion/ipfs-completion.bash` straight from your shell. This -is only temporary and to fully enable it, you'll have to follow one of the steps -below. - -### Bash on Linux -For bash, completion can be enabled in a couple of ways. One is to copy the -completion script to the directory `~/.ipfs/` and then in the file -`~/.bash_completion` add ```bash -source ~/.ipfs/ipfs-completion.bash +> eval "$(ipfs commands completion bash)" ``` -It will automatically be loaded the next time bash is loaded. -To enable ipfs command completion globally on your system you may also -copy the completion script to `/etc/bash_completion.d/`. - -Additional References ---------------------- -* https://www.debian-administration.org/article/316/An_introduction_to_bash_completion_part_1 +To install the completions permanently, they can be moved to +`/etc/bash_completion.d` or sourced from your `~/.bashrc` file. diff --git a/docs/config.md b/docs/config.md index 87a2ea14c..57076fb54 100644 --- a/docs/config.md +++ b/docs/config.md @@ -8,7 +8,7 @@ config file at runtime. ## Profiles Configuration profiles allow to tweak configuration quickly. Profiles can be -applied with `--profile` flag to `ipfs init` or with the `ipfs config profile +applied with the `--profile` flag to `ipfs init` or with the `ipfs config profile apply` command. When a profile is applied a backup of the configuration file will be created in `$IPFS_PATH`. @@ -22,7 +22,7 @@ documented in `ipfs config profile --help`. - `randomports` - Use a random port number for swarm. + Use a random port number for the incoming swarm connections. - `default-datastore` @@ -34,8 +34,8 @@ documented in `ipfs config profile --help`. - `local-discovery` - Sets default values to fields affected by the server - profile, enables discovery in local networks. + Enables local discovery (enabled by default). Useful to re-enable local discovery after it's + disabled by another profile (e.g., the server profile). - `test` @@ -56,7 +56,7 @@ documented in `ipfs config profile --help`. - You need a very simple and very reliable datastore and you trust your filesystem. This datastore stores each block as a separate file in the - underlying filesystem so it's unlikely to loose data unless there's an issue + underlying filesystem so it's unlikely to lose data unless there's an issue with the underlying file system. - You need to run garbage collection on a small (<= 10GiB) datastore. The default datastore, badger, can leave several gigabytes of data behind when @@ -258,7 +258,7 @@ Type: `strings` (multiaddrs) ### `Addresses.Swarm` -Array of multiaddrs describing which addresses to listen on for p2p swarm +An array of multiaddrs describing which addresses to listen on for p2p swarm connections. Supported Transports: @@ -289,7 +289,7 @@ Default: `[]` Type: `array[string]` (multiaddrs) ### `Addresses.NoAnnounce` -Array of swarm addresses not to announce to the network. +An array of swarm addresses not to announce to the network. Default: `[]` @@ -363,8 +363,7 @@ Type: `duration` (when `0`/unset, the default value is used) ## `Bootstrap` -Bootstrap is an array of multiaddrs of trusted nodes to connect to in order to -initiate a connection to the network. +Bootstrap is an array of multiaddrs of trusted nodes that your node connects to, to fetch other nodes of the network on startup. Default: The ipfs.io bootstrap nodes @@ -405,7 +404,7 @@ Type: `duration` (an empty string means the default value) ### `Datastore.HashOnRead` -A boolean value. If set to true, all block reads from disk will be hashed and +A boolean value. If set to true, all block reads from the disk will be hashed and verified. This will cause increased CPU utilization. Default: `false` @@ -416,13 +415,13 @@ Type: `bool` A number representing the size in bytes of the blockstore's [bloom filter](https://en.wikipedia.org/wiki/Bloom_filter). A value of zero represents -the feature being disabled. +the feature is disabled. This site generates useful graphs for various bloom filter values: You may use it to find a preferred optimal value, where `m` is `BloomFilterSize` in bits. Remember to convert the value `m` from bits, into bytes for use as `BloomFilterSize` in the -config file. For example, for 1,000,000 blocks, expecting a 1% false positive +config file. For example, for 1,000,000 blocks, expecting a 1% false-positive rate, you'd end up with a filter size of 9592955 bits, so for `BloomFilterSize` 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) @@ -496,7 +495,7 @@ Type: `bool` #### `Discovery.MDNS.Interval` -A number of seconds to wait between discovery checks. +The number of seconds between discovery checks. Default: `5` @@ -518,8 +517,8 @@ Type: `bool` ### `Gateway.NoDNSLink` A boolean to configure whether DNSLink lookup for value in `Host` HTTP header -should be performed. If DNSLink is present, content path stored in the DNS TXT -record becomes the `/` and respective payload is returned to the client. +should be performed. If DNSLink is present, the content path stored in the DNS TXT +record becomes the `/` and the respective payload is returned to the client. Default: `false` @@ -567,7 +566,7 @@ Type: `bool` **DEPRECATED:** see [go-ipfs#7702](https://github.com/ipfs/go-ipfs/issues/7702)