From 3e104db9af14bed5785d200d57f13f6b16feeef1 Mon Sep 17 00:00:00 2001 From: galargh Date: Thu, 10 Nov 2022 14:03:10 +0100 Subject: [PATCH 01/35] docs: update header in release issue template --- docs/RELEASE_ISSUE_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/RELEASE_ISSUE_TEMPLATE.md b/docs/RELEASE_ISSUE_TEMPLATE.md index 9edf679c1305..cd4048b6be5e 100644 --- a/docs/RELEASE_ISSUE_TEMPLATE.md +++ b/docs/RELEASE_ISSUE_TEMPLATE.md @@ -1,4 +1,4 @@ - + > Release Issue Template. If doing a patch release, see [here](https://github.com/ipfs/kubo/blob/master/docs/PATCH_RELEASE_TEMPLATE.md) From 89ffd1cb6782e549b2c2ba4b71aa14ebf61d775c Mon Sep 17 00:00:00 2001 From: galargh Date: Thu, 10 Nov 2022 17:17:14 +0100 Subject: [PATCH 02/35] chore: bump version to v0.17.0-rc1 --- version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.go b/version.go index 7639d27dae88..d03126e547c7 100644 --- a/version.go +++ b/version.go @@ -11,7 +11,7 @@ import ( var CurrentCommit string // CurrentVersionNumber is the current application's version literal -const CurrentVersionNumber = "0.17.0-dev" +const CurrentVersionNumber = "0.17.0-rc1" const ApiVersion = "/kubo/" + CurrentVersionNumber + "/" //nolint From 9fafe50faee6f375bad12461996d92f0dd9c34f8 Mon Sep 17 00:00:00 2001 From: Steve Loeppky Date: Thu, 10 Nov 2022 15:28:45 -0800 Subject: [PATCH 03/35] Update RELEASE_ISSUE_TEMPLATE.md Making some changes that am seeing so far. Some of these changes are so I can leave PR comments. --- docs/RELEASE_ISSUE_TEMPLATE.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/RELEASE_ISSUE_TEMPLATE.md b/docs/RELEASE_ISSUE_TEMPLATE.md index cd4048b6be5e..7836f537dc73 100644 --- a/docs/RELEASE_ISSUE_TEMPLATE.md +++ b/docs/RELEASE_ISSUE_TEMPLATE.md @@ -14,7 +14,7 @@ * Release reviewer: @who * Expected RC date: week of YYYY-MM-DD * 🚢 Expected final release date: YYYY-MM-DD -* Accompanying PR for improving the release process: (example: https://github.com/ipfs/kubo/pull/9100) +* Accompanying PR for improving the release process: (example: https://github.com/ipfs/kubo/pull/9391) See the [Kubo release process](https://pl-strflt.notion.site/Kubo-Release-Process-5a5d066264704009a28a79cff93062c4) for more info. @@ -41,11 +41,13 @@ As usual, this release includes important fixes, some of which may be critical f Checklist: - [ ] **Stage 0 - Prerequisites** - - [ ] Open an issue against [bifrost-infra](https://github.com/protocol/bifrost-infra) ahead of the release ([example](https://github.com/protocol/bifrost-infra/issues/2109)). + - [ ] Open an issue against [bifrost-infra](https://github.com/protocol/bifrost-infra) ahead of the release ([example](https://github.com/protocol/bifrost-infra/issues/2109)). **Idealy, do this multiple days in advance of the RC** to give Bifrost the heads up that asks will be coming their way. - [ ] Spell out all that we want updated - gateways, the bootstraper and the cluster/preload nodes - [ ] Mention @protocol/bifrost-team in the issue and let them know the expected date of the release + * Issue link: - [ ] Ensure that the `What's left for release` section has all the checkboxes checked. If that's not the case, discuss the open items with Kubo maintainers and update the release schedule accordingly. - - [ ] Create `docs-release-vX.Y.Z` branch, open a draft PR and keep updating `docs/RELEASE_ISSUE_TEMPLATE.md` on that branch as you go. + - [ ] Create `docs-release-vX.Y.Z` branch, open a draft PR and keep updating `docs/RELEASE_ISSUE_TEMPLATE.md` on that branch as you go ([example](https://github.com/ipfs/kubo/pull/9391)). + - [ ] Link it in the "Meta" section above. - [ ] Ensure you have a [GPG key generated](https://docs.github.com/en/authentication/managing-commit-signature-verification/generating-a-new-gpg-key) and [added to your GitHub account](https://docs.github.com/en/authentication/managing-commit-signature-verification/adding-a-gpg-key-to-your-github-account). This will enable you to created signed tags. - [ ] Ensure you have [admin access](https://discuss.ipfs.tech/g/admins) to [IPFS Discourse](https://discuss.ipfs.tech/). Admin access is required to globally pin posts and create banners. @2color might be able to assist you. - [ ] Access to [#bifrost](https://filecoinproject.slack.com/archives/C03MMMF606T) channel in FIL Slack might come in handy. Ask the release reviewer to invite you over. @@ -54,11 +56,12 @@ Checklist: - [ ] You're also going to need NPM installed on your system. See [here](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) for instructions. - [ ] Prepare changelog proposal in [docs/changelogs/vX.Y.md](https://github.com/ipfs/kubo/blob/master/docs/changelogs/). - Skip filling out the `### Changelog` section (the one where which lists all the commits and contributors) for now. We will populate it after the release branch is cut. + - PR link: - [ ] Install ZSH ([instructions](https://github.com/ohmyzsh/ohmyzsh/wiki/Installing-ZSH#install-and-set-up-zsh-as-default)). It is needed by the changelog creation script. - [ ] Ensure you have `kubo` checked out under `$(go env GOPATH)/src/github.com/ipfs/kubo`. This is required by the changelog creation script. - If you want your clone to live in a different location, you can symlink it to the expected location by running `mkdir -p $(go env GOPATH)/src/github.com/ipfs && ln -s $(pwd) $(go env GOPATH)/src/github.com/ipfs/kubo`. - [ ] Ensure that [README.md](https://github.com/ipfs/go-ipfs/tree/master/README.md) is up to date. -- [ ] **Stage 1 - Initial Preparations** +- [ ] **Stage 1 - Initial Preparations** - [ ] Upgrade to the latest patch release of Go that CircleCI has published (currently used version: `1.19.1`) - [ ] See the list here: https://hub.docker.com/r/cimg/go/tags - [ ] [ipfs/distributions](https://github.com/ipfs/distributions): bump [this version](https://github.com/ipfs/distributions/blob/master/.tool-versions#L2) @@ -108,7 +111,7 @@ Checklist: - [ ] IPFS Discord #ipfs-chatter - [ ] FIL Slack #ipfs-chatter - [ ] Matrix https://matrix.to/#/#ipfs-chatter:ipfs.io - - [ ] Mention [early testers](https://github.com/ipfs/go-ipfs/tree/master/docs/EARLY_TESTERS.md) in the comment under the release issue ([example](https://github.com/ipfs/kubo/issues/9237#issuecomment-1258072509)). + - [ ] Mention [early testers](https://github.com/ipfs/go-ipfs/tree/master/docs/EARLY_TESTERS.md) in the comment under the release issue ([example](https://github.com/ipfs/kubo/issues/9319#issuecomment-1311002478)). - [ ] **Stage 3 - Internal Testing** - [ ] Library Testing. - [ ] [interop](https://github.com/ipfs/interop) @@ -226,7 +229,5 @@ Checklist: Would you like to contribute to the IPFS project and don't know how? Well, there are a few places you can get started: - Check the issues with the `help wanted` label in the [ipfs/kubo repo](https://github.com/ipfs/kubo/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) -- Join an IPFS All Hands, introduce yourself and let us know where you would like to contribute - https://github.com/ipfs/team-mgmt/#weekly-ipfs-all-hands -- Hack with IPFS and show us what you made! The All Hands call is also the perfect venue for demos, join in and show us what you built -- Join the discussion at [discuss.ipfs.io](https://discuss.ipfs.io/) and help users finding their answers. -- Join the [🚀 IPFS Core Implementations Weekly Sync 🛰](https://github.com/ipfs/team-mgmt/issues/992) and be part of the action! +- Join the discussion at [discuss.ipfs.tech](https://discuss.ipfs.tech/) and help users finding their answers. +- See other options at https://docs.ipfs.tech/community/ From 350f58e5817b31a580acc2336d47f7a74db3e217 Mon Sep 17 00:00:00 2001 From: galargh Date: Tue, 15 Nov 2022 13:56:34 +0100 Subject: [PATCH 04/35] docs: add instructions on how to complete RC via CLI --- docs/RELEASE_ISSUE_TEMPLATE.md | 251 +++++++++++++++++++++++++++++++-- 1 file changed, 243 insertions(+), 8 deletions(-) diff --git a/docs/RELEASE_ISSUE_TEMPLATE.md b/docs/RELEASE_ISSUE_TEMPLATE.md index 7836f537dc73..24964d69bc3d 100644 --- a/docs/RELEASE_ISSUE_TEMPLATE.md +++ b/docs/RELEASE_ISSUE_TEMPLATE.md @@ -44,10 +44,47 @@ Checklist: - [ ] Open an issue against [bifrost-infra](https://github.com/protocol/bifrost-infra) ahead of the release ([example](https://github.com/protocol/bifrost-infra/issues/2109)). **Idealy, do this multiple days in advance of the RC** to give Bifrost the heads up that asks will be coming their way. - [ ] Spell out all that we want updated - gateways, the bootstraper and the cluster/preload nodes - [ ] Mention @protocol/bifrost-team in the issue and let them know the expected date of the release - * Issue link: + - Issue link: +
+ # create new issue in protocol/bifrost-infra + gh api \ + --method POST \ + --raw-field "title=Rollout Kubo v0.17.0-RC1" \ + --raw-field "body=## What should be updated + + - [ ] Gateways + - [ ] Bootstrapper + - [ ] Cluster/Preload nodes + + ## When + + YYYY-MM-DD" \ + repos/protocol/bifrost-infra/issues +
- [ ] Ensure that the `What's left for release` section has all the checkboxes checked. If that's not the case, discuss the open items with Kubo maintainers and update the release schedule accordingly. - - [ ] Create `docs-release-vX.Y.Z` branch, open a draft PR and keep updating `docs/RELEASE_ISSUE_TEMPLATE.md` on that branch as you go ([example](https://github.com/ipfs/kubo/pull/9391)). - - [ ] Link it in the "Meta" section above. + - [ ] Create `docs-release-vX.Y.Z` branch, open a draft PR and keep updating `docs/RELEASE_ISSUE_TEMPLATE.md` on that branch as you go. + - [ ] Link it in the "Meta" section above. +
+ # retrieve master ref for ipfs/kubo + gh api /repos/ipfs/kubo/git/ref/heads/master + + # create docs-release-v0.17.0 ref for ipfs/kubo + gh api \ + --method POST \ + /repos/ipfs/kubo/git/refs \ + -f ref='refs/heads/docs-release-v0.17.0' \ + -f sha='254d81a9d5595c3e637c7573d56125836d5f5055' + + # create draft PR from docs-release-v0.17.0 to master for ipfs/kubo + # requires docs-release-v0.17.0 to be modified + gh api \ + --method POST \ + /repos/ipfs/kubo/pulls \ + -f title='docs: release v0.17.0' \ + -f head='docs-release-v0.17.0' \ + -f base='master' \ + -f draft=true +
- [ ] Ensure you have a [GPG key generated](https://docs.github.com/en/authentication/managing-commit-signature-verification/generating-a-new-gpg-key) and [added to your GitHub account](https://docs.github.com/en/authentication/managing-commit-signature-verification/adding-a-gpg-key-to-your-github-account). This will enable you to created signed tags. - [ ] Ensure you have [admin access](https://discuss.ipfs.tech/g/admins) to [IPFS Discourse](https://discuss.ipfs.tech/). Admin access is required to globally pin posts and create banners. @2color might be able to assist you. - [ ] Access to [#bifrost](https://filecoinproject.slack.com/archives/C03MMMF606T) channel in FIL Slack might come in handy. Ask the release reviewer to invite you over. @@ -56,49 +93,247 @@ Checklist: - [ ] You're also going to need NPM installed on your system. See [here](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) for instructions. - [ ] Prepare changelog proposal in [docs/changelogs/vX.Y.md](https://github.com/ipfs/kubo/blob/master/docs/changelogs/). - Skip filling out the `### Changelog` section (the one where which lists all the commits and contributors) for now. We will populate it after the release branch is cut. - - PR link: + - PR link: - [ ] Install ZSH ([instructions](https://github.com/ohmyzsh/ohmyzsh/wiki/Installing-ZSH#install-and-set-up-zsh-as-default)). It is needed by the changelog creation script. - [ ] Ensure you have `kubo` checked out under `$(go env GOPATH)/src/github.com/ipfs/kubo`. This is required by the changelog creation script. - If you want your clone to live in a different location, you can symlink it to the expected location by running `mkdir -p $(go env GOPATH)/src/github.com/ipfs && ln -s $(pwd) $(go env GOPATH)/src/github.com/ipfs/kubo`. - [ ] Ensure that [README.md](https://github.com/ipfs/go-ipfs/tree/master/README.md) is up to date. -- [ ] **Stage 1 - Initial Preparations** +- [ ] **Stage 1 - Initial Preparations** - [ ] Upgrade to the latest patch release of Go that CircleCI has published (currently used version: `1.19.1`) - [ ] See the list here: https://hub.docker.com/r/cimg/go/tags +
+ # retrieve the latest version of cimg/go available + curl -s 'https://hub.docker.com/v2/repositories/cimg/go/tags' | jq -r '.results | map(.name) | map(select(. | test("^[0-9]+\\.[0-9]+\\.[0-9]+$"))) | .[0]' +
- [ ] [ipfs/distributions](https://github.com/ipfs/distributions): bump [this version](https://github.com/ipfs/distributions/blob/master/.tool-versions#L2) +
+ # checkout new branch + git checkout -b bump-go-version + + # replace the cimg/go version in .tool-versions in ipfs/distributions + sed -i 's/golang [0-9]\+\.[0-9]\+\.[0-9]\+/golang 1.19.3/g' .tool-versions + + # commit the change + git add .tool-versions + git commit -m "chore: bump go version to 1.19.3" + + # push the change + git push origin bump-go-version + + # open a PR + gh api /repos/ipfs/distributions/pulls \ + --method POST \ + -f title='chore: bump go version to 1.19.3' \ + -f head='bump-go-version' \ + -f base='master' +
- [ ] [ipfs/kubo](https://github.com/ipfs/kubo): [example PR](https://github.com/ipfs/kubo/pull/8599) - - [ ] [ipfs/ipfs-docs](https://github.com/ipfs/ipfs-docs): [example PR](https://github.com/ipfs/ipfs-docs/pull/1298) +
+ # checkout new branch + git checkout -b bump-go-version + + # replace the cimg/go version in .circleci/main.yml in ipfs/kubo + sed -i 's/cimg\/go:[0-9]\+\.[0-9]\+\.[0-9]\+/cimg\/go:1.19.3/g' .circleci/main.yml + + # replace golang version in Dockerfile + sed -i 's/golang:[0-9]\+\.[0-9]\+\.[0-9]\+/golang:1.19.3/g' Dockerfile + + # commit the change + git add .circleci/main.yml Dockerfile + git commit -m "chore: bump go version to 1.19.3" + + # push the change + git push origin bump-go-version + + # open a PR + gh api /repos/ipfs/kubo/pulls \ + --method POST \ + -f title='chore: bump go version to 1.19.3' \ + -f head='bump-go-version' \ + -f base='master' +
+ - [ ] [ipfs/ipfs-docs](https://github.com/ipfs/ipfs-docs): [example PR](https://github.com/ipfs/ipfs-docs/pull/1298) - only if the major version changed - [ ] Fork a new branch (`release-vX.Y.Z`) from `master`. +
+ # retrieve master ref for ipfs/kubo + gh api /repos/ipfs/kubo/git/ref/heads/master + + # create release-v0.17.0 ref for ipfs/kubo + gh api \ + --method POST \ + /repos/ipfs/kubo/git/refs \ + -f ref='refs/heads/release-v0.17.0' \ + -f sha='a4da8f6cc768c3e2cce9c2677a792b2c237066aa' +
- [ ] Bump the version in `version.go` in the `master` branch to `vX.(Y+1).0-dev` via a PR ([example](https://github.com/ipfs/kubo/pull/9305)). +
+ # checkout new branch + git checkout -b bump-version + + # replace the version in version.go + sed -i 's/const CurrentVersionNumber = "0.17.0-dev"/const CurrentVersionNumber = "0.18.0-dev"/g' version.go + + # commit the change + git add version.go + git commit -m "chore: bump version to v0.18.0-dev" + + # push the change + git push origin bump-version + + # open a PR + gh api /repos/ipfs/kubo/pulls \ + --method POST \ + -f title='chore: bump version to v0.18.0-dev' \ + -f head='bump-version' \ + -f base='master' +
- [ ] **Stage 2 - Release Candidate** - _if any [non-trivial](docs/releases.md#footnotes) changes need to be included in the release, return to this stage_ - [ ] Bump the version in `version.go` in the `release-vX.Y.Z` branch to `vX.Y.Z-rcN`. +
+ # checkout new branch + git checkout -b bump-release-version + + # replace the version in version.go + sed -i 's/const CurrentVersionNumber = "0.17.0-dev"/const CurrentVersionNumber = "0.17.0-rc1"/g' version.go + + # commit the change + git add version.go + git commit -m "chore: bump version to v0.17.0-rc1" + + # push the change + git push origin bump-release-version + + # open a PR + gh api /repos/ipfs/kubo/pulls \ + --method POST \ + -f title='chore: bump version to v0.17.0-rc1' \ + -f head='bump-release-version' \ + -f base='release-v0.17.0' +
- [ ] If applicable, add new commits to the `release-vX.Y.Z` branch from `master` using `git cherry-pick -x ...` - Note: `release-*` branches are protected. You can do all needed updates on a separated branch (e.g. `wip-release-vX.Y.Z`) and when everything is settled push to `release-vX.Y.Z` - [ ] Push the `release-vX.Y.Z` branch to GitHub (`git push origin release-vX.Y.Z`) and create a draft PR targetting `release` branch if it doesn't exist yet ([example](https://github.com/ipfs/kubo/pull/9306)). +
+ # open a PR + gh api /repos/ipfs/kubo/pulls \ + --method POST \ + -f title='wip: release v0.17.0' \ + -f head='release-v0.17.0' \ + -f base='release' \ + -f draft=true +
- [ ] Wait for CI to run and complete PR checks. All checks should pass. - [ ] Create a signed tag for the release candidate. - [ ] This is a dangerous operation, as it is difficult to reverse due to Go modules and automated Docker image publishing. Remember to verify the commands you intend to run for items marked with ⚠️ with the release reviewer. - [ ] ⚠️ Tag HEAD `release-vX.Y.Z` commit with `vX.Y.Z-rcN` (`git tag -s vX.Y.Z-rcN -m 'Pre-release X.Y.Z-rcn'`) - - [ ] Run `git show vX.Y.Z` to ensure the tag is correct. - - [ ] ⚠️ Push the `vX.Y.Z` tag to GitHub (`git push origin vX.Y.Z`; DO NOT USE `git push --tags` because it pushes all your local tags). +
+ # create a signed tag + git tag -s v0.17.0-rc1 -m 'Pre-release 0.17.0-rc1' +
+ - [ ] Run `git show vX.Y.Z-rc1` to ensure the tag is correct. +
+ # show the signed tag + git show v0.17.0-rc1 +
+ - [ ] ⚠️ Push the `vX.Y.Z-rc1` tag to GitHub (`git push origin vX.Y.Z-rc1`; DO NOT USE `git push --tags` because it pushes all your local tags). +
+ # show the signed tag + git push origin v0.17.0-rc1 +
- [ ] Add artifacts to https://dist.ipfs.tech by making a PR against [ipfs/distributions](https://github.com/ipfs/distributions) - [ ] Clone the `ipfs/distributions` repo locally. - [ ] Create a new branch (`kubo-release-vX.Y.Z-rcn`) from `master`. +
+ # checkout new branch + git checkout -b kubo-release-v0.17.0-rc1 +
- [ ] Run `./dist.sh add-version kubo vX.Y.Z-rcN` to add the new version to the `versions` file ([instructions](https://github.com/ipfs/distributions#usage)). - `dist.sh` will print _WARNING: not marking pre-release kubo vX.Y.Z-rc1n as the current version._. +
+ # add new kubo version to dist + ./dist.sh add-version kubo v0.17.0-rc1 +
- [ ] Push the `kubo-release-vX.Y.Z-rcn` branch to GitHub and create a PR from that branch ([example](https://github.com/ipfs/distributions/pull/760)). +
+ # push the change + git push origin kubo-release-v0.17.0-rc1 + + # open a PR + gh api /repos/ipfs/distributions/pulls \ + --method POST \ + -f title='chore: add kubo v0.17.0-rc1' \ + -f head='kubo-release-v0.17.0-rc1' \ + -f base='master' +
- [ ] Ask for a review from the release reviewer. - [ ] Enable auto-merge for the PR. - PR build will build the artifacts and generate a diff in around 30 minutes - PR will be merged automatically once the diff is approved - `master` build will publish the artifacts to https://dist.ipfs.io in around 30 minutes +
+ # get pull id + id=$(gh api --method GET /repos/ipfs/distributions/pulls -f head='kubo-release-v0.17.0-rc1' --jq '.[0].id') + + # enable automerge + gh api graphql -f pull="${id}" -f query='mutation($pull: ID!) { enablePullRequestAutoMerge(input: {pullRequestId: $pull, mergeMethod: SQUASH}) {} }' +
- [ ] Ensure that the artifacts are available at https://dist.ipfs.io +
+ # check if RC is available + curl --retry 5 --no-progress-meter https://dist.ipfs.tech/kubo/versions | grep -q v0.17.0-rc1 + echo $? +
- [ ] Publish the RC to [the NPM package](https://www.npmjs.com/package/go-ipfs?activeTab=versions) by running https://github.com/ipfs/npm-go-ipfs/actions/workflows/main.yml (it happens automatically but it is safe to speed up the process and kick of a run manually) +
+ # dispatch workflow + gh api /repos/ipfs/npm-go-ipfs/actions/workflows/main.yml/dispatches \ + --method POST \ + -f ref='master' + + # get workflow run + gh api /repos/ipfs/npm-go-ipfs/actions/workflows/main.yml/runs \ + --method GET \ + -f per_page='1' \ + --jq '.workflow_runs[0]' + + # get workflow job + gh api /repos/ipfs/npm-go-ipfs/actions/runs/3470515021/jobs \ + --method GET \ + -f per_page='1' \ + --jq '.jobs[0]' + + # check logs for version + gh api /repos/ipfs/npm-go-ipfs/actions/jobs/9499319520/logs \ + --method GET | grep -q '0.17.0-rc1' + echo $? +
- [ ] Cut a pre-release on [GitHub](https://github.com/ipfs/kubo/releases) ([instructions](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release), [example](https://github.com/ipfs/kubo/releases/tag/v0.16.0-rc1)) - Use `vX.Y.Z-rcN` as the tag. - Link to the release issue in the description. - Link to the relevant [changelog](https://github.com/ipfs/kubo/blob/master/docs/changelogs/) in the description. - Check `This is a pre-release`. +
+ # create a pre-release + body='See the related issue: https://github.com/ipfs/kubo/issues/9319 + + And the draft changelog: [docs/changelogs/v0.17.md](https://github.com/ipfs/kubo/blob/release-v0.17.0/docs/changelogs/v0.17.md)' + gh api /repos/ipfs/kubo/releases \ + --method POST \ + -f tag_name='v0.17.0-rc1' \ + -f name='v0.17.0-rc1' \ + -f body="${body}" \ + -F draft=false \ + -F prerelease=true \ + -F generate_release_notes=false \ + -F make_latest=false +
- [ ] Synchronize release artifacts by running [sync-release-assets](https://github.com/ipfs/kubo/actions/workflows/sync-release-assets.yml) workflow. +
+ # dispatch workflow + gh api /repos/ipfs/kubo/actions/workflows/sync-release-assets.yml/dispatches \ + --method POST \ + -f ref='master' +
- [ ] Announce the RC - [ ] Create a new post on [IPFS Discourse](https://discuss.ipfs.tech). ([example](https://discuss.ipfs.tech/t/kubo-v0-16-0-rc1-release-candidate-is-out/15248)) - Use `Kubo vX.Y.Z-rcn Release Candidate is out!` as the title. From 341c2ab460f909e00047bb6c702fc07991deead4 Mon Sep 17 00:00:00 2001 From: galargh Date: Tue, 15 Nov 2022 14:09:15 +0100 Subject: [PATCH 05/35] docs: create a final issue for bifrost (TODO) --- docs/RELEASE_ISSUE_TEMPLATE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/RELEASE_ISSUE_TEMPLATE.md b/docs/RELEASE_ISSUE_TEMPLATE.md index 24964d69bc3d..28b0034819ce 100644 --- a/docs/RELEASE_ISSUE_TEMPLATE.md +++ b/docs/RELEASE_ISSUE_TEMPLATE.md @@ -428,6 +428,7 @@ Checklist: - Copy the relevant [changelog](https://github.com/ipfs/kubo/blob/release/docs/changelogs/) into the release description. - Keep the release notes as trim as possible (e.g. remove top headers where possible, [example](https://github.com/ipfs/kubo/releases/tag/v0.15.0)) - [ ] Synchronize release artifacts by running [sync-release-assets](https://github.com/ipfs/kubo/actions/workflows/sync-release-assets.yml) workflow. + - [ ] TODO: https://github.com/protocol/bifrost-infra/issues/2184#issuecomment-1315279257 - [ ] Announce the release - [ ] Add a link to the release to this release issue as a comment. - [ ] Create a new post on [IPFS Discourse](https://discuss.ipfs.tech). ([example](https://discuss.ipfs.tech/t/kubo-v0-16-0-release-is-out/15286)) From e58cde1789835422a588e91a133904d0a9216f1d Mon Sep 17 00:00:00 2001 From: Antonio Navarro Perez Date: Tue, 15 Nov 2022 17:01:08 +0100 Subject: [PATCH 06/35] docs: Deprecate Reframe on docs. (#9401) --- docs/config.md | 61 +++++++++++--------------------------------------- 1 file changed, 13 insertions(+), 48 deletions(-) diff --git a/docs/config.md b/docs/config.md index af7e7c672e9e..58d62a43322a 100644 --- a/docs/config.md +++ b/docs/config.md @@ -1299,8 +1299,7 @@ Contains options for content, peer, and IPNS routing mechanisms. Map of additional Routers. Allows for extending the default routing (DHT) with alternative Router -implementations, such as custom DHTs and delegated routing based -on the [reframe protocol](https://github.com/ipfs/specs/tree/main/reframe#readme). +implementations. The map key is a name of a Router, and the value is its configuration. @@ -1316,7 +1315,7 @@ It specifies the routing type that will be created. Currently supported types: -- `reframe` (delegated routing based on the [reframe protocol](https://github.com/ipfs/specs/tree/main/reframe#readme)) +- `reframe` **(DEPRECATED)** (delegated routing based on the [reframe protocol](https://github.com/ipfs/specs/tree/main/reframe#readme)) - `dht` - `parallel` and `sequential`: Helpers that can be used to run several routers sequentially or in parallel. @@ -1328,7 +1327,7 @@ Type: `string` Parameters needed to create the specified router. Supported params per router type: -Reframe: +Reframe **(DEPRECATED)**: - `Endpoint` (mandatory): URL that will be used to connect to a specified router. DHT: @@ -1351,21 +1350,6 @@ Sequential: - `IgnoreErrors:bool`: It will specify if that router should be ignored if an error occurred. - `Timeout:duration`: Global timeout. It accepts strings compatible with Go `time.ParseDuration(string)`. -**Examples:** - -To add router provided by _Store the Index_ team at [cid.contact](https://cid.contact): - -```console -$ ipfs config Routing.Routers.CidContact --json '{ - "Type": "reframe", - "Parameters": { - "Endpoint": "https://cid.contact/reframe" - } -}' -``` - -Anyone can create and run their own Reframe endpoint, and experiment with custom routing logic. See [`someguy`](https://github.com/aschmahmann/someguy) example, which proxies requests to BOTH the IPFS Public DHT AND an Indexer node. Protocol Labs provides a public instance at `https://routing.delegate.ipfs.io/reframe`. - Default: `{}` (use the safe implicit defaults) Type: `object[string->string]` @@ -1381,44 +1365,25 @@ Type: `object[string->object]` **Examples:** -To use the previously added `CidContact` reframe router on all methods: - -```console -$ ipfs config Routing.Methods --json '{ - "find-peers": { - "RouterName": "CidContact" - }, - "find-providers": { - "RouterName": "CidContact" - }, - "get-ipns": { - "RouterName": "CidContact" - }, - "provide": { - "RouterName": "CidContact" - }, - "put-ipns": { - "RouterName": "CidContact" - } - }' -``` -Complete example using 3 Routers, reframe, DHT and parallel. +Complete example using 2 Routers, DHT (LAN/WAN) and parallel. ``` $ ipfs config Routing.Type --json '"custom"' -$ ipfs config Routing.Routers.CidContact --json '{ - "Type": "reframe", +$ ipfs config Routing.Routers.WanDHT --json '{ + "Type": "dht", "Parameters": { - "Endpoint": "https://cid.contact/reframe" + "Mode": "auto", + "PublicIPNetwork": true, + "AcceleratedDHTClient": false } }' -$ ipfs config Routing.Routers.WanDHT --json '{ +$ ipfs config Routing.Routers.LanDHT --json '{ "Type": "dht", "Parameters": { "Mode": "auto", - "PublicIPNetwork": true, + "PublicIPNetwork": false, "AcceleratedDHTClient": false } }' @@ -1428,7 +1393,7 @@ $ ipfs config Routing.Routers.ParallelHelper --json '{ "Parameters": { "Routers": [ { - "RouterName" : "CidContact", + "RouterName" : "LanDHT", "IgnoreErrors" : true, "Timeout": "3s" }, @@ -1453,7 +1418,7 @@ ipfs config Routing.Methods --json '{ "RouterName": "ParallelHelper" }, "provide": { - "RouterName": "WanDHT" + "RouterName": "ParallelHelper" }, "put-ipns": { "RouterName": "ParallelHelper" From 7b79f69c78f84e6117f78f1d78ef5be8cdf4a727 Mon Sep 17 00:00:00 2001 From: galargh Date: Tue, 15 Nov 2022 18:18:25 +0100 Subject: [PATCH 07/35] docs: internal testing as code --- docs/RELEASE_ISSUE_TEMPLATE.md | 51 ++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 18 deletions(-) diff --git a/docs/RELEASE_ISSUE_TEMPLATE.md b/docs/RELEASE_ISSUE_TEMPLATE.md index 28b0034819ce..3145f003922a 100644 --- a/docs/RELEASE_ISSUE_TEMPLATE.md +++ b/docs/RELEASE_ISSUE_TEMPLATE.md @@ -348,24 +348,6 @@ Checklist: - [ ] Matrix https://matrix.to/#/#ipfs-chatter:ipfs.io - [ ] Mention [early testers](https://github.com/ipfs/go-ipfs/tree/master/docs/EARLY_TESTERS.md) in the comment under the release issue ([example](https://github.com/ipfs/kubo/issues/9319#issuecomment-1311002478)). - [ ] **Stage 3 - Internal Testing** - - [ ] Library Testing. - - [ ] [interop](https://github.com/ipfs/interop) - - [ ] Clone the `ipfs/interop` repo locally. - - [ ] Create a new branch (`kubo-release-vX.Y.Z-rcn`) from `master`. - - [ ] Update `go-ipfs` version to `vX.Y.Z-rcN` in [package.json](https://github.com/ipfs/interop/blob/master/package.json). - - [ ] Run `npm install` locally - - [ ] Push the `kubo-release-vX.Y.Z-rcn` branch to GitHub and create a draft PR from that branch ([example](https://github.com/ipfs/interop/pull/511)). - - [ ] [go-ipfs-api](https://github.com/ipfs/go-ipfs-api) - - [ ] Create a branch with kubo version pinned in the [test setup action](https://github.com/ipfs/go-ipfs-api/blob/master/.github/actions/go-test-setup/action.yml) ([example](https://github.com/ipfs/go-ipfs-api/commit/d156b808cc3aebafba65a38e5dd6993543a50e82)). - - [ ] Ensure that CI is green. - - [ ] Delete the branch. - - [ ] [go-ipfs-http-client](https://github.com/ipfs/go-ipfs-http-client) - - [ ] Create a branch with kubo version pinned in the [test setup action](https://github.com/ipfs/go-ipfs-http-client/blob/master/.github/actions/go-test-setup/action.yml) ([example](https://github.com/ipfs/go-ipfs-http-client/commit/8a057960d26f1c60fffef09be3b05ec3f2e71bba)). - - [ ] Ensure that CI is green. - - [ ] Delete the branch. - - [ ] [WebUI](https://github.com/ipfs-shipyard/ipfs-webui) - - [ ] Run [CI workflow](https://github.com/ipfs/ipfs-webui/actions/workflows/ci.yml) with `vX.Y.Z-rcN` for the `kubo-version` input. - - [ ] Ensure that CI is green. - [ ] Infrastructure Testing. - [ ] Update the issue against [bifrost-infra](https://github.com/protocol/bifrost-infra) ([example](https://github.com/protocol/bifrost-infra/issues/2109)). - [ ] Mention @protocol/bifrost-team in the issue to let them know the release is ready @@ -380,12 +362,45 @@ Checklist: - [ ] Push to a branch ([example](https://github.com/ipfs/ipfs-desktop/pull/1826/commits/b0a23db31ce942b46d95965ee6fe770fb24d6bde)) - [ ] Open a draft PR to track through the final release ([example](https://github.com/ipfs/ipfs-desktop/pull/1826)) - [ ] Ensure CI tests pass +
+ # checkout new branch + git checkout -b kubo-release-v0.17.0 + + # replace the go-ipfs version in package.json + sed -i 's/"go-ipfs": ".*"/"go-ipfs": "0.17.0-rc1"/' package.json + + # update package-lock.json + npm install + + # commit the change + git add package.json package-lock.json + git commit -m "chore: bump kubo version to v0.17.0-rc1" + + # push the change + git push origin kubo-release-v0.17.0 + + # open a PR + gh api /repos/ipfs/ipfs-desktop/pulls \ + --method POST \ + -f title='chore: bump kubo version to v0.17.0-rc1' \ + -f head='kubo-release-v0.17.0' \ + -f base='main' \ + -f title='chore: bump kubo version to v0.17.0' \ + -F draft=true +
- [ ] [IPFS Companion](https://github.com/ipfs-shipyard/ipfs-companion) - [ ] Start kubo daemon of the version to release. - [ ] Start a fresh chromium or chrome instance using `chromium --user-data-dir=$(mktemp -d)` (macos `/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir=$(mktemp -d)`) - [ ] Start a fresh firefox instance using `firefox --profile $(mktemp -d)` (macos `/Applications/Firefox.app/Contents/MacOS/firefox --profile $(mktemp -d)`) - [ ] Install IPFS Companion from [vendor-specific store](https://github.com/ipfs/ipfs-companion/#readme). - [ ] Check that the comunication between Kubo daemon and IPFS companion is working properly checking if the number of connected peers changes. +
+ curl --retry 5 --no-progress-meter --output kubo.tar.gz https://dist.ipfs.tech/kubo/v0.17.0-rc1/kubo_v0.17.0-rc1_darwin-arm64.tar.gz + tar -xzvf kubo.tar.gz + export IPFS_PATH=$(mktemp -d) + ./kubo/ipfs init + ./kubo/ipfs daemon & +
- [ ] **Stage 5 - Release** - _ONLY FOR FINAL RELEASE_ - [ ] Prepare the `release` branch. - [ ] Bump the version in `version.go` in the `release-vX.Y.Z` branch to `vX.Y.Z`. From fb42b53f58e989fd2897d814cd5edfa52eddcb62 Mon Sep 17 00:00:00 2001 From: Antonio Navarro Perez Date: Tue, 15 Nov 2022 10:36:22 +0100 Subject: [PATCH 08/35] Fix RM errors when acceleratedDHT is active Signed-off-by: Antonio Navarro Perez --- core/node/groups.go | 2 +- core/node/libp2p/rcmgr.go | 6 +++--- core/node/libp2p/rcmgr_defaults.go | 32 ++++++++++++++++++++++++------ 3 files changed, 30 insertions(+), 10 deletions(-) diff --git a/core/node/groups.go b/core/node/groups.go index fca984650d93..6a821becab23 100644 --- a/core/node/groups.go +++ b/core/node/groups.go @@ -147,7 +147,7 @@ func LibP2P(bcfg *BuildCfg, cfg *config.Config) fx.Option { BaseLibP2P, // Services (resource management) - fx.Provide(libp2p.ResourceManager(cfg.Swarm)), + fx.Provide(libp2p.ResourceManager(cfg.Swarm, cfg.Experimental.AcceleratedDHTClient)), fx.Provide(libp2p.AddrFilters(cfg.Swarm.AddrFilters)), fx.Provide(libp2p.AddrsFactory(cfg.Addresses.Announce, cfg.Addresses.AppendAnnounce, cfg.Addresses.NoAnnounce)), fx.Provide(libp2p.SmuxTransport(cfg.Swarm.Transports)), diff --git a/core/node/libp2p/rcmgr.go b/core/node/libp2p/rcmgr.go index 49c9d3823997..0de4fbe64083 100644 --- a/core/node/libp2p/rcmgr.go +++ b/core/node/libp2p/rcmgr.go @@ -29,7 +29,7 @@ const NetLimitTraceFilename = "rcmgr.json.gz" var ErrNoResourceMgr = fmt.Errorf("missing ResourceMgr: make sure the daemon is running with Swarm.ResourceMgr.Enabled") -func ResourceManager(cfg config.SwarmConfig) interface{} { +func ResourceManager(cfg config.SwarmConfig, acceleratedDHT bool) interface{} { return func(mctx helpers.MetricsCtx, lc fx.Lifecycle, repo repo.Repo) (network.ResourceManager, Libp2pOpts, error) { var manager network.ResourceManager var opts Libp2pOpts @@ -52,7 +52,7 @@ func ResourceManager(cfg config.SwarmConfig) interface{} { return nil, opts, fmt.Errorf("opening IPFS_PATH: %w", err) } - limits, err := createDefaultLimitConfig(cfg) + limits, err := createDefaultLimitConfig(cfg, acceleratedDHT) if err != nil { return nil, opts, err } @@ -513,7 +513,7 @@ func NetResetLimit(mgr network.ResourceManager, repo repo.Repo, scope string) (r return result, fmt.Errorf("reading config to reset limit: %w", err) } - defaults, err := createDefaultLimitConfig(cfg.Swarm) + defaults, err := createDefaultLimitConfig(cfg.Swarm, cfg.Experimental.AcceleratedDHTClient) if err != nil { return result, fmt.Errorf("creating default limit config: %w", err) } diff --git a/core/node/libp2p/rcmgr_defaults.go b/core/node/libp2p/rcmgr_defaults.go index 3ff8b55dd265..2c1f3d93a8c7 100644 --- a/core/node/libp2p/rcmgr_defaults.go +++ b/core/node/libp2p/rcmgr_defaults.go @@ -89,7 +89,7 @@ var noLimitIncrease = rcmgr.BaseLimitIncrease{ // maxMemory, maxFD, or maxConns with Swarm.HighWater.ConnMgr. // 3. Power user - They specify all the limits they want set via Swarm.ResourceMgr.Limits // and we don't do any defaults/overrides. We pass that config blindly into libp2p resource manager. -func createDefaultLimitConfig(cfg config.SwarmConfig) (rcmgr.LimitConfig, error) { +func createDefaultLimitConfig(cfg config.SwarmConfig, acceleratedDHT bool) (rcmgr.LimitConfig, error) { maxMemoryDefaultString := humanize.Bytes(uint64(memory.TotalMemory()) / 8) maxMemoryString := cfg.ResourceMgr.MaxMemory.WithDefault(maxMemoryDefaultString) maxMemory, err := humanize.ParseBytes(maxMemoryString) @@ -132,9 +132,29 @@ func createDefaultLimitConfig(cfg config.SwarmConfig) (rcmgr.LimitConfig, error) StreamsOutbound: 0, }, - // Just go with what libp2p does - TransientBaseLimit: rcmgr.DefaultLimits.TransientBaseLimit, - TransientLimitIncrease: rcmgr.DefaultLimits.TransientLimitIncrease, + TransientBaseLimit: rcmgr.BaseLimit{ + Streams: bigEnough, + StreamsInbound: rcmgr.DefaultLimits.TransientBaseLimit.StreamsInbound, + StreamsOutbound: bigEnough, + Conns: bigEnough, + ConnsInbound: rcmgr.DefaultLimits.TransientBaseLimit.ConnsInbound, + ConnsOutbound: bigEnough, + FD: rcmgr.DefaultLimits.TransientBaseLimit.FD, + Memory: rcmgr.DefaultLimits.TransientBaseLimit.Memory, + }, + + TransientLimitIncrease: rcmgr.BaseLimitIncrease{ + Memory: rcmgr.DefaultLimits.TransientLimitIncrease.Memory, + FDFraction: rcmgr.DefaultLimits.TransientLimitIncrease.FDFraction, + + Conns: 0, + ConnsInbound: rcmgr.DefaultLimits.TransientLimitIncrease.ConnsInbound, + ConnsOutbound: 0, + + Streams: 0, + StreamsInbound: rcmgr.DefaultLimits.TransientLimitIncrease.StreamsInbound, + StreamsOutbound: 0, + }, // Lets get out of the way of the allow list functionality. // If someone specified "Swarm.ResourceMgr.Allowlist" we should let it go through. @@ -197,8 +217,8 @@ func createDefaultLimitConfig(cfg config.SwarmConfig) (rcmgr.LimitConfig, error) defaultLimitConfig := scalingLimitConfig.Scale(int64(maxMemory), int(numFD)) - // If a high water mark is set: - if cfg.ConnMgr.Type == "basic" { + // If a high water mark is set (ignore when using accelerated DHT): + if cfg.ConnMgr.Type == "basic" && !acceleratedDHT { // set the connection limit higher than high water mark so that the ConnMgr has "space and time" to close "least useful" connections. defaultLimitConfig.System.Conns = 2 * cfg.ConnMgr.HighWater log.Info("adjusted default resource manager System.Conns limits to match ConnMgr.HighWater value of %s", cfg.ConnMgr.HighWater) From 377d4e9938eddb7c589e53c26d36b181e035cc08 Mon Sep 17 00:00:00 2001 From: Antonio Navarro Perez Date: Tue, 15 Nov 2022 17:22:41 +0100 Subject: [PATCH 09/35] Remove limitation by HighWater param. Signed-off-by: Antonio Navarro Perez --- core/node/groups.go | 2 +- core/node/libp2p/rcmgr.go | 6 +++--- core/node/libp2p/rcmgr_defaults.go | 23 ++++++++++++----------- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/core/node/groups.go b/core/node/groups.go index 6a821becab23..fca984650d93 100644 --- a/core/node/groups.go +++ b/core/node/groups.go @@ -147,7 +147,7 @@ func LibP2P(bcfg *BuildCfg, cfg *config.Config) fx.Option { BaseLibP2P, // Services (resource management) - fx.Provide(libp2p.ResourceManager(cfg.Swarm, cfg.Experimental.AcceleratedDHTClient)), + fx.Provide(libp2p.ResourceManager(cfg.Swarm)), fx.Provide(libp2p.AddrFilters(cfg.Swarm.AddrFilters)), fx.Provide(libp2p.AddrsFactory(cfg.Addresses.Announce, cfg.Addresses.AppendAnnounce, cfg.Addresses.NoAnnounce)), fx.Provide(libp2p.SmuxTransport(cfg.Swarm.Transports)), diff --git a/core/node/libp2p/rcmgr.go b/core/node/libp2p/rcmgr.go index 0de4fbe64083..49c9d3823997 100644 --- a/core/node/libp2p/rcmgr.go +++ b/core/node/libp2p/rcmgr.go @@ -29,7 +29,7 @@ const NetLimitTraceFilename = "rcmgr.json.gz" var ErrNoResourceMgr = fmt.Errorf("missing ResourceMgr: make sure the daemon is running with Swarm.ResourceMgr.Enabled") -func ResourceManager(cfg config.SwarmConfig, acceleratedDHT bool) interface{} { +func ResourceManager(cfg config.SwarmConfig) interface{} { return func(mctx helpers.MetricsCtx, lc fx.Lifecycle, repo repo.Repo) (network.ResourceManager, Libp2pOpts, error) { var manager network.ResourceManager var opts Libp2pOpts @@ -52,7 +52,7 @@ func ResourceManager(cfg config.SwarmConfig, acceleratedDHT bool) interface{} { return nil, opts, fmt.Errorf("opening IPFS_PATH: %w", err) } - limits, err := createDefaultLimitConfig(cfg, acceleratedDHT) + limits, err := createDefaultLimitConfig(cfg) if err != nil { return nil, opts, err } @@ -513,7 +513,7 @@ func NetResetLimit(mgr network.ResourceManager, repo repo.Repo, scope string) (r return result, fmt.Errorf("reading config to reset limit: %w", err) } - defaults, err := createDefaultLimitConfig(cfg.Swarm, cfg.Experimental.AcceleratedDHTClient) + defaults, err := createDefaultLimitConfig(cfg.Swarm) if err != nil { return result, fmt.Errorf("creating default limit config: %w", err) } diff --git a/core/node/libp2p/rcmgr_defaults.go b/core/node/libp2p/rcmgr_defaults.go index 2c1f3d93a8c7..84eedf7ed50d 100644 --- a/core/node/libp2p/rcmgr_defaults.go +++ b/core/node/libp2p/rcmgr_defaults.go @@ -57,9 +57,6 @@ var noLimitIncrease = rcmgr.BaseLimitIncrease{ // - cfg.ResourceMgr.MaxFileDescriptors: This is the maximum number of file descriptors to allow libp2p to use. // libp2p's resource manager will prevent additional file descriptor consumption while this limit is hit. // If this value isn't specified, the maximum between 1/2 of system FD limit and 4096 is used. -// - Swarm.ConnMgr.HighWater: If a connection manager is specified, libp2p's resource manager -// will allow 2x more connections than the HighWater mark -// so the connection manager has "space and time" to close "least useful" connections. // // With these inputs defined, limits are created at the system, transient, and peer scopes. // Other scopes are ignored (by being set to infinity). @@ -89,7 +86,18 @@ var noLimitIncrease = rcmgr.BaseLimitIncrease{ // maxMemory, maxFD, or maxConns with Swarm.HighWater.ConnMgr. // 3. Power user - They specify all the limits they want set via Swarm.ResourceMgr.Limits // and we don't do any defaults/overrides. We pass that config blindly into libp2p resource manager. -func createDefaultLimitConfig(cfg config.SwarmConfig, acceleratedDHT bool) (rcmgr.LimitConfig, error) { +// +// Note that within libp2p. Swarm.ConnMgr settings have no impact on libp2p's resource manager limits. +// See https://github.com/libp2p/go-libp2p/blob/master/p2p/host/resource-manager/README.md#connmanager-vs-resource-manager +// and https://github.com/libp2p/go-libp2p/issues/1640 +// We also don't layer on extra logic in this function because SystemBaseLimit.Conns is already "bigEnough". +// There is headroom for the connection manager to apply any Swarm.ConnMgr.HighWater mark. +// We're keeping things simple by avoiding any interaction between libp2p's resource manager and connection manager. +// For example we don't set SystemBaseLimit.Conns to be related to Swarm.ConnMgr.HighWater. +// SystemBaseLimit.Conns is "bigEnough" and won't won't limit total connections. +// (We will limit SystemBaseLimit.ConnsInbound though.) +// The Swarm.ConnMgr can manage connections based on Swarm.ConnMgr.HighWater. +func createDefaultLimitConfig(cfg config.SwarmConfig) (rcmgr.LimitConfig, error) { maxMemoryDefaultString := humanize.Bytes(uint64(memory.TotalMemory()) / 8) maxMemoryString := cfg.ResourceMgr.MaxMemory.WithDefault(maxMemoryDefaultString) maxMemory, err := humanize.ParseBytes(maxMemoryString) @@ -217,12 +225,5 @@ func createDefaultLimitConfig(cfg config.SwarmConfig, acceleratedDHT bool) (rcmg defaultLimitConfig := scalingLimitConfig.Scale(int64(maxMemory), int(numFD)) - // If a high water mark is set (ignore when using accelerated DHT): - if cfg.ConnMgr.Type == "basic" && !acceleratedDHT { - // set the connection limit higher than high water mark so that the ConnMgr has "space and time" to close "least useful" connections. - defaultLimitConfig.System.Conns = 2 * cfg.ConnMgr.HighWater - log.Info("adjusted default resource manager System.Conns limits to match ConnMgr.HighWater value of %s", cfg.ConnMgr.HighWater) - } - return defaultLimitConfig, nil } From 4bff0420368680bd94a8a2ca2d9e560baf029c54 Mon Sep 17 00:00:00 2001 From: Antonio Navarro Perez Date: Tue, 15 Nov 2022 17:52:07 +0100 Subject: [PATCH 10/35] Update core/node/libp2p/rcmgr_defaults.go Co-authored-by: Steve Loeppky --- core/node/libp2p/rcmgr_defaults.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/core/node/libp2p/rcmgr_defaults.go b/core/node/libp2p/rcmgr_defaults.go index 84eedf7ed50d..4b32fd921b35 100644 --- a/core/node/libp2p/rcmgr_defaults.go +++ b/core/node/libp2p/rcmgr_defaults.go @@ -141,14 +141,16 @@ func createDefaultLimitConfig(cfg config.SwarmConfig) (rcmgr.LimitConfig, error) }, TransientBaseLimit: rcmgr.BaseLimit{ - Streams: bigEnough, - StreamsInbound: rcmgr.DefaultLimits.TransientBaseLimit.StreamsInbound, - StreamsOutbound: bigEnough, + Memory: rcmgr.DefaultLimits.TransientBaseLimit.Memory, + FD: rcmgr.DefaultLimits.TransientBaseLimit.FD, + Conns: bigEnough, ConnsInbound: rcmgr.DefaultLimits.TransientBaseLimit.ConnsInbound, ConnsOutbound: bigEnough, - FD: rcmgr.DefaultLimits.TransientBaseLimit.FD, - Memory: rcmgr.DefaultLimits.TransientBaseLimit.Memory, + + Streams: bigEnough, + StreamsInbound: rcmgr.DefaultLimits.TransientBaseLimit.StreamsInbound, + StreamsOutbound: bigEnough, }, TransientLimitIncrease: rcmgr.BaseLimitIncrease{ From dfa631e841038f56f1c9161e0f4598cb361bd851 Mon Sep 17 00:00:00 2001 From: Antonio Navarro Perez Date: Tue, 15 Nov 2022 18:04:37 +0100 Subject: [PATCH 11/35] Apply go fmt Signed-off-by: Antonio Navarro Perez --- core/node/libp2p/rcmgr_defaults.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/core/node/libp2p/rcmgr_defaults.go b/core/node/libp2p/rcmgr_defaults.go index 4b32fd921b35..f05e1f4f3c27 100644 --- a/core/node/libp2p/rcmgr_defaults.go +++ b/core/node/libp2p/rcmgr_defaults.go @@ -141,13 +141,13 @@ func createDefaultLimitConfig(cfg config.SwarmConfig) (rcmgr.LimitConfig, error) }, TransientBaseLimit: rcmgr.BaseLimit{ - Memory: rcmgr.DefaultLimits.TransientBaseLimit.Memory, - FD: rcmgr.DefaultLimits.TransientBaseLimit.FD, - - Conns: bigEnough, - ConnsInbound: rcmgr.DefaultLimits.TransientBaseLimit.ConnsInbound, - ConnsOutbound: bigEnough, - + Memory: rcmgr.DefaultLimits.TransientBaseLimit.Memory, + FD: rcmgr.DefaultLimits.TransientBaseLimit.FD, + + Conns: bigEnough, + ConnsInbound: rcmgr.DefaultLimits.TransientBaseLimit.ConnsInbound, + ConnsOutbound: bigEnough, + Streams: bigEnough, StreamsInbound: rcmgr.DefaultLimits.TransientBaseLimit.StreamsInbound, StreamsOutbound: bigEnough, From f29640e0c8cc2bbad046145adcdeb77a5ff9acb5 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Fri, 11 Nov 2022 01:15:30 +0100 Subject: [PATCH 12/35] fix(config): skip nulls in ResourceMgr --- config/swarm.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/swarm.go b/config/swarm.go index 631192827721..b6cc9aa9a2ba 100644 --- a/config/swarm.go +++ b/config/swarm.go @@ -144,8 +144,8 @@ type ResourceMgr struct { Enabled Flag `json:",omitempty"` Limits *rcmgr.LimitConfig `json:",omitempty"` - MaxMemory OptionalString `json:",omitempty"` - MaxFileDescriptors OptionalInteger `json:",omitempty"` + MaxMemory *OptionalString `json:",omitempty"` + MaxFileDescriptors *OptionalInteger `json:",omitempty"` // A list of multiaddrs that can bypass normal system limits (but are still // limited by the allowlist scope). Convenience config around From 65365192f754d18c00f2411e833b74ff0aee9f3d Mon Sep 17 00:00:00 2001 From: Lucas Molas Date: Tue, 26 Apr 2022 20:49:14 -0300 Subject: [PATCH 13/35] refactor(config): remove Swarm.ConnMgr defaults This moves defaults to Kubo code, cleaning up config. If value is in config, we assume it is an explicit choice made by user. Makes migrations easier. --- config/init.go | 12 ++++-------- config/profile.go | 10 +++++++--- config/swarm.go | 8 ++++---- core/node/groups.go | 39 +++++++++++++-------------------------- docs/changelogs/v0.17.md | 19 ++++++++++++++++++- docs/config.md | 22 ++++++++++++++-------- 6 files changed, 60 insertions(+), 50 deletions(-) diff --git a/config/init.go b/config/init.go index cc2351f1f4e3..f86317369f55 100644 --- a/config/init.go +++ b/config/init.go @@ -79,14 +79,6 @@ func InitWithIdentity(identity Identity) (*Config, error) { Interval: "12h", Strategy: "all", }, - Swarm: SwarmConfig{ - ConnMgr: ConnMgr{ - LowWater: DefaultConnMgrLowWater, - HighWater: DefaultConnMgrHighWater, - GracePeriod: DefaultConnMgrGracePeriod.String(), - Type: "basic", - }, - }, Pinning: Pinning{ RemoteServices: map[string]RemotePinningService{}, }, @@ -114,6 +106,10 @@ const DefaultConnMgrLowWater = 600 // grace period const DefaultConnMgrGracePeriod = time.Second * 20 +// DefaultConnMgrType is the default value for the connection managers +// type. +const DefaultConnMgrType = "basic" + func addressesConfig() Addresses { return Addresses{ Swarm: []string{ diff --git a/config/profile.go b/config/profile.go index cbc7c9764532..6748b5fb2b73 100644 --- a/config/profile.go +++ b/config/profile.go @@ -178,9 +178,13 @@ fetching may be degraded. c.AutoNAT.ServiceMode = AutoNATServiceDisabled c.Reprovider.Interval = "0" - c.Swarm.ConnMgr.LowWater = 20 - c.Swarm.ConnMgr.HighWater = 40 - c.Swarm.ConnMgr.GracePeriod = time.Minute.String() + lowWater := int64(20) + highWater := int64(40) + gracePeriod := time.Minute + c.Swarm.ConnMgr.Type = NewOptionalString("basic") + c.Swarm.ConnMgr.LowWater = &OptionalInteger{value: &lowWater} + c.Swarm.ConnMgr.HighWater = &OptionalInteger{value: &highWater} + c.Swarm.ConnMgr.GracePeriod = &OptionalDuration{&gracePeriod} return nil }, }, diff --git a/config/swarm.go b/config/swarm.go index b6cc9aa9a2ba..d8fd17e946d8 100644 --- a/config/swarm.go +++ b/config/swarm.go @@ -131,10 +131,10 @@ type Transports struct { // ConnMgr defines configuration options for the libp2p connection manager type ConnMgr struct { - Type string - LowWater int - HighWater int - GracePeriod string + Type *OptionalString `json:",omitempty"` + LowWater *OptionalInteger `json:",omitempty"` + HighWater *OptionalInteger `json:",omitempty"` + GracePeriod *OptionalDuration `json:",omitempty"` } // ResourceMgr defines configuration options for the libp2p Network Resource Manager diff --git a/core/node/groups.go b/core/node/groups.go index fca984650d93..5c576fc447f8 100644 --- a/core/node/groups.go +++ b/core/node/groups.go @@ -38,33 +38,20 @@ var BaseLibP2P = fx.Options( ) func LibP2P(bcfg *BuildCfg, cfg *config.Config) fx.Option { - // parse ConnMgr config - - grace := config.DefaultConnMgrGracePeriod - low := config.DefaultConnMgrLowWater - high := config.DefaultConnMgrHighWater - - connmgr := fx.Options() - - if cfg.Swarm.ConnMgr.Type != "none" { - switch cfg.Swarm.ConnMgr.Type { - case "": - // 'default' value is the basic connection manager - break - case "basic": - var err error - grace, err = time.ParseDuration(cfg.Swarm.ConnMgr.GracePeriod) - if err != nil { - return fx.Error(fmt.Errorf("parsing Swarm.ConnMgr.GracePeriod: %s", err)) - } - - low = cfg.Swarm.ConnMgr.LowWater - high = cfg.Swarm.ConnMgr.HighWater - default: - return fx.Error(fmt.Errorf("unrecognized ConnMgr.Type: %q", cfg.Swarm.ConnMgr.Type)) - } - + var connmgr fx.Option + + // set connmgr based on Swarm.ConnMgr.Type + connMgrType := cfg.Swarm.ConnMgr.Type.WithDefault(config.DefaultConnMgrType) + switch connMgrType { + case "none": + connmgr = fx.Options() // noop + case "", "basic": + grace := cfg.Swarm.ConnMgr.GracePeriod.WithDefault(config.DefaultConnMgrGracePeriod) + low := int(cfg.Swarm.ConnMgr.LowWater.WithDefault(config.DefaultConnMgrLowWater)) + high := int(cfg.Swarm.ConnMgr.HighWater.WithDefault(config.DefaultConnMgrHighWater)) connmgr = fx.Provide(libp2p.ConnectionManager(low, high, grace)) + default: + return fx.Error(fmt.Errorf("unrecognized Swarm.ConnMgr.Type: %q", connMgrType)) } // parse PubSub config diff --git a/docs/changelogs/v0.17.md b/docs/changelogs/v0.17.md index efe0099395b8..941fd419f9d0 100644 --- a/docs/changelogs/v0.17.md +++ b/docs/changelogs/v0.17.md @@ -9,8 +9,8 @@ Below is an outline of all that is in this release, so you get a sense of all th - [Kubo changelog v0.17](#kubo-changelog-v017) - [v0.17.0](#v0170) - [Overview](#overview) - - [TOC](#toc) - [🔦 Highlights](#-highlights) + - [Implicit connection manager limits](#implicit-connection-manager-limits) - [TAR Response Format on Gateways](#tar-response-format-on-gateways) - [Changelog](#changelog) - [Contributors](#contributors) @@ -19,6 +19,23 @@ Below is an outline of all that is in this release, so you get a sense of all th +#### Implicit connection manager limits + +Starting with this release, `ipfs init` will no longer store the default +[Connection Manager](https://github.com/ipfs/kubo/blob/master/docs/config.md#swarmconnmgr) +limits in the user config under `Swarm.ConnMgr`. + +Users are still free to use this setting to set custom values, but for most use +cases, the defaults provided with the latest Kubo release should be sufficient. + +To remove any custom limits and switch to the implicit defaults managed by Kubo: + +```console +$ ipfs config --json Swarm.ConnMgr '{}' +``` + +We will be adjusting defaults in the future releases. + #### TAR Response Format on Gateways Implemented [IPIP-288](https://github.com/ipfs/specs/pull/288) which adds diff --git a/docs/config.md b/docs/config.md index 58d62a43322a..784a42d730ed 100644 --- a/docs/config.md +++ b/docs/config.md @@ -243,9 +243,15 @@ documented in `ipfs config profile --help`. - `lowpower` - Reduces daemon overhead on the system. May affect node + Reduces daemon overhead on the system. Affects node functionality - performance of content discovery and data - fetching may be degraded. + fetching may be degraded. Local data won't be announced on routing systems like DHT. + + - `Swarm.ConnMgr` set to maintain minimum number of p2p connections at a time. + - Disables [`Reprovider`](#reprovider) service → no CID will be announced on DHT and other routing systems(!) + - Disables AutoNAT. + + Use this profile with caution. ## Types @@ -1695,7 +1701,8 @@ be configured to keep. Kubo currently supports two connection managers: * none: never close idle connections. * basic: the default connection manager. -Default: basic +By default, this section is empty and the implicit defaults defined below +are used. #### `Swarm.ConnMgr.Type` @@ -1704,8 +1711,7 @@ management) and `"basic"`. Default: "basic". -Type: `string` (when unset or `""`, the default connection manager is applied -and all `ConnMgr` fields are ignored). +Type: `optionalString` (default when unset or empty) #### Basic Connection Manager @@ -1744,7 +1750,7 @@ trim down to. Default: `600` -Type: `integer` +Type: `optionalInteger` ##### `Swarm.ConnMgr.HighWater` @@ -1754,7 +1760,7 @@ towards this limit. Default: `900` -Type: `integer` +Type: `optionalInteger` ##### `Swarm.ConnMgr.GracePeriod` @@ -1763,7 +1769,7 @@ by the connection manager. Default: `"20s"` -Type: `duration` +Type: `optionalDuration` ### `Swarm.ResourceMgr` From 13b9a62ae5d6a87b15f32b09d6e0b604e4246378 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Tue, 15 Nov 2022 20:17:00 +0100 Subject: [PATCH 14/35] docs: document /wss fixes in 0.17 --- docs/changelogs/v0.17.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/changelogs/v0.17.md b/docs/changelogs/v0.17.md index 941fd419f9d0..8cab7499126c 100644 --- a/docs/changelogs/v0.17.md +++ b/docs/changelogs/v0.17.md @@ -12,6 +12,7 @@ Below is an outline of all that is in this release, so you get a sense of all th - [🔦 Highlights](#-highlights) - [Implicit connection manager limits](#implicit-connection-manager-limits) - [TAR Response Format on Gateways](#tar-response-format-on-gateways) + - [Dialling `/wss` peer behind a reverse proxy](#dialling-wss-peer-behind-a-reverse-proxy) - [Changelog](#changelog) - [Contributors](#contributors) @@ -54,6 +55,14 @@ bafybeigccimv3zqm5g4jt363faybagywkvqbrismoquogimy7kvz2sj7sq/1 - Barrel - Part 1 bafybeigccimv3zqm5g4jt363faybagywkvqbrismoquogimy7kvz2sj7sq/1 - Barrel - Part 1.png ``` +#### Dialling `/wss` peer behind a reverse proxy + +This release resolves a regression introduced in Kubo 0.16, making it possible +again to connect to a peer over a WebSockets endpoint (`/wss`) that is +deployed behind a reverse proxy. + +More details in [go-libp2p release notes](https://github.com/libp2p/go-libp2p/releases/tag/v0.23.3). + ### Changelog From db3d1cd8e14ef455611a44a6468ccb0103a2cf02 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Fri, 11 Nov 2022 00:05:02 +0100 Subject: [PATCH 15/35] fix(docs): typo --- docs/config.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/config.md b/docs/config.md index 784a42d730ed..b285ec1eb523 100644 --- a/docs/config.md +++ b/docs/config.md @@ -1835,8 +1835,8 @@ struct from [go-libp2p-resource-manager](https://github.com/libp2p/go-libp2p/tre Current resource usage and a list of services, protocols, and peers can be obtained via `ipfs swarm stats --help` -It is also possible to adjust some runtime limits via `ipfs stats limit --help`. -Changes made via `stats limit` are persisted in `Swarm.ResourceMgr.Limits`. +It is also possible to adjust some runtime limits via `ipfs swarm limit --help`. +Changes made via `ipfs swarm limit` are persisted in `Swarm.ResourceMgr.Limits`. Default: `{}` (use the safe implicit defaults) From 1127a15aebc0448c3c0ff8f6eaa6d34da2db644c Mon Sep 17 00:00:00 2001 From: Antonio Navarro Perez Date: Mon, 14 Nov 2022 13:03:46 +0100 Subject: [PATCH 16/35] fix: update go-unixfs lib to v0.4.1 Signed-off-by: Antonio Navarro Perez --- docs/examples/kubo-as-a-library/go.mod | 2 +- docs/examples/kubo-as-a-library/go.sum | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/examples/kubo-as-a-library/go.mod b/docs/examples/kubo-as-a-library/go.mod index 6eac119b0df4..b7398dbaa127 100644 --- a/docs/examples/kubo-as-a-library/go.mod +++ b/docs/examples/kubo-as-a-library/go.mod @@ -103,7 +103,7 @@ require ( github.com/ipfs/go-namesys v0.5.0 // indirect github.com/ipfs/go-path v0.3.0 // indirect github.com/ipfs/go-peertaskqueue v0.7.1 // indirect - github.com/ipfs/go-unixfs v0.4.0 // indirect + github.com/ipfs/go-unixfs v0.4.1 // indirect github.com/ipfs/go-unixfsnode v1.4.0 // indirect github.com/ipfs/go-verifcid v0.0.2 // indirect github.com/ipld/edelweiss v0.2.0 // indirect diff --git a/docs/examples/kubo-as-a-library/go.sum b/docs/examples/kubo-as-a-library/go.sum index b72fece84d6a..170376b10e1e 100644 --- a/docs/examples/kubo-as-a-library/go.sum +++ b/docs/examples/kubo-as-a-library/go.sum @@ -648,8 +648,8 @@ github.com/ipfs/go-peertaskqueue v0.7.1/go.mod h1:M/akTIE/z1jGNXMU7kFB4TeSEFvj68 github.com/ipfs/go-pinning-service-http-client v0.1.2/go.mod h1:6wd5mjYhXJTiWU8b4RSWPpWdlzE5/csoXV0dWWMjun4= github.com/ipfs/go-unixfs v0.2.4/go.mod h1:SUdisfUjNoSDzzhGVxvCL9QO/nKdwXdr+gbMUdqcbYw= github.com/ipfs/go-unixfs v0.3.1/go.mod h1:h4qfQYzghiIc8ZNFKiLMFWOTzrWIAtzYQ59W/pCFf1o= -github.com/ipfs/go-unixfs v0.4.0 h1:qSyyxfB/OiDdWHYiSbyaqKC7zfSE/TFL0QdwkRjBm20= -github.com/ipfs/go-unixfs v0.4.0/go.mod h1:I7Nqtm06HgOOd+setAoCU6rf/HgVFHE+peeNuOv/5+g= +github.com/ipfs/go-unixfs v0.4.1 h1:nmJFKvF+khK03PIWyCxxydD/nkQX315NZDcgvRqMXf0= +github.com/ipfs/go-unixfs v0.4.1/go.mod h1:2SUDFhUSzrcL408B1qpIkJJ5HznnyTzweViPXUAvkNg= github.com/ipfs/go-unixfsnode v1.1.2/go.mod h1:5dcE2x03pyjHk4JjamXmunTMzz+VUtqvPwZjIEkfV6s= github.com/ipfs/go-unixfsnode v1.4.0 h1:9BUxHBXrbNi8mWHc6j+5C580WJqtVw9uoeEKn4tMhwA= github.com/ipfs/go-unixfsnode v1.4.0/go.mod h1:qc7YFFZ8tABc58p62HnIYbUMwj9chhUuFWmxSokfePo= diff --git a/go.mod b/go.mod index 57f83d205fb0..405284f49862 100644 --- a/go.mod +++ b/go.mod @@ -58,7 +58,7 @@ require ( github.com/ipfs/go-namesys v0.5.0 github.com/ipfs/go-path v0.3.0 github.com/ipfs/go-pinning-service-http-client v0.1.2 - github.com/ipfs/go-unixfs v0.4.0 + github.com/ipfs/go-unixfs v0.4.1 github.com/ipfs/go-unixfsnode v1.4.0 github.com/ipfs/go-verifcid v0.0.2 github.com/ipfs/interface-go-ipfs-core v0.7.0 diff --git a/go.sum b/go.sum index fac4bfe11b1c..ef0441f6c3a1 100644 --- a/go.sum +++ b/go.sum @@ -638,8 +638,8 @@ github.com/ipfs/go-pinning-service-http-client v0.1.2 h1:jdr7KelhL9gNHTU8jbqPMwI github.com/ipfs/go-pinning-service-http-client v0.1.2/go.mod h1:6wd5mjYhXJTiWU8b4RSWPpWdlzE5/csoXV0dWWMjun4= github.com/ipfs/go-unixfs v0.2.4/go.mod h1:SUdisfUjNoSDzzhGVxvCL9QO/nKdwXdr+gbMUdqcbYw= github.com/ipfs/go-unixfs v0.3.1/go.mod h1:h4qfQYzghiIc8ZNFKiLMFWOTzrWIAtzYQ59W/pCFf1o= -github.com/ipfs/go-unixfs v0.4.0 h1:qSyyxfB/OiDdWHYiSbyaqKC7zfSE/TFL0QdwkRjBm20= -github.com/ipfs/go-unixfs v0.4.0/go.mod h1:I7Nqtm06HgOOd+setAoCU6rf/HgVFHE+peeNuOv/5+g= +github.com/ipfs/go-unixfs v0.4.1 h1:nmJFKvF+khK03PIWyCxxydD/nkQX315NZDcgvRqMXf0= +github.com/ipfs/go-unixfs v0.4.1/go.mod h1:2SUDFhUSzrcL408B1qpIkJJ5HznnyTzweViPXUAvkNg= github.com/ipfs/go-unixfsnode v1.1.2/go.mod h1:5dcE2x03pyjHk4JjamXmunTMzz+VUtqvPwZjIEkfV6s= github.com/ipfs/go-unixfsnode v1.4.0 h1:9BUxHBXrbNi8mWHc6j+5C580WJqtVw9uoeEKn4tMhwA= github.com/ipfs/go-unixfsnode v1.4.0/go.mod h1:qc7YFFZ8tABc58p62HnIYbUMwj9chhUuFWmxSokfePo= From 9de9c12ef4a295bc450077e466468eb995578945 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Tue, 15 Nov 2022 18:16:24 +0100 Subject: [PATCH 17/35] chore(ci): bigger box for webui and interop These two are on par with sharness, and webui became flaky. Flakiness will be addressed upstream, but this should decrease how often it occurs + make CI faster (making sharness the longest one again) --- .circleci/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/main.yml b/.circleci/main.yml index 86684a5d0ccc..08e176656f6b 100644 --- a/.circleci/main.yml +++ b/.circleci/main.yml @@ -224,7 +224,7 @@ jobs: docker: - image: cimg/go:1.19.1-node parallelism: 4 - resource_class: large + resource_class: 2xlarge+ steps: - *make_out_dirs - attach_workspace: @@ -324,6 +324,7 @@ jobs: - ~/.cache/go-build/ ipfs-webui: executor: node-browsers + resource_class: 2xlarge+ steps: - *make_out_dirs - attach_workspace: From 83034d840cd3ecfed5084835490a3088fc3e230b Mon Sep 17 00:00:00 2001 From: Steve Loeppky Date: Wed, 16 Nov 2022 10:26:59 +0000 Subject: [PATCH 18/35] Doc improvements and changelog for resource manager (#9413) Co-authored-by: Antonio Navarro Perez --- core/node/libp2p/rcmgr.go | 12 ++-- core/node/libp2p/rcmgr_defaults.go | 56 +---------------- docs/changelogs/v0.17.md | 23 +++++++ docs/config.md | 96 +++++++++++++++++++++++++----- 4 files changed, 115 insertions(+), 72 deletions(-) diff --git a/core/node/libp2p/rcmgr.go b/core/node/libp2p/rcmgr.go index 49c9d3823997..35894dc72340 100644 --- a/core/node/libp2p/rcmgr.go +++ b/core/node/libp2p/rcmgr.go @@ -52,18 +52,22 @@ func ResourceManager(cfg config.SwarmConfig) interface{} { return nil, opts, fmt.Errorf("opening IPFS_PATH: %w", err) } - limits, err := createDefaultLimitConfig(cfg) + limitConfig, err := createDefaultLimitConfig(cfg) if err != nil { return nil, opts, err } + // The logic for defaults and overriding with specified SwarmConfig.ResourceMgr.Limits + // is documented in docs/config.md. + // Any changes here should be reflected there. if cfg.ResourceMgr.Limits != nil { l := *cfg.ResourceMgr.Limits - l.Apply(limits) - limits = l + // This effectively overrides the computed default LimitConfig with any vlues from cfg.ResourceMgr.Limits + l.Apply(limitConfig) + limitConfig = l } - limiter := rcmgr.NewFixedLimiter(limits) + limiter := rcmgr.NewFixedLimiter(limitConfig) str, err := rcmgrObs.NewStatsTraceReporter() if err != nil { diff --git a/core/node/libp2p/rcmgr_defaults.go b/core/node/libp2p/rcmgr_defaults.go index f05e1f4f3c27..3cee4c50c474 100644 --- a/core/node/libp2p/rcmgr_defaults.go +++ b/core/node/libp2p/rcmgr_defaults.go @@ -44,59 +44,8 @@ var noLimitIncrease = rcmgr.BaseLimitIncrease{ // This file defines implicit limit defaults used when Swarm.ResourceMgr.Enabled // createDefaultLimitConfig creates LimitConfig to pass to libp2p's resource manager. -// libp2p's resource manager provides tremendous flexibility but also adds a lot of complexity. -// The intent of the default config here is to provide good defaults, -// and where the defaults aren't good enough, -// to expose a good set of higher-level "knobs" to users to satisfy most use cases -// without requiring users to wade into all the intricacies of libp2p's resource manager. -// -// The inputs one can specify in SwarmConfig are: -// - cfg.ResourceMgr.MaxMemory: This is the max amount of memory in bytes to allow libp2p to use. -// libp2p's resource manager will prevent additional resource creation while this limit is hit. -// If this value isn't specified, 1/8th of the total system memory is used. -// - cfg.ResourceMgr.MaxFileDescriptors: This is the maximum number of file descriptors to allow libp2p to use. -// libp2p's resource manager will prevent additional file descriptor consumption while this limit is hit. -// If this value isn't specified, the maximum between 1/2 of system FD limit and 4096 is used. -// -// With these inputs defined, limits are created at the system, transient, and peer scopes. -// Other scopes are ignored (by being set to infinity). -// The reason these scopes are chosen is because: -// - system - This gives us the coarse-grained control we want so we can reason about the system as a whole. -// It is the backstop, and allows us to reason about resource consumption more easily -// since don't have think about the interaction of many other scopes. -// - transient - Limiting connections that are in process of being established provides backpressure so not too much work queues up. -// - peer - The peer scope doesn't protect us against intentional DoS attacks. -// It's just as easy for an attacker to send 100 requests/second with 1 peerId vs. 10 requests/second with 10 peers. -// We are reliant on the system scope for protection here in the malicious case. -// The reason for having a peer scope is to protect against unintentional DoS attacks -// (e.g., bug in a peer which is causing it to "misbehave"). -// In the unintional case, we want to make sure a "misbehaving" node doesn't consume more resources than necessary. -// -// Within these scopes, limits are just set on memory, FD, and inbound connections/streams. -// Limits are set based on the inputs above. -// We trust this node to behave properly and thus ignore outbound connection/stream limits. -// We apply any limits that libp2p has for its protocols/services -// since we assume libp2p knows best here. -// -// This leaves 3 levels of resource management protection: -// 1. The user who does nothing and uses defaults - In this case they get some sane defaults -// based on the amount of memory and file descriptors their system has. -// This should protect the node from many attacks. -// 2. Slightly more advanced user - They can tweak the above by passing in config on -// maxMemory, maxFD, or maxConns with Swarm.HighWater.ConnMgr. -// 3. Power user - They specify all the limits they want set via Swarm.ResourceMgr.Limits -// and we don't do any defaults/overrides. We pass that config blindly into libp2p resource manager. -// -// Note that within libp2p. Swarm.ConnMgr settings have no impact on libp2p's resource manager limits. -// See https://github.com/libp2p/go-libp2p/blob/master/p2p/host/resource-manager/README.md#connmanager-vs-resource-manager -// and https://github.com/libp2p/go-libp2p/issues/1640 -// We also don't layer on extra logic in this function because SystemBaseLimit.Conns is already "bigEnough". -// There is headroom for the connection manager to apply any Swarm.ConnMgr.HighWater mark. -// We're keeping things simple by avoiding any interaction between libp2p's resource manager and connection manager. -// For example we don't set SystemBaseLimit.Conns to be related to Swarm.ConnMgr.HighWater. -// SystemBaseLimit.Conns is "bigEnough" and won't won't limit total connections. -// (We will limit SystemBaseLimit.ConnsInbound though.) -// The Swarm.ConnMgr can manage connections based on Swarm.ConnMgr.HighWater. +// The defaults follow the documentation in docs/config.md. +// Any changes in the logic here should be reflected there. func createDefaultLimitConfig(cfg config.SwarmConfig) (rcmgr.LimitConfig, error) { maxMemoryDefaultString := humanize.Bytes(uint64(memory.TotalMemory()) / 8) maxMemoryString := cfg.ResourceMgr.MaxMemory.WithDefault(maxMemoryDefaultString) @@ -113,7 +62,6 @@ func createDefaultLimitConfig(cfg config.SwarmConfig) (rcmgr.LimitConfig, error) FD: int(numFD), // By default, we just limit connections on the inbound side. - // Note that the limit gets adjusted below if "cfg.ConnMgr.HighWater" is set. Conns: bigEnough, ConnsInbound: rcmgr.DefaultLimits.SystemBaseLimit.ConnsInbound, // same as libp2p default ConnsOutbound: bigEnough, diff --git a/docs/changelogs/v0.17.md b/docs/changelogs/v0.17.md index 8cab7499126c..b6a562c0cac5 100644 --- a/docs/changelogs/v0.17.md +++ b/docs/changelogs/v0.17.md @@ -10,6 +10,7 @@ Below is an outline of all that is in this release, so you get a sense of all th - [v0.17.0](#v0170) - [Overview](#overview) - [🔦 Highlights](#-highlights) + - [libp2p resource management enabled by default](#libp2p-resource-management-enabled-by-default) - [Implicit connection manager limits](#implicit-connection-manager-limits) - [TAR Response Format on Gateways](#tar-response-format-on-gateways) - [Dialling `/wss` peer behind a reverse proxy](#dialling-wss-peer-behind-a-reverse-proxy) @@ -20,6 +21,28 @@ Below is an outline of all that is in this release, so you get a sense of all th +#### libp2p resource management enabled by default + +To help protect nodes from DoS (resource exhaustion) and eclipse attacks, +go-libp2p released a [Network Resource Manager](https://github.com/libp2p/go-libp2p/tree/master/p2p/host/resource-manager) with a host of improvements throughout 2022. + +Kubo first [exposed this functionality in Kubo 0.13](https://github.com/ipfs/kubo/blob/master/docs/changelogs/v0.13.md#-libp2p-network-resource-manager-swarmresourcemgr), +but it was disabled by default. + +The resource manager is now enabled by default to protect nodes. +The defaults balance providing protection from various attacks while still enabling normal usecases to work as expected. + +If you want to adjust the defaults, then you can: +1. bound the amount of memory and file descriptors that libp2p will use with [Swarm.ResourceMgr.MaxMemory](https://github.com/ipfs/go-ipfs/blob/master/docs/config.md#swarmresourcemgrmaxmemory) +and [Swarm.ResourceMgr.MaxFileDescriptors](https://github.com/ipfs/go-ipfs/blob/master/docs/config.md#swarmresourcemgrmaxfiledescriptors) and/or +2. override any specific resource scopes/limits with [Swarm.ResourceMgr.Limits](https://github.com/ipfs/go-ipfs/blob/master/docs/config.md#swarmresourcemgrlimits) + +See [Swarm.ResourceMgr](https://github.com/ipfs/go-ipfs/blob/master/docs/config.md#swarmresourcemgr) for +1. what limits are set by default, +2. example override configuration, +3. how to access prometheus metrics and view grafana dashboards of resource usage, and +4. how to set explicit "allow lists" to protect against eclipse attacks. + #### Implicit connection manager limits Starting with this release, `ipfs init` will no longer store the default diff --git a/docs/config.md b/docs/config.md index b285ec1eb523..5027b67b7c25 100644 --- a/docs/config.md +++ b/docs/config.md @@ -1773,30 +1773,78 @@ Type: `optionalDuration` ### `Swarm.ResourceMgr` -The [libp2p Network Resource Manager](https://github.com/libp2p/go-libp2p-resource-manager#readme) allows setting limits per a scope, +The [libp2p Network Resource Manager](https://github.com/libp2p/go-libp2p/tree/master/p2p/host/resource-manager#readme) allows setting limits per [Resource Scope](https://github.com/libp2p/go-libp2p/tree/master/p2p/host/resource-manager#resource-scopes), and tracking recource usage over time. -#### `Swarm.ResourceMgr.Enabled` +##### Levels of Configuration + +libp2p's resource manager provides tremendous flexibility but also adds a lot of complexity. +There are these levels of limit configuration for resource management protection: +1. "The user who does nothing" - In this case they get some sane defaults discussed below + based on the amount of memory and file descriptors their system has. + This should protect the node from many attacks. +2. "Slightly more advanced user" - They can tweak the default limits discussed below. + Where the defaults aren't good enough, a good set of higher-level "knobs" are exposed to satisfy most use cases + without requiring users to wade into all the intricacies of libp2p's resource manager. + The "knobs"/inputs are `Swarm.ResourceMgr.MaxMemory` and `Swarm.ResourceMgr.MaxFileDescriptors` as described below. +3. "Power user" - They specify all the default limits from below they want override via `Swarm.ResourceMgr.Limits`; + +##### Default Limits + +With these inputs defined, [resource manager limits](https://github.com/libp2p/go-libp2p/tree/master/p2p/host/resource-manager#limits) are created at the +[system](https://github.com/libp2p/go-libp2p/tree/master/p2p/host/resource-manager#the-system-scope), +[transient](https://github.com/libp2p/go-libp2p/tree/master/p2p/host/resource-manager#the-transient-scope), +and [peer](https://github.com/libp2p/go-libp2p/tree/master/p2p/host/resource-manager#peer-scopes) scopes. +Other scopes are ignored (by being set to "~infinity". + +The reason these scopes are chosen is because: +- system - This gives us the coarse-grained control we want so we can reason about the system as a whole. + It is the backstop, and allows us to reason about resource consumption more easily + since don't have think about the interaction of many other scopes. +- transient - Limiting connections that are in process of being established provides backpressure so not too much work queues up. +- peer - The peer scope doesn't protect us against intentional DoS attacks. + It's just as easy for an attacker to send 100 requests/second with 1 peerId vs. 10 requests/second with 10 peers. + We are reliant on the system scope for protection here in the malicious case. + The reason for having a peer scope is to protect against unintentional DoS attacks + (e.g., bug in a peer which is causing it to "misbehave"). + In the unintional case, we want to make sure a "misbehaving" node doesn't consume more resources than necessary. + +Within these scopes, limits are just set on +[memory](https://github.com/libp2p/go-libp2p/tree/master/p2p/host/resource-manager#memory), +[file descriptors (FD)](https://github.com/libp2p/go-libp2p/tree/master/p2p/host/resource-manager#file-descriptors), [*inbound* connections](https://github.com/libp2p/go-libp2p/tree/master/p2p/host/resource-manager#connections), +and [*inbound* streams](https://github.com/libp2p/go-libp2p/tree/master/p2p/host/resource-manager#streams). +Limits are set based on the inputs above. +We trust this node to behave properly and thus don't limit *outbound* connection/stream limits. +We apply any limits that libp2p has for its protocols/services +since we assume libp2p knows best here. + +** libp2p resource monitoring ** +For [monitoring libp2p resource usage](https://github.com/libp2p/go-libp2p/tree/master/p2p/host/resource-manager#monitoring), +various `*rcmgr_*` metrics can be accessed as the prometheus endpoint at `{Addresses.API}/debug/metrics/prometheus` (default: `http://127.0.0.1:5001/debug/metrics/prometheus`). +There are also [pre-built Grafana dashboards](https://github.com/libp2p/go-libp2p/tree/master/p2p/host/resource-manager/obs/grafana-dashboards) that can be added to a Grafana instance. -Enables the libp2p Network Resource Manager and auguments the default limits -using user-defined ones in `Swarm.ResourceMgr.Limits` (if present). +#### `Swarm.ResourceMgr.Enabled` -Various `*rcmgr_*` metrics can be accessed as the prometheus endpoint at `{Addresses.API}/debug/metrics/prometheus` (default: `http://127.0.0.1:5001/debug/metrics/prometheus`) +Enables the libp2p Resource Manager using limits based on the defaults and/or other configuration as discussed above. Default: `true` - Type: `flag` #### `Swarm.ResourceMgr.MaxMemory` -The maximum amount of memory that the libp2p resource manager will allow. +This is the max amount of memory to allow libp2p to use. +libp2p's resource manager will prevent additional resource creation while this limit is reached. +This value is also used to scale the limit on various resources at various scopes +when the default limits (discuseed above) are used. +For example, increasing this value will increase the default limit for incoming connections. Default: `[TOTAL_SYSTEM_MEMORY]/8` Type: `optionalBytes` #### `Swarm.ResourceMgr.MaxFileDescriptors` -Define the maximum number of file descriptors that libp2p can use. +This is the maximum number of file descriptors to allow libp2p to use. +libp2p's resource manager will prevent additional file descriptor consumption while this limit is reached. This param is ignored on Windows. @@ -1807,21 +1855,26 @@ Type: `optionalInteger` Map of resource limits [per scope](https://github.com/libp2p/go-libp2p/tree/master/p2p/host/resource-manager#resource-scopes). -The map supports fields from [`ScalingLimitConfig`](https://github.com/libp2p/go-libp2p/blob/master/p2p/host/resource-manager/limit_defaults.go#L21-L59) -struct from [go-libp2p-resource-manager](https://github.com/libp2p/go-libp2p/tree/master/p2p/host/resource-manager#readme). +The map supports fields from the [`LimitConfig` struct](https://github.com/libp2p/go-libp2p/blob/master/p2p/host/resource-manager/limit_defaults.go#L111). +[`BaseLimit`s](https://github.com/libp2p/go-libp2p/blob/master/p2p/host/resource-manager/limit.go#L89) can be set for any scope, and within the `BaseLimit`, all limit s are optional. + +The `Swarm.ResourceMgr.Limits` override the default limits described above. +Any override `BaseLimits` or limit s from `Swarm.ResourceMgr.Limits` +that aren't specified will use the default limits. + +Example #1: setting limits for a specific scope ```json { "Swarm": { "ResourceMgr": { - "Enabled": true, "Limits": { "System": { + "Memory": 1073741824, + "FD": 512, "Conns": 1024, "ConnsInbound": 256, "ConnsOutbound": 1024, - "FD": 512, - "Memory": 1073741824, "Streams": 16384, "StreamsInbound": 4096, "StreamsOutbound": 16384 @@ -1832,13 +1885,28 @@ struct from [go-libp2p-resource-manager](https://github.com/libp2p/go-libp2p/tre } ``` +Example #2: setting a specific limit +```json +{ + "Swarm": { + "ResourceMgr": { + "Limits": { + "Transient": { + "ConnsOutbound": 256, + } + } + } + } +} +``` + Current resource usage and a list of services, protocols, and peers can be obtained via `ipfs swarm stats --help` It is also possible to adjust some runtime limits via `ipfs swarm limit --help`. Changes made via `ipfs swarm limit` are persisted in `Swarm.ResourceMgr.Limits`. -Default: `{}` (use the safe implicit defaults) +Default: `{}` (use the safe implicit defaults described above) Type: `object[string->object]` From 9246cdaf9c6230ba087016991a92bea9ddef73ff Mon Sep 17 00:00:00 2001 From: galargh Date: Wed, 16 Nov 2022 13:17:22 +0100 Subject: [PATCH 19/35] chore: bump version to v0.17.0-rc2 --- version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.go b/version.go index d03126e547c7..025c110d56d5 100644 --- a/version.go +++ b/version.go @@ -11,7 +11,7 @@ import ( var CurrentCommit string // CurrentVersionNumber is the current application's version literal -const CurrentVersionNumber = "0.17.0-rc1" +const CurrentVersionNumber = "0.17.0-rc2" const ApiVersion = "/kubo/" + CurrentVersionNumber + "/" //nolint From baafe9d2cac8b721201b0ee731142036db13b207 Mon Sep 17 00:00:00 2001 From: galargh Date: Tue, 22 Nov 2022 13:03:15 +0100 Subject: [PATCH 20/35] chore: bump version to v0.17.0 --- version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.go b/version.go index 025c110d56d5..adc947104362 100644 --- a/version.go +++ b/version.go @@ -11,7 +11,7 @@ import ( var CurrentCommit string // CurrentVersionNumber is the current application's version literal -const CurrentVersionNumber = "0.17.0-rc2" +const CurrentVersionNumber = "0.17.0" const ApiVersion = "/kubo/" + CurrentVersionNumber + "/" //nolint From d007b2ae38955d7beb7441ce4600c8683175b9ce Mon Sep 17 00:00:00 2001 From: galargh Date: Tue, 22 Nov 2022 13:20:20 +0100 Subject: [PATCH 21/35] docs: udpate changelog --- docs/changelogs/v0.17.md | 137 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 127 insertions(+), 10 deletions(-) diff --git a/docs/changelogs/v0.17.md b/docs/changelogs/v0.17.md index b6a562c0cac5..4d4bde3c170b 100644 --- a/docs/changelogs/v0.17.md +++ b/docs/changelogs/v0.17.md @@ -23,25 +23,25 @@ Below is an outline of all that is in this release, so you get a sense of all th #### libp2p resource management enabled by default -To help protect nodes from DoS (resource exhaustion) and eclipse attacks, -go-libp2p released a [Network Resource Manager](https://github.com/libp2p/go-libp2p/tree/master/p2p/host/resource-manager) with a host of improvements throughout 2022. +To help protect nodes from DoS (resource exhaustion) and eclipse attacks, +go-libp2p released a [Network Resource Manager](https://github.com/libp2p/go-libp2p/tree/master/p2p/host/resource-manager) with a host of improvements throughout 2022. -Kubo first [exposed this functionality in Kubo 0.13](https://github.com/ipfs/kubo/blob/master/docs/changelogs/v0.13.md#-libp2p-network-resource-manager-swarmresourcemgr), +Kubo first [exposed this functionality in Kubo 0.13](https://github.com/ipfs/kubo/blob/master/docs/changelogs/v0.13.md#-libp2p-network-resource-manager-swarmresourcemgr), but it was disabled by default. -The resource manager is now enabled by default to protect nodes. +The resource manager is now enabled by default to protect nodes. The defaults balance providing protection from various attacks while still enabling normal usecases to work as expected. If you want to adjust the defaults, then you can: -1. bound the amount of memory and file descriptors that libp2p will use with [Swarm.ResourceMgr.MaxMemory](https://github.com/ipfs/go-ipfs/blob/master/docs/config.md#swarmresourcemgrmaxmemory) +1. bound the amount of memory and file descriptors that libp2p will use with [Swarm.ResourceMgr.MaxMemory](https://github.com/ipfs/go-ipfs/blob/master/docs/config.md#swarmresourcemgrmaxmemory) and [Swarm.ResourceMgr.MaxFileDescriptors](https://github.com/ipfs/go-ipfs/blob/master/docs/config.md#swarmresourcemgrmaxfiledescriptors) and/or 2. override any specific resource scopes/limits with [Swarm.ResourceMgr.Limits](https://github.com/ipfs/go-ipfs/blob/master/docs/config.md#swarmresourcemgrlimits) See [Swarm.ResourceMgr](https://github.com/ipfs/go-ipfs/blob/master/docs/config.md#swarmresourcemgr) for 1. what limits are set by default, -2. example override configuration, -3. how to access prometheus metrics and view grafana dashboards of resource usage, and -4. how to set explicit "allow lists" to protect against eclipse attacks. +2. example override configuration, +3. how to access prometheus metrics and view grafana dashboards of resource usage, and +4. how to set explicit "allow lists" to protect against eclipse attacks. #### Implicit connection manager limits @@ -88,8 +88,125 @@ More details in [go-libp2p release notes](https://github.com/libp2p/go-libp2p/re ### Changelog - +
Full Changelog + +- github.com/ipfs/kubo: + - chore: bump version to v0.17.0 ([ipfs/kubo#9427](https://github.com/ipfs/kubo/pull/9427)) + - chore: bump version to v0.17.0-rc2 ([ipfs/kubo#9414](https://github.com/ipfs/kubo/pull/9414)) + - Doc improvements and changelog for resource manager (#9413) ([ipfs/kubo#9413](https://github.com/ipfs/kubo/pull/9413)) + - fix(docs): typo + - docs: document /wss fixes in 0.17 + - refactor(config): remove Swarm.ConnMgr defaults + - fix(config): skip nulls in ResourceMgr + - Apply go fmt + - Update core/node/libp2p/rcmgr_defaults.go + - Remove limitation by HighWater param. + - Fix RM errors when acceleratedDHT is active + - docs: Deprecate Reframe on docs. (#9401) ([ipfs/kubo#9401](https://github.com/ipfs/kubo/pull/9401)) + - chore: bump version to v0.17.0-rc1 ([ipfs/kubo#9394](https://github.com/ipfs/kubo/pull/9394)) + - feat: Improve ResourceManager UX (#9338) ([ipfs/kubo#9338](https://github.com/ipfs/kubo/pull/9338)) + - feat: ipfs-webui 2.20.0 + - docs: note log tail is broken (#9383) ([ipfs/kubo#9383](https://github.com/ipfs/kubo/pull/9383)) + - feat(gateway): TAR response format (#9029) ([ipfs/kubo#9029](https://github.com/ipfs/kubo/pull/9029)) + - fix: error when using huge json limit file + - chore: go-multicodec v0.7.0 + - fix: remove old unused buggy coredag code + - feat: Add command line completion for fish + - chore: delete snap configuration ([ipfs/kubo#9352](https://github.com/ipfs/kubo/pull/9352)) + - docs: update scoop package + - docs: init release issue template improvement process v0.16.0 ([ipfs/kubo#9283](https://github.com/ipfs/kubo/pull/9283)) + - feat: add delegated routing metrics (#9354) ([ipfs/kubo#9354](https://github.com/ipfs/kubo/pull/9354)) + - chore: create v0.17.md changelog ([ipfs/kubo#9353](https://github.com/ipfs/kubo/pull/9353)) + - docs: pin remote arg + - feat: webui@v2.19.0 + - test(car): export/import of (dag-)cbor/json codecs + - add refs local alias repo ls (#9320) ([ipfs/kubo#9320](https://github.com/ipfs/kubo/pull/9320)) + - docs(cmds): Clarify block fetching of refs endpoint. + - chore(cmds): dag import: use ipld legacy decode ([ipfs/kubo#9219](https://github.com/ipfs/kubo/pull/9219)) + - fix ipfs swarm peering crash in offline mode (#9261) ([ipfs/kubo#9261](https://github.com/ipfs/kubo/pull/9261)) + - feat: remove provider delay interval in bitswap (#9053) ([ipfs/kubo#9053](https://github.com/ipfs/kubo/pull/9053)) + - feat: --reset flag on swarm limit command (#9310) ([ipfs/kubo#9310](https://github.com/ipfs/kubo/pull/9310)) + - fix: add InlineDNSLink flag to PublicGateways config (#9328) ([ipfs/kubo#9328](https://github.com/ipfs/kubo/pull/9328)) + - docs: Fix typo and grammar in README + - ci: add stylecheck to golangci-lint (#9334) ([ipfs/kubo#9334](https://github.com/ipfs/kubo/pull/9334)) + - Fix: `swarm stats all` command + - Merge release v0.16.0 back into master ([ipfs/kubo#9324](https://github.com/ipfs/kubo/pull/9324)) + - fix: Set default Methods value to nil + - docs: add WebTransport docs ([ipfs/kubo#9314](https://github.com/ipfs/kubo/pull/9314)) + - chore: bump version to 0.17.0-dev +- github.com/ipfs/go-delegated-routing (v0.6.0 -> v0.7.0): + - Release v0.7.0 + - feat: add latency & count metrics for content routing client (#59) ([ipfs/go-delegated-routing#59](https://github.com/ipfs/go-delegated-routing/pull/59)) + - docs: add basic readme ([ipfs/go-delegated-routing#57](https://github.com/ipfs/go-delegated-routing/pull/57)) + - sync: update CI config files ([ipfs/go-delegated-routing#40](https://github.com/ipfs/go-delegated-routing/pull/40)) + - added link to reframe blog post (#54) ([ipfs/go-delegated-routing#54](https://github.com/ipfs/go-delegated-routing/pull/54)) +- github.com/ipfs/go-ipfs-files (v0.1.1 -> v0.2.0): + - Release v0.2.0 + - fix: error when TAR has files outside of root (#56) ([ipfs/go-ipfs-files#56](https://github.com/ipfs/go-ipfs-files/pull/56)) + - sync: update CI config files ([ipfs/go-ipfs-files#55](https://github.com/ipfs/go-ipfs-files/pull/55)) + - chore(Directory): add DirIterator API restriction: iterate only once +- github.com/ipfs/go-unixfs (v0.4.0 -> v0.4.1): + - Update version.json + - Fix: panic when childer is nil (#127) ([ipfs/go-unixfs#127](https://github.com/ipfs/go-unixfs/pull/127)) + - sync: update CI config files (#125) ([ipfs/go-unixfs#125](https://github.com/ipfs/go-unixfs/pull/125)) +- github.com/ipld/go-ipld-prime (v0.18.0 -> v0.19.0): + - Prepare v0.19.0 + - fix: correct json codec links & bytes handling + - test(basicnode): increase test coverage for int and map types (#454) ([ipld/go-ipld-prime#454](https://github.com/ipld/go-ipld-prime/pull/454)) + - fix: remove reliance on ioutil + - run gofmt -s + - bump go.mod to Go 1.18 and run go fix + - feat: add kinded union to gendemo +- github.com/libp2p/go-libp2p (v0.23.2 -> v0.23.4): + - Release v0.23.4 (#1864) ([libp2p/go-libp2p#1864](https://github.com/libp2p/go-libp2p/pull/1864)) + - release v0.23.3 + - websocket: set the HTTP host header in WSS +- github.com/libp2p/go-netroute (v0.2.0 -> v0.2.1): + - v0.2.1 ([libp2p/go-netroute#27](https://github.com/libp2p/go-netroute/pull/27)) + - fix(phys-addr-length): fix physical address length mismatch ([libp2p/go-netroute#29](https://github.com/libp2p/go-netroute/pull/29)) + - compare priority if route rule's dst mask is same size + - compare priority if route rule's dst mask is same size + - sync: update CI config files (#24) ([libp2p/go-netroute#24](https://github.com/libp2p/go-netroute/pull/24)) +- github.com/marten-seemann/qpack (v0.2.1 -> v0.3.0): + - update to Ginkgo v2 (#30) ([marten-seemann/qpack#30](https://github.com/marten-seemann/qpack/pull/30)) + - return write error when encoding header fields (#28) ([marten-seemann/qpack#28](https://github.com/marten-seemann/qpack/pull/28)) + - update Go versions (#29) ([marten-seemann/qpack#29](https://github.com/marten-seemann/qpack/pull/29)) + - remove CircleCI build status from README + - add link to QPACK RFC to README + - remove build constraint from fuzzer ([marten-seemann/qpack#24](https://github.com/marten-seemann/qpack/pull/24)) +- github.com/multiformats/go-multicodec (v0.6.0 -> v0.7.0): + - feat: update ./multicodec/table.csv ([multiformats/go-multicodec#71](https://github.com/multiformats/go-multicodec/pull/71)) + +
### Contributors - +| Contributor | Commits | Lines ± | Files Changed | +|-------------|---------|---------|---------------| +| Antonio Navarro Perez | 11 | +780/-987 | 31 | +| Marcin Rataj | 14 | +791/-543 | 26 | +| web3-bot | 7 | +393/-427 | 71 | +| galargh | 20 | +309/-277 | 21 | +| Gus Eggert | 5 | +358/-222 | 58 | +| Henrique Dias | 3 | +409/-30 | 13 | +| Dustin Long | 1 | +314/-0 | 2 | +| Marco Munizaga | 2 | +211/-46 | 11 | +| Rod Vagg | 4 | +188/-62 | 13 | +| Jorropo | 2 | +4/-219 | 5 | +| Steve Loeppky | 1 | +115/-72 | 4 | +| Andreas Källberg | 1 | +145/-5 | 5 | +| Lucas Molas | 3 | +76/-53 | 9 | +| snyh | 2 | +36/-18 | 2 | +| Piotr Galar | 2 | +31/-4 | 2 | +| Ondrej Kokes | 1 | +25/-4 | 2 | +| Marten Seemann | 6 | +14/-14 | 14 | +| Yann Autissier | 1 | +14/-4 | 1 | +| maxos | 1 | +8/-1 | 2 | +| reidlw | 1 | +1/-4 | 1 | +| Russell Dempsey | 2 | +4/-1 | 2 | +| Ian Davis | 1 | +4/-0 | 2 | +| Daniel Norman | 1 | +3/-1 | 1 | +| Will Scott | 1 | +1/-1 | 1 | +| Nikhilesh Susarla | 1 | +2/-0 | 2 | +| Jamie Wilkinson | 1 | +1/-1 | 1 | +| Will | 1 | +0/-1 | 1 | From 1e90efb75d736a7d3a24ed8edbc9ad293900b877 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Tue, 22 Nov 2022 13:59:13 +0100 Subject: [PATCH 22/35] docs(readme): improve tldr --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4cb4c49dac86..62613fb15dfd 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ ## What is Kubo? -Kubo was the first IPFS implementation and is the most widely used one today. Implementing the *Interplanetary Filesystem* - the Web3 standard and contender to replace https. Thus powered by IPLD's data models and the libp2p for network communication. Kubo is written in Go. +Kubo was the first IPFS implementation and is the most widely used one today. Implementing the *Interplanetary Filesystem* - the Web3 standard for content-addressing, interoperable with HTTP. Thus powered by IPLD's data models and the libp2p for network communication. Kubo is written in Go. Featureset - Runs an IPFS-Node as a network service From a32128d1d30467644ea429ccaf9b7de92083c48a Mon Sep 17 00:00:00 2001 From: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> Date: Tue, 22 Nov 2022 14:19:27 -0800 Subject: [PATCH 23/35] docs: ipfs-http-client -> kubo-rpc-client (#9331) Fixes https://github.com/ipfs/js-kubo-rpc-client/issues/35 Co-authored-by: Steve Loeppky Co-authored-by: Marcin Rataj --- README.md | 4 ++++ docs/http-rpc-clients.md | 14 ++++++++++++++ docs/implement-api-bindings.md | 18 +----------------- 3 files changed, 19 insertions(+), 17 deletions(-) create mode 100644 docs/http-rpc-clients.md diff --git a/README.md b/README.md index 62613fb15dfd..76e0e0201daf 100644 --- a/README.md +++ b/README.md @@ -378,6 +378,10 @@ Basic proof of 'ipfs working' locally: # QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o ipfs cat +### HTTP/RPC clients + +For programmatic interaction with Kubo, see our [list of HTTP/RPC clients](docs/http-rpc-clients.md). + ### Troubleshooting If you have previously installed IPFS before and you are running into problems getting a newer version to work, try deleting (or backing up somewhere else) your IPFS config directory (~/.ipfs by default) and rerunning `ipfs init`. This will reinitialize the config file to its defaults and clear out the local datastore of any bad entries. diff --git a/docs/http-rpc-clients.md b/docs/http-rpc-clients.md new file mode 100644 index 000000000000..c011b98f72f6 --- /dev/null +++ b/docs/http-rpc-clients.md @@ -0,0 +1,14 @@ +# HTTP/RPC Clients + +Kubo provides official HTTP RPC (`/api/v0`) clients for selected lanaguages: + +- [js-kubo-rpc-client](https://github.com/ipfs/js-kubo-rpc-client) - Official JS client for talking to Kubo RPC over HTTP +- [go-ipfs-api](https://github.com/ipfs/go-ipfs-api) - The go interface to ipfs's HTTP RPC - Follow https://github.com/ipfs/kubo/issues/9124 for coming changes. +- [go-ipfs-http-client](https://github.com/ipfs/go-ipfs-http-client) - IPFS CoreAPI implementation using HTTP RPC - Follow https://github.com/ipfs/kubo/issues/9124 for coming changes. + +## Recommended clients + +| Language | Package Name | Github Repository | +|:--------:|:-------------------:|---------------------------------------------| +| JS | kubo-rpc-client | https://github.com/ipfs/js-kubo-rpc-client | +| Go | go-ipfs-http-client | https://github.com/ipfs/go-ipfs-http-client | diff --git a/docs/implement-api-bindings.md b/docs/implement-api-bindings.md index 488cdd07ca20..996a6b8ac80d 100644 --- a/docs/implement-api-bindings.md +++ b/docs/implement-api-bindings.md @@ -76,28 +76,12 @@ As mentioned above, the API commands map to HTTP with: - the request body streams file data - reads files or stdin - multiple streams are muxed with multipart (todo: add tar stream support) -To date, we have two different HTTP API clients: - -- [js-ipfs-api](https://github.com/ipfs/js-ipfs-api) - simple javascript - wrapper -- best to look at -- [kubo/commands/http](https://github.com/ipfs/kubo/tree/916f987de2c35db71815b54bbb9a0a71df829838/commands/http) - - generalized transport based on the [command definitions](https://github.com/ipfs/kubo/tree/916f987de2c35db71815b54bbb9a0a71df829838/core/commands) +You can see the latest [list of our HTTP RPC clients here](http-rpc-clients.md) The Go implementation is good to answer harder questions, like how is multipart handled, or what headers should be set in edge conditions. But the javascript implementation is very concise, and easy to follow. -#### Anatomy of node-ipfs-api - -Currently, node-ipfs-api has three main files -- [src/index.js](https://github.com/ipfs-inactive/js-ipfs-http-client/blob/66d1462bd02181d46e8baf4cd9d476b213426ad8/src/index.js) defines the functions clients of the API - module will use. uses `RequestAPI`, and translates function call parameters to - the API almost directly. -- [src/get-files-stream.js](https://github.com/ipfs-inactive/js-ipfs-http-client/blob/66d1462bd02181d46e8baf4cd9d476b213426ad8/src/get-files-stream.js) implements the hardest part: - file streaming. This one uses multipart. -- [src/request-api.js](https://github.com/ipfs-inactive/js-ipfs-http-client/blob/66d1462bd02181d46e8baf4cd9d476b213426ad8/src/request-api.js) generic function call to perform - the actual HTTP requests - ## Note on multipart + inspecting requests Despite all the generalization spoken about above, the IPFS API is actually very From 3b00c81c8d92683d5ff6454827e20ec917da710e Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Mon, 28 Nov 2022 15:47:40 +0100 Subject: [PATCH 24/35] docs: remove snap and chocolatey packages See https://github.com/ipfs/kubo/issues/8688 https://github.com/ipfs/kubo/issues/9341 --- Dockerfile | 1 - README.md | 23 +--- docs/PATCH_RELEASE_TEMPLATE.md | 2 - docs/snap.md | 201 --------------------------------- 4 files changed, 2 insertions(+), 225 deletions(-) delete mode 100644 docs/snap.md diff --git a/Dockerfile b/Dockerfile index a5b8cfa8fb87..57e650710504 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,3 @@ -# Note: when updating the go minor version here, also update the go-channel in snap/snapcraft.yml FROM golang:1.19.1-buster LABEL maintainer="Steven Allen " diff --git a/README.md b/README.md index 76e0e0201daf..307f0b566419 100644 --- a/README.md +++ b/README.md @@ -216,22 +216,7 @@ $ guix package -i go-ipfs #### Snap -> ⚠️ **SNAP USE IS DISCOURAGED** -> -> If you want something more sophisticated to escape the Snap confinement, we recommend using a different method to install Kubo so that it is not subject to snap confinement. - - -With snap, in any of the [supported Linux distributions](https://snapcraft.io/docs/core/install): - -``` -$ sudo snap install ipfs -``` - -The snap sets `IPFS_PATH` to `SNAP_USER_COMMON`, which is usually `~/snap/ipfs/common`. If you want to use `~/.ipfs` instead, you can bind-mount it to `~/snap/ipfs/common` like this: - -``` -$ sudo mount --bind ~/.ipfs ~/snap/ipfs/common -``` +No longer supported, see rationale in [kubo#8688](https://github.com/ipfs/kubo/issues/8688). #### MacPorts @@ -266,11 +251,7 @@ $ brew install --formula ipfs #### Chocolatey -[![Chocolatey Version](https://img.shields.io/chocolatey/v/go-ipfs?color=00a4ef&label=go-ipfs&logo=windows&style=flat-square&cacheSeconds=3600)](https://chocolatey.org/packages/go-ipfs) - -```Powershell -PS> choco install go-ipfs -``` +No longer supported, see rationale in [kubo#9341](https://github.com/ipfs/kubo/issues/9341). #### Scoop diff --git a/docs/PATCH_RELEASE_TEMPLATE.md b/docs/PATCH_RELEASE_TEMPLATE.md index e777f8ad2c45..a2599d9fd2de 100644 --- a/docs/PATCH_RELEASE_TEMPLATE.md +++ b/docs/PATCH_RELEASE_TEMPLATE.md @@ -24,8 +24,6 @@ This process handles patch releases from version `vX.Y.Z` to `vX.Y.Z+1` assuming - [ ] Release published - [ ] to [dist.ipfs.tech](https://dist.ipfs.tech) - [ ] to [npm-go-ipfs](https://www.npmjs.com/package/go-ipfs) (should be done by [ipfs/npm-go-ipfs](https://github.com/ipfs/npm-go-ipfs), but ok to dispatch [this job](https://github.com/ipfs/npm-go-ipfs/actions/workflows/main.yml) manually) - - [ ] to [chocolatey](https://chocolatey.org/packages/go-ipfs) (should be done by [ipfs/choco-go-ipfs](https://github.com/ipfs/choco-go-ipfs/), but ok to dispatch [this job](https://github.com/ipfs/choco-go-ipfs/actions/workflows/main.yml) manually) - - [ ] to [snap](https://snapcraft.io/ipfs) (should happen automatically, see [snap/snapcraft.yaml](https://github.com/ipfs/kubo/blob/master/snap/snapcraft.yaml)) - [ ] to [github](https://github.com/ipfs/kubo/releases) - [ ] to [arch](https://www.archlinux.org/packages/community/x86_64/go-ipfs/) (flag it out of date) - [ ] Cut a new ipfs-desktop release diff --git a/docs/snap.md b/docs/snap.md deleted file mode 100644 index 1675e00e2adc..000000000000 --- a/docs/snap.md +++ /dev/null @@ -1,201 +0,0 @@ -# Publishing Kubo as a snap - -> Snap is the default package manager for ubuntu since the release of 20.04. This doc captures what we know about building Kubo as a snap package and publishing it to the snapstore. - -The Kubo snap is defined in [snap/snapcraft.yaml](https://github.com/ipfs/go-ipfs/blob/master/snap/snapcraft.yaml). For more detail on our snapcraft.yaml see: https://github.com/ipfs-shipyard/ipfs-snap - -- Kubo is published as `ipfs` to the snapcraft store, see: https://snapcraft.io/ipfs -- ipfs-desktop is published as `ipfs-desktop`, from CI, here: https://github.com/ipfs-shipyard/ipfs-desktop/blob/master/.github/workflows/snapcraft.yml - -For Kubo we deliberately lean on the Canonical lauchpad.net build environment so as it simplifies creating builds for more architectures, which has been requested by user numerous times. - -Linux user can install Kubo with: - -``` -$ snap install ipfs -``` - -Apps installed via Snapcraft are auto-updating by default. Snapcraft uses 'Release Channels' to let the user pick their stability level, with channels for `stable`, `candidate`, `beta` and `edge`. Snap will install the latest release from the `stable` channel by default. A user that wants to test out the bleeding edge can opt in by passing the `--edge` flag - -``` -$ snap install --edge ipfs -``` - -Dashboard for managaing Kubo snap release channels for go-ipfs - -## Known issues - -- `ipfs mount` fails as fusermount is not included in the snap, and cannot work from a snap as it is not able to create non-root mounts, see: https://github.com/elopio/ipfs-snap/issues/6 - -```console -ubuntu@primary:~$ ipfs mount -2020-07-10T09:54:17.458+0100 ERROR node node/mount_unix.go:91 error mounting: fusermount: exec: "fusermount": executable file not found in $PATH -2020-07-10T09:54:17.463+0100 ERROR node node/mount_unix.go:95 error mounting: fusermount: exec: "fusermount": executable file not found in $PATH -``` - -## Developing - -We let launchpad.net build our snap for us, but if you need to edit the snapcraft.yml you can test it locally - -### Requirements - - You need `snapcraft` installed locally - -```console -# ubuntu or similar -$ snap install snapcraft --classic - -# macos -$ brew install snapcraft -``` - -### Build and test - -**Build** out a snap package for Kubo by running the following from this project - -```console -$ snapcraft -``` - -**Test** the built snap package by installing it on a system that has `snapd` - -``` -$ snap install ipfs_.snap -# then kick the tires -$ ubuntu@primary:~$ ipfs daemon -Initializing daemon... -go-ipfs version: 0.7.0-dev -``` - -You can test it out on mac too. By installing and using `snapcraft`, it'll pull in `multipass` which is a quick way to run an ubuntu vm, and it has a notion of a primary container, which gets nice things like automounting your home dir in the vm, so you can: - -```console -# install your .snap in a multipass vm -$ multipass shell -ubuntu@primary:~$ cd ~/Home/path/to/snap/on/host/filesystem -ubuntu@primary:~$ snap install ipfs_.snap --devmode --dangerous -ubuntu@primary:~$ ipfs daemon -Initializing daemon... -go-ipfs version: 0.7.0-dev -``` - -### Building in Docker - -[ipfs-shipyard/ipfs-snap](https://github.com/ipfs-shipyard/ipfs-snap) includes a Dockerfile that creates an image that can build Kubo from source and package it as a snap. It starts with `snapcore/snapcraft:stable` and adds in `go` and just enough tools to allow snapcraft to build go-ipfs. It is published to dockerhub as `ipfs/ipfs-snap-builder`. - -```console -$ docker run -v $(pwd):/my-snap ipfs/ipfs-snap-builder:latest sh -c "apt update && cd /my-snap && snapcraft --debug" -``` - -## Publishing the Snap - -The following snap release channels are published automatically: - -| Git branch | Snap channel | -|------------|--------------| -| `release` | `stable` -| `master` | `edge` - - -### Edge via snapcraft.io - -The snapcraft store watches the default branch of the Kubo repo, and updates the snap for the `edge` channel. This service is configured automatically by snapcraft. It's neat, but it doesn't allow us to watch any branch other than the default. - -Screenshot 2020-10-12 at 15 56 07 - - -### Stable via launchpad.net - -The `stable` channel is published automatically via launchpad.net. There is a mirror of the Kubo repo at https://launchpad.net/go-ipfs that is sync'd with the github repo every few hours (at canonical's leisure). - -A snap build configuration called `ipfs-stable` is set up to watch the `release` branch on Kubo and publish it to the `stable` snap channel. - -The key configuration points are: - -```yaml -# What flavour VM to build on. -Series: infer from snapcraft.yml - -Source: - Git: - # the launchpad mirror of go-ipfs - Git repository: ~ipfs/go-ipfs/+git/go-ipfs - Git branch: refs/heads/release - -Automatically build when branch changes: true - Source snap channels for automatic builds: - # tell snapcraft what version of snapcraft to use when building. - # NOTE: At time of writing we use the default `core18` platform for the - # Kubo snap. If you specify others here, a build error occurs, which - # I think is mainly due to a launchpad ux bug here. - core: "" - core18: stable - core20: "" - snapcraft: stable - - -Automatically upload to store: - Registered store package name: ipfs - Store channels: - Risk: - Stable: true - -# What architectures to build for. this selection is chosen to match the auto -# configured build provided by snapcraft for the edge channel, for neatness, so -# that all architectures that currently have builds in snap continue to get -# updates, even though some of them would be tough for use to test on. -Processors: - amd64: true - # raspi 4 - arm64: true - # older raspi - armhf: true - # sure ok i guess. - i386: true - # hmmm... PowerPC!? - ppc64el: true - # wat. IBM system Z mainframes!? - s390x: true -``` - -![Screenshot_2020-10-12 Edit ipfs-stable Snap packages “IPFS Maintainers” team](https://user-images.githubusercontent.com/58871/95762510-b4f4a080-0ca5-11eb-8148-d208f891d202.png) - -### Future work - Publish RCs to the `candidate` channel - -If we wish to publish release candidates to the snap store, we can do that by creating a new snap build config - -1. Find the `release-vX.X` branch in the lauchpad.net mirror of the Kubo repo. - - e.g. https://code.launchpad.net/~ipfs/go-ipfs/+git/go-ipfs/+ref/release-v0.7.0 -2. Click "Create snap package" -3. Fill out the form using the same values as listed above for the stable channel, but: - - Set `Name` to `ipfs-candidate` _(this just needs to be a unique name to identify this config)_ - - For `Risk` select only `Candidate` _(so the snap is published to the `Candidate` channel.)_ - -You can trigger a build manually to kick things off. Subsequent changes to that branch will be published as a snap automatically when when the mirror next syncs with github (every 6-12hrs) - - -## Who can edit this? - -The `ipfs` snapcraft.io listing can be edited by - -- @elopio _TBC, the original submitter, need to check about getting ownership transferred._ -- @lidel -- @olizilla - -You need a Canonical developer account, then ask an existing owner to add you. Access is managed here https://dashboard.snapcraft.io/snaps/ipfs/collaboration/ - - -The launchpad.net config is managed by [**IPFS Maintainers**](https://launchpad.net/~ipfs) team, and you can request to join that team with your Canonical developer account. The list of maintainers is here: https://launchpad.net/~ipfs/+members - -At the time of writing the launchpad maintainers are: - -- @lidel -- @olizilla - - -## References - -- Walkthrough of publishing a snap package via snapcraft and launchpad: https://www.youtube.com/watch?v=X_U-pcvBFrU -- For more details on the Kubo snapcraft.yaml see: https://github.com/ipfs-shipyard/ipfs-snap -- publishing to multiple channels via build.snapcraft.io: https://forum.snapcraft.io/t/maintaining-and-publishing-multiple-to-multiple-channels-via-build-snapcraft-io/12455 -- How node.js manages snaps: https://github.com/ipfs/go-ipfs/issues/7679#issuecomment-695914986 From 51f60ea05a3f001d93a638b6d72a8834cca45280 Mon Sep 17 00:00:00 2001 From: Mohsin Zaidi <2236875+smrz2001@users.noreply.github.com> Date: Mon, 28 Nov 2022 18:05:44 -0500 Subject: [PATCH 25/35] feat(config): Pubsub.SeenMessagesTTL (#9372) Co-authored-by: Marcin Rataj --- config/pubsub.go | 4 + core/node/groups.go | 1 + docs/config.md | 20 ++ docs/examples/kubo-as-a-library/go.mod | 3 +- docs/examples/kubo-as-a-library/go.sum | 20 +- go.mod | 4 +- go.sum | 42 +-- .../integration/pubsub_msg_seen_cache_test.go | 244 ++++++++++++++++++ 8 files changed, 276 insertions(+), 62 deletions(-) create mode 100644 test/integration/pubsub_msg_seen_cache_test.go diff --git a/config/pubsub.go b/config/pubsub.go index aabc35a0e0f9..ba80843005a1 100644 --- a/config/pubsub.go +++ b/config/pubsub.go @@ -11,4 +11,8 @@ type PubsubConfig struct { // Enable pubsub (--enable-pubsub-experiment) Enabled Flag `json:",omitempty"` + + // SeenMessagesTTL configures the duration after which a previously seen + // message ID can be forgotten about. + SeenMessagesTTL *OptionalDuration `json:",omitempty"` } diff --git a/core/node/groups.go b/core/node/groups.go index 5c576fc447f8..cc0134b6446c 100644 --- a/core/node/groups.go +++ b/core/node/groups.go @@ -64,6 +64,7 @@ func LibP2P(bcfg *BuildCfg, cfg *config.Config) fx.Option { pubsubOptions = append( pubsubOptions, pubsub.WithMessageSigning(!cfg.Pubsub.DisableSigning), + pubsub.WithSeenMessagesTTL(cfg.Pubsub.SeenMessagesTTL.WithDefault(pubsub.TimeCacheDuration)), ) switch cfg.Pubsub.Router { diff --git a/docs/config.md b/docs/config.md index c70b186c1e01..ba775ad3b738 100644 --- a/docs/config.md +++ b/docs/config.md @@ -98,6 +98,7 @@ config file at runtime. - [`Pubsub.Enabled`](#pubsubenabled) - [`Pubsub.Router`](#pubsubrouter) - [`Pubsub.DisableSigning`](#pubsubdisablesigning) + - [`Pubsub.SeenMessagesTTL`](#pubsubseenmessagesttl) - [`Peering`](#peering) - [`Peering.Peers`](#peeringpeers) - [`Reprovider`](#reprovider) @@ -1200,6 +1201,25 @@ Default: `false` Type: `bool` +### `Pubsub.SeenMessagesTTL` + +Configures the duration after which a previously seen Pubsub Message ID can be +forgotten about. + +A smaller value for this parameter means that Pubsub messages in the cache will +be garbage collected sooner, which can result in a smaller cache. At the same +time, if there are slower nodes in the network that forward older messages, +this can cause more duplicates to be propagated through the network. + +Conversely, a larger value for this parameter means that Pubsub messages in the +cache will be garbage collected later, which can result in a larger cache for +the same traffic pattern. However, it is less likely that duplicates will be +propagated through the network. + +Default: see `TimeCacheDuration` from [go-libp2p-pubsub](https://github.com/libp2p/go-libp2p-pubsub) + +Type: `optionalDuration` + ## `Peering` Configures the peering subsystem. The peering subsystem configures Kubo to diff --git a/docs/examples/kubo-as-a-library/go.mod b/docs/examples/kubo-as-a-library/go.mod index b7398dbaa127..57333bfb27ac 100644 --- a/docs/examples/kubo-as-a-library/go.mod +++ b/docs/examples/kubo-as-a-library/go.mod @@ -121,10 +121,9 @@ require ( github.com/libp2p/go-flow-metrics v0.1.0 // indirect github.com/libp2p/go-libp2p-asn-util v0.2.0 // indirect github.com/libp2p/go-libp2p-core v0.20.1 // indirect - github.com/libp2p/go-libp2p-discovery v0.7.0 // indirect github.com/libp2p/go-libp2p-kad-dht v0.18.0 // indirect github.com/libp2p/go-libp2p-kbucket v0.4.7 // indirect - github.com/libp2p/go-libp2p-pubsub v0.6.1 // indirect + github.com/libp2p/go-libp2p-pubsub v0.8.1 // indirect github.com/libp2p/go-libp2p-pubsub-router v0.5.0 // indirect github.com/libp2p/go-libp2p-record v0.2.0 // indirect github.com/libp2p/go-libp2p-routing-helpers v0.4.0 // indirect diff --git a/docs/examples/kubo-as-a-library/go.sum b/docs/examples/kubo-as-a-library/go.sum index 170376b10e1e..73797d285018 100644 --- a/docs/examples/kubo-as-a-library/go.sum +++ b/docs/examples/kubo-as-a-library/go.sum @@ -798,7 +798,6 @@ github.com/libp2p/go-libp2p v0.13.0/go.mod h1:pM0beYdACRfHO1WcJlp65WXyG2A6NqYM+t github.com/libp2p/go-libp2p v0.14.3/go.mod h1:d12V4PdKbpL0T1/gsUNN8DfgMuRPDX8bS2QxCZlwRH0= github.com/libp2p/go-libp2p v0.14.4/go.mod h1:EIRU0Of4J5S8rkockZM7eJp2S0UrCyi55m2kJVru3rM= github.com/libp2p/go-libp2p v0.16.0/go.mod h1:ump42BsirwAWxKzsCiFnTtN1Yc+DuPu76fyMX364/O4= -github.com/libp2p/go-libp2p v0.18.0/go.mod h1:+veaZ9z1SZQhmc5PW78jvnnxZ89Mgvmh4cggO11ETmw= github.com/libp2p/go-libp2p v0.20.0/go.mod h1:g0C5Fu+aXXbCXkusCzLycuBowEih3ElmDqtbo61Em7k= github.com/libp2p/go-libp2p v0.22.0/go.mod h1:UDolmweypBSjQb2f7xutPnwZ/fxioLbMBxSjRksxxU4= github.com/libp2p/go-libp2p v0.23.2/go.mod h1:s9DEa5NLR4g+LZS+md5uGU4emjMWFiqkZr6hBTY8UxI= @@ -829,7 +828,6 @@ github.com/libp2p/go-libp2p-circuit v0.1.4/go.mod h1:CY67BrEjKNDhdTk8UgBX1Y/H5c3 github.com/libp2p/go-libp2p-circuit v0.2.1/go.mod h1:BXPwYDN5A8z4OEY9sOfr2DUQMLQvKt/6oku45YUmjIo= github.com/libp2p/go-libp2p-circuit v0.4.0/go.mod h1:t/ktoFIUzM6uLQ+o1G6NuBl2ANhBKN9Bc8jRIk31MoA= github.com/libp2p/go-libp2p-circuit v0.6.0/go.mod h1:kB8hY+zCpMeScyvFrKrGicRdid6vNXbunKE4rXATZ0M= -github.com/libp2p/go-libp2p-connmgr v0.2.4 h1:TMS0vc0TCBomtQJyWr7fYxcVYYhx+q/2gF++G5Jkl/w= github.com/libp2p/go-libp2p-connmgr v0.2.4/go.mod h1:YV0b/RIm8NGPnnNWM7hG9Q38OeQiQfKhHCCs1++ufn0= github.com/libp2p/go-libp2p-core v0.0.1/go.mod h1:g/VxnTZ/1ygHxH3dKok7Vno1VfpvGcGip57wjTU4fco= github.com/libp2p/go-libp2p-core v0.0.2/go.mod h1:9dAcntw/n46XycV4RnlBq3BpgrmyUi9LuoTNdPrbUco= @@ -876,8 +874,6 @@ github.com/libp2p/go-libp2p-discovery v0.2.0/go.mod h1:s4VGaxYMbw4+4+tsoQTqh7wfx github.com/libp2p/go-libp2p-discovery v0.3.0/go.mod h1:o03drFnz9BVAZdzC/QUQ+NeQOu38Fu7LJGEOK2gQltw= github.com/libp2p/go-libp2p-discovery v0.5.0/go.mod h1:+srtPIU9gDaBNu//UHvcdliKBIcr4SfDcm0/PfPJLug= github.com/libp2p/go-libp2p-discovery v0.6.0/go.mod h1:/u1voHt0tKIe5oIA1RHBKQLVCWPna2dXmPNHc2zR9S8= -github.com/libp2p/go-libp2p-discovery v0.7.0 h1:6Iu3NyningTb/BmUnEhcTwzwbs4zcywwbfTulM9LHuc= -github.com/libp2p/go-libp2p-discovery v0.7.0/go.mod h1:zPug0Rxib1aQG9iIdwOpRpBf18cAfZgzicO826UQP4I= github.com/libp2p/go-libp2p-gostream v0.3.0/go.mod h1:pLBQu8db7vBMNINGsAwLL/ZCE8wng5V1FThoaE5rNjc= github.com/libp2p/go-libp2p-host v0.0.1/go.mod h1:qWd+H1yuU0m5CwzAkvbSjqKairayEHdR5MMl7Cwa7Go= github.com/libp2p/go-libp2p-host v0.0.3/go.mod h1:Y/qPyA6C8j2coYyos1dfRm0I8+nvd4TGrDGt4tA7JR8= @@ -904,7 +900,6 @@ github.com/libp2p/go-libp2p-mplex v0.3.0/go.mod h1:l9QWxRbbb5/hQMECEb908GbS9Sm2U github.com/libp2p/go-libp2p-mplex v0.4.0/go.mod h1:yCyWJE2sc6TBTnFpjvLuEJgTSw/u+MamvzILKdX7asw= github.com/libp2p/go-libp2p-mplex v0.4.1/go.mod h1:cmy+3GfqfM1PceHTLL7zQzAAYaryDu6iPSC+CIb094g= github.com/libp2p/go-libp2p-mplex v0.5.0/go.mod h1:eLImPJLkj3iG5t5lq68w3Vm5NAQ5BcKwrrb2VmOYb3M= -github.com/libp2p/go-libp2p-mplex v0.6.0/go.mod h1:i3usuPrBbh9FD2fLZjGpotyNkwr42KStYZQY7BeTiu4= github.com/libp2p/go-libp2p-nat v0.0.4/go.mod h1:N9Js/zVtAXqaeT99cXgTV9e75KpnWCvVOiGzlcHmBbY= github.com/libp2p/go-libp2p-nat v0.0.5/go.mod h1:1qubaE5bTZMJE+E/uu2URroMbzdubFz1ChgiN79yKPE= github.com/libp2p/go-libp2p-nat v0.0.6/go.mod h1:iV59LVhB3IkFvS6S6sauVTSOrNEANnINbI/fkaLimiw= @@ -938,8 +933,8 @@ github.com/libp2p/go-libp2p-pnet v0.2.0/go.mod h1:Qqvq6JH/oMZGwqs3N1Fqhv8NVhrdYc github.com/libp2p/go-libp2p-protocol v0.0.1/go.mod h1:Af9n4PiruirSDjHycM1QuiMi/1VZNHYcK8cLgFJLZ4s= github.com/libp2p/go-libp2p-protocol v0.1.0/go.mod h1:KQPHpAabB57XQxGrXCNvbL6UEXfQqUgC/1adR2Xtflk= github.com/libp2p/go-libp2p-pubsub v0.6.0/go.mod h1:nJv87QM2cU0w45KPR1rZicq+FmFIOD16zmT+ep1nOmg= -github.com/libp2p/go-libp2p-pubsub v0.6.1 h1:wycbV+f4rreCoVY61Do6g/BUk0RIrbNRcYVbn+QkjGk= -github.com/libp2p/go-libp2p-pubsub v0.6.1/go.mod h1:nJv87QM2cU0w45KPR1rZicq+FmFIOD16zmT+ep1nOmg= +github.com/libp2p/go-libp2p-pubsub v0.8.1 h1:hSw09NauFUaA0FLgQPBJp6QOy0a2n+HSkb8IeOx8OnY= +github.com/libp2p/go-libp2p-pubsub v0.8.1/go.mod h1:e4kT+DYjzPUYGZeWk4I+oxCSYTXizzXii5LDRRhjKSw= github.com/libp2p/go-libp2p-pubsub-router v0.5.0 h1:WuYdY42DVIJ+N0qMdq2du/E9poJH+xzsXL7Uptwj9tw= github.com/libp2p/go-libp2p-pubsub-router v0.5.0/go.mod h1:TRJKskSem3C0aSb3CmRgPwq6IleVFzds6hS09fmZbGM= github.com/libp2p/go-libp2p-quic-transport v0.10.0/go.mod h1:RfJbZ8IqXIhxBRm5hqUEJqjiiY8xmEuq3HUDS993MkA= @@ -947,14 +942,12 @@ github.com/libp2p/go-libp2p-quic-transport v0.11.2/go.mod h1:wlanzKtIh6pHrq+0U3p github.com/libp2p/go-libp2p-quic-transport v0.13.0/go.mod h1:39/ZWJ1TW/jx1iFkKzzUg00W6tDJh73FC0xYudjr7Hc= github.com/libp2p/go-libp2p-quic-transport v0.15.0/go.mod h1:wv4uGwjcqe8Mhjj7N/Ic0aKjA+/10UnMlSzLO0yRpYQ= github.com/libp2p/go-libp2p-quic-transport v0.16.0/go.mod h1:1BXjVMzr+w7EkPfiHkKnwsWjPjtfaNT0q8RS3tGDvEQ= -github.com/libp2p/go-libp2p-quic-transport v0.16.1/go.mod h1:1BXjVMzr+w7EkPfiHkKnwsWjPjtfaNT0q8RS3tGDvEQ= github.com/libp2p/go-libp2p-record v0.0.1/go.mod h1:grzqg263Rug/sRex85QrDOLntdFAymLDLm7lxMgU79Q= github.com/libp2p/go-libp2p-record v0.1.0/go.mod h1:ujNc8iuE5dlKWVy6wuL6dd58t0n7xI4hAIl8pE6wu5Q= github.com/libp2p/go-libp2p-record v0.1.2/go.mod h1:pal0eNcT5nqZaTV7UGhqeGqxFgGdsU/9W//C8dqjQDk= github.com/libp2p/go-libp2p-record v0.1.3/go.mod h1:yNUff/adKIfPnYQXgp6FQmNu3gLJ6EMg7+/vv2+9pY4= github.com/libp2p/go-libp2p-record v0.2.0 h1:oiNUOCWno2BFuxt3my4i1frNrt7PerzB3queqa1NkQ0= github.com/libp2p/go-libp2p-record v0.2.0/go.mod h1:I+3zMkvvg5m2OcSdoL0KPljyJyvNDFGKX7QdlpYUcwk= -github.com/libp2p/go-libp2p-resource-manager v0.1.5/go.mod h1:wJPNjeE4XQlxeidwqVY5G6DLOKqFK33u2n8blpl0I6Y= github.com/libp2p/go-libp2p-resource-manager v0.3.0/go.mod h1:K+eCkiapf+ey/LADO4TaMpMTP9/Qde/uLlrnRqV4PLQ= github.com/libp2p/go-libp2p-routing v0.0.1/go.mod h1:N51q3yTr4Zdr7V8Jt2JIktVU+3xBBylx1MZeVA6t1Ys= github.com/libp2p/go-libp2p-routing-helpers v0.2.3/go.mod h1:795bh+9YeoFl99rMASoiVgHdi5bjack0N1+AFAdbvBw= @@ -977,7 +970,6 @@ github.com/libp2p/go-libp2p-swarm v0.5.0/go.mod h1:sU9i6BoHE0Ve5SKz3y9WfKrh8dUat github.com/libp2p/go-libp2p-swarm v0.5.3/go.mod h1:NBn7eNW2lu568L7Ns9wdFrOhgRlkRnIDg0FLKbuu3i8= github.com/libp2p/go-libp2p-swarm v0.8.0/go.mod h1:sOMp6dPuqco0r0GHTzfVheVBh6UEL0L1lXUZ5ot2Fvc= github.com/libp2p/go-libp2p-swarm v0.10.0/go.mod h1:71ceMcV6Rg/0rIQ97rsZWMzto1l9LnNquef+efcRbmA= -github.com/libp2p/go-libp2p-swarm v0.10.2/go.mod h1:Pdkq0QU5a+qu+oyqIV3bknMsnzk9lnNyKvB9acJ5aZs= github.com/libp2p/go-libp2p-swarm v0.11.0 h1:ITgsTEY2tA4OxFJGcWeugiMh2x5+VOEnI2JStT1EWxI= github.com/libp2p/go-libp2p-swarm v0.11.0/go.mod h1:sumjVYrC84gPSZOFKL8hNcnN6HZvJSwJ8ymaXeko4Lk= github.com/libp2p/go-libp2p-testing v0.0.1/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= @@ -992,7 +984,6 @@ github.com/libp2p/go-libp2p-testing v0.4.0/go.mod h1:Q+PFXYoiYFN5CAEG2w3gLPEzotl github.com/libp2p/go-libp2p-testing v0.4.2/go.mod h1:Q+PFXYoiYFN5CAEG2w3gLPEzotlKsNSbKQ/lImlOWF0= github.com/libp2p/go-libp2p-testing v0.5.0/go.mod h1:QBk8fqIL1XNcno/l3/hhaIEn4aLRijpYOR+zVjjlh+A= github.com/libp2p/go-libp2p-testing v0.7.0/go.mod h1:OLbdn9DbgdMwv00v+tlp1l3oe2Cl+FAjoWIA2pa0X6E= -github.com/libp2p/go-libp2p-testing v0.8.0/go.mod h1:gRdsNxQSxAZowTgcLY7CC33xPmleZzoBpqSYbWenqPc= github.com/libp2p/go-libp2p-testing v0.9.2/go.mod h1:Td7kbdkWqYTJYQGTwzlgXwaqldraIanyjuRiAbK/XQU= github.com/libp2p/go-libp2p-testing v0.11.0/go.mod h1:qG4sF27dfKFoK9KlVzK2y52LQKhp0VEmLjV5aDqr1Hg= github.com/libp2p/go-libp2p-testing v0.12.0 h1:EPvBb4kKMWO29qP4mZGyhVzUyR25dvfUIK5WDu6iPUA= @@ -1012,7 +1003,6 @@ github.com/libp2p/go-libp2p-transport-upgrader v0.4.3/go.mod h1:bpkldbOWXMrXhpZb github.com/libp2p/go-libp2p-transport-upgrader v0.4.6/go.mod h1:JE0WQuQdy+uLZ5zOaI3Nw9dWGYJIA7mywEtP2lMvnyk= github.com/libp2p/go-libp2p-transport-upgrader v0.5.0/go.mod h1:Rc+XODlB3yce7dvFV4q/RmyJGsFcCZRkeZMu/Zdg0mo= github.com/libp2p/go-libp2p-transport-upgrader v0.7.0/go.mod h1:GIR2aTRp1J5yjVlkUoFqMkdobfob6RnAwYg/RZPhrzg= -github.com/libp2p/go-libp2p-transport-upgrader v0.7.1/go.mod h1:GIR2aTRp1J5yjVlkUoFqMkdobfob6RnAwYg/RZPhrzg= github.com/libp2p/go-libp2p-xor v0.0.0-20210714161855-5c005aca55db/go.mod h1:LSTM5yRnjGZbWNTA/hRwq2gGFrvRIbQJscoIL/u6InY= github.com/libp2p/go-libp2p-xor v0.1.0 h1:hhQwT4uGrBcuAkUGXADuPltalOdpf9aag9kaYNT2tLA= github.com/libp2p/go-libp2p-xor v0.1.0/go.mod h1:LSTM5yRnjGZbWNTA/hRwq2gGFrvRIbQJscoIL/u6InY= @@ -1030,8 +1020,6 @@ github.com/libp2p/go-libp2p-yamux v0.5.1/go.mod h1:dowuvDu8CRWmr0iqySMiSxK+W0iL5 github.com/libp2p/go-libp2p-yamux v0.5.4/go.mod h1:tfrXbyaTqqSU654GTvK3ocnSZL3BuHoeTSqhcel1wsE= github.com/libp2p/go-libp2p-yamux v0.6.0/go.mod h1:MRhd6mAYnFRnSISp4M8i0ClV/j+mWHo2mYLifWGw33k= github.com/libp2p/go-libp2p-yamux v0.8.0/go.mod h1:yTkPgN2ib8FHyU1ZcVD7aelzyAqXXwEPbyx+aSKm9h8= -github.com/libp2p/go-libp2p-yamux v0.8.1/go.mod h1:rUozF8Jah2dL9LLGyBaBeTQeARdwhefMCTQVQt6QobE= -github.com/libp2p/go-libp2p-yamux v0.8.2/go.mod h1:rUozF8Jah2dL9LLGyBaBeTQeARdwhefMCTQVQt6QobE= github.com/libp2p/go-maddr-filter v0.0.1/go.mod h1:6eT12kSQMA9x2pvFQa+xesMKUBlj9VImZbj3B9FBH/Q= github.com/libp2p/go-maddr-filter v0.0.4/go.mod h1:6eT12kSQMA9x2pvFQa+xesMKUBlj9VImZbj3B9FBH/Q= github.com/libp2p/go-maddr-filter v0.0.5/go.mod h1:Jk+36PMfIqCJhAnaASRH83bdAvfDRp/w6ENFaC9bG+M= @@ -1044,7 +1032,6 @@ github.com/libp2p/go-mplex v0.1.2/go.mod h1:Xgz2RDCi3co0LeZfgjm4OgUF15+sVR8SRcu3 github.com/libp2p/go-mplex v0.2.0/go.mod h1:0Oy/A9PQlwBytDRp4wSkFnzHYDKcpLot35JQ6msjvYQ= github.com/libp2p/go-mplex v0.3.0/go.mod h1:0Oy/A9PQlwBytDRp4wSkFnzHYDKcpLot35JQ6msjvYQ= github.com/libp2p/go-mplex v0.4.0/go.mod h1:y26Lx+wNVtMYMaPu300Cbot5LkEZ4tJaNYeHeT9dh6E= -github.com/libp2p/go-mplex v0.6.0/go.mod h1:y26Lx+wNVtMYMaPu300Cbot5LkEZ4tJaNYeHeT9dh6E= github.com/libp2p/go-mplex v0.7.0 h1:BDhFZdlk5tbr0oyFq/xv/NPGfjbnrsDam1EvutpBDbY= github.com/libp2p/go-mplex v0.7.0/go.mod h1:rW8ThnRcYWft/Jb2jeORBmPd6xuG3dGxWN/W168L9EU= github.com/libp2p/go-msgio v0.0.2/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= @@ -1103,7 +1090,6 @@ github.com/libp2p/go-tcp-transport v0.2.4/go.mod h1:9dvr03yqrPyYGIEN6Dy5UvdJZjyP github.com/libp2p/go-tcp-transport v0.2.7/go.mod h1:lue9p1b3VmZj1MhhEGB/etmvF/nBQ0X9CW2DutBT3MM= github.com/libp2p/go-tcp-transport v0.4.0/go.mod h1:0y52Rwrn4076xdJYu/51/qJIdxz+EWDAOG2S45sV3VI= github.com/libp2p/go-tcp-transport v0.5.0/go.mod h1:UPPL0DIjQqiWRwVAb+CEQlaAG0rp/mCqJfIhFcLHc4Y= -github.com/libp2p/go-tcp-transport v0.5.1/go.mod h1:UPPL0DIjQqiWRwVAb+CEQlaAG0rp/mCqJfIhFcLHc4Y= github.com/libp2p/go-testutil v0.0.1/go.mod h1:iAcJc/DKJQanJ5ws2V+u5ywdL2n12X1WbbEG+Jjy69I= github.com/libp2p/go-testutil v0.1.0/go.mod h1:81b2n5HypcVyrCg/MJx4Wgfp/VHojytjVe/gLzZ2Ehc= github.com/libp2p/go-ws-transport v0.0.5/go.mod h1:Qbl4BxPfXXhhd/o0wcrgoaItHqA9tnZjoFZnxykuaXU= @@ -1113,7 +1099,6 @@ github.com/libp2p/go-ws-transport v0.3.0/go.mod h1:bpgTJmRZAvVHrgHybCVyqoBmyLQ1f github.com/libp2p/go-ws-transport v0.3.1/go.mod h1:bpgTJmRZAvVHrgHybCVyqoBmyLQ1fiZuEaBYusP5zsk= github.com/libp2p/go-ws-transport v0.4.0/go.mod h1:EcIEKqf/7GDjth6ksuS/6p7R49V4CBY6/E7R/iyhYUA= github.com/libp2p/go-ws-transport v0.5.0/go.mod h1:I2juo1dNTbl8BKSBYo98XY85kU2xds1iamArLvl8kNg= -github.com/libp2p/go-ws-transport v0.6.0/go.mod h1:dXqtI9e2JV9FtF1NOtWVZSKXh5zXvnuwPXfj8GPBbYU= github.com/libp2p/go-yamux v1.2.1/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= github.com/libp2p/go-yamux v1.2.2/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= github.com/libp2p/go-yamux v1.2.3/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= @@ -1128,7 +1113,6 @@ github.com/libp2p/go-yamux/v2 v2.0.0/go.mod h1:NVWira5+sVUIU6tu1JWvaRn1dRnG+cawO github.com/libp2p/go-yamux/v2 v2.2.0/go.mod h1:3So6P6TV6r75R9jiBpiIKgU/66lOarCZjqROGxzPpPQ= github.com/libp2p/go-yamux/v2 v2.3.0/go.mod h1:iTU+lOIn/2h0AgKcL49clNTwfEw+WSfDYrXe05EyKIs= github.com/libp2p/go-yamux/v3 v3.0.1/go.mod h1:s2LsDhHbh+RfCsQoICSYt58U2f8ijtPANFD8BmE74Bo= -github.com/libp2p/go-yamux/v3 v3.0.2/go.mod h1:s2LsDhHbh+RfCsQoICSYt58U2f8ijtPANFD8BmE74Bo= github.com/libp2p/go-yamux/v3 v3.1.1/go.mod h1:jeLEQgLXqE2YqX1ilAClIfCMDY+0uXQUKmmb/qp0gT4= github.com/libp2p/go-yamux/v3 v3.1.2/go.mod h1:jeLEQgLXqE2YqX1ilAClIfCMDY+0uXQUKmmb/qp0gT4= github.com/libp2p/go-yamux/v4 v4.0.0 h1:+Y80dV2Yx/kv7Y7JKu0LECyVdMXm1VUoko+VQ9rBfZQ= diff --git a/go.mod b/go.mod index 405284f49862..fdb2efa083d8 100644 --- a/go.mod +++ b/go.mod @@ -76,7 +76,7 @@ require ( github.com/libp2p/go-libp2p-kad-dht v0.18.0 github.com/libp2p/go-libp2p-kbucket v0.4.7 github.com/libp2p/go-libp2p-loggables v0.1.0 - github.com/libp2p/go-libp2p-pubsub v0.6.1 + github.com/libp2p/go-libp2p-pubsub v0.8.1 github.com/libp2p/go-libp2p-pubsub-router v0.5.0 github.com/libp2p/go-libp2p-record v0.2.0 github.com/libp2p/go-libp2p-routing-helpers v0.4.0 @@ -172,8 +172,8 @@ require ( github.com/libp2p/go-cidranger v1.1.0 // indirect github.com/libp2p/go-flow-metrics v0.1.0 // indirect github.com/libp2p/go-libp2p-asn-util v0.2.0 // indirect + github.com/libp2p/go-libp2p-blankhost v0.3.0 // indirect github.com/libp2p/go-libp2p-core v0.20.1 // indirect - github.com/libp2p/go-libp2p-discovery v0.7.0 // indirect github.com/libp2p/go-libp2p-gostream v0.3.0 // indirect github.com/libp2p/go-libp2p-swarm v0.11.0 // indirect github.com/libp2p/go-libp2p-xor v0.1.0 // indirect diff --git a/go.sum b/go.sum index ef0441f6c3a1..11fd7a8b6ca6 100644 --- a/go.sum +++ b/go.sum @@ -605,7 +605,6 @@ github.com/ipfs/go-log/v2 v2.0.5/go.mod h1:eZs4Xt4ZUJQFM3DlanGhy7TkwwawCZcSByscw github.com/ipfs/go-log/v2 v2.1.1/go.mod h1:2v2nsGfZsvvAJz13SyFzf9ObaqwHiHxsPLEHntrv9KM= github.com/ipfs/go-log/v2 v2.1.3/go.mod h1:/8d0SH3Su5Ooc31QlL1WysJhvyOTDCjcCZ9Axpmri6g= github.com/ipfs/go-log/v2 v2.3.0/go.mod h1:QqGoj30OTpnKaG/LKTGTxoP2mmQtjVMEnK72gynbe/g= -github.com/ipfs/go-log/v2 v2.5.0/go.mod h1:prSpmC1Gpllc9UYWxDiZDreBYw7zp4Iqp1kOLU9U5UI= github.com/ipfs/go-log/v2 v2.5.1 h1:1XdUzF7048prq4aBjDQQ4SL5RxftpRGdXhNRwKSAlcY= github.com/ipfs/go-log/v2 v2.5.1/go.mod h1:prSpmC1Gpllc9UYWxDiZDreBYw7zp4Iqp1kOLU9U5UI= github.com/ipfs/go-merkledag v0.0.6/go.mod h1:QYPdnlvkOg7GnQRofu9XZimC5ZW5Wi3bKys/4GQQfto= @@ -784,7 +783,6 @@ github.com/libp2p/go-libp2p v0.13.0/go.mod h1:pM0beYdACRfHO1WcJlp65WXyG2A6NqYM+t github.com/libp2p/go-libp2p v0.14.3/go.mod h1:d12V4PdKbpL0T1/gsUNN8DfgMuRPDX8bS2QxCZlwRH0= github.com/libp2p/go-libp2p v0.14.4/go.mod h1:EIRU0Of4J5S8rkockZM7eJp2S0UrCyi55m2kJVru3rM= github.com/libp2p/go-libp2p v0.16.0/go.mod h1:ump42BsirwAWxKzsCiFnTtN1Yc+DuPu76fyMX364/O4= -github.com/libp2p/go-libp2p v0.18.0/go.mod h1:+veaZ9z1SZQhmc5PW78jvnnxZ89Mgvmh4cggO11ETmw= github.com/libp2p/go-libp2p v0.23.4 h1:hWi9XHSOVFR1oDWRk7rigfyA4XNMuYL20INNybP9LP8= github.com/libp2p/go-libp2p v0.23.4/go.mod h1:s9DEa5NLR4g+LZS+md5uGU4emjMWFiqkZr6hBTY8UxI= github.com/libp2p/go-libp2p-asn-util v0.0.0-20200825225859-85005c6cf052/go.mod h1:nRMRTab+kZuk0LnKZpxhOVH/ndsdr2Nr//Zltc/vwgo= @@ -811,8 +809,6 @@ github.com/libp2p/go-libp2p-circuit v0.1.0/go.mod h1:Ahq4cY3V9VJcHcn1SBXjr78AbFk github.com/libp2p/go-libp2p-circuit v0.1.4/go.mod h1:CY67BrEjKNDhdTk8UgBX1Y/H5c3xkAcs3gnksxY7osU= github.com/libp2p/go-libp2p-circuit v0.2.1/go.mod h1:BXPwYDN5A8z4OEY9sOfr2DUQMLQvKt/6oku45YUmjIo= github.com/libp2p/go-libp2p-circuit v0.4.0/go.mod h1:t/ktoFIUzM6uLQ+o1G6NuBl2ANhBKN9Bc8jRIk31MoA= -github.com/libp2p/go-libp2p-circuit v0.6.0/go.mod h1:kB8hY+zCpMeScyvFrKrGicRdid6vNXbunKE4rXATZ0M= -github.com/libp2p/go-libp2p-connmgr v0.2.4 h1:TMS0vc0TCBomtQJyWr7fYxcVYYhx+q/2gF++G5Jkl/w= github.com/libp2p/go-libp2p-connmgr v0.2.4/go.mod h1:YV0b/RIm8NGPnnNWM7hG9Q38OeQiQfKhHCCs1++ufn0= github.com/libp2p/go-libp2p-core v0.0.1/go.mod h1:g/VxnTZ/1ygHxH3dKok7Vno1VfpvGcGip57wjTU4fco= github.com/libp2p/go-libp2p-core v0.0.2/go.mod h1:9dAcntw/n46XycV4RnlBq3BpgrmyUi9LuoTNdPrbUco= @@ -843,8 +839,6 @@ github.com/libp2p/go-libp2p-core v0.8.6/go.mod h1:dgHr0l0hIKfWpGpqAMbpo19pen9wJf github.com/libp2p/go-libp2p-core v0.9.0/go.mod h1:ESsbz31oC3C1AvMJoGx26RTuCkNhmkSRCqZ0kQtJ2/8= github.com/libp2p/go-libp2p-core v0.10.0/go.mod h1:ECdxehoYosLYHgDDFa2N4yE8Y7aQRAMf0sX9mf2sbGg= github.com/libp2p/go-libp2p-core v0.11.0/go.mod h1:ECdxehoYosLYHgDDFa2N4yE8Y7aQRAMf0sX9mf2sbGg= -github.com/libp2p/go-libp2p-core v0.12.0/go.mod h1:ECdxehoYosLYHgDDFa2N4yE8Y7aQRAMf0sX9mf2sbGg= -github.com/libp2p/go-libp2p-core v0.14.0/go.mod h1:tLasfcVdTXnixsLB0QYaT1syJOhsbrhG7q6pGrHtBg8= github.com/libp2p/go-libp2p-core v0.20.1 h1:fQz4BJyIFmSZAiTbKV8qoYhEH5Dtv/cVhZbG3Ib/+Cw= github.com/libp2p/go-libp2p-core v0.20.1/go.mod h1:6zR8H7CvQWgYLsbG4on6oLNSGcyKaYFSEYyDt51+bIY= github.com/libp2p/go-libp2p-crypto v0.0.1/go.mod h1:yJkNyDmO341d5wwXxDUGO0LykUVT72ImHNUqh5D/dBE= @@ -856,8 +850,6 @@ github.com/libp2p/go-libp2p-discovery v0.2.0/go.mod h1:s4VGaxYMbw4+4+tsoQTqh7wfx github.com/libp2p/go-libp2p-discovery v0.3.0/go.mod h1:o03drFnz9BVAZdzC/QUQ+NeQOu38Fu7LJGEOK2gQltw= github.com/libp2p/go-libp2p-discovery v0.5.0/go.mod h1:+srtPIU9gDaBNu//UHvcdliKBIcr4SfDcm0/PfPJLug= github.com/libp2p/go-libp2p-discovery v0.6.0/go.mod h1:/u1voHt0tKIe5oIA1RHBKQLVCWPna2dXmPNHc2zR9S8= -github.com/libp2p/go-libp2p-discovery v0.7.0 h1:6Iu3NyningTb/BmUnEhcTwzwbs4zcywwbfTulM9LHuc= -github.com/libp2p/go-libp2p-discovery v0.7.0/go.mod h1:zPug0Rxib1aQG9iIdwOpRpBf18cAfZgzicO826UQP4I= github.com/libp2p/go-libp2p-gostream v0.3.0 h1:rnas//vRdHYCr7bjraZJISPwZV8OGMjeX5k5fN5Ax44= github.com/libp2p/go-libp2p-gostream v0.3.0/go.mod h1:pLBQu8db7vBMNINGsAwLL/ZCE8wng5V1FThoaE5rNjc= github.com/libp2p/go-libp2p-host v0.0.1/go.mod h1:qWd+H1yuU0m5CwzAkvbSjqKairayEHdR5MMl7Cwa7Go= @@ -886,8 +878,6 @@ github.com/libp2p/go-libp2p-mplex v0.2.3/go.mod h1:CK3p2+9qH9x+7ER/gWWDYJ3QW5ZxW github.com/libp2p/go-libp2p-mplex v0.3.0/go.mod h1:l9QWxRbbb5/hQMECEb908GbS9Sm2UAR2KFZKUJEynEs= github.com/libp2p/go-libp2p-mplex v0.4.0/go.mod h1:yCyWJE2sc6TBTnFpjvLuEJgTSw/u+MamvzILKdX7asw= github.com/libp2p/go-libp2p-mplex v0.4.1/go.mod h1:cmy+3GfqfM1PceHTLL7zQzAAYaryDu6iPSC+CIb094g= -github.com/libp2p/go-libp2p-mplex v0.5.0/go.mod h1:eLImPJLkj3iG5t5lq68w3Vm5NAQ5BcKwrrb2VmOYb3M= -github.com/libp2p/go-libp2p-mplex v0.6.0/go.mod h1:i3usuPrBbh9FD2fLZjGpotyNkwr42KStYZQY7BeTiu4= github.com/libp2p/go-libp2p-nat v0.0.4/go.mod h1:N9Js/zVtAXqaeT99cXgTV9e75KpnWCvVOiGzlcHmBbY= github.com/libp2p/go-libp2p-nat v0.0.5/go.mod h1:1qubaE5bTZMJE+E/uu2URroMbzdubFz1ChgiN79yKPE= github.com/libp2p/go-libp2p-nat v0.0.6/go.mod h1:iV59LVhB3IkFvS6S6sauVTSOrNEANnINbI/fkaLimiw= @@ -914,29 +904,25 @@ github.com/libp2p/go-libp2p-peerstore v0.2.6/go.mod h1:ss/TWTgHZTMpsU/oKVVPQCGuD github.com/libp2p/go-libp2p-peerstore v0.2.7/go.mod h1:ss/TWTgHZTMpsU/oKVVPQCGuDHItOpf2W8RxAi50P2s= github.com/libp2p/go-libp2p-peerstore v0.2.8/go.mod h1:gGiPlXdz7mIHd2vfAsHzBNAMqSDkt2UBFwgcITgw1lA= github.com/libp2p/go-libp2p-peerstore v0.4.0/go.mod h1:rDJUFyzEWPpXpEwywkcTYYzDHlwza8riYMaUzaN6hX0= -github.com/libp2p/go-libp2p-peerstore v0.6.0/go.mod h1:DGEmKdXrcYpK9Jha3sS7MhqYdInxJy84bIPtSu65bKc= github.com/libp2p/go-libp2p-peerstore v0.8.0 h1:bzTG693TA1Ju/zKmUCQzDLSqiJnyRFVwPpuloZ/OZtI= github.com/libp2p/go-libp2p-pnet v0.2.0/go.mod h1:Qqvq6JH/oMZGwqs3N1Fqhv8NVhrdYcO0BW4wssv21LA= github.com/libp2p/go-libp2p-protocol v0.0.1/go.mod h1:Af9n4PiruirSDjHycM1QuiMi/1VZNHYcK8cLgFJLZ4s= github.com/libp2p/go-libp2p-protocol v0.1.0/go.mod h1:KQPHpAabB57XQxGrXCNvbL6UEXfQqUgC/1adR2Xtflk= github.com/libp2p/go-libp2p-pubsub v0.6.0/go.mod h1:nJv87QM2cU0w45KPR1rZicq+FmFIOD16zmT+ep1nOmg= -github.com/libp2p/go-libp2p-pubsub v0.6.1 h1:wycbV+f4rreCoVY61Do6g/BUk0RIrbNRcYVbn+QkjGk= -github.com/libp2p/go-libp2p-pubsub v0.6.1/go.mod h1:nJv87QM2cU0w45KPR1rZicq+FmFIOD16zmT+ep1nOmg= +github.com/libp2p/go-libp2p-pubsub v0.8.1 h1:hSw09NauFUaA0FLgQPBJp6QOy0a2n+HSkb8IeOx8OnY= +github.com/libp2p/go-libp2p-pubsub v0.8.1/go.mod h1:e4kT+DYjzPUYGZeWk4I+oxCSYTXizzXii5LDRRhjKSw= github.com/libp2p/go-libp2p-pubsub-router v0.5.0 h1:WuYdY42DVIJ+N0qMdq2du/E9poJH+xzsXL7Uptwj9tw= github.com/libp2p/go-libp2p-pubsub-router v0.5.0/go.mod h1:TRJKskSem3C0aSb3CmRgPwq6IleVFzds6hS09fmZbGM= github.com/libp2p/go-libp2p-quic-transport v0.10.0/go.mod h1:RfJbZ8IqXIhxBRm5hqUEJqjiiY8xmEuq3HUDS993MkA= github.com/libp2p/go-libp2p-quic-transport v0.11.2/go.mod h1:wlanzKtIh6pHrq+0U3p3DY9PJfGqxMgPaGKaK5LifwQ= github.com/libp2p/go-libp2p-quic-transport v0.13.0/go.mod h1:39/ZWJ1TW/jx1iFkKzzUg00W6tDJh73FC0xYudjr7Hc= github.com/libp2p/go-libp2p-quic-transport v0.15.0/go.mod h1:wv4uGwjcqe8Mhjj7N/Ic0aKjA+/10UnMlSzLO0yRpYQ= -github.com/libp2p/go-libp2p-quic-transport v0.16.0/go.mod h1:1BXjVMzr+w7EkPfiHkKnwsWjPjtfaNT0q8RS3tGDvEQ= -github.com/libp2p/go-libp2p-quic-transport v0.16.1/go.mod h1:1BXjVMzr+w7EkPfiHkKnwsWjPjtfaNT0q8RS3tGDvEQ= github.com/libp2p/go-libp2p-record v0.0.1/go.mod h1:grzqg263Rug/sRex85QrDOLntdFAymLDLm7lxMgU79Q= github.com/libp2p/go-libp2p-record v0.1.0/go.mod h1:ujNc8iuE5dlKWVy6wuL6dd58t0n7xI4hAIl8pE6wu5Q= github.com/libp2p/go-libp2p-record v0.1.2/go.mod h1:pal0eNcT5nqZaTV7UGhqeGqxFgGdsU/9W//C8dqjQDk= github.com/libp2p/go-libp2p-record v0.1.3/go.mod h1:yNUff/adKIfPnYQXgp6FQmNu3gLJ6EMg7+/vv2+9pY4= github.com/libp2p/go-libp2p-record v0.2.0 h1:oiNUOCWno2BFuxt3my4i1frNrt7PerzB3queqa1NkQ0= github.com/libp2p/go-libp2p-record v0.2.0/go.mod h1:I+3zMkvvg5m2OcSdoL0KPljyJyvNDFGKX7QdlpYUcwk= -github.com/libp2p/go-libp2p-resource-manager v0.1.5/go.mod h1:wJPNjeE4XQlxeidwqVY5G6DLOKqFK33u2n8blpl0I6Y= github.com/libp2p/go-libp2p-routing v0.0.1/go.mod h1:N51q3yTr4Zdr7V8Jt2JIktVU+3xBBylx1MZeVA6t1Ys= github.com/libp2p/go-libp2p-routing-helpers v0.2.3/go.mod h1:795bh+9YeoFl99rMASoiVgHdi5bjack0N1+AFAdbvBw= github.com/libp2p/go-libp2p-routing-helpers v0.4.0 h1:b7y4aixQ7AwbqYfcOQ6wTw8DQvuRZeTAA0Od3YYN5yc= @@ -957,8 +943,6 @@ github.com/libp2p/go-libp2p-swarm v0.4.0/go.mod h1:XVFcO52VoLoo0eitSxNQWYq4D6syd github.com/libp2p/go-libp2p-swarm v0.5.0/go.mod h1:sU9i6BoHE0Ve5SKz3y9WfKrh8dUat6JknzUehFx8xW4= github.com/libp2p/go-libp2p-swarm v0.5.3/go.mod h1:NBn7eNW2lu568L7Ns9wdFrOhgRlkRnIDg0FLKbuu3i8= github.com/libp2p/go-libp2p-swarm v0.8.0/go.mod h1:sOMp6dPuqco0r0GHTzfVheVBh6UEL0L1lXUZ5ot2Fvc= -github.com/libp2p/go-libp2p-swarm v0.10.0/go.mod h1:71ceMcV6Rg/0rIQ97rsZWMzto1l9LnNquef+efcRbmA= -github.com/libp2p/go-libp2p-swarm v0.10.2/go.mod h1:Pdkq0QU5a+qu+oyqIV3bknMsnzk9lnNyKvB9acJ5aZs= github.com/libp2p/go-libp2p-swarm v0.11.0 h1:ITgsTEY2tA4OxFJGcWeugiMh2x5+VOEnI2JStT1EWxI= github.com/libp2p/go-libp2p-swarm v0.11.0/go.mod h1:sumjVYrC84gPSZOFKL8hNcnN6HZvJSwJ8ymaXeko4Lk= github.com/libp2p/go-libp2p-testing v0.0.1/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= @@ -972,8 +956,6 @@ github.com/libp2p/go-libp2p-testing v0.3.0/go.mod h1:efZkql4UZ7OVsEfaxNHZPzIehts github.com/libp2p/go-libp2p-testing v0.4.0/go.mod h1:Q+PFXYoiYFN5CAEG2w3gLPEzotlKsNSbKQ/lImlOWF0= github.com/libp2p/go-libp2p-testing v0.4.2/go.mod h1:Q+PFXYoiYFN5CAEG2w3gLPEzotlKsNSbKQ/lImlOWF0= github.com/libp2p/go-libp2p-testing v0.5.0/go.mod h1:QBk8fqIL1XNcno/l3/hhaIEn4aLRijpYOR+zVjjlh+A= -github.com/libp2p/go-libp2p-testing v0.7.0/go.mod h1:OLbdn9DbgdMwv00v+tlp1l3oe2Cl+FAjoWIA2pa0X6E= -github.com/libp2p/go-libp2p-testing v0.8.0/go.mod h1:gRdsNxQSxAZowTgcLY7CC33xPmleZzoBpqSYbWenqPc= github.com/libp2p/go-libp2p-testing v0.12.0 h1:EPvBb4kKMWO29qP4mZGyhVzUyR25dvfUIK5WDu6iPUA= github.com/libp2p/go-libp2p-testing v0.12.0/go.mod h1:KcGDRXyN7sQCllucn1cOOS+Dmm7ujhfEyXQL5lvkcPg= github.com/libp2p/go-libp2p-tls v0.1.3/go.mod h1:wZfuewxOndz5RTnCAxFliGjvYSDA40sKitV4c50uI1M= @@ -990,8 +972,6 @@ github.com/libp2p/go-libp2p-transport-upgrader v0.4.2/go.mod h1:NR8ne1VwfreD5VIW github.com/libp2p/go-libp2p-transport-upgrader v0.4.3/go.mod h1:bpkldbOWXMrXhpZbSV1mQxTrefOg2Fi+k1ClDSA4ppw= github.com/libp2p/go-libp2p-transport-upgrader v0.4.6/go.mod h1:JE0WQuQdy+uLZ5zOaI3Nw9dWGYJIA7mywEtP2lMvnyk= github.com/libp2p/go-libp2p-transport-upgrader v0.5.0/go.mod h1:Rc+XODlB3yce7dvFV4q/RmyJGsFcCZRkeZMu/Zdg0mo= -github.com/libp2p/go-libp2p-transport-upgrader v0.7.0/go.mod h1:GIR2aTRp1J5yjVlkUoFqMkdobfob6RnAwYg/RZPhrzg= -github.com/libp2p/go-libp2p-transport-upgrader v0.7.1/go.mod h1:GIR2aTRp1J5yjVlkUoFqMkdobfob6RnAwYg/RZPhrzg= github.com/libp2p/go-libp2p-xor v0.0.0-20210714161855-5c005aca55db/go.mod h1:LSTM5yRnjGZbWNTA/hRwq2gGFrvRIbQJscoIL/u6InY= github.com/libp2p/go-libp2p-xor v0.1.0 h1:hhQwT4uGrBcuAkUGXADuPltalOdpf9aag9kaYNT2tLA= github.com/libp2p/go-libp2p-xor v0.1.0/go.mod h1:LSTM5yRnjGZbWNTA/hRwq2gGFrvRIbQJscoIL/u6InY= @@ -1008,9 +988,6 @@ github.com/libp2p/go-libp2p-yamux v0.5.0/go.mod h1:AyR8k5EzyM2QN9Bbdg6X1SkVVuqLw github.com/libp2p/go-libp2p-yamux v0.5.1/go.mod h1:dowuvDu8CRWmr0iqySMiSxK+W0iL5cMVO9S94Y6gkv4= github.com/libp2p/go-libp2p-yamux v0.5.4/go.mod h1:tfrXbyaTqqSU654GTvK3ocnSZL3BuHoeTSqhcel1wsE= github.com/libp2p/go-libp2p-yamux v0.6.0/go.mod h1:MRhd6mAYnFRnSISp4M8i0ClV/j+mWHo2mYLifWGw33k= -github.com/libp2p/go-libp2p-yamux v0.8.0/go.mod h1:yTkPgN2ib8FHyU1ZcVD7aelzyAqXXwEPbyx+aSKm9h8= -github.com/libp2p/go-libp2p-yamux v0.8.1/go.mod h1:rUozF8Jah2dL9LLGyBaBeTQeARdwhefMCTQVQt6QobE= -github.com/libp2p/go-libp2p-yamux v0.8.2/go.mod h1:rUozF8Jah2dL9LLGyBaBeTQeARdwhefMCTQVQt6QobE= github.com/libp2p/go-maddr-filter v0.0.1/go.mod h1:6eT12kSQMA9x2pvFQa+xesMKUBlj9VImZbj3B9FBH/Q= github.com/libp2p/go-maddr-filter v0.0.4/go.mod h1:6eT12kSQMA9x2pvFQa+xesMKUBlj9VImZbj3B9FBH/Q= github.com/libp2p/go-maddr-filter v0.0.5/go.mod h1:Jk+36PMfIqCJhAnaASRH83bdAvfDRp/w6ENFaC9bG+M= @@ -1022,8 +999,6 @@ github.com/libp2p/go-mplex v0.1.1/go.mod h1:Xgz2RDCi3co0LeZfgjm4OgUF15+sVR8SRcu3 github.com/libp2p/go-mplex v0.1.2/go.mod h1:Xgz2RDCi3co0LeZfgjm4OgUF15+sVR8SRcu3SFXI1lk= github.com/libp2p/go-mplex v0.2.0/go.mod h1:0Oy/A9PQlwBytDRp4wSkFnzHYDKcpLot35JQ6msjvYQ= github.com/libp2p/go-mplex v0.3.0/go.mod h1:0Oy/A9PQlwBytDRp4wSkFnzHYDKcpLot35JQ6msjvYQ= -github.com/libp2p/go-mplex v0.4.0/go.mod h1:y26Lx+wNVtMYMaPu300Cbot5LkEZ4tJaNYeHeT9dh6E= -github.com/libp2p/go-mplex v0.6.0/go.mod h1:y26Lx+wNVtMYMaPu300Cbot5LkEZ4tJaNYeHeT9dh6E= github.com/libp2p/go-mplex v0.7.0 h1:BDhFZdlk5tbr0oyFq/xv/NPGfjbnrsDam1EvutpBDbY= github.com/libp2p/go-mplex v0.7.0/go.mod h1:rW8ThnRcYWft/Jb2jeORBmPd6xuG3dGxWN/W168L9EU= github.com/libp2p/go-msgio v0.0.2/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= @@ -1042,7 +1017,6 @@ github.com/libp2p/go-netroute v0.1.2/go.mod h1:jZLDV+1PE8y5XxBySEBgbuVAXbhtuHSdm github.com/libp2p/go-netroute v0.1.3/go.mod h1:jZLDV+1PE8y5XxBySEBgbuVAXbhtuHSdmLPL2n9MKbk= github.com/libp2p/go-netroute v0.1.5/go.mod h1:V1SR3AaECRkEQCoFFzYwVYWvYIEtlxx89+O3qcpCl4A= github.com/libp2p/go-netroute v0.1.6/go.mod h1:AqhkMh0VuWmfgtxKPp3Oc1LdU5QSWS7wl0QLhSZqXxQ= -github.com/libp2p/go-netroute v0.2.0/go.mod h1:Vio7LTzZ+6hoT4CMZi5/6CpY3Snzh2vgZhWgxMNwlQI= github.com/libp2p/go-netroute v0.2.1 h1:V8kVrpD8GK0Riv15/7VN6RbUQ3URNZVosw7H2v9tksU= github.com/libp2p/go-netroute v0.2.1/go.mod h1:hraioZr0fhBjG0ZRXJJ6Zj2IVEVNx6tDTFQfSmcq7mQ= github.com/libp2p/go-openssl v0.0.2/go.mod h1:v8Zw2ijCSWBQi8Pq5GAixw6DbFfa9u6VIYDXnvOXkc0= @@ -1072,7 +1046,6 @@ github.com/libp2p/go-stream-muxer v0.1.0/go.mod h1:8JAVsjeRBCWwPoZeH0W1imLOcriqX github.com/libp2p/go-stream-muxer-multistream v0.1.1/go.mod h1:zmGdfkQ1AzOECIAcccoL8L//laqawOsO03zX8Sa+eGw= github.com/libp2p/go-stream-muxer-multistream v0.2.0/go.mod h1:j9eyPol/LLRqT+GPLSxvimPhNph4sfYfMoDPd7HkzIc= github.com/libp2p/go-stream-muxer-multistream v0.3.0/go.mod h1:yDh8abSIzmZtqtOt64gFJUXEryejzNb0lisTt+fAMJA= -github.com/libp2p/go-stream-muxer-multistream v0.4.0/go.mod h1:nb+dGViZleRP4XcyHuZSVrJCBl55nRBOMmiSL/dyziw= github.com/libp2p/go-tcp-transport v0.0.4/go.mod h1:+E8HvC8ezEVOxIo3V5vCK9l1y/19K427vCzQ+xHKH/o= github.com/libp2p/go-tcp-transport v0.1.0/go.mod h1:oJ8I5VXryj493DEJ7OsBieu8fcg2nHGctwtInJVpipc= github.com/libp2p/go-tcp-transport v0.1.1/go.mod h1:3HzGvLbx6etZjnFlERyakbaYPdfjg2pWP97dFZworkY= @@ -1082,8 +1055,6 @@ github.com/libp2p/go-tcp-transport v0.2.3/go.mod h1:9dvr03yqrPyYGIEN6Dy5UvdJZjyP github.com/libp2p/go-tcp-transport v0.2.4/go.mod h1:9dvr03yqrPyYGIEN6Dy5UvdJZjyPFvl1S/igQ5QD1SU= github.com/libp2p/go-tcp-transport v0.2.7/go.mod h1:lue9p1b3VmZj1MhhEGB/etmvF/nBQ0X9CW2DutBT3MM= github.com/libp2p/go-tcp-transport v0.4.0/go.mod h1:0y52Rwrn4076xdJYu/51/qJIdxz+EWDAOG2S45sV3VI= -github.com/libp2p/go-tcp-transport v0.5.0/go.mod h1:UPPL0DIjQqiWRwVAb+CEQlaAG0rp/mCqJfIhFcLHc4Y= -github.com/libp2p/go-tcp-transport v0.5.1/go.mod h1:UPPL0DIjQqiWRwVAb+CEQlaAG0rp/mCqJfIhFcLHc4Y= github.com/libp2p/go-testutil v0.0.1/go.mod h1:iAcJc/DKJQanJ5ws2V+u5ywdL2n12X1WbbEG+Jjy69I= github.com/libp2p/go-testutil v0.1.0/go.mod h1:81b2n5HypcVyrCg/MJx4Wgfp/VHojytjVe/gLzZ2Ehc= github.com/libp2p/go-ws-transport v0.0.5/go.mod h1:Qbl4BxPfXXhhd/o0wcrgoaItHqA9tnZjoFZnxykuaXU= @@ -1093,7 +1064,6 @@ github.com/libp2p/go-ws-transport v0.3.0/go.mod h1:bpgTJmRZAvVHrgHybCVyqoBmyLQ1f github.com/libp2p/go-ws-transport v0.3.1/go.mod h1:bpgTJmRZAvVHrgHybCVyqoBmyLQ1fiZuEaBYusP5zsk= github.com/libp2p/go-ws-transport v0.4.0/go.mod h1:EcIEKqf/7GDjth6ksuS/6p7R49V4CBY6/E7R/iyhYUA= github.com/libp2p/go-ws-transport v0.5.0/go.mod h1:I2juo1dNTbl8BKSBYo98XY85kU2xds1iamArLvl8kNg= -github.com/libp2p/go-ws-transport v0.6.0/go.mod h1:dXqtI9e2JV9FtF1NOtWVZSKXh5zXvnuwPXfj8GPBbYU= github.com/libp2p/go-yamux v1.2.1/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= github.com/libp2p/go-yamux v1.2.2/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= github.com/libp2p/go-yamux v1.2.3/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= @@ -1106,8 +1076,6 @@ github.com/libp2p/go-yamux v1.4.1/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/h github.com/libp2p/go-yamux/v2 v2.0.0/go.mod h1:NVWira5+sVUIU6tu1JWvaRn1dRnG+cawOJiflsAM+7U= github.com/libp2p/go-yamux/v2 v2.2.0/go.mod h1:3So6P6TV6r75R9jiBpiIKgU/66lOarCZjqROGxzPpPQ= github.com/libp2p/go-yamux/v2 v2.3.0/go.mod h1:iTU+lOIn/2h0AgKcL49clNTwfEw+WSfDYrXe05EyKIs= -github.com/libp2p/go-yamux/v3 v3.0.1/go.mod h1:s2LsDhHbh+RfCsQoICSYt58U2f8ijtPANFD8BmE74Bo= -github.com/libp2p/go-yamux/v3 v3.0.2/go.mod h1:s2LsDhHbh+RfCsQoICSYt58U2f8ijtPANFD8BmE74Bo= github.com/libp2p/go-yamux/v4 v4.0.0 h1:+Y80dV2Yx/kv7Y7JKu0LECyVdMXm1VUoko+VQ9rBfZQ= github.com/libp2p/go-yamux/v4 v4.0.0/go.mod h1:NWjl8ZTLOGlozrXSOZ/HlfG++39iKNnM5wwmtQP1YB4= github.com/libp2p/zeroconf/v2 v2.1.1/go.mod h1:fuJqLnUwZTshS3U/bMRJ3+ow/v9oid1n0DmyYyNO1Xs= @@ -1119,7 +1087,6 @@ github.com/lucas-clemente/quic-go v0.19.3/go.mod h1:ADXpNbTQjq1hIzCpB+y/k5iz4n4z github.com/lucas-clemente/quic-go v0.21.2/go.mod h1:vF5M1XqhBAHgbjKcJOXY3JZz3GP0T3FQhz/uyOUS38Q= github.com/lucas-clemente/quic-go v0.23.0/go.mod h1:paZuzjXCE5mj6sikVLMvqXk8lJV2AsqtJ6bDhjEfxx0= github.com/lucas-clemente/quic-go v0.24.0/go.mod h1:paZuzjXCE5mj6sikVLMvqXk8lJV2AsqtJ6bDhjEfxx0= -github.com/lucas-clemente/quic-go v0.25.0/go.mod h1:YtzP8bxRVCBlO77yRanE264+fY/T2U9ZlW1AaHOsMOg= github.com/lucas-clemente/quic-go v0.29.1 h1:Z+WMJ++qMLhvpFkRZA+jl3BTxUjm415YBmWanXB8zP0= github.com/lucas-clemente/quic-go v0.29.1/go.mod h1:CTcNfLYJS2UuRNB+zcNlgvkjBhxX6Hm3WUxxAQx2mgE= github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= @@ -1137,7 +1104,6 @@ github.com/marten-seemann/qtls-go1-15 v0.1.5/go.mod h1:GyFwywLKkRt+6mfU99csTEY1j github.com/marten-seemann/qtls-go1-16 v0.1.4/go.mod h1:gNpI2Ol+lRS3WwSOtIUUtRwZEQMXjYK+dQSBFbethAk= github.com/marten-seemann/qtls-go1-17 v0.1.0-rc.1/go.mod h1:fz4HIxByo+LlWcreM4CZOYNuz3taBQ8rN2X6FqvaWo8= github.com/marten-seemann/qtls-go1-17 v0.1.0/go.mod h1:fz4HIxByo+LlWcreM4CZOYNuz3taBQ8rN2X6FqvaWo8= -github.com/marten-seemann/qtls-go1-18 v0.1.0-beta.1/go.mod h1:PUhIQk19LoFt2174H4+an8TYvWOGjb/hHwphBeaDHwI= github.com/marten-seemann/qtls-go1-18 v0.1.3 h1:R4H2Ks8P6pAtUagjFty2p7BVHn3XiwDAl7TTQf5h7TI= github.com/marten-seemann/qtls-go1-18 v0.1.3/go.mod h1:mJttiymBAByA49mhlNZZGrH5u1uXYZJ+RW28Py7f4m4= github.com/marten-seemann/qtls-go1-19 v0.1.1 h1:mnbxeq3oEyQxQXwI4ReCgW9DPoPR94sNlqWoDZnjRIE= @@ -1230,8 +1196,6 @@ github.com/multiformats/go-multiaddr v0.3.0/go.mod h1:dF9kph9wfJ+3VLAaeBqo9Of8x4 github.com/multiformats/go-multiaddr v0.3.1/go.mod h1:uPbspcUPd5AfaP6ql3ujFY+QWzmBD8uLLL4bXW0XfGc= github.com/multiformats/go-multiaddr v0.3.3/go.mod h1:lCKNGP1EQ1eZ35Za2wlqnabm9xQkib3fyB+nZXHLag0= github.com/multiformats/go-multiaddr v0.4.0/go.mod h1:YcpyLH8ZPudLxQlemYBPhSm0/oCXAT8Z4mzFpyoPyRc= -github.com/multiformats/go-multiaddr v0.4.1/go.mod h1:3afI9HfVW8csiF8UZqtpYRiDyew8pRX7qLIGHu9FLuM= -github.com/multiformats/go-multiaddr v0.5.0/go.mod h1:3KAxNkUqLTJ20AAwN4XVX4kZar+bR+gh4zgbfr3SNug= github.com/multiformats/go-multiaddr v0.7.0 h1:gskHcdaCyPtp9XskVwtvEeQOG465sCohbQIirSyqxrc= github.com/multiformats/go-multiaddr v0.7.0/go.mod h1:Fs50eBDWvZu+l3/9S6xAE7ZYj6yhxlvaVZjakWN7xRs= github.com/multiformats/go-multiaddr-dns v0.0.1/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= @@ -1417,8 +1381,6 @@ github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0ua github.com/prometheus/statsd_exporter v0.21.0 h1:hA05Q5RFeIjgwKIYEdFd59xu5Wwaznf33yKI+pyX6T8= github.com/prometheus/statsd_exporter v0.21.0/go.mod h1:rbT83sZq2V+p73lHhPZfMc3MLCHmSHelCh9hSGYNLTQ= github.com/rabbitmq/amqp091-go v1.1.0/go.mod h1:ogQDLSOACsLPsIq0NpbtiifNZi2YOz0VTJ0kHRghqbM= -github.com/raulk/clock v1.1.0/go.mod h1:3MpVxdZ/ODBQDxbN+kzshf5OSZwPjtMDx6BBXBmOeY0= -github.com/raulk/go-watchdog v1.2.0/go.mod h1:lzSbAl5sh4rtI8tYHU01BWIDzgzqaQLj6RcA1i4mlqI= github.com/raulk/go-watchdog v1.3.0 h1:oUmdlHxdkXRJlwfG0O9omj8ukerm8MEQavSiDTEtBsk= github.com/raulk/go-watchdog v1.3.0/go.mod h1:fIvOnLbF0b0ZwkB9YU4mOW9Did//4vPZtDqv66NfsMU= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= diff --git a/test/integration/pubsub_msg_seen_cache_test.go b/test/integration/pubsub_msg_seen_cache_test.go new file mode 100644 index 000000000000..394cda5b1207 --- /dev/null +++ b/test/integration/pubsub_msg_seen_cache_test.go @@ -0,0 +1,244 @@ +package integrationtest + +import ( + "bytes" + "context" + "fmt" + "io" + "testing" + "time" + + "go.uber.org/fx" + + "github.com/ipfs/kubo/config" + "github.com/ipfs/kubo/core" + "github.com/ipfs/kubo/core/bootstrap" + "github.com/ipfs/kubo/core/coreapi" + libp2p2 "github.com/ipfs/kubo/core/node/libp2p" + "github.com/ipfs/kubo/repo" + + "github.com/ipfs/go-datastore" + syncds "github.com/ipfs/go-datastore/sync" + + "github.com/libp2p/go-libp2p-pubsub" + "github.com/libp2p/go-libp2p-pubsub/pb" + "github.com/libp2p/go-libp2p/core/peer" + + mock "github.com/ipfs/kubo/core/mock" + "github.com/libp2p/go-libp2p/p2p/net/mock" +) + +func TestMessageSeenCacheTTL(t *testing.T) { + if err := RunMessageSeenCacheTTLTest(t, "10s"); err != nil { + t.Fatal(err) + } +} + +func mockNode(ctx context.Context, mn mocknet.Mocknet, pubsubEnabled bool, seenMessagesCacheTTL string) (*core.IpfsNode, error) { + ds := syncds.MutexWrap(datastore.NewMapDatastore()) + cfg, err := config.Init(io.Discard, 2048) + if err != nil { + return nil, err + } + count := len(mn.Peers()) + cfg.Addresses.Swarm = []string{ + fmt.Sprintf("/ip4/18.0.%d.%d/tcp/4001", count>>16, count&0xFF), + } + cfg.Datastore = config.Datastore{} + if pubsubEnabled { + cfg.Pubsub.Enabled = config.True + var ttl *config.OptionalDuration + if len(seenMessagesCacheTTL) > 0 { + ttl = &config.OptionalDuration{} + if err = ttl.UnmarshalJSON([]byte(seenMessagesCacheTTL)); err != nil { + return nil, err + } + } + cfg.Pubsub.SeenMessagesTTL = ttl + } + return core.NewNode(ctx, &core.BuildCfg{ + Online: true, + Routing: libp2p2.DHTServerOption, + Repo: &repo.Mock{ + C: *cfg, + D: ds, + }, + Host: mock.MockHostOption(mn), + ExtraOpts: map[string]bool{ + "pubsub": pubsubEnabled, + }, + }) +} + +func RunMessageSeenCacheTTLTest(t *testing.T, seenMessagesCacheTTL string) error { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + var bootstrapNode, consumerNode, producerNode *core.IpfsNode + var bootstrapPeerID, consumerPeerID, producerPeerID peer.ID + sendDupMsg := false + + mn := mocknet.New() + bootstrapNode, err := mockNode(ctx, mn, false, "") // no need for PubSub configuration + if err != nil { + t.Fatal(err) + } + bootstrapPeerID = bootstrapNode.PeerHost.ID() + defer bootstrapNode.Close() + + consumerNode, err = mockNode(ctx, mn, true, seenMessagesCacheTTL) // use passed seen cache TTL + if err != nil { + t.Fatal(err) + } + consumerPeerID = consumerNode.PeerHost.ID() + defer consumerNode.Close() + + ttl, err := time.ParseDuration(seenMessagesCacheTTL) + if err != nil { + t.Fatal(err) + } + + // Set up the pubsub message ID generation override for the producer + core.RegisterFXOptionFunc(func(info core.FXNodeInfo) ([]fx.Option, error) { + var pubsubOptions []pubsub.Option + pubsubOptions = append( + pubsubOptions, + pubsub.WithSeenMessagesTTL(ttl), + pubsub.WithMessageIdFn(func(pmsg *pubsub_pb.Message) string { + now := time.Now().Format(time.StampMilli) + msg := string(pmsg.Data) + var msgID string + from, _ := peer.IDFromBytes(pmsg.From) + if (from == producerPeerID) && sendDupMsg { + msgID = "DupMsg" + t.Logf("sending [%s] with duplicate message ID at [%s]", msg, now) + } else { + msgID = pubsub.DefaultMsgIdFn(pmsg) + t.Logf("sending [%s] with unique message ID at [%s]", msg, now) + } + return msgID + }), + ) + return append( + info.FXOptions, + fx.Provide(libp2p2.TopicDiscovery()), + fx.Decorate(libp2p2.GossipSub(pubsubOptions...)), + ), nil + }) + + producerNode, err = mockNode(ctx, mn, false, "") // PubSub configuration comes from overrides above + if err != nil { + t.Fatal(err) + } + producerPeerID = producerNode.PeerHost.ID() + defer producerNode.Close() + + t.Logf("bootstrap peer=%s, consumer peer=%s, producer peer=%s", bootstrapPeerID, consumerPeerID, producerPeerID) + + producerAPI, err := coreapi.NewCoreAPI(producerNode) + if err != nil { + t.Fatal(err) + } + consumerAPI, err := coreapi.NewCoreAPI(consumerNode) + if err != nil { + t.Fatal(err) + } + + err = mn.LinkAll() + if err != nil { + t.Fatal(err) + } + + bis := bootstrapNode.Peerstore.PeerInfo(bootstrapNode.PeerHost.ID()) + bcfg := bootstrap.BootstrapConfigWithPeers([]peer.AddrInfo{bis}) + if err = producerNode.Bootstrap(bcfg); err != nil { + t.Fatal(err) + } + if err = consumerNode.Bootstrap(bcfg); err != nil { + t.Fatal(err) + } + + // Set up the consumer subscription + const TopicName = "topic" + consumerSubscription, err := consumerAPI.PubSub().Subscribe(ctx, TopicName) + if err != nil { + t.Fatal(err) + } + // Utility functions defined inline to include context in closure + now := func() string { + return time.Now().Format(time.StampMilli) + } + ctr := 0 + msgGen := func() string { + ctr++ + return fmt.Sprintf("msg_%d", ctr) + } + produceMessage := func() string { + msgTxt := msgGen() + err = producerAPI.PubSub().Publish(ctx, TopicName, []byte(msgTxt)) + if err != nil { + t.Fatal(err) + } + return msgTxt + } + consumeMessage := func(msgTxt string, shouldFind bool) { + // Set up a separate timed context for receiving messages + rxCtx, rxCancel := context.WithTimeout(context.Background(), time.Second) + defer rxCancel() + msg, err := consumerSubscription.Next(rxCtx) + if shouldFind { + if err != nil { + t.Logf("did not receive [%s] by [%s]", msgTxt, now()) + t.Fatal(err) + } + t.Logf("received [%s] at [%s]", string(msg.Data()), now()) + if !bytes.Equal(msg.Data(), []byte(msgTxt)) { + t.Fatalf("consumed data [%s] does not match published data [%s]", string(msg.Data()), msgTxt) + } + } else { + if err == nil { + t.Logf("received [%s] at [%s]", string(msg.Data()), now()) + t.Fail() + } + t.Logf("did not receive [%s] by [%s]", msgTxt, now()) + } + } + + // Send message 1 with the message ID we're going to duplicate later + sendDupMsg = true + msgTxt := produceMessage() + consumeMessage(msgTxt, true) // should find message + + // Send message 2 with the same message ID as before + sendDupMsg = true + msgTxt = produceMessage() + consumeMessage(msgTxt, false) // should NOT find message, because it got deduplicated (sent twice within the SeenMessagesTTL window) + + // Wait for seen cache TTL time to let seen cache entries time out + time.Sleep(ttl) + + // Send message 3 with a new message ID + // + // This extra step is necessary for testing the cache TTL because the PubSub code only garbage collects when a + // message ID was not already present in the cache. This means that message 2's cache entry, even though it has + // technically timed out, will still cause the message to be considered duplicate. When a message with a different + // ID passes through, it will be added to the cache and garbage collection will clean up message 2's entry. This is + // another bug in the pubsub/cache implementation that will be fixed once the code is refactored for this issue: + // https://github.com/libp2p/go-libp2p-pubsub/issues/502 + sendDupMsg = false + msgTxt = produceMessage() + consumeMessage(msgTxt, true) // should find message + + // Send message 4 with the same message ID as before + sendDupMsg = true + msgTxt = produceMessage() + consumeMessage(msgTxt, true) // should find message again (time since the last read > SeenMessagesTTL, so it looks like a new message). + + // Send message 5 with a new message ID + // + // This step is not strictly necessary, but has been added for good measure. + sendDupMsg = false + msgTxt = produceMessage() + consumeMessage(msgTxt, true) // should find message + return nil +} From c8a4b6ae00d06d3af88d9080789e2f68a863477e Mon Sep 17 00:00:00 2001 From: Antonio Navarro Perez Date: Wed, 30 Nov 2022 12:19:50 +0100 Subject: [PATCH 26/35] docs: Update CHANGELOG.md adding 0.17 link --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3b9663c1314..389576e73eb2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Kubo Changelogs +- [v0.17](docs/changelogs/v0.17.md) - [v0.16](docs/changelogs/v0.16.md) - [v0.15](docs/changelogs/v0.15.md) - [v0.14](docs/changelogs/v0.14.md) From 09765951ea172d3cf6d0b12031ad97635ee2ad02 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Thu, 1 Dec 2022 22:15:20 +0100 Subject: [PATCH 27/35] fix(rcmgr): improve error phrasing limits were not exceeded, manager protects us from that https://github.com/ipfs/kubo/issues/9432#issuecomment-1334160936 --- core/node/libp2p/rcmgr_logging.go | 2 +- core/node/libp2p/rcmgr_logging_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/node/libp2p/rcmgr_logging.go b/core/node/libp2p/rcmgr_logging.go index 34742dd1d7f2..eadce1837cd5 100644 --- a/core/node/libp2p/rcmgr_logging.go +++ b/core/node/libp2p/rcmgr_logging.go @@ -50,7 +50,7 @@ func (n *loggingResourceManager) start(ctx context.Context) { n.limitExceededErrs = make(map[string]int) for e, count := range errs { - n.logger.Errorf("Resource limits were exceeded %d times with error %q.", count, e) + n.logger.Errorf("Protected from exceeding resource limits %d times: %q.", count, e) } if len(errs) != 0 { diff --git a/core/node/libp2p/rcmgr_logging_test.go b/core/node/libp2p/rcmgr_logging_test.go index 3521e5314eac..ca06fae1219b 100644 --- a/core/node/libp2p/rcmgr_logging_test.go +++ b/core/node/libp2p/rcmgr_logging_test.go @@ -55,7 +55,7 @@ func TestLoggingResourceManager(t *testing.T) { if oLogs.Len() == 0 { continue } - require.Equal(t, "Resource limits were exceeded 2 times with error \"system: cannot reserve inbound connection: resource limit exceeded\".", oLogs.All()[0].Message) + require.Equal(t, "Protected from exceeding resource limits 2 times: \"system: cannot reserve inbound connection: resource limit exceeded\".", oLogs.All()[0].Message) return } } From 5283c6f8b53002319525ab124e27b9b7d85184a4 Mon Sep 17 00:00:00 2001 From: Antonio Navarro Perez Date: Fri, 2 Dec 2022 12:28:43 +0100 Subject: [PATCH 28/35] chore: Update go-routing-helpers dependency It will avoid a deadlock when using parallel router to compose routers. Signed-off-by: Antonio Navarro Perez --- docs/examples/kubo-as-a-library/go.mod | 8 ++++---- docs/examples/kubo-as-a-library/go.sum | 12 +++++------- go.mod | 2 +- go.sum | 4 ++-- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/docs/examples/kubo-as-a-library/go.mod b/docs/examples/kubo-as-a-library/go.mod index 57333bfb27ac..9b8a8772828b 100644 --- a/docs/examples/kubo-as-a-library/go.mod +++ b/docs/examples/kubo-as-a-library/go.mod @@ -9,9 +9,9 @@ replace github.com/ipfs/kubo => ./../../.. require ( github.com/ipfs/go-ipfs-files v0.2.0 github.com/ipfs/interface-go-ipfs-core v0.7.0 - github.com/ipfs/kubo v0.14.0-rc1 + github.com/ipfs/kubo v0.0.0-00010101000000-000000000000 github.com/libp2p/go-libp2p v0.23.4 - github.com/multiformats/go-multiaddr v0.7.0 + github.com/multiformats/go-multiaddr v0.8.0 ) require ( @@ -126,7 +126,7 @@ require ( github.com/libp2p/go-libp2p-pubsub v0.8.1 // indirect github.com/libp2p/go-libp2p-pubsub-router v0.5.0 // indirect github.com/libp2p/go-libp2p-record v0.2.0 // indirect - github.com/libp2p/go-libp2p-routing-helpers v0.4.0 // indirect + github.com/libp2p/go-libp2p-routing-helpers v0.4.1 // indirect github.com/libp2p/go-libp2p-xor v0.1.0 // indirect github.com/libp2p/go-mplex v0.7.0 // indirect github.com/libp2p/go-msgio v0.2.0 // indirect @@ -176,7 +176,7 @@ require ( github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/stretchr/objx v0.4.0 // indirect - github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect + github.com/syndtr/goleveldb v1.0.0 // indirect github.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc // indirect github.com/whyrusleeping/cbor-gen v0.0.0-20210219115102-f37d292932f2 // indirect github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f // indirect diff --git a/docs/examples/kubo-as-a-library/go.sum b/docs/examples/kubo-as-a-library/go.sum index 73797d285018..a74d0f1a9431 100644 --- a/docs/examples/kubo-as-a-library/go.sum +++ b/docs/examples/kubo-as-a-library/go.sum @@ -951,8 +951,8 @@ github.com/libp2p/go-libp2p-record v0.2.0/go.mod h1:I+3zMkvvg5m2OcSdoL0KPljyJyvN github.com/libp2p/go-libp2p-resource-manager v0.3.0/go.mod h1:K+eCkiapf+ey/LADO4TaMpMTP9/Qde/uLlrnRqV4PLQ= github.com/libp2p/go-libp2p-routing v0.0.1/go.mod h1:N51q3yTr4Zdr7V8Jt2JIktVU+3xBBylx1MZeVA6t1Ys= github.com/libp2p/go-libp2p-routing-helpers v0.2.3/go.mod h1:795bh+9YeoFl99rMASoiVgHdi5bjack0N1+AFAdbvBw= -github.com/libp2p/go-libp2p-routing-helpers v0.4.0 h1:b7y4aixQ7AwbqYfcOQ6wTw8DQvuRZeTAA0Od3YYN5yc= -github.com/libp2p/go-libp2p-routing-helpers v0.4.0/go.mod h1:dYEAgkVhqho3/YKxfOEGdFMIcWfAFNlZX8iAIihYA2E= +github.com/libp2p/go-libp2p-routing-helpers v0.4.1 h1:rOlZiFpUt7SgHm4w62MBvWaQ4UHh7bVJnSnor6RN7j8= +github.com/libp2p/go-libp2p-routing-helpers v0.4.1/go.mod h1:dYEAgkVhqho3/YKxfOEGdFMIcWfAFNlZX8iAIihYA2E= github.com/libp2p/go-libp2p-secio v0.0.3/go.mod h1:hS7HQ00MgLhRO/Wyu1bTX6ctJKhVpm+j2/S2A5UqYb0= github.com/libp2p/go-libp2p-secio v0.1.0/go.mod h1:tMJo2w7h3+wN4pgU2LSYeiKPrfqBgkOsdiKK77hE7c8= github.com/libp2p/go-libp2p-secio v0.2.0/go.mod h1:2JdZepB8J5V9mBp79BmwsaPQhRPNN2NrnB2lKQcdy6g= @@ -1247,8 +1247,9 @@ github.com/multiformats/go-multiaddr v0.4.0/go.mod h1:YcpyLH8ZPudLxQlemYBPhSm0/o github.com/multiformats/go-multiaddr v0.4.1/go.mod h1:3afI9HfVW8csiF8UZqtpYRiDyew8pRX7qLIGHu9FLuM= github.com/multiformats/go-multiaddr v0.5.0/go.mod h1:3KAxNkUqLTJ20AAwN4XVX4kZar+bR+gh4zgbfr3SNug= github.com/multiformats/go-multiaddr v0.6.0/go.mod h1:F4IpaKZuPP360tOMn2Tpyu0At8w23aRyVqeK0DbFeGM= -github.com/multiformats/go-multiaddr v0.7.0 h1:gskHcdaCyPtp9XskVwtvEeQOG465sCohbQIirSyqxrc= github.com/multiformats/go-multiaddr v0.7.0/go.mod h1:Fs50eBDWvZu+l3/9S6xAE7ZYj6yhxlvaVZjakWN7xRs= +github.com/multiformats/go-multiaddr v0.8.0 h1:aqjksEcqK+iD/Foe1RRFsGZh8+XFiGo7FgUCZlpv3LU= +github.com/multiformats/go-multiaddr v0.8.0/go.mod h1:Fs50eBDWvZu+l3/9S6xAE7ZYj6yhxlvaVZjakWN7xRs= github.com/multiformats/go-multiaddr-dns v0.0.1/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= github.com/multiformats/go-multiaddr-dns v0.0.2/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= github.com/multiformats/go-multiaddr-dns v0.2.0/go.mod h1:TJ5pr5bBO7Y1B18djPuRsVkduhQH2YqYSbxWJzYGdK0= @@ -1540,9 +1541,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE= github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= -github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= -github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= github.com/texttheater/golang-levenshtein v0.0.0-20180516184445-d188e65d659e/go.mod h1:XDKHRm5ThF8YJjx001LtgelzsoaEcvnA7lVWz9EeX3g= github.com/tj/assert v0.0.3/go.mod h1:Ne6X72Q+TB1AteidzQncjw9PabbMp4PBMZ1k+vd1Pvk= @@ -1819,7 +1819,6 @@ golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= @@ -1935,7 +1934,6 @@ golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/go.mod b/go.mod index fdb2efa083d8..af5f37063431 100644 --- a/go.mod +++ b/go.mod @@ -79,7 +79,7 @@ require ( github.com/libp2p/go-libp2p-pubsub v0.8.1 github.com/libp2p/go-libp2p-pubsub-router v0.5.0 github.com/libp2p/go-libp2p-record v0.2.0 - github.com/libp2p/go-libp2p-routing-helpers v0.4.0 + github.com/libp2p/go-libp2p-routing-helpers v0.4.1 github.com/libp2p/go-libp2p-testing v0.12.0 github.com/libp2p/go-socket-activation v0.1.0 github.com/miekg/dns v1.1.50 diff --git a/go.sum b/go.sum index 11fd7a8b6ca6..b476d5f2aa54 100644 --- a/go.sum +++ b/go.sum @@ -925,8 +925,8 @@ github.com/libp2p/go-libp2p-record v0.2.0 h1:oiNUOCWno2BFuxt3my4i1frNrt7PerzB3qu github.com/libp2p/go-libp2p-record v0.2.0/go.mod h1:I+3zMkvvg5m2OcSdoL0KPljyJyvNDFGKX7QdlpYUcwk= github.com/libp2p/go-libp2p-routing v0.0.1/go.mod h1:N51q3yTr4Zdr7V8Jt2JIktVU+3xBBylx1MZeVA6t1Ys= github.com/libp2p/go-libp2p-routing-helpers v0.2.3/go.mod h1:795bh+9YeoFl99rMASoiVgHdi5bjack0N1+AFAdbvBw= -github.com/libp2p/go-libp2p-routing-helpers v0.4.0 h1:b7y4aixQ7AwbqYfcOQ6wTw8DQvuRZeTAA0Od3YYN5yc= -github.com/libp2p/go-libp2p-routing-helpers v0.4.0/go.mod h1:dYEAgkVhqho3/YKxfOEGdFMIcWfAFNlZX8iAIihYA2E= +github.com/libp2p/go-libp2p-routing-helpers v0.4.1 h1:rOlZiFpUt7SgHm4w62MBvWaQ4UHh7bVJnSnor6RN7j8= +github.com/libp2p/go-libp2p-routing-helpers v0.4.1/go.mod h1:dYEAgkVhqho3/YKxfOEGdFMIcWfAFNlZX8iAIihYA2E= github.com/libp2p/go-libp2p-secio v0.0.3/go.mod h1:hS7HQ00MgLhRO/Wyu1bTX6ctJKhVpm+j2/S2A5UqYb0= github.com/libp2p/go-libp2p-secio v0.1.0/go.mod h1:tMJo2w7h3+wN4pgU2LSYeiKPrfqBgkOsdiKK77hE7c8= github.com/libp2p/go-libp2p-secio v0.2.0/go.mod h1:2JdZepB8J5V9mBp79BmwsaPQhRPNN2NrnB2lKQcdy6g= From 2c2926b7ab3d6b5bcae4079a5b9ae9e1f05dfb6c Mon Sep 17 00:00:00 2001 From: galargh Date: Mon, 5 Dec 2022 09:47:25 +0100 Subject: [PATCH 29/35] docs: parameterise release issue template --- docs/RELEASE_ISSUE_TEMPLATE.md | 205 ++++++++++++++++++++++++--------- 1 file changed, 149 insertions(+), 56 deletions(-) diff --git a/docs/RELEASE_ISSUE_TEMPLATE.md b/docs/RELEASE_ISSUE_TEMPLATE.md index 3145f003922a..3ffce655e093 100644 --- a/docs/RELEASE_ISSUE_TEMPLATE.md +++ b/docs/RELEASE_ISSUE_TEMPLATE.md @@ -1,4 +1,4 @@ - + > Release Issue Template. If doing a patch release, see [here](https://github.com/ipfs/kubo/blob/master/docs/PATCH_RELEASE_TEMPLATE.md) @@ -49,7 +49,7 @@ Checklist: # create new issue in protocol/bifrost-infra gh api \ --method POST \ - --raw-field "title=Rollout Kubo v0.17.0-RC1" \ + --raw-field "title=Rollout Kubo vX.Y.Z-RCN" \ --raw-field "body=## What should be updated - [ ] Gateways @@ -68,20 +68,20 @@ Checklist: # retrieve master ref for ipfs/kubo gh api /repos/ipfs/kubo/git/ref/heads/master - # create docs-release-v0.17.0 ref for ipfs/kubo + # create docs-release-vX.Y.Z ref for ipfs/kubo gh api \ --method POST \ /repos/ipfs/kubo/git/refs \ - -f ref='refs/heads/docs-release-v0.17.0' \ + -f ref='refs/heads/docs-release-vX.Y.Z' \ -f sha='254d81a9d5595c3e637c7573d56125836d5f5055' - # create draft PR from docs-release-v0.17.0 to master for ipfs/kubo - # requires docs-release-v0.17.0 to be modified + # create draft PR from docs-release-vX.Y.Z to master for ipfs/kubo + # requires docs-release-vX.Y.Z to be modified gh api \ --method POST \ /repos/ipfs/kubo/pulls \ - -f title='docs: release v0.17.0' \ - -f head='docs-release-v0.17.0' \ + -f title='docs: release vX.Y.Z' \ + -f head='docs-release-vX.Y.Z' \ -f base='master' \ -f draft=true @@ -158,11 +158,11 @@ Checklist: # retrieve master ref for ipfs/kubo gh api /repos/ipfs/kubo/git/ref/heads/master - # create release-v0.17.0 ref for ipfs/kubo + # create release-vX.Y.Z ref for ipfs/kubo gh api \ --method POST \ /repos/ipfs/kubo/git/refs \ - -f ref='refs/heads/release-v0.17.0' \ + -f ref='refs/heads/release-vX.Y.Z' \ -f sha='a4da8f6cc768c3e2cce9c2677a792b2c237066aa' - [ ] Bump the version in `version.go` in the `master` branch to `vX.(Y+1).0-dev` via a PR ([example](https://github.com/ipfs/kubo/pull/9305)). @@ -171,7 +171,7 @@ Checklist: git checkout -b bump-version # replace the version in version.go - sed -i 's/const CurrentVersionNumber = "0.17.0-dev"/const CurrentVersionNumber = "0.18.0-dev"/g' version.go + sed -i 's/const CurrentVersionNumber = ".*"/const CurrentVersionNumber = "0.18.0-dev"/g' version.go # commit the change git add version.go @@ -188,17 +188,19 @@ Checklist: -f base='master' - [ ] **Stage 2 - Release Candidate** - _if any [non-trivial](docs/releases.md#footnotes) changes need to be included in the release, return to this stage_ + - [ ] If it's not a first RC, add new commits to the `release-vX.Y.Z` branch from `master` using `git cherry-pick -x ...` + - Note: `release-*` branches are protected. You can do all needed updates on a separated branch (e.g. `wip-release-vX.Y.Z`) and when everything is settled push to `release-vX.Y.Z` - [ ] Bump the version in `version.go` in the `release-vX.Y.Z` branch to `vX.Y.Z-rcN`.
# checkout new branch - git checkout -b bump-release-version + git checkout -B bump-release-version # replace the version in version.go - sed -i 's/const CurrentVersionNumber = "0.17.0-dev"/const CurrentVersionNumber = "0.17.0-rc1"/g' version.go + sed -i 's/const CurrentVersionNumber = ".*"/const CurrentVersionNumber = "X.Y.Z-rcN"/g' version.go # commit the change git add version.go - git commit -m "chore: bump version to v0.17.0-rc1" + git commit -m "chore: bump version to vX.Y.Z-rcN" # push the change git push origin bump-release-version @@ -206,19 +208,17 @@ Checklist: # open a PR gh api /repos/ipfs/kubo/pulls \ --method POST \ - -f title='chore: bump version to v0.17.0-rc1' \ + -f title='chore: bump version to vX.Y.Z-rcN' \ -f head='bump-release-version' \ - -f base='release-v0.17.0' + -f base='release-vX.Y.Z'
- - [ ] If applicable, add new commits to the `release-vX.Y.Z` branch from `master` using `git cherry-pick -x ...` - - Note: `release-*` branches are protected. You can do all needed updates on a separated branch (e.g. `wip-release-vX.Y.Z`) and when everything is settled push to `release-vX.Y.Z` - - [ ] Push the `release-vX.Y.Z` branch to GitHub (`git push origin release-vX.Y.Z`) and create a draft PR targetting `release` branch if it doesn't exist yet ([example](https://github.com/ipfs/kubo/pull/9306)). + - [ ] If it's a first RC, create a draft PR targetting `release` branch if it doesn't exist yet ([example](https://github.com/ipfs/kubo/pull/9306)).
# open a PR gh api /repos/ipfs/kubo/pulls \ --method POST \ - -f title='wip: release v0.17.0' \ - -f head='release-v0.17.0' \ + -f title='wip: release vX.Y.Z' \ + -f head='release-vX.Y.Z' \ -f base='release' \ -f draft=true
@@ -228,41 +228,43 @@ Checklist: - [ ] ⚠️ Tag HEAD `release-vX.Y.Z` commit with `vX.Y.Z-rcN` (`git tag -s vX.Y.Z-rcN -m 'Pre-release X.Y.Z-rcn'`)
# create a signed tag - git tag -s v0.17.0-rc1 -m 'Pre-release 0.17.0-rc1' + git tag -s vX.Y.Z-rcN -m 'Pre-release X.Y.Z-rcN'
- - [ ] Run `git show vX.Y.Z-rc1` to ensure the tag is correct. + - [ ] Run `git show vX.Y.Z-rcN` to ensure the tag is correct.
# show the signed tag - git show v0.17.0-rc1 + git show vX.Y.Z-rcN
- - [ ] ⚠️ Push the `vX.Y.Z-rc1` tag to GitHub (`git push origin vX.Y.Z-rc1`; DO NOT USE `git push --tags` because it pushes all your local tags). + - [ ] ⚠️ Push the `vX.Y.Z-rcN` tag to GitHub (`git push origin vX.Y.Z-rcN`; DO NOT USE `git push --tags` because it pushes all your local tags).
# show the signed tag - git push origin v0.17.0-rc1 + git push origin vX.Y.Z-rcN
- [ ] Add artifacts to https://dist.ipfs.tech by making a PR against [ipfs/distributions](https://github.com/ipfs/distributions) - [ ] Clone the `ipfs/distributions` repo locally. - [ ] Create a new branch (`kubo-release-vX.Y.Z-rcn`) from `master`.
# checkout new branch - git checkout -b kubo-release-v0.17.0-rc1 + git checkout -b kubo-release-vX.Y.Z-rcN
- [ ] Run `./dist.sh add-version kubo vX.Y.Z-rcN` to add the new version to the `versions` file ([instructions](https://github.com/ipfs/distributions#usage)). - - `dist.sh` will print _WARNING: not marking pre-release kubo vX.Y.Z-rc1n as the current version._. + - `dist.sh` will print _WARNING: not marking pre-release kubo vX.Y.Z-rcNn as the current version._.
# add new kubo version to dist - ./dist.sh add-version kubo v0.17.0-rc1 + ./dist.sh add-version kubo vX.Y.Z-rcN + git add dists/*/versions + git commit -m "chore: add kubo vX.Y.Z-rcN"
- [ ] Push the `kubo-release-vX.Y.Z-rcn` branch to GitHub and create a PR from that branch ([example](https://github.com/ipfs/distributions/pull/760)).
# push the change - git push origin kubo-release-v0.17.0-rc1 + git push origin kubo-release-vX.Y.Z-rcN # open a PR gh api /repos/ipfs/distributions/pulls \ --method POST \ - -f title='chore: add kubo v0.17.0-rc1' \ - -f head='kubo-release-v0.17.0-rc1' \ + -f title='chore: add kubo vX.Y.Z-rcN' \ + -f head='kubo-release-vX.Y.Z-rcN' \ -f base='master'
- [ ] Ask for a review from the release reviewer. @@ -272,15 +274,15 @@ Checklist: - `master` build will publish the artifacts to https://dist.ipfs.io in around 30 minutes
# get pull id - id=$(gh api --method GET /repos/ipfs/distributions/pulls -f head='kubo-release-v0.17.0-rc1' --jq '.[0].id') + id=$(gh api --method GET /repos/ipfs/distributions/pulls -f head='kubo-release-vX.Y.Z-rcN' --jq '.[0].node_id') # enable automerge - gh api graphql -f pull="${id}" -f query='mutation($pull: ID!) { enablePullRequestAutoMerge(input: {pullRequestId: $pull, mergeMethod: SQUASH}) {} }' + gh api graphql -f pull="${id}" -f query='mutation($pull: ID!) { enablePullRequestAutoMerge(input: {pullRequestId: $pull, mergeMethod: SQUASH}) { pullRequest { autoMergeRequest { enabledAtenabledBy { login } } } } }'
- [ ] Ensure that the artifacts are available at https://dist.ipfs.io
# check if RC is available - curl --retry 5 --no-progress-meter https://dist.ipfs.tech/kubo/versions | grep -q v0.17.0-rc1 + curl --retry 5 --no-progress-meter https://dist.ipfs.tech/kubo/versions | grep -q vX.Y.Z-rcN echo $?
- [ ] Publish the RC to [the NPM package](https://www.npmjs.com/package/go-ipfs?activeTab=versions) by running https://github.com/ipfs/npm-go-ipfs/actions/workflows/main.yml (it happens automatically but it is safe to speed up the process and kick of a run manually) @@ -304,10 +306,10 @@ Checklist: # check logs for version gh api /repos/ipfs/npm-go-ipfs/actions/jobs/9499319520/logs \ - --method GET | grep -q '0.17.0-rc1' + --method GET | grep -q 'X.Y.Z-rcN' echo $? - - [ ] Cut a pre-release on [GitHub](https://github.com/ipfs/kubo/releases) ([instructions](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release), [example](https://github.com/ipfs/kubo/releases/tag/v0.16.0-rc1)) + - [ ] Cut a pre-release on [GitHub](https://github.com/ipfs/kubo/releases) ([instructions](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release), [example](https://github.com/ipfs/kubo/releases/tag/v0.16.0-rcN)) - Use `vX.Y.Z-rcN` as the tag. - Link to the release issue in the description. - Link to the relevant [changelog](https://github.com/ipfs/kubo/blob/master/docs/changelogs/) in the description. @@ -316,16 +318,16 @@ Checklist: # create a pre-release body='See the related issue: https://github.com/ipfs/kubo/issues/9319 - And the draft changelog: [docs/changelogs/v0.17.md](https://github.com/ipfs/kubo/blob/release-v0.17.0/docs/changelogs/v0.17.md)' + And the draft changelog: [docs/changelogs/v0.17.md](https://github.com/ipfs/kubo/blob/release-vX.Y.Z/docs/changelogs/v0.17.md)' gh api /repos/ipfs/kubo/releases \ --method POST \ - -f tag_name='v0.17.0-rc1' \ - -f name='v0.17.0-rc1' \ + -f tag_name='vX.Y.Z-rcN' \ + -f name='vX.Y.Z-rcN' \ -f body="${body}" \ -F draft=false \ -F prerelease=true \ -F generate_release_notes=false \ - -F make_latest=false + -f make_latest=false - [ ] Synchronize release artifacts by running [sync-release-assets](https://github.com/ipfs/kubo/actions/workflows/sync-release-assets.yml) workflow.
@@ -335,7 +337,7 @@ Checklist: -f ref='master'
- [ ] Announce the RC - - [ ] Create a new post on [IPFS Discourse](https://discuss.ipfs.tech). ([example](https://discuss.ipfs.tech/t/kubo-v0-16-0-rc1-release-candidate-is-out/15248)) + - [ ] Create a new post on [IPFS Discourse](https://discuss.ipfs.tech). ([example](https://discuss.ipfs.tech/t/kubo-v0-16-0-rcN-release-candidate-is-out/15248)) - Use `Kubo vX.Y.Z-rcn Release Candidate is out!` as the title. - Use `kubo` and `go-ipfs` as topics. - Repeat the title as a heading (`##`) in the description. @@ -364,28 +366,28 @@ Checklist: - [ ] Ensure CI tests pass
# checkout new branch - git checkout -b kubo-release-v0.17.0 + git checkout -b kubo-release-vX.Y.Z # replace the go-ipfs version in package.json - sed -i 's/"go-ipfs": ".*"/"go-ipfs": "0.17.0-rc1"/' package.json + sed -i 's/"go-ipfs": ".*"/"go-ipfs": "X.Y.Z-rcN"/' package.json # update package-lock.json npm install # commit the change git add package.json package-lock.json - git commit -m "chore: bump kubo version to v0.17.0-rc1" + git commit -m "chore: bump kubo version to vX.Y.Z-rcN" # push the change - git push origin kubo-release-v0.17.0 + git push origin kubo-release-vX.Y.Z # open a PR gh api /repos/ipfs/ipfs-desktop/pulls \ --method POST \ - -f title='chore: bump kubo version to v0.17.0-rc1' \ - -f head='kubo-release-v0.17.0' \ + -f title='chore: bump kubo version to vX.Y.Z-rcN' \ + -f head='kubo-release-vX.Y.Z' \ -f base='main' \ - -f title='chore: bump kubo version to v0.17.0' \ + -f title='chore: bump kubo version to vX.Y.Z' \ -F draft=true
- [ ] [IPFS Companion](https://github.com/ipfs-shipyard/ipfs-companion) @@ -395,7 +397,7 @@ Checklist: - [ ] Install IPFS Companion from [vendor-specific store](https://github.com/ipfs/ipfs-companion/#readme). - [ ] Check that the comunication between Kubo daemon and IPFS companion is working properly checking if the number of connected peers changes.
- curl --retry 5 --no-progress-meter --output kubo.tar.gz https://dist.ipfs.tech/kubo/v0.17.0-rc1/kubo_v0.17.0-rc1_darwin-arm64.tar.gz + curl --retry 5 --no-progress-meter --output kubo.tar.gz https://dist.ipfs.tech/kubo/vX.Y.Z-rcN/kubo_vX.Y.Z-rcN_darwin-arm64.tar.gz tar -xzvf kubo.tar.gz export IPFS_PATH=$(mktemp -d) ./kubo/ipfs init @@ -403,7 +405,28 @@ Checklist:
- [ ] **Stage 5 - Release** - _ONLY FOR FINAL RELEASE_ - [ ] Prepare the `release` branch. - - [ ] Bump the version in `version.go` in the `release-vX.Y.Z` branch to `vX.Y.Z`. + - [ ] Bump the version in `version.go` in the `release-vX.Y.Z` branch to `X.Y.Z`. +
+ # checkout new branch + git checkout -b bump-version-vX.Y.Z + + # replace the version in version.go + sed -i 's/const CurrentVersionNumber = ".*"/const CurrentVersionNumber = "X.Y.Z"/g' version.go + + # commit the change + git add version.go + git commit -m "chore: bump version to vX.Y.Z" + + # push the change + git push origin bump-version-vX.Y.Z + + # open a PR + gh api /repos/ipfs/kubo/pulls \ + --method POST \ + -f title='chore: bump version to vX.Y.Z' \ + -f head='bump-version-vX.Y.Z' \ + -f base='release-vX.Y.Z' +
- [ ] Update the [docs/changelogs/vX.Y.md](docs/changelogs) with the new commits and contributors. - [ ] Run `./bin/mkreleaselog` twice to generate the changelog and copy the output. - The first run of the script might be poluted with `git clone` output. @@ -418,31 +441,93 @@ Checklist: - Do not delete the `release-vX.Y.Z` branch. - [ ] Checkout the `release` branch locally. - Remember to pull the latest changes. +
+ git checkout release + git pull +
- [ ] Create a signed tag for the release. - [ ] This is a dangerous operation, as it is difficult to reverse due to Go modules and automated Docker image publishing. Remember to verify the commands you intend to run for items marked with ⚠️ with the release reviewer. - [ ] ⚠️ Tag HEAD `release` commit with `vX.Y.Z` (`git tag -s vX.Y.Z -m 'Release X.Y.Z'`) +
+ # create a signed tag + git tag -s vX.Y.Z -m 'Release X.Y.Z' +
- [ ] Run `git show vX.Y.Z` to ensure the tag is correct. +
+ # show the signed tag + git show vX.Y.Z +
- [ ] ⚠️ Push the `vX.Y.Z` tag to GitHub (`git push origin vX.Y.Z`; DO NOT USE `git push --tags` because it pushes all your local tags). +
+ # show the signed tag + git push origin vX.Y.Z +
- [ ] Publish the release. - [ ] Wait for [Publish docker image](https://github.com/ipfs/kubo/actions/workflows/docker-image.yml) workflow run initiated by the tag push to finish. - [ ] Add artifacts to https://dist.ipfs.tech by making a PR against [ipfs/distributions](https://github.com/ipfs/distributions) - [ ] Clone the `ipfs/distributions` repo locally. - [ ] Create a new branch (`kubo-release-vX.Y.Z`) from `master`. +
+ # create a new branch + git checkout -b kubo-release-vX.Y.Z +
- [ ] Run `./dist.sh add-version kubo vX.Y.Z` to add the new version to the `versions` file ([instructions](https://github.com/ipfs/distributions#usage)). +
+ # add new kubo version to dist + ./dist.sh add-version kubo vX.Y.Z + git add dists/*/versions + git commit -m "chore: add kubo vX.Y.Z" +
- [ ] Push the `kubo-release-vX.Y.Z` branch to GitHub and create a PR from that branch ([example](https://github.com/ipfs/distributions/pull/768)). +
+ # push the change + git push origin kubo-release-vX.Y.Z + + # open a PR + gh api /repos/ipfs/distributions/pulls \ + --method POST \ + -f title='chore: add kubo vX.Y.Z' \ + -f head='kubo-release-vX.Y.Z' \ + -f base='master' +
- [ ] Ask for a review from the release reviewer. - [ ] Enable auto-merge for the PR. - PR build will build the artifacts and generate a diff in around 30 minutes - PR will be merged automatically once the diff is approved - `master` build will publish the artifacts to https://dist.ipfs.io in around 30 minutes +
+ # get pull id + id=$(gh api --method GET /repos/ipfs/distributions/pulls -f head='kubo-release-vX.Y.Z' --jq '.[0].node_id') + + # enable automerge + gh api graphql -f pull="${id}" -f query='mutation($pull: ID!) { enablePullRequestAutoMerge(input: {pullRequestId: $pull, mergeMethod: SQUASH}) { pullRequest { autoMergeRequest { enabledBy { login } } } } }' +
- [ ] Ensure that the artifacts are available at https://dist.ipfs.io - [ ] Publish the release to [the NPM package](https://www.npmjs.com/package/go-ipfs?activeTab=versions) by running https://github.com/ipfs/npm-go-ipfs/actions/workflows/main.yml (it happens automatically but it is safe to speed up the process and kick of a run manually) - [ ] Cut the release on [GitHub](https://github.com/ipfs/kubo/releases) ([instructions](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release), [example](https://github.com/ipfs/kubo/releases/tag/v0.16.0)) - Use `vX.Y.Z` as the tag. - - Link to the release issue in the description. - Copy the relevant [changelog](https://github.com/ipfs/kubo/blob/release/docs/changelogs/) into the release description. - - Keep the release notes as trim as possible (e.g. remove top headers where possible, [example](https://github.com/ipfs/kubo/releases/tag/v0.15.0)) + - Keep the release notes as trim as possible (e.g. remove top headers where possible, [example](https://github.com/ipfs/kubo/releases/tag/v0.15.0)) +
+ # create the release + body="$(curl --retry 5 --no-progress-meter https://raw.githubusercontent.com/ipfs/kubo/release-vX.Y.Z/docs/changelogs/v0.17.md)" + gh api /repos/ipfs/kubo/releases \ + --method POST \ + -f tag_name='vX.Y.Z' \ + -f name='vX.Y.Z' \ + -f body="${body}" \ + -F draft=false \ + -F prerelease=false \ + -F generate_release_notes=false \ + -f make_latest=true +
- [ ] Synchronize release artifacts by running [sync-release-assets](https://github.com/ipfs/kubo/actions/workflows/sync-release-assets.yml) workflow. +
+ # dispatch workflow + gh api /repos/ipfs/kubo/actions/workflows/sync-release-assets.yml/dispatches \ + --method POST \ + -f ref='master' +
- [ ] TODO: https://github.com/protocol/bifrost-infra/issues/2184#issuecomment-1315279257 - [ ] Announce the release - [ ] Add a link to the release to this release issue as a comment. @@ -462,11 +547,19 @@ Checklist: - [ ] Update the draft PR created for [IPFS Desktop](https://github.com/ipfs-shipyard/ipfs-desktop) to use the new release and mark it as ready for review. - [ ] Update docs - [ ] Run https://github.com/ipfs/ipfs-docs/actions/workflows/update-on-new-ipfs-tag.yml to generate a PR to the docs repo +
+ # dispatch workflow + gh api /repos/ipfs/ipfs-docs/actions/workflows/update-on-new-ipfs-tag.yml/dispatches \ + --method POST \ + -f ref='main' +
- [ ] Merge the auto-created PR in https://github.com/ipfs/ipfs-docs/pulls ([example](https://github.com/ipfs/ipfs-docs/pull/1263)) - - [ ] Get the blog post created and shared + - [ ] Get the blog post created - [ ] Submit a request for blog post creation using [the form](https://airtable.com/shrNH8YWole1xc70I). - - Notify marketing in #shared-pl-marketing-requests about the blog entry request (since the form tends to go to spam; [example]([example](https://filecoinproject.slack.com/archives/C018EJ8LWH1/p1664885305374909))). - - Don't mark this as done until the blog entry is live. + - Title: Just released: Kubo X.Y.Z! + - Link type: Release notes + - URL: https://github.com/ipfs/kubo/releases/tag/vX.Y.Z + - [ ] The post is live on https://blog.ipfs.io - [ ] Share the blog post - [ ] Twitter (request in Filecoin Slack channel #shared-pl-marketing-requests; [example](https://filecoinproject.slack.com/archives/C018EJ8LWH1/p1664903524843269?thread_ts=1664885305.374909&cid=C018EJ8LWH1)) - [ ] [Reddit](https://reddit.com/r/ipfs) From a1a7c987b02fa39c549dc0e8b5816370fcba326e Mon Sep 17 00:00:00 2001 From: galargh Date: Mon, 5 Dec 2022 09:50:10 +0100 Subject: [PATCH 30/35] docs: update examples in release issue teamplate --- docs/RELEASE_ISSUE_TEMPLATE.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/RELEASE_ISSUE_TEMPLATE.md b/docs/RELEASE_ISSUE_TEMPLATE.md index 3ffce655e093..8802bd46a19d 100644 --- a/docs/RELEASE_ISSUE_TEMPLATE.md +++ b/docs/RELEASE_ISSUE_TEMPLATE.md @@ -309,7 +309,7 @@ Checklist: --method GET | grep -q 'X.Y.Z-rcN' echo $? - - [ ] Cut a pre-release on [GitHub](https://github.com/ipfs/kubo/releases) ([instructions](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release), [example](https://github.com/ipfs/kubo/releases/tag/v0.16.0-rcN)) + - [ ] Cut a pre-release on [GitHub](https://github.com/ipfs/kubo/releases) ([instructions](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release), [example](https://github.com/ipfs/kubo/releases/tag/vX.Y.Z-rcN)) - Use `vX.Y.Z-rcN` as the tag. - Link to the release issue in the description. - Link to the relevant [changelog](https://github.com/ipfs/kubo/blob/master/docs/changelogs/) in the description. @@ -318,7 +318,7 @@ Checklist: # create a pre-release body='See the related issue: https://github.com/ipfs/kubo/issues/9319 - And the draft changelog: [docs/changelogs/v0.17.md](https://github.com/ipfs/kubo/blob/release-vX.Y.Z/docs/changelogs/v0.17.md)' + And the draft changelog: [docs/changelogs/vX.Y.md](https://github.com/ipfs/kubo/blob/release-vX.Y.Z/docs/changelogs/vX.Y.md)' gh api /repos/ipfs/kubo/releases \ --method POST \ -f tag_name='vX.Y.Z-rcN' \ @@ -504,13 +504,13 @@ Checklist: - [ ] Ensure that the artifacts are available at https://dist.ipfs.io - [ ] Publish the release to [the NPM package](https://www.npmjs.com/package/go-ipfs?activeTab=versions) by running https://github.com/ipfs/npm-go-ipfs/actions/workflows/main.yml (it happens automatically but it is safe to speed up the process and kick of a run manually) - - [ ] Cut the release on [GitHub](https://github.com/ipfs/kubo/releases) ([instructions](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release), [example](https://github.com/ipfs/kubo/releases/tag/v0.16.0)) + - [ ] Cut the release on [GitHub](https://github.com/ipfs/kubo/releases) ([instructions](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release), [example](https://github.com/ipfs/kubo/releases/tag/v0.17.0)) - Use `vX.Y.Z` as the tag. - Copy the relevant [changelog](https://github.com/ipfs/kubo/blob/release/docs/changelogs/) into the release description. - - Keep the release notes as trim as possible (e.g. remove top headers where possible, [example](https://github.com/ipfs/kubo/releases/tag/v0.15.0)) + - Keep the release notes as trim as possible (e.g. remove top headers where possible, [example](https://github.com/ipfs/kubo/releases/tag/v0.17.0))
# create the release - body="$(curl --retry 5 --no-progress-meter https://raw.githubusercontent.com/ipfs/kubo/release-vX.Y.Z/docs/changelogs/v0.17.md)" + body="$(curl --retry 5 --no-progress-meter https://raw.githubusercontent.com/ipfs/kubo/release-vX.Y.Z/docs/changelogs/vX.Y.md)" gh api /repos/ipfs/kubo/releases \ --method POST \ -f tag_name='vX.Y.Z' \ @@ -542,7 +542,7 @@ Checklist: - [ ] IPFS Discord #ipfs-chatter - [ ] FIL Slack #ipfs-chatter - [ ] Matrix - - [ ] Add a link from release notes to Discuss post (like we did here: https://github.com/ipfs/kubo/releases/tag/v0.15.0) + - [ ] Add a link from release notes to Discuss post (like we did here: https://github.com/ipfs/kubo/releases/tag/v0.17.0) - [ ] Update the draft PR created for [interop](https://github.com/ipfs/interop) to use the new release and mark it as ready for review. - [ ] Update the draft PR created for [IPFS Desktop](https://github.com/ipfs-shipyard/ipfs-desktop) to use the new release and mark it as ready for review. - [ ] Update docs @@ -560,9 +560,9 @@ Checklist: - Link type: Release notes - URL: https://github.com/ipfs/kubo/releases/tag/vX.Y.Z - [ ] The post is live on https://blog.ipfs.io - - [ ] Share the blog post - - [ ] Twitter (request in Filecoin Slack channel #shared-pl-marketing-requests; [example](https://filecoinproject.slack.com/archives/C018EJ8LWH1/p1664903524843269?thread_ts=1664885305.374909&cid=C018EJ8LWH1)) - - [ ] [Reddit](https://reddit.com/r/ipfs) + - [ ] Share the link to the GitHub release + - [ ] Twitter (request in Filecoin Slack channel #shared-pl-marketing-requests; [example](https://filecoinproject.slack.com/archives/C018EJ8LWH1/p1664903524843269?thread_ts=1664885305.374909&cid=C018EJ8LWH1)) + - [ ] [Reddit](https://reddit.com/r/ipfs) - [ ] **Stage 6 - Post-Release** - [ ] Merge the `release` branch back into `master`, ignoring the changes to `version.go` (keep the `-dev` version from master). - [ ] Create an issue using this release issue template for the _next_ release. From fa21445d6762ae4f80700bb24a31cd6adffc4cc4 Mon Sep 17 00:00:00 2001 From: galargh Date: Mon, 5 Dec 2022 09:50:41 +0100 Subject: [PATCH 31/35] docs: update mkreleaselog output --- bin/mkreleaselog | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/mkreleaselog b/bin/mkreleaselog index a60125cb2f46..1b31854a7542 100755 --- a/bin/mkreleaselog +++ b/bin/mkreleaselog @@ -261,6 +261,11 @@ recursive_release_log() { printf -- "Generating Changelog for %s %s..%s\n" "$module" "$start" "$end" >&2 + echo "### Changelog" + echo + echo "
Full Changelog" + echo + printf -- "- %s:\n" "$module" release_log "$module" "$start" "$end" | indent @@ -286,7 +291,9 @@ recursive_release_log() { done echo - echo "Contributors" + echo "
" + echo + echo "### Contributors" echo echo "| Contributor | Commits | Lines ± | Files Changed |" From 345c58ff7a4b286813b173628a9eb46fb52ab138 Mon Sep 17 00:00:00 2001 From: galargh Date: Mon, 5 Dec 2022 09:52:43 +0100 Subject: [PATCH 32/35] docs: ensure the changelogs are correctly linked --- docs/RELEASE_ISSUE_TEMPLATE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/RELEASE_ISSUE_TEMPLATE.md b/docs/RELEASE_ISSUE_TEMPLATE.md index 8802bd46a19d..a222f4524700 100644 --- a/docs/RELEASE_ISSUE_TEMPLATE.md +++ b/docs/RELEASE_ISSUE_TEMPLATE.md @@ -94,6 +94,7 @@ Checklist: - [ ] Prepare changelog proposal in [docs/changelogs/vX.Y.md](https://github.com/ipfs/kubo/blob/master/docs/changelogs/). - Skip filling out the `### Changelog` section (the one where which lists all the commits and contributors) for now. We will populate it after the release branch is cut. - PR link: + - [ ] Ensure the new changelog is linked in the [CHANGELOG.md](CHANGELOG.md) file. - [ ] Install ZSH ([instructions](https://github.com/ohmyzsh/ohmyzsh/wiki/Installing-ZSH#install-and-set-up-zsh-as-default)). It is needed by the changelog creation script. - [ ] Ensure you have `kubo` checked out under `$(go env GOPATH)/src/github.com/ipfs/kubo`. This is required by the changelog creation script. - If you want your clone to live in a different location, you can symlink it to the expected location by running `mkdir -p $(go env GOPATH)/src/github.com/ipfs && ln -s $(pwd) $(go env GOPATH)/src/github.com/ipfs/kubo`. From 4d1d0b7eedd65506ddf95b971bf45f2d03ac4cbe Mon Sep 17 00:00:00 2001 From: galargh Date: Mon, 5 Dec 2022 09:55:40 +0100 Subject: [PATCH 33/35] docs: remove raw release issue template automation notes --- docs/RELEASE_ISSUE_TEMPLATE.md | 360 --------------------------------- 1 file changed, 360 deletions(-) diff --git a/docs/RELEASE_ISSUE_TEMPLATE.md b/docs/RELEASE_ISSUE_TEMPLATE.md index a222f4524700..992ec8059040 100644 --- a/docs/RELEASE_ISSUE_TEMPLATE.md +++ b/docs/RELEASE_ISSUE_TEMPLATE.md @@ -45,46 +45,9 @@ Checklist: - [ ] Spell out all that we want updated - gateways, the bootstraper and the cluster/preload nodes - [ ] Mention @protocol/bifrost-team in the issue and let them know the expected date of the release - Issue link: -
- # create new issue in protocol/bifrost-infra - gh api \ - --method POST \ - --raw-field "title=Rollout Kubo vX.Y.Z-RCN" \ - --raw-field "body=## What should be updated - - - [ ] Gateways - - [ ] Bootstrapper - - [ ] Cluster/Preload nodes - - ## When - - YYYY-MM-DD" \ - repos/protocol/bifrost-infra/issues -
- [ ] Ensure that the `What's left for release` section has all the checkboxes checked. If that's not the case, discuss the open items with Kubo maintainers and update the release schedule accordingly. - [ ] Create `docs-release-vX.Y.Z` branch, open a draft PR and keep updating `docs/RELEASE_ISSUE_TEMPLATE.md` on that branch as you go. - [ ] Link it in the "Meta" section above. -
- # retrieve master ref for ipfs/kubo - gh api /repos/ipfs/kubo/git/ref/heads/master - - # create docs-release-vX.Y.Z ref for ipfs/kubo - gh api \ - --method POST \ - /repos/ipfs/kubo/git/refs \ - -f ref='refs/heads/docs-release-vX.Y.Z' \ - -f sha='254d81a9d5595c3e637c7573d56125836d5f5055' - - # create draft PR from docs-release-vX.Y.Z to master for ipfs/kubo - # requires docs-release-vX.Y.Z to be modified - gh api \ - --method POST \ - /repos/ipfs/kubo/pulls \ - -f title='docs: release vX.Y.Z' \ - -f head='docs-release-vX.Y.Z' \ - -f base='master' \ - -f draft=true -
- [ ] Ensure you have a [GPG key generated](https://docs.github.com/en/authentication/managing-commit-signature-verification/generating-a-new-gpg-key) and [added to your GitHub account](https://docs.github.com/en/authentication/managing-commit-signature-verification/adding-a-gpg-key-to-your-github-account). This will enable you to created signed tags. - [ ] Ensure you have [admin access](https://discuss.ipfs.tech/g/admins) to [IPFS Discourse](https://discuss.ipfs.tech/). Admin access is required to globally pin posts and create banners. @2color might be able to assist you. - [ ] Access to [#bifrost](https://filecoinproject.slack.com/archives/C03MMMF606T) channel in FIL Slack might come in handy. Ask the release reviewer to invite you over. @@ -102,241 +65,41 @@ Checklist: - [ ] **Stage 1 - Initial Preparations** - [ ] Upgrade to the latest patch release of Go that CircleCI has published (currently used version: `1.19.1`) - [ ] See the list here: https://hub.docker.com/r/cimg/go/tags -
- # retrieve the latest version of cimg/go available - curl -s 'https://hub.docker.com/v2/repositories/cimg/go/tags' | jq -r '.results | map(.name) | map(select(. | test("^[0-9]+\\.[0-9]+\\.[0-9]+$"))) | .[0]' -
- [ ] [ipfs/distributions](https://github.com/ipfs/distributions): bump [this version](https://github.com/ipfs/distributions/blob/master/.tool-versions#L2) -
- # checkout new branch - git checkout -b bump-go-version - - # replace the cimg/go version in .tool-versions in ipfs/distributions - sed -i 's/golang [0-9]\+\.[0-9]\+\.[0-9]\+/golang 1.19.3/g' .tool-versions - - # commit the change - git add .tool-versions - git commit -m "chore: bump go version to 1.19.3" - - # push the change - git push origin bump-go-version - - # open a PR - gh api /repos/ipfs/distributions/pulls \ - --method POST \ - -f title='chore: bump go version to 1.19.3' \ - -f head='bump-go-version' \ - -f base='master' -
- [ ] [ipfs/kubo](https://github.com/ipfs/kubo): [example PR](https://github.com/ipfs/kubo/pull/8599) -
- # checkout new branch - git checkout -b bump-go-version - - # replace the cimg/go version in .circleci/main.yml in ipfs/kubo - sed -i 's/cimg\/go:[0-9]\+\.[0-9]\+\.[0-9]\+/cimg\/go:1.19.3/g' .circleci/main.yml - - # replace golang version in Dockerfile - sed -i 's/golang:[0-9]\+\.[0-9]\+\.[0-9]\+/golang:1.19.3/g' Dockerfile - - # commit the change - git add .circleci/main.yml Dockerfile - git commit -m "chore: bump go version to 1.19.3" - - # push the change - git push origin bump-go-version - - # open a PR - gh api /repos/ipfs/kubo/pulls \ - --method POST \ - -f title='chore: bump go version to 1.19.3' \ - -f head='bump-go-version' \ - -f base='master' -
- [ ] [ipfs/ipfs-docs](https://github.com/ipfs/ipfs-docs): [example PR](https://github.com/ipfs/ipfs-docs/pull/1298) - only if the major version changed - [ ] Fork a new branch (`release-vX.Y.Z`) from `master`. -
- # retrieve master ref for ipfs/kubo - gh api /repos/ipfs/kubo/git/ref/heads/master - - # create release-vX.Y.Z ref for ipfs/kubo - gh api \ - --method POST \ - /repos/ipfs/kubo/git/refs \ - -f ref='refs/heads/release-vX.Y.Z' \ - -f sha='a4da8f6cc768c3e2cce9c2677a792b2c237066aa' -
- [ ] Bump the version in `version.go` in the `master` branch to `vX.(Y+1).0-dev` via a PR ([example](https://github.com/ipfs/kubo/pull/9305)). -
- # checkout new branch - git checkout -b bump-version - - # replace the version in version.go - sed -i 's/const CurrentVersionNumber = ".*"/const CurrentVersionNumber = "0.18.0-dev"/g' version.go - - # commit the change - git add version.go - git commit -m "chore: bump version to v0.18.0-dev" - - # push the change - git push origin bump-version - - # open a PR - gh api /repos/ipfs/kubo/pulls \ - --method POST \ - -f title='chore: bump version to v0.18.0-dev' \ - -f head='bump-version' \ - -f base='master' -
- [ ] **Stage 2 - Release Candidate** - _if any [non-trivial](docs/releases.md#footnotes) changes need to be included in the release, return to this stage_ - [ ] If it's not a first RC, add new commits to the `release-vX.Y.Z` branch from `master` using `git cherry-pick -x ...` - Note: `release-*` branches are protected. You can do all needed updates on a separated branch (e.g. `wip-release-vX.Y.Z`) and when everything is settled push to `release-vX.Y.Z` - [ ] Bump the version in `version.go` in the `release-vX.Y.Z` branch to `vX.Y.Z-rcN`. -
- # checkout new branch - git checkout -B bump-release-version - - # replace the version in version.go - sed -i 's/const CurrentVersionNumber = ".*"/const CurrentVersionNumber = "X.Y.Z-rcN"/g' version.go - - # commit the change - git add version.go - git commit -m "chore: bump version to vX.Y.Z-rcN" - - # push the change - git push origin bump-release-version - - # open a PR - gh api /repos/ipfs/kubo/pulls \ - --method POST \ - -f title='chore: bump version to vX.Y.Z-rcN' \ - -f head='bump-release-version' \ - -f base='release-vX.Y.Z' -
- [ ] If it's a first RC, create a draft PR targetting `release` branch if it doesn't exist yet ([example](https://github.com/ipfs/kubo/pull/9306)). -
- # open a PR - gh api /repos/ipfs/kubo/pulls \ - --method POST \ - -f title='wip: release vX.Y.Z' \ - -f head='release-vX.Y.Z' \ - -f base='release' \ - -f draft=true -
- [ ] Wait for CI to run and complete PR checks. All checks should pass. - [ ] Create a signed tag for the release candidate. - [ ] This is a dangerous operation, as it is difficult to reverse due to Go modules and automated Docker image publishing. Remember to verify the commands you intend to run for items marked with ⚠️ with the release reviewer. - [ ] ⚠️ Tag HEAD `release-vX.Y.Z` commit with `vX.Y.Z-rcN` (`git tag -s vX.Y.Z-rcN -m 'Pre-release X.Y.Z-rcn'`) -
- # create a signed tag - git tag -s vX.Y.Z-rcN -m 'Pre-release X.Y.Z-rcN' -
- [ ] Run `git show vX.Y.Z-rcN` to ensure the tag is correct. -
- # show the signed tag - git show vX.Y.Z-rcN -
- [ ] ⚠️ Push the `vX.Y.Z-rcN` tag to GitHub (`git push origin vX.Y.Z-rcN`; DO NOT USE `git push --tags` because it pushes all your local tags). -
- # show the signed tag - git push origin vX.Y.Z-rcN -
- [ ] Add artifacts to https://dist.ipfs.tech by making a PR against [ipfs/distributions](https://github.com/ipfs/distributions) - [ ] Clone the `ipfs/distributions` repo locally. - [ ] Create a new branch (`kubo-release-vX.Y.Z-rcn`) from `master`. -
- # checkout new branch - git checkout -b kubo-release-vX.Y.Z-rcN -
- [ ] Run `./dist.sh add-version kubo vX.Y.Z-rcN` to add the new version to the `versions` file ([instructions](https://github.com/ipfs/distributions#usage)). - `dist.sh` will print _WARNING: not marking pre-release kubo vX.Y.Z-rcNn as the current version._. -
- # add new kubo version to dist - ./dist.sh add-version kubo vX.Y.Z-rcN - git add dists/*/versions - git commit -m "chore: add kubo vX.Y.Z-rcN" -
- [ ] Push the `kubo-release-vX.Y.Z-rcn` branch to GitHub and create a PR from that branch ([example](https://github.com/ipfs/distributions/pull/760)). -
- # push the change - git push origin kubo-release-vX.Y.Z-rcN - - # open a PR - gh api /repos/ipfs/distributions/pulls \ - --method POST \ - -f title='chore: add kubo vX.Y.Z-rcN' \ - -f head='kubo-release-vX.Y.Z-rcN' \ - -f base='master' -
- [ ] Ask for a review from the release reviewer. - [ ] Enable auto-merge for the PR. - PR build will build the artifacts and generate a diff in around 30 minutes - PR will be merged automatically once the diff is approved - `master` build will publish the artifacts to https://dist.ipfs.io in around 30 minutes -
- # get pull id - id=$(gh api --method GET /repos/ipfs/distributions/pulls -f head='kubo-release-vX.Y.Z-rcN' --jq '.[0].node_id') - - # enable automerge - gh api graphql -f pull="${id}" -f query='mutation($pull: ID!) { enablePullRequestAutoMerge(input: {pullRequestId: $pull, mergeMethod: SQUASH}) { pullRequest { autoMergeRequest { enabledAtenabledBy { login } } } } }' -
- [ ] Ensure that the artifacts are available at https://dist.ipfs.io -
- # check if RC is available - curl --retry 5 --no-progress-meter https://dist.ipfs.tech/kubo/versions | grep -q vX.Y.Z-rcN - echo $? -
- [ ] Publish the RC to [the NPM package](https://www.npmjs.com/package/go-ipfs?activeTab=versions) by running https://github.com/ipfs/npm-go-ipfs/actions/workflows/main.yml (it happens automatically but it is safe to speed up the process and kick of a run manually) -
- # dispatch workflow - gh api /repos/ipfs/npm-go-ipfs/actions/workflows/main.yml/dispatches \ - --method POST \ - -f ref='master' - - # get workflow run - gh api /repos/ipfs/npm-go-ipfs/actions/workflows/main.yml/runs \ - --method GET \ - -f per_page='1' \ - --jq '.workflow_runs[0]' - - # get workflow job - gh api /repos/ipfs/npm-go-ipfs/actions/runs/3470515021/jobs \ - --method GET \ - -f per_page='1' \ - --jq '.jobs[0]' - - # check logs for version - gh api /repos/ipfs/npm-go-ipfs/actions/jobs/9499319520/logs \ - --method GET | grep -q 'X.Y.Z-rcN' - echo $? -
- [ ] Cut a pre-release on [GitHub](https://github.com/ipfs/kubo/releases) ([instructions](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release), [example](https://github.com/ipfs/kubo/releases/tag/vX.Y.Z-rcN)) - Use `vX.Y.Z-rcN` as the tag. - Link to the release issue in the description. - Link to the relevant [changelog](https://github.com/ipfs/kubo/blob/master/docs/changelogs/) in the description. - Check `This is a pre-release`. -
- # create a pre-release - body='See the related issue: https://github.com/ipfs/kubo/issues/9319 - - And the draft changelog: [docs/changelogs/vX.Y.md](https://github.com/ipfs/kubo/blob/release-vX.Y.Z/docs/changelogs/vX.Y.md)' - gh api /repos/ipfs/kubo/releases \ - --method POST \ - -f tag_name='vX.Y.Z-rcN' \ - -f name='vX.Y.Z-rcN' \ - -f body="${body}" \ - -F draft=false \ - -F prerelease=true \ - -F generate_release_notes=false \ - -f make_latest=false -
- [ ] Synchronize release artifacts by running [sync-release-assets](https://github.com/ipfs/kubo/actions/workflows/sync-release-assets.yml) workflow. -
- # dispatch workflow - gh api /repos/ipfs/kubo/actions/workflows/sync-release-assets.yml/dispatches \ - --method POST \ - -f ref='master' -
- [ ] Announce the RC - [ ] Create a new post on [IPFS Discourse](https://discuss.ipfs.tech). ([example](https://discuss.ipfs.tech/t/kubo-v0-16-0-rcN-release-candidate-is-out/15248)) - Use `Kubo vX.Y.Z-rcn Release Candidate is out!` as the title. @@ -365,69 +128,15 @@ Checklist: - [ ] Push to a branch ([example](https://github.com/ipfs/ipfs-desktop/pull/1826/commits/b0a23db31ce942b46d95965ee6fe770fb24d6bde)) - [ ] Open a draft PR to track through the final release ([example](https://github.com/ipfs/ipfs-desktop/pull/1826)) - [ ] Ensure CI tests pass -
- # checkout new branch - git checkout -b kubo-release-vX.Y.Z - - # replace the go-ipfs version in package.json - sed -i 's/"go-ipfs": ".*"/"go-ipfs": "X.Y.Z-rcN"/' package.json - - # update package-lock.json - npm install - - # commit the change - git add package.json package-lock.json - git commit -m "chore: bump kubo version to vX.Y.Z-rcN" - - # push the change - git push origin kubo-release-vX.Y.Z - - # open a PR - gh api /repos/ipfs/ipfs-desktop/pulls \ - --method POST \ - -f title='chore: bump kubo version to vX.Y.Z-rcN' \ - -f head='kubo-release-vX.Y.Z' \ - -f base='main' \ - -f title='chore: bump kubo version to vX.Y.Z' \ - -F draft=true -
- [ ] [IPFS Companion](https://github.com/ipfs-shipyard/ipfs-companion) - [ ] Start kubo daemon of the version to release. - [ ] Start a fresh chromium or chrome instance using `chromium --user-data-dir=$(mktemp -d)` (macos `/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir=$(mktemp -d)`) - [ ] Start a fresh firefox instance using `firefox --profile $(mktemp -d)` (macos `/Applications/Firefox.app/Contents/MacOS/firefox --profile $(mktemp -d)`) - [ ] Install IPFS Companion from [vendor-specific store](https://github.com/ipfs/ipfs-companion/#readme). - [ ] Check that the comunication between Kubo daemon and IPFS companion is working properly checking if the number of connected peers changes. -
- curl --retry 5 --no-progress-meter --output kubo.tar.gz https://dist.ipfs.tech/kubo/vX.Y.Z-rcN/kubo_vX.Y.Z-rcN_darwin-arm64.tar.gz - tar -xzvf kubo.tar.gz - export IPFS_PATH=$(mktemp -d) - ./kubo/ipfs init - ./kubo/ipfs daemon & -
- [ ] **Stage 5 - Release** - _ONLY FOR FINAL RELEASE_ - [ ] Prepare the `release` branch. - [ ] Bump the version in `version.go` in the `release-vX.Y.Z` branch to `X.Y.Z`. -
- # checkout new branch - git checkout -b bump-version-vX.Y.Z - - # replace the version in version.go - sed -i 's/const CurrentVersionNumber = ".*"/const CurrentVersionNumber = "X.Y.Z"/g' version.go - - # commit the change - git add version.go - git commit -m "chore: bump version to vX.Y.Z" - - # push the change - git push origin bump-version-vX.Y.Z - - # open a PR - gh api /repos/ipfs/kubo/pulls \ - --method POST \ - -f title='chore: bump version to vX.Y.Z' \ - -f head='bump-version-vX.Y.Z' \ - -f base='release-vX.Y.Z' -
- [ ] Update the [docs/changelogs/vX.Y.md](docs/changelogs) with the new commits and contributors. - [ ] Run `./bin/mkreleaselog` twice to generate the changelog and copy the output. - The first run of the script might be poluted with `git clone` output. @@ -442,93 +151,30 @@ Checklist: - Do not delete the `release-vX.Y.Z` branch. - [ ] Checkout the `release` branch locally. - Remember to pull the latest changes. -
- git checkout release - git pull -
- [ ] Create a signed tag for the release. - [ ] This is a dangerous operation, as it is difficult to reverse due to Go modules and automated Docker image publishing. Remember to verify the commands you intend to run for items marked with ⚠️ with the release reviewer. - [ ] ⚠️ Tag HEAD `release` commit with `vX.Y.Z` (`git tag -s vX.Y.Z -m 'Release X.Y.Z'`) -
- # create a signed tag - git tag -s vX.Y.Z -m 'Release X.Y.Z' -
- [ ] Run `git show vX.Y.Z` to ensure the tag is correct. -
- # show the signed tag - git show vX.Y.Z -
- [ ] ⚠️ Push the `vX.Y.Z` tag to GitHub (`git push origin vX.Y.Z`; DO NOT USE `git push --tags` because it pushes all your local tags). -
- # show the signed tag - git push origin vX.Y.Z -
- [ ] Publish the release. - [ ] Wait for [Publish docker image](https://github.com/ipfs/kubo/actions/workflows/docker-image.yml) workflow run initiated by the tag push to finish. - [ ] Add artifacts to https://dist.ipfs.tech by making a PR against [ipfs/distributions](https://github.com/ipfs/distributions) - [ ] Clone the `ipfs/distributions` repo locally. - [ ] Create a new branch (`kubo-release-vX.Y.Z`) from `master`. -
- # create a new branch - git checkout -b kubo-release-vX.Y.Z -
- [ ] Run `./dist.sh add-version kubo vX.Y.Z` to add the new version to the `versions` file ([instructions](https://github.com/ipfs/distributions#usage)). -
- # add new kubo version to dist - ./dist.sh add-version kubo vX.Y.Z - git add dists/*/versions - git commit -m "chore: add kubo vX.Y.Z" -
- [ ] Push the `kubo-release-vX.Y.Z` branch to GitHub and create a PR from that branch ([example](https://github.com/ipfs/distributions/pull/768)). -
- # push the change - git push origin kubo-release-vX.Y.Z - - # open a PR - gh api /repos/ipfs/distributions/pulls \ - --method POST \ - -f title='chore: add kubo vX.Y.Z' \ - -f head='kubo-release-vX.Y.Z' \ - -f base='master' -
- [ ] Ask for a review from the release reviewer. - [ ] Enable auto-merge for the PR. - PR build will build the artifacts and generate a diff in around 30 minutes - PR will be merged automatically once the diff is approved - `master` build will publish the artifacts to https://dist.ipfs.io in around 30 minutes -
- # get pull id - id=$(gh api --method GET /repos/ipfs/distributions/pulls -f head='kubo-release-vX.Y.Z' --jq '.[0].node_id') - - # enable automerge - gh api graphql -f pull="${id}" -f query='mutation($pull: ID!) { enablePullRequestAutoMerge(input: {pullRequestId: $pull, mergeMethod: SQUASH}) { pullRequest { autoMergeRequest { enabledBy { login } } } } }' -
- [ ] Ensure that the artifacts are available at https://dist.ipfs.io - [ ] Publish the release to [the NPM package](https://www.npmjs.com/package/go-ipfs?activeTab=versions) by running https://github.com/ipfs/npm-go-ipfs/actions/workflows/main.yml (it happens automatically but it is safe to speed up the process and kick of a run manually) - [ ] Cut the release on [GitHub](https://github.com/ipfs/kubo/releases) ([instructions](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release), [example](https://github.com/ipfs/kubo/releases/tag/v0.17.0)) - Use `vX.Y.Z` as the tag. - Copy the relevant [changelog](https://github.com/ipfs/kubo/blob/release/docs/changelogs/) into the release description. - Keep the release notes as trim as possible (e.g. remove top headers where possible, [example](https://github.com/ipfs/kubo/releases/tag/v0.17.0)) -
- # create the release - body="$(curl --retry 5 --no-progress-meter https://raw.githubusercontent.com/ipfs/kubo/release-vX.Y.Z/docs/changelogs/vX.Y.md)" - gh api /repos/ipfs/kubo/releases \ - --method POST \ - -f tag_name='vX.Y.Z' \ - -f name='vX.Y.Z' \ - -f body="${body}" \ - -F draft=false \ - -F prerelease=false \ - -F generate_release_notes=false \ - -f make_latest=true -
- [ ] Synchronize release artifacts by running [sync-release-assets](https://github.com/ipfs/kubo/actions/workflows/sync-release-assets.yml) workflow. -
- # dispatch workflow - gh api /repos/ipfs/kubo/actions/workflows/sync-release-assets.yml/dispatches \ - --method POST \ - -f ref='master' -
- [ ] TODO: https://github.com/protocol/bifrost-infra/issues/2184#issuecomment-1315279257 - [ ] Announce the release - [ ] Add a link to the release to this release issue as a comment. @@ -548,12 +194,6 @@ Checklist: - [ ] Update the draft PR created for [IPFS Desktop](https://github.com/ipfs-shipyard/ipfs-desktop) to use the new release and mark it as ready for review. - [ ] Update docs - [ ] Run https://github.com/ipfs/ipfs-docs/actions/workflows/update-on-new-ipfs-tag.yml to generate a PR to the docs repo -
- # dispatch workflow - gh api /repos/ipfs/ipfs-docs/actions/workflows/update-on-new-ipfs-tag.yml/dispatches \ - --method POST \ - -f ref='main' -
- [ ] Merge the auto-created PR in https://github.com/ipfs/ipfs-docs/pulls ([example](https://github.com/ipfs/ipfs-docs/pull/1263)) - [ ] Get the blog post created - [ ] Submit a request for blog post creation using [the form](https://airtable.com/shrNH8YWole1xc70I). From 5ff08e4e188dc56c1d5d2f1c15558996c64a54c6 Mon Sep 17 00:00:00 2001 From: galargh Date: Mon, 5 Dec 2022 09:56:55 +0100 Subject: [PATCH 34/35] docs: update top comment in release issue template --- docs/RELEASE_ISSUE_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/RELEASE_ISSUE_TEMPLATE.md b/docs/RELEASE_ISSUE_TEMPLATE.md index 992ec8059040..f6fdef156c4d 100644 --- a/docs/RELEASE_ISSUE_TEMPLATE.md +++ b/docs/RELEASE_ISSUE_TEMPLATE.md @@ -1,4 +1,4 @@ - + > Release Issue Template. If doing a patch release, see [here](https://github.com/ipfs/kubo/blob/master/docs/PATCH_RELEASE_TEMPLATE.md) From 928105865c31239d0412e1c53d4fd77651d67da5 Mon Sep 17 00:00:00 2001 From: Piotr Galar Date: Mon, 5 Dec 2022 10:02:15 +0100 Subject: [PATCH 35/35] Apply suggestions from code review --- docs/RELEASE_ISSUE_TEMPLATE.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/RELEASE_ISSUE_TEMPLATE.md b/docs/RELEASE_ISSUE_TEMPLATE.md index f6fdef156c4d..13b14c8a4f91 100644 --- a/docs/RELEASE_ISSUE_TEMPLATE.md +++ b/docs/RELEASE_ISSUE_TEMPLATE.md @@ -85,7 +85,7 @@ Checklist: - [ ] Clone the `ipfs/distributions` repo locally. - [ ] Create a new branch (`kubo-release-vX.Y.Z-rcn`) from `master`. - [ ] Run `./dist.sh add-version kubo vX.Y.Z-rcN` to add the new version to the `versions` file ([instructions](https://github.com/ipfs/distributions#usage)). - - `dist.sh` will print _WARNING: not marking pre-release kubo vX.Y.Z-rcNn as the current version._. + - `dist.sh` will print _WARNING: not marking pre-release kubo vX.Y.Z-rcN as the current version._. - [ ] Push the `kubo-release-vX.Y.Z-rcn` branch to GitHub and create a PR from that branch ([example](https://github.com/ipfs/distributions/pull/760)). - [ ] Ask for a review from the release reviewer. - [ ] Enable auto-merge for the PR. @@ -94,14 +94,14 @@ Checklist: - `master` build will publish the artifacts to https://dist.ipfs.io in around 30 minutes - [ ] Ensure that the artifacts are available at https://dist.ipfs.io - [ ] Publish the RC to [the NPM package](https://www.npmjs.com/package/go-ipfs?activeTab=versions) by running https://github.com/ipfs/npm-go-ipfs/actions/workflows/main.yml (it happens automatically but it is safe to speed up the process and kick of a run manually) - - [ ] Cut a pre-release on [GitHub](https://github.com/ipfs/kubo/releases) ([instructions](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release), [example](https://github.com/ipfs/kubo/releases/tag/vX.Y.Z-rcN)) + - [ ] Cut a pre-release on [GitHub](https://github.com/ipfs/kubo/releases) ([instructions](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release), [example](https://github.com/ipfs/kubo/releases/tag/v0.17.0-rc1)) - Use `vX.Y.Z-rcN` as the tag. - Link to the release issue in the description. - Link to the relevant [changelog](https://github.com/ipfs/kubo/blob/master/docs/changelogs/) in the description. - Check `This is a pre-release`. - [ ] Synchronize release artifacts by running [sync-release-assets](https://github.com/ipfs/kubo/actions/workflows/sync-release-assets.yml) workflow. - [ ] Announce the RC - - [ ] Create a new post on [IPFS Discourse](https://discuss.ipfs.tech). ([example](https://discuss.ipfs.tech/t/kubo-v0-16-0-rcN-release-candidate-is-out/15248)) + - [ ] Create a new post on [IPFS Discourse](https://discuss.ipfs.tech). ([example](https://discuss.ipfs.tech/t/kubo-v0-16-0-rc1-release-candidate-is-out/15248)) - Use `Kubo vX.Y.Z-rcn Release Candidate is out!` as the title. - Use `kubo` and `go-ipfs` as topics. - Repeat the title as a heading (`##`) in the description.