diff --git a/.github/ISSUE_TEMPLATE/module-readiness-checklist.md b/.github/ISSUE_TEMPLATE/module-readiness-checklist.md index 2d14413ad971..4d696f78d9db 100644 --- a/.github/ISSUE_TEMPLATE/module-readiness-checklist.md +++ b/.github/ISSUE_TEMPLATE/module-readiness-checklist.md @@ -10,13 +10,13 @@ This checklist is to be used for tracking the final internal audit of new Cosmos ### Release Candidate Checklist -The following checklist should be gone through once the module has been fully implemented. This audit should be performed directly on `master`, or preferably on a `alpha` or `beta` release tag that includes the module. +The following checklist should be gone through once the module has been fully implemented. This audit should be performed directly on `main`, or preferably on a `alpha` or `beta` release tag that includes the module. The module **should not** be included in any Release Candidate tag until it has passed this checklist. - [ ] API audit (at least 1 person) (@assignee) - [ ] Are Msg and Query methods and types well-named and organized? - - [ ] Is everything well documented (inline godoc as well as [`/spec/` folder](https://github.com/cosmos/cosmos-sdk/blob/master/docs/spec/SPEC-SPEC.md) in module directory) + - [ ] Is everything well documented (inline godoc as well as [`/spec/` folder](https://github.com/cosmos/cosmos-sdk/blob/main/docs/spec/SPEC-SPEC.md) in module directory) - [ ] State machine audit (at least 2 people) (@assignee1, @assignee2) - [ ] Read through MsgServer code and verify correctness upon visual inspection - [ ] Ensure all state machine code which could be confusing is properly commented diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index dd537fce565b..5306d0890f29 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -23,10 +23,10 @@ I have... - [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] added `!` to the type prefix if API or client breaking change -- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting)) +- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting)) - [ ] provided a link to the relevant issue or specification -- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules) -- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing) +- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules) +- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing) - [ ] added a changelog entry to `CHANGELOG.md` - [ ] included comments for [documenting Go code](https://blog.golang.org/godoc) - [ ] updated the relevant documentation or specification @@ -47,4 +47,4 @@ I have... - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage -- [ ] manually tested (if applicable) \ No newline at end of file +- [ ] manually tested (if applicable) diff --git a/.github/PULL_REQUEST_TEMPLATE/docs.md b/.github/PULL_REQUEST_TEMPLATE/docs.md index e6a10d37eca0..8233f83261c0 100644 --- a/.github/PULL_REQUEST_TEMPLATE/docs.md +++ b/.github/PULL_REQUEST_TEMPLATE/docs.md @@ -15,9 +15,9 @@ please add links to any relevant follow up issues.* I have... - [ ] included the correct `docs:` prefix in the PR title -- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting)) +- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting)) - [ ] provided a link to the relevant issue or specification -- [ ] followed the [documentation writing guidelines](https://github.com/cosmos/cosmos-sdk/blob/master/docs/DOC_WRITING_GUIDELINES.md) +- [ ] followed the [documentation writing guidelines](https://github.com/cosmos/cosmos-sdk/blob/main/docs/DOC_WRITING_GUIDELINES.md) - [ ] reviewed "Files changed" and left comments if necessary - [ ] confirmed all CI checks have passed diff --git a/.github/PULL_REQUEST_TEMPLATE/other.md b/.github/PULL_REQUEST_TEMPLATE/other.md index f98b5a068efd..b4f19151b34e 100644 --- a/.github/PULL_REQUEST_TEMPLATE/other.md +++ b/.github/PULL_REQUEST_TEMPLATE/other.md @@ -15,7 +15,7 @@ please add links to any relevant follow up issues.* I have... - [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title -- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting)) +- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting)) - [ ] provided a link to the relevant issue or specification - [ ] reviewed "Files changed" and left comments if necessary - [ ] confirmed all CI checks have passed @@ -29,4 +29,4 @@ I have... - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed all author checklist items have been addressed -- [ ] confirmed that this PR does not change production code \ No newline at end of file +- [ ] confirmed that this PR does not change production code diff --git a/.github/workflows/atlas.yml b/.github/workflows/atlas.yml index 65ac5897053b..5c59de030807 100644 --- a/.github/workflows/atlas.yml +++ b/.github/workflows/atlas.yml @@ -3,7 +3,7 @@ name: Atlas on: push: branches: - - master + - main paths: - "x/**/atlas/*" pull_request: diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 55e925fd0487..e887ca898772 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -1,10 +1,10 @@ name: Deploy docs # This job builds and deploys documenation to github pages. -# It runs on every push to master with a change in the docs folder. +# It runs on every push to main with a change in the docs folder. on: push: branches: - - master + - main paths: - "docs/**" diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 35f253f0a6d9..4e4691c3e5ee 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,10 +1,10 @@ name: Build & Push -# Build & Push builds the simapp docker image on every push to master and +# Build & Push builds the simapp docker image on every push to main and # and pushes the image to https://hub.docker.com/r/interchainio/simapp/tags on: push: branches: - - master + - main tags: - "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10 - "v[0-9]+.[0-9]+.[0-9]+-rc*" # Push events to matching v*, i.e. v1.0-rc1, v20.15.10-rc5 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 835b2569df7a..056f53b1adda 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,12 +1,12 @@ name: Lint # Lint runs golangci-lint over the entire cosmos-sdk repository -# This workflow is run on every pull request and push to master +# This workflow is run on every pull request and push to main # The `golangci` will pass without running if no *.{go, mod, sum} files have been changed. on: pull_request: push: branches: - - master + - main jobs: golangci: name: golangci-lint diff --git a/.github/workflows/proto-docker.yml b/.github/workflows/proto-docker.yml index 21568c7af8aa..4563ae48b070 100644 --- a/.github/workflows/proto-docker.yml +++ b/.github/workflows/proto-docker.yml @@ -2,18 +2,18 @@ name: Build & Push SDK Proto Builder on: push: branches: - - master + - main paths: - "contrib/devtools/dockerfile" permissions: contents: read - + jobs: build: runs-on: ubuntu-latest steps: - # set VERSION to new version when making changes, when merged to master the image will automatically be pushed + # set VERSION to new version when making changes, when merged to main the image will automatically be pushed - uses: actions/checkout@v3 - name: Prepare id: prep diff --git a/.github/workflows/proto-registry.yml b/.github/workflows/proto-registry.yml index 74a356992e50..c5be0bc8e4b5 100644 --- a/.github/workflows/proto-registry.yml +++ b/.github/workflows/proto-registry.yml @@ -4,9 +4,9 @@ name: Buf-Push on: push: branches: - - master + - main paths: - - 'proto/**' + - "proto/**" jobs: push: @@ -16,6 +16,5 @@ jobs: - uses: bufbuild/buf-setup-action@v1.4.0 - uses: bufbuild/buf-push-action@v1 with: - input: 'proto' + input: "proto" buf_token: ${{ secrets.BUF_TOKEN }} - diff --git a/.github/workflows/proto.yml b/.github/workflows/proto.yml index 48c4bd129e91..8a350668e881 100644 --- a/.github/workflows/proto.yml +++ b/.github/workflows/proto.yml @@ -4,12 +4,12 @@ name: Protobuf on: pull_request: paths: - - 'proto/**' + - "proto/**" push: branches: - - master + - main paths: - - 'proto/**' + - "proto/**" jobs: lint: @@ -29,5 +29,5 @@ jobs: - uses: bufbuild/buf-setup-action@v1.4.0 - uses: bufbuild/buf-breaking-action@v1 with: - input: 'proto' - against: 'https://github.com/${{ github.repository }}.git#branch=${{ github.event.pull_request.base.ref }},ref=HEAD~1,subdir=proto' + input: "proto" + against: "https://github.com/${{ github.repository }}.git#branch=${{ github.event.pull_request.base.ref }},ref=HEAD~1,subdir=proto" diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index a9a0462b11b0..d7e97454a7b5 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -11,10 +11,10 @@ jobs: cleanup-runs: runs-on: ubuntu-latest steps: - - uses: rokroskar/workflow-run-cleanup-action@master - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'" + - uses: rokroskar/workflow-run-cleanup-action@master + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'" build: runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, 'skip-sims')" diff --git a/.github/workflows/test-race.yml b/.github/workflows/test-race.yml index 935c1e6ce2de..1b92805875d2 100644 --- a/.github/workflows/test-race.yml +++ b/.github/workflows/test-race.yml @@ -1,11 +1,11 @@ name: Tests Race # Tests Race workflow runs unit tests with the race detector -# This workflow is run on pushes to master & every Pull Requests where a .go, .mod, .sum have been changed +# This workflow is run on pushes to main & every Pull Requests where a .go, .mod, .sum have been changed on: pull_request: push: branches: - - master + - main permissions: contents: read @@ -17,7 +17,7 @@ jobs: - uses: rokroskar/workflow-run-cleanup-action@master env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'" + if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'" install-tparse: runs-on: ubuntu-latest diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fc41f31dbcf9..b5234cc89eba 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,23 +1,23 @@ name: Tests / Code Coverage # Tests / Code Coverage workflow runs unit tests and uploads a code coverage report -# This workflow is run on pushes to master & every Pull Requests where a .go, .mod, .sum have been changed +# This workflow is run on pushes to main & every Pull Requests where a .go, .mod, .sum have been changed on: pull_request: push: branches: - - master + - main permissions: contents: read - + jobs: cleanup-runs: runs-on: ubuntu-latest steps: - - uses: rokroskar/workflow-run-cleanup-action@master - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'" + - uses: rokroskar/workflow-run-cleanup-action@master + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'" build: runs-on: ubuntu-latest strategy: @@ -73,7 +73,7 @@ jobs: with: go-version: 1.18 - name: Create a file with all core Cosmos SDK pkgs - run: go list ./... > pkgs.txt + run: go list ./... > pkgs.txt - name: Split pkgs into 4 files run: split -d -n l/4 pkgs.txt pkgs.txt.part. # cache multiple @@ -217,7 +217,7 @@ jobs: run: | ./contrib/localnet_liveness.sh 100 5 50 localhost if: env.GIT_DIFF - + install-runsim: runs-on: ubuntu-latest needs: build diff --git a/.mergify.yml b/.mergify.yml index f43e68bc80a4..107930132efe 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -4,11 +4,11 @@ queue_rules: - "#approved-reviews-by>1" pull_request_rules: - - name: automerge to master with label automerge and branch protection passing + - name: automerge to main with label automerge and branch protection passing conditions: - "#approved-reviews-by>1" - - base=master - - label=automerge + - base=main + - label=A:automerge actions: queue: name: default @@ -18,7 +18,7 @@ pull_request_rules: {{ body }} - name: backport patches to v0.46.x branch conditions: - - base=master + - base=main - label=backport/0.46.x actions: backport: @@ -26,7 +26,7 @@ pull_request_rules: - release/v0.46.x - name: backport patches to v0.45.x branch conditions: - - base=master + - base=main - label=backport/0.45.x actions: backport: @@ -34,7 +34,7 @@ pull_request_rules: - release/v0.45.x - name: backport patches to v0.44.x branch conditions: - - base=master + - base=main - label=backport/0.44.x actions: backport: @@ -42,7 +42,7 @@ pull_request_rules: - release/v0.44.x - name: backport patches to v0.42.x branch conditions: - - base=master + - base=main - label=backport/0.42.x (Stargate) actions: backport: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e2d1be58a772..7f12a31521b2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -69,16 +69,16 @@ If you would like to join one of those calls, then please contact us on [Discord ## Architecture Decision Records (ADR) -When proposing an architecture decision for the Cosmos SDK, please start by opening an [issue](https://github.com/cosmos/cosmos-sdk/issues/new/choose) or a [discussion](https://github.com/cosmos/cosmos-sdk/discussions/new) with a summary of the proposal. Once the proposal has been discussed and there is rough alignment on a high-level approach to the design, the [ADR creation process](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/PROCESS.md) can begin. We are following this process to ensure all involved parties are in agreement before any party begins coding the proposed implementation. If you would like to see examples of how these are written, please refer to the current [ADRs](https://github.com/cosmos/cosmos-sdk/tree/master/docs/architecture). +When proposing an architecture decision for the Cosmos SDK, please start by opening an [issue](https://github.com/cosmos/cosmos-sdk/issues/new/choose) or a [discussion](https://github.com/cosmos/cosmos-sdk/discussions/new) with a summary of the proposal. Once the proposal has been discussed and there is rough alignment on a high-level approach to the design, the [ADR creation process](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/PROCESS.md) can begin. We are following this process to ensure all involved parties are in agreement before any party begins coding the proposed implementation. If you would like to see examples of how these are written, please refer to the current [ADRs](https://github.com/cosmos/cosmos-sdk/tree/main/docs/architecture). ## Development Procedure -* The latest state of development is on `master`. -* `master` must never fail `make lint test test-race`. -* No `--force` onto `master` (except when reverting a broken commit, which should seldom happen). +* The latest state of development is on `main`. +* `main` must never fail `make lint test test-race`. +* No `--force` onto `main` (except when reverting a broken commit, which should seldom happen). * Create a branch to start work: * Fork the repo (core developers must create a branch directly in the Cosmos SDK repo), - branch from the HEAD of `master`, make some commits, and submit a PR to `master`. + branch from the HEAD of `main`, make some commits, and submit a PR to `main`. * For core developers working within the `cosmos-sdk` repo, follow branch name conventions to ensure a clear ownership of branches: `{moniker}/{issue#}-branch-name`. * See [Branching Model](#branching-model-and-release) for more details. @@ -90,7 +90,7 @@ When proposing an architecture decision for the Cosmos SDK, please start by open before each commit is available in the `contrib/githooks/` directory. * Follow the [CODING GUIDELINES](CODING_GUIDELINES.md), which defines criteria for designing and coding a software. -Code is merged into master through pull request procedure. +Code is merged into main through pull request procedure. ### Testing @@ -100,7 +100,7 @@ Tests can be executed by running `make test` at the top level of the Cosmos SDK Before submitting a pull request: -* merge the latest master `git merge origin/master`, +* merge the latest main `git merge origin/main`, * run `make lint test` to ensure that all checks and tests pass. Then: @@ -117,9 +117,9 @@ PRs must have a category prefix that is based on the type of changes being made [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. Additionally, each PR should only address a single issue. -Pull requests are merged automatically using [`automerge` action](https://mergify.io/features/auto-merge). +Pull requests are merged automatically using [`A:automerge` action](https://mergify.io/features/auto-merge). -NOTE: when merging, GitHub will squash commits and rebase on top of the master. +NOTE: when merging, GitHub will squash commits and rebase on top of the main. ### Pull Request Templates @@ -169,7 +169,7 @@ When writing documentation, follow the [Documentation Writing Guidelines](./docs We use [Go Modules](https://github.com/golang/go/wiki/Modules) to manage dependency versions. -The master branch of every Cosmos repository should just build with `go get`, +The main branch of every Cosmos repository should just build with `go get`, which means they should be kept up-to-date with their dependencies, so we can get away with telling people they can just `go get` our software. @@ -215,11 +215,11 @@ The Cosmos SDK utilizes [semantic versioning](https://semver.org/). ### PR Targeting -Ensure that you base and target your PR on the `master` branch. +Ensure that you base and target your PR on the `main` branch. -All feature additions and all bug fixes must be targeted against `master`. Exception is for bug fixes which are only related to a released version. In that case, the related bug fix PRs must target against the release branch. +All feature additions and all bug fixes must be targeted against `main`. Exception is for bug fixes which are only related to a released version. In that case, the related bug fix PRs must target against the release branch. -If needed, we backport a commit from `master` to a release branch (excluding consensus breaking feature, API breaking and similar). +If needed, we backport a commit from `main` to a release branch (excluding consensus breaking feature, API breaking and similar). ## Code Owner Membership @@ -273,9 +273,9 @@ is broken up into three distinct stages: **Strategy Discovery**, **Concept Appro * Architecture Decision Records (ADRs) may be proposed by any contributors or maintainers of the Cosmos SDK, and should follow the guidelines outlined in the - [ADR Creation Process](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/PROCESS.md) + [ADR Creation Process](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/PROCESS.md) * After proposal, a time bound period for Request for Comment (RFC) on ADRs commences -* ADRs are intended to be iterative, and may be merged into `master` while still in a `Proposed` status +* ADRs are intended to be iterative, and may be merged into `main` while still in a `Proposed` status #### Time Bound Period diff --git a/Makefile b/Makefile index 1535c5bc15fe..384cbf7b2b04 100644 --- a/Makefile +++ b/Makefile @@ -430,7 +430,7 @@ proto-lint: @$(DOCKER_BUF) lint --error-format=json proto-check-breaking: - @$(DOCKER_BUF) breaking --against $(HTTPS_GIT)#branch=master + @$(DOCKER_BUF) breaking --against $(HTTPS_GIT)#branch=main TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/v0.34.0-rc6/proto/tendermint diff --git a/README.md b/README.md index 24d4b11f84dd..0cf63d16aeeb 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ parent: Version - + License: Apache-2.0 @@ -23,7 +23,7 @@ parent: Go report card - Code Coverage + Code Coverage
diff --git a/RELEASE_PROCESS.md b/RELEASE_PROCESS.md index ca4b7c5ce7f6..07e1edf7e204 100644 --- a/RELEASE_PROCESS.md +++ b/RELEASE_PROCESS.md @@ -12,22 +12,22 @@ Before making a new _major_ release we do beta and release candidate releases. F v1.0.0-beta1 → v1.0.0-beta2 → ... → v1.0.0-rc1 → v1.0.0-rc2 → ... → v1.0.0 ``` -* Release a first beta version on the `master` branch and freeze `master` from receiving any new features. After beta is released, we focus on releasing the release candidate: +* Release a first beta version on the `main` branch and freeze `main` from receiving any new features. After beta is released, we focus on releasing the release candidate: * finish audits and reviews * kick off a large round of simulation testing (e.g. 400 seeds for 2k blocks) * perform functional tests * add more tests * release new beta version as the bugs are discovered and fixed. -* After the team feels that the `master` works fine we create a `release/vY` branch (going forward known a release branch), where `Y` is the version number, with the patch part substituted to `x` (eg: 0.42.x, 1.0.x). Ensure the release branch is protected so that pushes against the release branch are permitted only by the release manager or release coordinator. +* After the team feels that the `main` works fine we create a `release/vY` branch (going forward known a release branch), where `Y` is the version number, with the patch part substituted to `x` (eg: 0.42.x, 1.0.x). Ensure the release branch is protected so that pushes against the release branch are permitted only by the release manager or release coordinator. * **PRs targeting this branch can be merged _only_ when exceptional circumstances arise** - * update the GitHub mergify integration by adding instructions for automatically backporting commits from `master` to the `release/vY` using the `backport/Y` label. + * update the GitHub mergify integration by adding instructions for automatically backporting commits from `main` to the `release/vY` using the `backport/Y` label. * In the release branch, prepare a new version section in the `CHANGELOG.md` * All links must be link-ified: `$ python ./scripts/linkify_changelog.py CHANGELOG.md` * Copy the entries into a `RELEASE_CHANGELOG.md`, this is needed so the bot knows which entries to add to the release page on GitHub. * Create a new annotated git tag for a release candidate (eg: `git tag -a v1.1.0-rc1`) in the release branch. - * from this point we unfreeze master. + * from this point we unfreeze main. * the SDK teams collaborate and do their best to run testnets in order to validate the release. - * when bugs are found, create a PR for `master`, and backport fixes to the release branch. + * when bugs are found, create a PR for `main`, and backport fixes to the release branch. * create new release candidate tags after bugs are fixed. * After the team feels the release branch is stable and everything works, create a full release: * update `CHANGELOG.md`. @@ -47,7 +47,7 @@ A _patch release_ is an increment of the patch number (eg: `v1.2.0` → `v1.2.1` **Patch release must not break API nor consensus.** -Updates to the release branch should come from `master` by backporting PRs (usually done by automatic cherry pick followed by a PRs to the release branch). The backports must be marked using `backport/Y` label in PR for master. +Updates to the release branch should come from `main` by backporting PRs (usually done by automatic cherry pick followed by a PRs to the release branch). The backports must be marked using `backport/Y` label in PR for main. It is the PR author's responsibility to fix merge conflicts, update changelog entries, and ensure CI passes. If a PR originates from an external contributor, a core team member assumes responsibility to perform this process instead of the original author. @@ -82,8 +82,8 @@ and must follow the [Patch Release Procedure][CONTRIBUTING.md#patch-release-proc ### Rationale -Unlike in-development `master` branch snapshots, **Cosmos-SDK** releases are subject to much wider adoption, -and by a significantly different demographic of users. During development, changes in the `master` branch +Unlike in-development `main` branch snapshots, **Cosmos-SDK** releases are subject to much wider adoption, +and by a significantly different demographic of users. During development, changes in the `main` branch affect SDK users, application developers, early adopters, and other advanced users that elect to use unstable experimental software at their own risk. @@ -97,13 +97,13 @@ poorly tested code. We never assume that any change, no matter how little or non of regression risks. Therefore, the requirements for stable changes are different than those that are candidates to be merged in -the `master` branch. When preparing future major releases, our aim is to design the most elegant, user-friendly and +the `main` branch. When preparing future major releases, our aim is to design the most elegant, user-friendly and maintainable SDK possible which often entails fundamental changes to the SDK's architecture design, rearranging and/or renaming packages as well as reducing code duplication so that we maintain common functions and data structures in one place rather than leaving them scattered all over the code base. However, once a release is published, the -priority is to minimise the risk caused by changes that are not strictly required to fix qualifying bugs; this tends to -be correlated with minimising the size of such changes. As such, the same bug may need to be fixed in different -ways in stable releases and `master` branch. +priority is to minimize the risk caused by changes that are not strictly required to fix qualifying bugs; this tends to +be correlated with minimizing the size of such changes. As such, the same bug may need to be fixed in different +ways in stable releases and `main` branch. ### Migrations @@ -157,7 +157,7 @@ As rule of thumb, the following changes will **NOT** be automatically accepted i ### Stable Release Exception - Procedure -1. Check that the bug is either fixed or not reproducible in `master`. It is, in general, not appropriate to release bug fixes for stable releases without first testing them in `master`. Please apply the label [v0.43](https://github.com/cosmos/cosmos-sdk/milestone/26) to the issue. +1. Check that the bug is either fixed or not reproducible in `main`. It is, in general, not appropriate to release bug fixes for stable releases without first testing them in `main`. Please apply the label [v0.43](https://github.com/cosmos/cosmos-sdk/milestone/26) to the issue. 2. Add a comment to the issue and ensure it contains the following information (see the bug template below): * **[Impact]** An explanation of the bug on users and justification for backporting the fix to the stable release. diff --git a/SECURITY.md b/SECURITY.md index b2a83a0dc574..c6bc9179b35f 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -17,34 +17,32 @@ in for Tendermint and other lower-level libraries (eg. [IAVL](https://github.com ### Core packages -* [`/baseapp`](https://github.com/cosmos/cosmos-sdk/tree/master/baseapp) -* [`/crypto`](https://github.com/cosmos/cosmos-sdk/tree/master/crypto) -* [`/types`](https://github.com/cosmos/cosmos-sdk/tree/master/types) -* [`/store`](https://github.com/cosmos/cosmos-sdk/tree/master/store) +* [`/baseapp`](https://github.com/cosmos/cosmos-sdk/tree/main/baseapp) +* [`/crypto`](https://github.com/cosmos/cosmos-sdk/tree/main/crypto) +* [`/types`](https://github.com/cosmos/cosmos-sdk/tree/main/types) +* [`/store`](https://github.com/cosmos/cosmos-sdk/tree/main/store) ### Modules -* [`x/auth`](https://github.com/cosmos/cosmos-sdk/tree/master/x/auth) -* [`x/bank`](https://github.com/cosmos/cosmos-sdk/tree/master/x/bank) -* [`x/capability`](https://github.com/cosmos/cosmos-sdk/tree/master/x/capability) -* [`x/staking`](https://github.com/cosmos/cosmos-sdk/tree/master/x/staking) -* [`x/slashing`](https://github.com/cosmos/cosmos-sdk/tree/master/x/slashing) -* [`x/evidence`](https://github.com/cosmos/cosmos-sdk/tree/master/x/evidence) -* [`x/distribution`](https://github.com/cosmos/cosmos-sdk/tree/master/x/distribution) -* [`x/ibc`](https://github.com/cosmos/cosmos-sdk/tree/master/x/ibc) -* [`x/ibc-transfer`](https://github.com/cosmos/cosmos-sdk/tree/master/x/ibc-transfer) -* [`x/mint`](https://github.com/cosmos/cosmos-sdk/tree/master/x/mint) +* [`x/auth`](https://github.com/cosmos/cosmos-sdk/tree/main/x/auth) +* [`x/bank`](https://github.com/cosmos/cosmos-sdk/tree/main/x/bank) +* [`x/capability`](https://github.com/cosmos/cosmos-sdk/tree/main/x/capability) +* [`x/staking`](https://github.com/cosmos/cosmos-sdk/tree/main/x/staking) +* [`x/slashing`](https://github.com/cosmos/cosmos-sdk/tree/main/x/slashing) +* [`x/evidence`](https://github.com/cosmos/cosmos-sdk/tree/main/x/evidence) +* [`x/distribution`](https://github.com/cosmos/cosmos-sdk/tree/main/x/distribution) +* [`x/mint`](https://github.com/cosmos/cosmos-sdk/tree/main/x/mint) We are interested in bugs in other modules, however the above are most likely to have significant vulnerabilities, due to the complexity / nuance involved. We -also recommend you to read the [specification](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/README.md) of each module before digging into +also recommend you to read the [specification](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules/README.md) of each module before digging into the code. ### How we process Tx parameters * Integer operations on tx parameters, especially `sdk.Int` / `sdk.Dec` * Gas calculation & parameter choices -* Tx signature verification (see [`x/auth/ante`](https://github.com/cosmos/cosmos-sdk/tree/master/x/auth/ante)) +* Tx signature verification (see [`x/auth/ante`](https://github.com/cosmos/cosmos-sdk/tree/main/x/auth/ante)) * Possible Node DoS vectors (perhaps due to gas weighting / non constant timing) ### Handling private keys @@ -59,7 +57,7 @@ The Cosmos SDK team uses the following disclosure process: 1. After a security report is received, the Cosmos SDK team works to verify the issue and confirm its severity level using Common Vulnerability Scoring System (CVSS). 1. The Cosmos SDK team collaborates with the Tendermint and Gaia teams to determine the vulnerability’s potential impact on the Cosmos Hub and partners. -1. Patches are prepared in private repositories for eligible releases of Cosmos SDK. See [Stable Release Policy](https://github.com/cosmos/cosmos-sdk/blob/master/RELEASE_PROCESS.md#stable-release-policy) for a list of eligible releases. +1. Patches are prepared in private repositories for eligible releases of Cosmos SDK. See [Stable Release Policy](https://github.com/cosmos/cosmos-sdk/blob/main/RELEASE_PROCESS.md#stable-release-policy) for a list of eligible releases. 1. If it is determined that a CVE-ID is required, we request a CVE through a CVE Numbering Authority. 1. We notify the community that a security release is coming to give users time to prepare their systems for the update. Notifications can include forum posts, tweets, and emails to partners and validators. 1. 24 hours after the notification, fixes are applied publicly and new releases are issued. diff --git a/cosmovisor/README.md b/cosmovisor/README.md index bf5d00933b9d..8b312d379a1e 100644 --- a/cosmovisor/README.md +++ b/cosmovisor/README.md @@ -299,7 +299,7 @@ cosmovisor run start Update app to the latest version (e.g. v0.45). -Next, we can add a migration - which is defined using `x/upgrade` [upgrade plan](https://github.com/cosmos/cosmos-sdk/blob/master/docs/core/upgrade.md) (you may refer to a past version if you are using an older Cosmos SDK release). In a migration we can do any deterministic state change. +Next, we can add a migration - which is defined using `x/upgrade` [upgrade plan](https://github.com/cosmos/cosmos-sdk/blob/main/docs/core/upgrade.md) (you may refer to a past version if you are using an older Cosmos SDK release). In a migration we can do any deterministic state change. Build the new version `simd` binary: diff --git a/cosmovisor/RELEASE_NOTES.md b/cosmovisor/RELEASE_NOTES.md index 95e1ddf9538f..ecec04998123 100644 --- a/cosmovisor/RELEASE_NOTES.md +++ b/cosmovisor/RELEASE_NOTES.md @@ -17,7 +17,7 @@ The existing way of starting an app with Cosmovisor has been deprecated (`cosmov ### New Features -We added a new configuration option: `DAEMON_BACKUP_DIR` (as env variable). When set, Cosmovisor will create backup the app data backup in that directory (instead of using the app home directory) before running the update. See the [README](https://github.com/cosmos/cosmos-sdk/blob/master/cosmovisor/README.md#command-line-arguments-and-environment-variables) file for more details. +We added a new configuration option: `DAEMON_BACKUP_DIR` (as env variable). When set, Cosmovisor will create backup the app data backup in that directory (instead of using the app home directory) before running the update. See the [README](https://github.com/cosmos/cosmos-sdk/blob/main/cosmovisor/README.md#command-line-arguments-and-environment-variables) file for more details. ### Bug Fixes diff --git a/cosmovisor/cmd/cosmovisor/cmd/help.go b/cosmovisor/cmd/cosmovisor/cmd/help.go index e25df4ee3671..701fadd2d219 100644 --- a/cosmovisor/cmd/cosmovisor/cmd/help.go +++ b/cosmovisor/cmd/cosmovisor/cmd/help.go @@ -34,7 +34,7 @@ the proposal. Cosmovisor interprets that data to perform an update: switch a cur and restart the App. Configuration of Cosmovisor is done through environment variables, which are -documented in: https://github.com/cosmos/cosmos-sdk/tree/master/cosmovisor/README.md +documented in: https://github.com/cosmos/cosmos-sdk/tree/main/cosmovisor/README.md To get help for the configured binary: cosmovisor run help diff --git a/cosmovisor/cmd/cosmovisor/cmd/help_test.go b/cosmovisor/cmd/cosmovisor/cmd/help_test.go index ebcc252d5701..af9eb8b5682e 100644 --- a/cosmovisor/cmd/cosmovisor/cmd/help_test.go +++ b/cosmovisor/cmd/cosmovisor/cmd/help_test.go @@ -158,7 +158,7 @@ func (s *HelpTestSuite) TestGetHelpText() { expectedPieces := []string{ "Cosmosvisor", cosmovisor.EnvName, cosmovisor.EnvHome, - "https://github.com/cosmos/cosmos-sdk/tree/master/cosmovisor/README.md", + "https://github.com/cosmos/cosmos-sdk/tree/main/cosmovisor/README.md", } actual := GetHelpText() diff --git a/cosmovisor/testdata/download/cosmovisor/genesis/bin/autod b/cosmovisor/testdata/download/cosmovisor/genesis/bin/autod index 8eb6d32fe565..dd0a2c875119 100755 --- a/cosmovisor/testdata/download/cosmovisor/genesis/bin/autod +++ b/cosmovisor/testdata/download/cosmovisor/genesis/bin/autod @@ -6,7 +6,7 @@ echo 'ERROR: UPGRADE "chain2" NEEDED at height: 49: zip_binary' # create upgrade info # this info contains directly information about binaries (in chain2->chain3 update we test with info containing a link to the file with an address for the new chain binary) -echo '{"name":"chain2","height":49,"info":"{\"binaries\":{\"linux/amd64\":\"https://github.com/cosmos/cosmos-sdk/raw/master/cosmovisor/testdata/repo/chain2-zip_bin/autod.zip?checksum=sha256:e2e178953d176196dcf736afa821121b259697ab4df90582044c313bcae48f13\"}}"}' > $3 +echo '{"name":"chain2","height":49,"info":"{\"binaries\":{\"linux/amd64\":\"https://github.com/cosmos/cosmos-sdk/raw/main/cosmovisor/testdata/repo/chain2-zip_bin/autod.zip?checksum=sha256:e2e178953d176196dcf736afa821121b259697ab4df90582044c313bcae48f13\"}}"}' >$3 sleep 0.1 echo Never should be printed!!! diff --git a/cosmovisor/testdata/repo/chain2-zip_bin/autod b/cosmovisor/testdata/repo/chain2-zip_bin/autod index 40cbf0fcb405..5bc99c552123 100755 --- a/cosmovisor/testdata/repo/chain2-zip_bin/autod +++ b/cosmovisor/testdata/repo/chain2-zip_bin/autod @@ -6,8 +6,8 @@ echo Args: $@ echo 'ERROR: UPGRADE "chain3" NEEDED at height: 936: ref_to_chain3-zip_dir.json module=main' # this update info doesn't contain binaries, instead it is a reference for further download instructions. -# echo '{"name":"chain3","height":936,"info":"{\"binaries\":{\"linux/amd64\":\"https://github.com/cosmos/cosmos-sdk/raw/master/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json\"}}"}' > $3 -echo '{"name":"chain3","height":936,"info":"https://github.com/cosmos/cosmos-sdk/raw/master/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json"}' > $3 +# echo '{"name":"chain3","height":936,"info":"{\"binaries\":{\"linux/amd64\":\"https://github.com/cosmos/cosmos-sdk/raw/main/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json\"}}"}' > $3 +echo '{"name":"chain3","height":936,"info":"https://github.com/cosmos/cosmos-sdk/raw/main/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json"}' >$3 sleep 1 echo 'Do not print' diff --git a/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json b/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json index 78128c58f422..7baa216b9633 100644 --- a/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json +++ b/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json @@ -1,5 +1,5 @@ { - "binaries": { - "linux/amd64": "https://github.com/cosmos/cosmos-sdk/raw/master/cosmovisor/testdata/repo/chain3-zip_dir/autod.zip?checksum=sha256:8951f52a0aea8617de0ae459a20daf704c29d259c425e60d520e363df0f166b4" - } + "binaries": { + "linux/amd64": "https://github.com/cosmos/cosmos-sdk/raw/main/cosmovisor/testdata/repo/chain3-zip_dir/autod.zip?checksum=sha256:8951f52a0aea8617de0ae459a20daf704c29d259c425e60d520e363df0f166b4" + } } diff --git a/cosmovisor/upgrade_test.go b/cosmovisor/upgrade_test.go index 9002ff4066bb..71eb300a9beb 100644 --- a/cosmovisor/upgrade_test.go +++ b/cosmovisor/upgrade_test.go @@ -154,7 +154,7 @@ func (s *upgradeTestSuite) TestGetDownloadURL() { }, "follow reference": { info: ref, - url: "https://github.com/cosmos/cosmos-sdk/raw/master/cosmovisor/testdata/repo/chain3-zip_dir/autod.zip?checksum=sha256:8951f52a0aea8617de0ae459a20daf704c29d259c425e60d520e363df0f166b4", + url: "https://github.com/cosmos/cosmos-sdk/raw/main/cosmovisor/testdata/repo/chain3-zip_dir/autod.zip?checksum=sha256:8951f52a0aea8617de0ae459a20daf704c29d259c425e60d520e363df0f166b4", }, "malformated reference target": { info: badref, diff --git a/crypto/hd/fundraiser_test.go b/crypto/hd/fundraiser_test.go index 9cd3b15dfd50..674ab95c71c8 100644 --- a/crypto/hd/fundraiser_test.go +++ b/crypto/hd/fundraiser_test.go @@ -7,10 +7,8 @@ import ( "os" "testing" - "github.com/stretchr/testify/require" - "github.com/cosmos/go-bip39" - + "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/crypto" "github.com/cosmos/cosmos-sdk/crypto/hd" diff --git a/crypto/hd/hdpath_test.go b/crypto/hd/hdpath_test.go index 12b89d97cca7..ec4ec3936fd6 100644 --- a/crypto/hd/hdpath_test.go +++ b/crypto/hd/hdpath_test.go @@ -5,11 +5,11 @@ import ( "fmt" "testing" - "github.com/cosmos/cosmos-sdk/crypto/hd" - "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/go-bip39" "github.com/stretchr/testify/require" + + "github.com/cosmos/cosmos-sdk/crypto/hd" + "github.com/cosmos/cosmos-sdk/types" ) var defaultBIP39Passphrase = "" diff --git a/docs/DOCS_README.md b/docs/DOCS_README.md index 9ec1fd81c1e5..6439571f7820 100644 --- a/docs/DOCS_README.md +++ b/docs/DOCS_README.md @@ -1,6 +1,6 @@ # Updating the docs -If you want to open a PR in Cosmos SDK to update the documentation, please follow the guidelines in [`CONTRIBUTING.md`](https://github.com/cosmos/cosmos-sdk/tree/master/CONTRIBUTING.md#updating-documentation). +If you want to open a PR in Cosmos SDK to update the documentation, please follow the guidelines in [`CONTRIBUTING.md`](https://github.com/cosmos/cosmos-sdk/tree/main/CONTRIBUTING.md#updating-documentation). ## Internationalization @@ -13,8 +13,8 @@ If you want to open a PR in Cosmos SDK to update the documentation, please follo * `docs/intro/` * `docs/migrations/` * `docs/run-node/` -* Each `docs//` folder must also have a `README.md` that includes a translated version of both the layout and content within the root-level [`README.md`](https://github.com/cosmos/cosmos-sdk/tree/master/docs/README.md). The layout defined in the `README.md` is used to build the homepage. -* Always translate content living on `master` unless you are revising documentation for a specific release. Translated documentation like the root-level documentation is semantically versioned. +* Each `docs//` folder must also have a `README.md` that includes a translated version of both the layout and content within the root-level [`README.md`](https://github.com/cosmos/cosmos-sdk/tree/main/docs/README.md). The layout defined in the `README.md` is used to build the homepage. +* Always translate content living on `main` unless you are revising documentation for a specific release. Translated documentation like the root-level documentation is semantically versioned. * For additional configuration options, please see [VuePress Internationalization](https://vuepress.vuejs.org/guide/i18n.html). ## Docs Build Workflow @@ -23,7 +23,7 @@ The documentation for Cosmos SDK is hosted at https://docs.cosmos.network/ and b ### How It Works -There is a CircleCI job listening for changes in the `/docs` directory for the `master` branch and each supported version tag (`v0.39` and `v0.42`). Any updates to files in the `/docs` directory will automatically trigger a website deployment. Under the hood, the private website repository has a `make build-docs` target consumed by a CircleCI job within that repository. +There is a CircleCI job listening for changes in the `/docs` directory for the `main` branch and each supported version tag (`v0.39` and `v0.42`). Any updates to files in the `/docs` directory will automatically trigger a website deployment. Under the hood, the private website repository has a `make build-docs` target consumed by a CircleCI job within that repository. ## README @@ -92,7 +92,7 @@ To build documentation as a static website run `npm run build`. You will find th First, run `make tools` from the root of repo, to install the swagger-ui tool. -Then, edit the `swagger.yaml` manually; it is found [here](https://github.com/cosmos/cosmos-sdk/blob/master/client/lcd/swagger-ui/swagger.yaml) +Then, edit the `swagger.yaml` manually; it is found [here](https://github.com/cosmos/cosmos-sdk/blob/main/client/lcd/swagger-ui/swagger.yaml) Finally, run `make update_gaia_lite_docs` from the root of the repo. diff --git a/docs/README.md b/docs/README.md index cc32da1945e3..2cdaa1e700ba 100644 --- a/docs/README.md +++ b/docs/README.md @@ -70,7 +70,7 @@ aside: false ## Cosmos Hub -The Cosmos Hub (`gaia`) docs have moved to [github.com/cosmos/gaia](https://github.com/cosmos/gaia/tree/master/docs). +The Cosmos Hub (`gaia`) docs have moved to [github.com/cosmos/gaia](https://github.com/cosmos/gaia/tree/main/docs). ## Languages @@ -78,4 +78,4 @@ The Cosmos SDK is written in [Golang](https://golang.org/), though the framework ## Contribute -See the [DOCS_README.md](https://github.com/cosmos/cosmos-sdk/blob/master/docs/DOCS_README.md) for details of the build process and considerations when making changes. +See the [DOCS_README.md](https://github.com/cosmos/cosmos-sdk/blob/main/docs/DOCS_README.md) for details of the build process and considerations when making changes. diff --git a/docs/architecture/PROCESS.md b/docs/architecture/PROCESS.md index 528301a67b39..c5140bbe41f3 100644 --- a/docs/architecture/PROCESS.md +++ b/docs/architecture/PROCESS.md @@ -14,7 +14,7 @@ ADR creation is an **iterative** process. Instead of trying to solve all decisio 2. Once the motivation is validated, a GitHub Pull Request (PR) is created with a new document based on the `adr-template.md`. -3. An ADR doesn't have to arrive to `master` with an _accepted_ status in a single PR. If the motivation is clear and the solution is sound, we SHOULD be able to merge it and keep a _proposed_ status. It's preferable to have an iterative approach rather than long, not merged Pull Requests. +3. An ADR doesn't have to arrive to `main` with an _accepted_ status in a single PR. If the motivation is clear and the solution is sound, we SHOULD be able to merge it and keep a _proposed_ status. It's preferable to have an iterative approach rather than long, not merged Pull Requests. 4. If a _proposed_ ADR is merged, then it should clearly document outstanding issues either in ADR document notes or in a GitHub Issue. diff --git a/docs/architecture/adr-044-protobuf-updates-guidelines.md b/docs/architecture/adr-044-protobuf-updates-guidelines.md index 833a5648cc64..6c0b33bc806f 100644 --- a/docs/architecture/adr-044-protobuf-updates-guidelines.md +++ b/docs/architecture/adr-044-protobuf-updates-guidelines.md @@ -15,7 +15,7 @@ This ADR provides guidelines and recommended practices when updating Protobuf de ## Context -The Cosmos SDK maintains a set of [Protobuf definitions](https://github.com/cosmos/cosmos-sdk/tree/master/proto/cosmos). It is important to correctly design Protobuf definitions to avoid any breaking changes within the same version. The reasons are to not break tooling (including indexers and explorers), wallets and other third-party integrations. +The Cosmos SDK maintains a set of [Protobuf definitions](https://github.com/cosmos/cosmos-sdk/tree/main/proto/cosmos). It is important to correctly design Protobuf definitions to avoid any breaking changes within the same version. The reasons are to not break tooling (including indexers and explorers), wallets and other third-party integrations. When making changes to these Protobuf definitions, the Cosmos SDK currently only follows [Buf's](https://docs.buf.build/) recommendations. We noticed however that Buf's recommendations might still result in breaking changes in the SDK in some cases. For example: diff --git a/docs/basics/gas-fees.md b/docs/basics/gas-fees.md index 81df8096e728..dfc82672f33a 100644 --- a/docs/basics/gas-fees.md +++ b/docs/basics/gas-fees.md @@ -71,7 +71,7 @@ The `AnteHandler` is run for every transaction during `CheckTx` and `DeliverTx`, type AnteHandler func(ctx Context, tx Tx, simulate bool) (newCtx Context, result Result, abort bool) ``` -The `anteHandler` is not implemented in the core Cosmos SDK but in a module. This gives the possibility to developers to choose which version of `AnteHandler` fits their application's needs. That said, most applications today use the default implementation defined in the [`auth` module](https://github.com/cosmos/cosmos-sdk/tree/master/x/auth). Here is what the `anteHandler` is intended to do in a normal Cosmos SDK application: +The `anteHandler` is not implemented in the core Cosmos SDK but in a module. This gives the possibility to developers to choose which version of `AnteHandler` fits their application's needs. That said, most applications today use the default implementation defined in the [`auth` module](https://github.com/cosmos/cosmos-sdk/tree/main/x/auth). Here is what the `anteHandler` is intended to do in a normal Cosmos SDK application: * Verify that the transaction are of the correct type. Transaction types are defined in the module that implements the `anteHandler`, and they follow the transaction interface: +++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc3/types/tx_msg.go#L49-L57 diff --git a/docs/basics/tx-lifecycle.md b/docs/basics/tx-lifecycle.md index 8209e2c518a5..355c179be935 100644 --- a/docs/basics/tx-lifecycle.md +++ b/docs/basics/tx-lifecycle.md @@ -102,7 +102,7 @@ After the ValidateBasic checks, the `AnteHandler`s are run. Technically, they ar A copy of the cached context is provided to the `AnteHandler`, which performs limited checks specified for the transaction type. Using a copy allows the AnteHandler to do stateful checks for `Tx` without modifying the last committed state, and revert back to the original if the execution fails. -For example, the [`auth`](https://github.com/cosmos/cosmos-sdk/tree/master/x/auth/spec) module `AnteHandler` checks and increments sequence numbers, checks signatures and account numbers, and deducts fees from the first signer of the transaction - all state changes are made using the `checkState`. +For example, the [`auth`](https://github.com/cosmos/cosmos-sdk/tree/main/x/auth/spec) module `AnteHandler` checks and increments sequence numbers, checks signatures and account numbers, and deducts fees from the first signer of the transaction - all state changes are made using the `checkState`. ### Gas diff --git a/docs/building-modules/module-manager.md b/docs/building-modules/module-manager.md index 1facca88deb4..e2a5588b3129 100644 --- a/docs/building-modules/module-manager.md +++ b/docs/building-modules/module-manager.md @@ -110,7 +110,7 @@ The `BasicManager` is a structure that lists all the `AppModuleBasic` of an appl It implements the following methods: -* `NewBasicManager(modules ...AppModuleBasic)`: Constructor function. It takes a list of the application's `AppModuleBasic` and builds a new `BasicManager`. This function is generally called in the `init()` function of [`app.go`](../basics/app-anatomy.md#core-application-file) to quickly initialize the independent elements of the application's modules (click [here](https://github.com/cosmos/gaia/blob/master/app/app.go#L59-L74) to see an example). +* `NewBasicManager(modules ...AppModuleBasic)`: Constructor function. It takes a list of the application's `AppModuleBasic` and builds a new `BasicManager`. This function is generally called in the `init()` function of [`app.go`](../basics/app-anatomy.md#core-application-file) to quickly initialize the independent elements of the application's modules (click [here](https://github.com/cosmos/gaia/blob/main/app/app.go#L59-L74) to see an example). * `RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)`: Registers the [`codec.LegacyAmino`s](../core/encoding.md#amino) of each of the application's `AppModuleBasic`. This function is usually called early on in the [application's construction](../basics/app-anatomy.md#constructor). * `RegisterInterfaces(registry codectypes.InterfaceRegistry)`: Registers interface types and implementations of each of the application's `AppModuleBasic`. * `DefaultGenesis(cdc codec.JSONCodec)`: Provides default genesis information for modules in the application by calling the [`DefaultGenesis(cdc codec.JSONCodec)`](./genesis.md#defaultgenesis) function of each module. It is used to construct a default genesis file for the application. diff --git a/docs/building-modules/simulator.md b/docs/building-modules/simulator.md index ab5801160dbb..c9db04a710af 100644 --- a/docs/building-modules/simulator.md +++ b/docs/building-modules/simulator.md @@ -68,7 +68,7 @@ As you can see, the weights are predefined in this case. Options exist to overri Here is how one can override the above package `simappparams`. -+++ https://github.com/cosmos/gaia/blob/master/sims.mk#L9-L22 ++++ https://github.com/cosmos/gaia/blob/main/sims.mk#L9-L22 For the last test a tool called runsim is used, this is used to parallelize go test instances, provide info to Github and slack integrations to provide information to your team on how the simulations are running. diff --git a/docs/core/transactions.md b/docs/core/transactions.md index ca146e81d706..52d4c80a9756 100644 --- a/docs/core/transactions.md +++ b/docs/core/transactions.md @@ -25,7 +25,7 @@ Transaction objects are Cosmos SDK types that implement the `Tx` interface It contains the following methods: * **GetMsgs:** unwraps the transaction and returns a list of contained `sdk.Msg`s - one transaction may have one or multiple messages, which are defined by module developers. -* **ValidateBasic:** lightweight, [_stateless_](../basics/tx-lifecycle.md#types-of-checks) checks used by ABCI messages [`CheckTx`](./baseapp.md#checktx) and [`DeliverTx`](./baseapp.md#delivertx) to make sure transactions are not invalid. For example, the [`auth`](https://github.com/cosmos/cosmos-sdk/tree/master/x/auth) module's `StdTx` `ValidateBasic` function checks that its transactions are signed by the correct number of signers and that the fees do not exceed what the user's maximum. Note that this function is to be distinct from `sdk.Msg` [`ValidateBasic`](../basics/tx-lifecycle.md#ValidateBasic) methods, which perform basic validity checks on messages only. When [`runTx`](./baseapp.md#runtx) is checking a transaction created from the [`auth`](https://github.com/cosmos/cosmos-sdk/tree/master/x/auth/spec) module, it first runs `ValidateBasic` on each message, then runs the `auth` module AnteHandler which calls `ValidateBasic` for the transaction itself. +* **ValidateBasic:** lightweight, [_stateless_](../basics/tx-lifecycle.md#types-of-checks) checks used by ABCI messages [`CheckTx`](./baseapp.md#checktx) and [`DeliverTx`](./baseapp.md#delivertx) to make sure transactions are not invalid. For example, the [`auth`](https://github.com/cosmos/cosmos-sdk/tree/main/x/auth) module's `StdTx` `ValidateBasic` function checks that its transactions are signed by the correct number of signers and that the fees do not exceed what the user's maximum. Note that this function is to be distinct from `sdk.Msg` [`ValidateBasic`](../basics/tx-lifecycle.md#ValidateBasic) methods, which perform basic validity checks on messages only. When [`runTx`](./baseapp.md#runtx) is checking a transaction created from the [`auth`](https://github.com/cosmos/cosmos-sdk/tree/main/x/auth/spec) module, it first runs `ValidateBasic` on each message, then runs the `auth` module AnteHandler which calls `ValidateBasic` for the transaction itself. As a developer, you should rarely manipulate `Tx` directly, as `Tx` is really an intermediate type used for transaction generation. Instead, developers should prefer the `TxBuilder` interface, which you can learn more about [below](#transaction-generation). diff --git a/docs/versions b/docs/versions index a1007ab1de14..ff500eb55c80 100644 --- a/docs/versions +++ b/docs/versions @@ -1,3 +1,3 @@ -master master +main main release/v0.44.x v0.44 release/v0.45.x v0.45 diff --git a/x/nft/spec/01_concepts.md b/x/nft/spec/01_concepts.md index 80dd9f62cbc8..ae4bbd99f7c9 100644 --- a/x/nft/spec/01_concepts.md +++ b/x/nft/spec/01_concepts.md @@ -6,7 +6,7 @@ order: 1 ## Class -`x/nft` module defines a struct `Class` to describe the common characteristics of a class of nft, under this class, you can create a variety of nft, which is equivalent to an erc721 contract for Ethereum. The design is defined in the [ADR 043](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-043-nft-module.md). +`x/nft` module defines a struct `Class` to describe the common characteristics of a class of nft, under this class, you can create a variety of nft, which is equivalent to an erc721 contract for Ethereum. The design is defined in the [ADR 043](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-043-nft-module.md). ## NFT diff --git a/x/nft/spec/README.md b/x/nft/spec/README.md index 5db1d2de06d6..570a15058c35 100644 --- a/x/nft/spec/README.md +++ b/x/nft/spec/README.md @@ -11,7 +11,7 @@ parent: ## Abstract -`x/nft` is an implementation of a Cosmos SDK module, per [ADR 43](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-043-nft-module.md), that allows you to create nft classification, create nft, transfer nft, update nft, and support various queries by integrating the module. It is fully compatible with the ERC721 specification. +`x/nft` is an implementation of a Cosmos SDK module, per [ADR 43](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-043-nft-module.md), that allows you to create nft classification, create nft, transfer nft, update nft, and support various queries by integrating the module. It is fully compatible with the ERC721 specification. 1. **[Concept](01_concepts.md)** * [Class](01_concepts.md#Class) diff --git a/x/upgrade/client/cli/tx.go b/x/upgrade/client/cli/tx.go index fd672974d7bd..d4a5311427fe 100644 --- a/x/upgrade/client/cli/tx.go +++ b/x/upgrade/client/cli/tx.go @@ -43,7 +43,7 @@ func NewCmdSubmitLegacyUpgradeProposal() *cobra.Command { Short: "Submit a software upgrade proposal", Long: "Submit a software upgrade along with an initial deposit.\n" + "Please specify a unique name and height for the upgrade to take effect.\n" + - "You may include info to reference a binary download link, in a format compatible with: https://github.com/cosmos/cosmos-sdk/tree/master/cosmovisor", + "You may include info to reference a binary download link, in a format compatible with: https://github.com/cosmos/cosmos-sdk/tree/main/cosmovisor", RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientTxContext(cmd) if err != nil {