diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 07b11e4197..14fbe66126 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -2,8 +2,14 @@ # NOTE: Order is important; the last matching pattern takes the most precedence -# Primary repo maintainers +# Cosmos SDK Codeowners -* @cosmos/sdk-core-dev +# Core team as default owners -# CODEOWNERS for docs configuration +* @cosmos/sdk-core-dev + +# Components + +# docs configuration + +/docs/ @cosmos/sdk-core-dev diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml new file mode 100644 index 0000000000..e33d7aafc0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -0,0 +1,49 @@ +name: 🐛 Bug report +description: Create a report to help us squash bugs! +title: "[Bug]: " +labels: ["T:Bug"] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! + Before smashing the submit button please review the template. + + - type: checkboxes + attributes: + label: Is there an existing issue for this? + description: Please search existing issues to avoid creating duplicates. + options: + - label: I have searched the existing issues + required: true + + - type: markdown + attributes: + value: | + IMPORTANT: Prior to opening a bug report, check if it affects one of the core modules + and if its eligible for a bug bounty on `SECURITY.md`. Bugs that are not submitted + through the appropriate channels won't receive any bounty. + - type: textarea + id: what-happened + attributes: + label: What happened? + description: Also tell us, what did you expect to happen? + placeholder: Tell us what you see! + value: "A bug happened!" + validations: + required: true + - type: input + attributes: + label: Cosmos SDK Version + description: If applicable, specify the version you're using + placeholder: 0.46, 0.47, main, etc. + validations: + required: true + - type: textarea + id: reproduce + attributes: + label: How to reproduce? + description: If applicable could you describe how we could reproduce the bug + placeholder: Tell us what how to reproduce the bug! + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/documentation.yml b/.github/ISSUE_TEMPLATE/documentation.yml new file mode 100644 index 0000000000..5e1c3423bb --- /dev/null +++ b/.github/ISSUE_TEMPLATE/documentation.yml @@ -0,0 +1,18 @@ +name: Documentation Request +description: Create an issue for missing or incorrect documentation +title: "[Documentation]: " +labels: ["T:Docs"] +body: + - type: markdown + attributes: + value: | + ✰ Thanks for opening an issue! ✰ + Tell us where what you would like to see get added to the documentation or if there is an error in the documentation? + + - type: textarea + id: what-happened + attributes: + label: Summary + placeholder: Description of what you would like to see + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/epics.yml b/.github/ISSUE_TEMPLATE/epics.yml new file mode 100644 index 0000000000..a8fb183788 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/epics.yml @@ -0,0 +1,43 @@ + +name: Epic +description: Create an epic/user +title: "[Epic]: " +labels: ["T:Epic"] +body: + - type: markdown + attributes: + value: | + Thanks for opening this issue, this template is meant for long lived work scopes, if this is what you're looking for please continue + + - type: textarea + id: summary + attributes: + label: Summary + description: | + What are the user needs? + How could this solution fix the user facing problem? + placeholder: Short, concise description of the proposed feature/changes to the repository + validations: + required: true + - type: textarea + id: problem + attributes: + label: Problem Definition + description: | + Why do we need this feature? + What problems may be addressed by introducing this feature? + What benefits does the SDK stand to gain by including this feature? + Are there any disadvantages of including this feature? + placeholder: Description of the issue being faced + validations: + required: true + - type: textarea + id: work + attributes: + label: Work Breakdown + description: | + Break the work into many bullet points that will later be turned into issues that can be assigned to developers to work on + This work may been to be broken up into phases of work in order to better organize when and how things get done. + placeholder: Description of the steps needed to deliver this feature + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml new file mode 100644 index 0000000000..b3d3fc479f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -0,0 +1,41 @@ +name: Feature Request +description: Create a proposal to request a feature +title: "[Feature]: " +labels: ["T:feature-request"] +body: + - type: markdown + attributes: + value: | + ✰ Thanks for opening an issue! ✰ + - type: textarea + id: summary + attributes: + label: Summary + description: | + What are the user needs? + How could this solution fix the user facing problem? + placeholder: Short, concise description of the proposed feature/changes to the repository + validations: + required: true + - type: textarea + id: problem + attributes: + label: Problem Definition + description: | + If applicable please answer the below questions + Why do we need this feature? + What problems may be addressed by introducing this feature? + What benefits does the SDK stand to gain by including this feature? + Are there any disadvantages of including this feature? + placeholder: Description of the issue being faced + validations: + required: false + - type: textarea + id: proposal + attributes: + label: Proposed Feature + description: | + Description of the proposed features or changes to an existing feature to meet your needs + placeholder: Description of the proposed feature(s) + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/module-readiness-checklist.md b/.github/ISSUE_TEMPLATE/module-readiness-checklist.md index 4e6bebed90..7892e356bc 100644 --- a/.github/ISSUE_TEMPLATE/module-readiness-checklist.md +++ b/.github/ISSUE_TEMPLATE/module-readiness-checklist.md @@ -16,7 +16,7 @@ The module **should not** be included in any Release Candidate tag until it has - [ ] 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 the spec [README.md](https://github.com/cosmos/cosmos-sdk/blob/main/docs/spec/SPEC-SPEC.md) in module directory) + - [ ] Is everything well documented (inline godoc as well as the spec [README.md](https://github.com/cosmos/cosmos-sdk/blob/main/docs/spec/README.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/ISSUE_TEMPLATE/qa.md b/.github/ISSUE_TEMPLATE/qa.md new file mode 100644 index 0000000000..953ee48032 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/qa.md @@ -0,0 +1,87 @@ + + +## Summary + + + +## Major Changes + + + +## Gotchas + + + +## QA Breakdown + +* Audit + * [ ] Audit BaseApp + * [ ] Audit Types + * [ ] Audit x/auth + * [ ] Audit x/authz + * [ ] Audit x/bank + * [ ] Audit x/circuit + * [ ] Audit x/consensus + * [ ] Audit x/distribution + * [ ] Audit x/evidence + * [ ] Audit x/epochs + * [ ] Audit x/feegrant + * [ ] Audit x/genutil + * [ ] Audit x/gov + * [ ] Audit x/group + * [ ] Audit x/mint + * [ ] Audit x/nft + * [ ] Audit x/protocolpool + * [ ] Audit x/slashing + * [ ] Audit x/staking + * [ ] Audit x/tx + * [ ] Audit x/upgrade + * [ ] Audit client + * [ ] Audit server + * [ ] Audit store + * [ ] Audit runtime + * [ ] Audit simapp +* [ ] Release alpha +* [ ] Cosmos-SDK testnet +* [ ] Public testnet (IBC, WASM, SDK) +* [ ] Upgrade a chain with data from vX +* Release documentation + * [ ] Audit UPGRADING.md + * [ ] Update all codeblock to the appropriate version number + + +### Audit checklist + +* please copy to a markdown to follow while you walk through the code +* 2 people should be assigned to each section + +* [ ] API audit + * spec audit: check if the spec is complete. + * Are Msg and Query methods and types well-named and organized? + * Is everything well documented (inline godoc as well as package [`README.md`](https://docs.cosmos.network/main/spec/SPEC_MODULE#common-layout) in module directory) + * check the proto definition - make sure everything is in accordance to ADR-30 (at least 1 person, TODO assignee) + * Check new fields and endpoints have the `Since: cosmos-sdk X` comment +* [ ] Completeness audit, fully implemented with tests + * [ ] Genesis import and export of all state + * [ ] Query services + * [ ] CLI methods + * [ ] All necessary migration scripts are present (if this is an upgrade of existing module) +* [ ] State machine audit + * [ ] Read through MsgServer code and verify correctness upon visual inspection + * [ ] Ensure all state machine code which could be confusing is properly commented + * [ ] Make sure state machine logic matches Msg method documentation + * [ ] Ensure that all state machine edge cases are covered with tests and that test coverage is sufficient (at least 90% coverage on module code) + * [ ] Assess potential threats for each method including spam attacks and ensure that threats have been addressed sufficiently. This should be done by writing up threat assessment for each method. Specifically we should be paying attention to: + * [ ] algorithmic complexity and places this could be exploited (ex. nested `for` loops) + * [ ] charging gas complex computation (ex. `for` loops) + * [ ] storage is safe (we don't pollute the state). + * [ ] Assess potential risks of any new third party dependencies and decide whether a dependency audit is needed + * [ ] Check correctness of simulation implementation if any +* [ ] Audit Changelog against commit log, ensuring all breaking changes, bug fixes, and improvements are properly documented. + +If any changes are needed, please make them against main and backport them to release/vX.X.x diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 56227fdea6..eaa49fdbef 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,11 +1,4 @@ - - -## Description +# Description Closes: #XXXX @@ -14,38 +7,43 @@ are the most critical to review. --> --- -### Author Checklist +## Author Checklist *All items are required. Please add a note to the item if the item is not applicable and 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 -* [ ] added `!` to the type prefix if API or client breaking change +* [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title, you can find examples of the prefixes below: + +* [ ] confirmed `!` in the type prefix if API or client breaking change * [ ] 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/main/docs/docs/building-modules) +* [ ] reviewed "Files changed" and left comments if necessary * [ ] 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 -* [ ] reviewed "Files changed" and left comments if necessary -* [ ] run `make lint` and `make test` +* [ ] updated the relevant documentation or specification, including comments for [documenting Go code](https://blog.golang.org/godoc) * [ ] confirmed all CI checks have passed -### Reviewers Checklist +## Reviewers Checklist *All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.* +Please see [Pull Request Reviewer section in the contributing guide](../CONTRIBUTING.md#reviewer) for more information on how to review a pull request. + 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 `!` in the type prefix if API or client breaking change -* [ ] confirmed all author checklist items have been addressed -* [ ] reviewed state machine logic -* [ ] reviewed API design and naming -* [ ] reviewed documentation is accurate -* [ ] reviewed tests and test coverage -* [ ] manually tested (if applicable) +* [ ] confirmed all author checklist items have been addressed +* [ ] reviewed state machine logic, API design and naming, documentation is accurate, tests and test coverage diff --git a/.github/codeql/config.yml b/.github/codeql/config.yml new file mode 100644 index 0000000000..795efa6cfb --- /dev/null +++ b/.github/codeql/config.yml @@ -0,0 +1,11 @@ +packs: + - crypto-com/cosmos-sdk-codeql +queries: + - uses: security-and-quality + - uses: security-experimental + - uses: security-extended +paths-ignore: + - api + - '**/*_test.go' + - '**/*.pulsar.go' + - '**/*.pb.gp' diff --git a/.github/dependabot.yml b/.github/dependabot.yml index f4f5f9044f..0c72d9f4e7 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,14 +9,6 @@ updates: interval: daily time: "01:00" - - package-ecosystem: npm - directory: "/docs" - schedule: - interval: weekly - # DevRel should review docs updates - assignees: - - "julienrbrt" - - package-ecosystem: gomod directory: "/" schedule: @@ -51,15 +43,6 @@ updates: labels: - "A:automerge" - dependencies - - package-ecosystem: gomod - directory: "/orm" - schedule: - interval: weekly - day: wednesday - time: "01:25" - labels: - - "A:automerge" - - dependencies - package-ecosystem: gomod directory: "/core" schedule: @@ -105,6 +88,15 @@ updates: labels: - "A:automerge" - dependencies + - package-ecosystem: gomod + directory: "/schema" + schedule: + interval: weekly + day: wednesday + time: "01:53" + labels: + - "A:automerge" + - dependencies - package-ecosystem: gomod directory: "/x/tx" schedule: @@ -205,6 +197,42 @@ updates: labels: - "A:automerge" - dependencies + - package-ecosystem: gomod + directory: "/x/protocolpool" + schedule: + interval: weekly + day: wednesday + time: "03:00" + labels: + - "A:automerge" + - dependencies + - package-ecosystem: gomod + directory: "/x/auth" + schedule: + interval: weekly + day: wednesday + time: "03:10" + labels: + - "A:automerge" + - dependencies + - package-ecosystem: gomod + directory: "/x/epochs" + schedule: + interval: weekly + day: wednesday + time: "03:15" + labels: + - "A:automerge" + - dependencies + - package-ecosystem: gomod + directory: "/tools/benchmark" + schedule: + interval: weekly + day: wednesday + time: "03:25" + labels: + - "A:automerge" + - dependencies # Dependencies should be up to date on release branch - package-ecosystem: gomod @@ -224,8 +252,14 @@ updates: dependency-type: "all" - dependency-name: "cosmossdk.io/*" dependency-type: "all" + - dependency-name: "github.com/cometbft/*" + dependency-type: "all" + ignore: + - dependency-name: "github.com/cometbft/cometbft" + # cometbft 0.37 is not semver, but we want to only update "patch" versions for 0.37.x + update-types: + ["version-update:semver-major", "version-update:semver-minor"] - # Dependencies should be up to date on release branch - package-ecosystem: gomod directory: "/" target-branch: "release/v0.50.x" @@ -243,3 +277,10 @@ updates: dependency-type: "all" - dependency-name: "cosmossdk.io/*" dependency-type: "all" + - dependency-name: "github.com/cometbft/*" + dependency-type: "all" + ignore: + - dependency-name: "github.com/cometbft/cometbft" + # cometbft 0.38 is not semver, but we want to only update "patch" versions for 0.38.x + update-types: + ["version-update:semver-major", "version-update:semver-minor"] diff --git a/.github/pr_labeler.yml b/.github/pr_labeler.yml index 434167563d..f7a935b30e 100644 --- a/.github/pr_labeler.yml +++ b/.github/pr_labeler.yml @@ -1,11 +1,38 @@ +"C:CLI": + - client/**/* + - x/*/client/**/* +"C:Confix": + - tools/confix/**/* +"C:Cosmovisor": + - tools/cosmovisor/**/* +"C:Keys": + - client/keys/**/* +"C:Simulations": + - types/simulation/**/* + - x/simulation/**/* + - x/*/simulation/**/* + - simsx/**/* + - tools/benchmark/**/* +"C:Store": + - store/**/* +"C:collections": + - collections/**/* +"C:core/testing": + - core/testing/**/* +"C:log": + - log/* +"C:schema": + - schema/**/* "C:x/auth": - x/auth/**/* "C:x/authz": - x/authz/**/* "C:x/bank": - x/bank/**/* -"C:x/crisis": - - x/crisis/**/* +"C:x/circuit": + - x/circuit/**/* +"C:x/consensus": + - x/consensus/**/* "C:x/distribution": - x/distribution/**/* "C:x/evidence": @@ -22,51 +49,29 @@ - x/mint/**/* "C:x/nft": - x/nft/**/* -"C:x/params": - - x/params/**/* -"C:Simulations": - - x/simulation/**/* - - x/*/simulation/**/* +"C:x/protocolpool": + - x/protocolpool/**/* "C:x/slashing": - x/slashing/**/* "C:x/staking": - x/staking/**/* -"C:x/upgrade": - - x/upgrade/**/* -"C:x/consensus": - - x/consensus/**/* -"C:x/circuit": - - x/circuit/**/* "C:x/tx": - x/tx/**/* -"C:collections": - - collections/**/* -"C:Cosmovisor": - - tools/cosmovisor/**/* -"C:Confix": - - tools/confix/**/* -"C:Keys": - - client/keys/**/* +"C:x/upgrade": + - x/upgrade/**/* +"C:x/epochs": + - x/epochs/**/* +"C:x/validate": + - x/validate/**/* +"Type: ADR": + - docs/architecture/**/* "Type: Build": - Makefile - Dockerfile - docker-compose.yml - scripts/* "Type: CI": - - .github/**/*.yml + - .github/** - buf.yaml - .mergify.yml - .golangci.yml -"C:CLI": - - client/**/* - - x/*/client/**/* -"Type: ADR": - - docs/architecture/**/* -"C:container": - - container/**/* -"C:Store": - - store/**/* -"C:orm": - - orm/**/* -"C:log": - - log/* diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9184b917f8..9911ffb681 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,5 +1,4 @@ name: Build SimApp -# This workflow is run on pushes to main & every Pull Requests where a .go, .mod, .sum have been changed on: pull_request: merge_group: @@ -16,43 +15,35 @@ concurrency: jobs: build: - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 strategy: matrix: - # go-arch: ["amd64", "arm", "arm64"] - go-arch: ["amd64", "arm64"] + go-arch: ["amd64", "arm64"] # drop 32 bit support for now (and maybe forever) steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: "1.23" + go-version: "1.24" check-latest: true - - uses: technote-space/get-diff-action@v6.1.2 - id: git_diff - with: - PATTERNS: | - **/*.go - go.mod - go.sum - **/go.mod - **/go.sum - **/Makefile - Makefile + - name: install aarch64-gcc + if: matrix.go-arch == 'arm64' + run: sudo apt-get install gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu ################### #### Build App #### ################### - name: Build - if: env.GIT_DIFF run: GOARCH=${{ matrix.go-arch }} make build - - name: Build Legacy - if: env.GIT_DIFF - run: GOARCH=${{ matrix.go-arch }} COSMOS_BUILD_OPTIONS=legacy make build + # TODO re-add with comet v1 + #- name: Build with BLS12381 + # if: matrix.go-arch == 'amd64' + # run: GOARCH=${{ matrix.go-arch }} COSMOS_BUILD_OPTIONS="bls12381" make build + - name: Build with Secp_cgo + if: matrix.go-arch == 'amd64' + run: GOARCH=${{ matrix.go-arch }} COSMOS_BUILD_OPTIONS="secp" make build ################### ## Build Tooling ## ################### - name: Build Cosmovisor - if: env.GIT_DIFF run: GOARCH=${{ matrix.go-arch }} make cosmovisor - name: Build Confix - if: env.GIT_DIFF run: GOARCH=${{ matrix.go-arch }} make confix diff --git a/.github/workflows/changelog-reminder.yml b/.github/workflows/changelog-reminder.yml index 8e04a4a2a0..6534722004 100644 --- a/.github/workflows/changelog-reminder.yml +++ b/.github/workflows/changelog-reminder.yml @@ -9,11 +9,11 @@ permissions: jobs: remind: name: Changelog Reminder - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 # Skip draft PRs and PRs starting with: revert, test, chore, ci, docs, style, build, refactor if: "!github.event.pull_request.draft && !contains(github.event.pull_request.title, 'revert') && !contains(github.event.pull_request.title, 'test') && !contains(github.event.pull_request.title, 'chore') && !contains(github.event.pull_request.title, 'ci') && !contains(github.event.pull_request.title, 'docs') && !contains(github.event.pull_request.title, 'style') && !contains(github.event.pull_request.title, 'build') && !contains(github.event.pull_request.title, 'refactor')" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: mskelton/changelog-reminder-action@v3 with: message: "@${{ github.actor }} your pull request is missing a changelog!" diff --git a/.github/workflows/clean-action-artifacts.yml b/.github/workflows/clean-action-artifacts.yml index b84b15d4bb..87204b07f3 100644 --- a/.github/workflows/clean-action-artifacts.yml +++ b/.github/workflows/clean-action-artifacts.yml @@ -7,7 +7,7 @@ on: jobs: remove-old-artifacts: - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 timeout-minutes: 30 steps: diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index d740dcdd1f..5a81ed2685 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -11,10 +11,14 @@ on: paths: - "**.go" +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: analyze: name: Analyze - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 permissions: actions: read contents: read @@ -22,27 +26,22 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: "1.23" + go-version: "1.24" check-latest: true # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: "go" - queries: +security-and-quality,github/codeql/go/ql/src/experimental/InconsistentCode/DeferInLoop.ql@main,github/codeql/go/ql/src/experimental/Unsafe/WrongUsageOfUnsafe.ql@main,github/codeql/go/ql/src/experimental/CWE-369/DivideByZero.ql@main - packs: +crypto-com/cosmos-sdk-codeql - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main + config-file: ./.github/codeql/config.yml # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@v3 # â„šī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -56,4 +55,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/consensuswarn.yml b/.github/workflows/consensuswarn.yml index c2944e342c..9929d33b5c 100644 --- a/.github/workflows/consensuswarn.yml +++ b/.github/workflows/consensuswarn.yml @@ -11,9 +11,9 @@ jobs: main: permissions: pull-requests: write # For reading the PR and posting comment - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: orijtech/consensuswarn@main with: roots: "github.com/cosmos/cosmos-sdk/baseapp.BaseApp.PrepareProposal,github.com/cosmos/cosmos-sdk/baseapp.BaseApp.ProcessProposal,github.com/cosmos/cosmos-sdk/baseapp.BaseApp.FinalizeBlock,github.com/cosmos/cosmos-sdk/baseapp.BaseApp.Commit,github.com/cosmos/cosmos-sdk/baseapp.BaseApp.VerifyVoteExtension" diff --git a/.github/workflows/dependabot-update-all.yml b/.github/workflows/dependabot-update-all.yml index f062d8c798..20b3a00185 100644 --- a/.github/workflows/dependabot-update-all.yml +++ b/.github/workflows/dependabot-update-all.yml @@ -2,22 +2,31 @@ name: Dependabot Update All Go Modules on: pull_request permissions: + contents: write pull-requests: write +env: + PR_TITLE: ${{ github.event.pull_request.title }} + jobs: update-all: - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 if: ${{ github.actor == 'dependabot[bot]' }} steps: - - uses: actions/checkout@v3 + - name: Generate Token + uses: actions/create-github-app-token@67e27a7eb7db372a1c61a7f9bdab8699e9ee57f7 # v1 + id: app-token + with: + app-id: "${{ secrets.APP_ID }}" + private-key: "${{ secrets.APP_PRIVATE_KEY }}" + - uses: actions/checkout@v4 with: repository: ${{ github.event.pull_request.head.repo.full_name }} ref: ${{ github.event.pull_request.head.ref }} - # Secret to be added in the repo under Settings > Secrets > Dependabot - token: ${{ secrets.PRBOT_PAT }} - - uses: actions/setup-go@v4 + token: "${{ steps.app-token.outputs.token }}" + - uses: actions/setup-go@v5 with: - go-version: "1.23" + go-version: "1.24" check-latest: true - name: Extract updated dependency id: deps @@ -25,8 +34,8 @@ jobs: # Extract the dependency name from the PR title # Example: "build(deps): Bump github.com/cosmos/cosmos-sdk from 0.46.0 to 0.47.0" # Extracts "github.com/cosmos/cosmos-sdk" and "0.47.0" - echo "::set-output name=name::$(echo "${{ github.event.pull_request.title }}" | cut -d ' ' -f 3)" - echo "::set-output name=version::$(echo "${{ github.event.pull_request.title }}" | cut -d ' ' -f 7)" + echo "name=$(echo "$PR_TITLE" | cut -d ' ' -f 3)" >> $GITHUB_OUTPUT + echo "version=$(echo "$PR_TITLE" | cut -d ' ' -f 7)" >> $GITHUB_OUTPUT - name: Update all Go modules run: | ./scripts/go-update-dep-all.sh ${{ format('{0}@v{1}', steps.deps.outputs.name, steps.deps.outputs.version) }} @@ -34,5 +43,5 @@ jobs: - name: Commit changes uses: EndBug/add-and-commit@v9 with: - default_author: github_actions + default_author: user_info message: "${{ github.event.pull_request.title }} for all modules" diff --git a/.github/workflows/dependencies-review.yml b/.github/workflows/dependencies-review.yml index 86c7264389..40e6621115 100644 --- a/.github/workflows/dependencies-review.yml +++ b/.github/workflows/dependencies-review.yml @@ -8,16 +8,16 @@ permissions: jobs: dependency-review: - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 steps: - name: "Checkout Repository" - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: "1.23" + go-version: "1.24" check-latest: true - name: "Dependency Review" - uses: actions/dependency-review-action@v3 + uses: actions/dependency-review-action@v4 with: base-ref: ${{ github.event.pull_request.base.sha || 'main' }} head-ref: ${{ github.event.pull_request.head.sha || github.ref }} diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 8dd7d0220d..bcbac136e8 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -22,7 +22,7 @@ on: permissions: contents: read packages: write - id-token: write + sid-token: write env: # Use docker.io for Docker Hub if empty @@ -32,7 +32,7 @@ env: jobs: build: - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 steps: - uses: actions/checkout@v4 with: @@ -60,8 +60,10 @@ jobs: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Setup Depot uses: depot/setup-action@v1 + - name: Publish to GitHub Packages uses: depot/build-push-action@v1 with: diff --git a/.github/workflows/issue_labeler.yml b/.github/workflows/issue_labeler.yml index bdc4da2e43..653824cfa4 100644 --- a/.github/workflows/issue_labeler.yml +++ b/.github/workflows/issue_labeler.yml @@ -5,9 +5,9 @@ on: jobs: triage: - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 steps: - - uses: github/issue-labeler@v3.1 + - uses: github/issue-labeler@v3.4 if: join(github.event.issue.labels) == '' with: repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/issues.yml b/.github/workflows/issues.yml index d8dd458633..4b296dc8a1 100644 --- a/.github/workflows/issues.yml +++ b/.github/workflows/issues.yml @@ -9,10 +9,10 @@ on: jobs: add-to-project: name: Add issue to project - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 steps: - - uses: actions/add-to-project@v0.5.0 + - uses: actions/add-to-project@v1.0.2 with: project-url: https://github.com/orgs/cosmos/projects/26 +# add all issues opened to the issue board for triage and assignment github-token: ${{ secrets.PERSONAL_TOKEN }} - labeled: T:Sprint,needs-triage diff --git a/.github/workflows/lint-pr.yml b/.github/workflows/lint-pr.yml index 7fc1f5ae94..5dbeb7ec77 100644 --- a/.github/workflows/lint-pr.yml +++ b/.github/workflows/lint-pr.yml @@ -15,9 +15,9 @@ jobs: permissions: pull-requests: read # for amannn/action-semantic-pull-request to analyze PRs statuses: write # for amannn/action-semantic-pull-request to mark status of analyzed PR - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 steps: - - uses: amannn/action-semantic-pull-request@v5.2.0 + - uses: amannn/action-semantic-pull-request@v5.5.3 id: lint_pr_title env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 48c9e419de..d1ec8eb054 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -8,20 +8,22 @@ on: merge_group: permissions: contents: read + jobs: golangci: name: golangci-lint - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: "1.23" + go-version: "1.24" check-latest: true - uses: technote-space/get-diff-action@v6.1.2 id: git_diff with: PATTERNS: | + **/*.mk Makefile **/Makefile .golangci.yml @@ -32,14 +34,10 @@ jobs: make lint - uses: technote-space/get-diff-action@v6.1.2 if: steps.lint_long.outcome == 'skipped' - id: git_diff_all with: PATTERNS: | **/*.go - go.mod - go.sum - **/go.mod - **/go.sum + *.go - name: run linting (short) if: steps.lint_long.outcome == 'skipped' && env.GIT_DIFF run: | diff --git a/.github/workflows/md-link-checker.yml b/.github/workflows/md-link-checker.yml index 38560ea8c8..226ce34c69 100644 --- a/.github/workflows/md-link-checker.yml +++ b/.github/workflows/md-link-checker.yml @@ -5,11 +5,27 @@ on: - "docs/**" jobs: markdown-link-check: - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 steps: - uses: actions/checkout@v4 - run: cd docs && sh ./pre.sh - - uses: gaurav-nelson/github-action-markdown-link-check@1.0.15 + - uses: gaurav-nelson/github-action-markdown-link-check@1.0.16 with: folder-path: "docs" - run: cd docs && sh ./post.sh + sims-notify-failure: + permissions: + contents: none + runs-on: depot-ubuntu-22.04-4 + if: ${{ failure() }} + steps: + - name: Notify Slack on failure + uses: rtCamp/action-slack-notify@v2.3.2 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + SLACK_CHANNEL: sdk-sims + SLACK_USERNAME: Broken Links + SLACK_ICON_EMOJI: ":skull:" + SLACK_COLOR: danger + SLACK_MESSAGE: Links are broken in docs + SLACK_FOOTER: "" diff --git a/.github/workflows/pr-go-mod-tidy-mocks.yml b/.github/workflows/pr-go-mod-tidy-mocks.yml new file mode 100644 index 0000000000..ce10bc72a4 --- /dev/null +++ b/.github/workflows/pr-go-mod-tidy-mocks.yml @@ -0,0 +1,52 @@ +name: "Checks dependencies and mocks generation" +on: + merge_group: + pull_request: + push: + branches: + - main + +concurrency: + group: ci-${{ github.ref }}-pr-go-mod-tidy-mocks + cancel-in-progress: true + +jobs: + go-mod-tidy: + name: Check go mod tidy + runs-on: depot-ubuntu-22.04-4 + steps: + - name: Check out code + uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: "1.24" + check-latest: true + - name: Run go mod tidy + run: ./scripts/go-mod-tidy-all.sh + - name: Check for diffs + run: | + git diff --exit-code || { + echo "Please run './scripts/go-mod-tidy-all.sh' and commit the changes"; + exit 1; + } + + generate-mocks: + name: Check up to date mocks + runs-on: depot-ubuntu-22.04-4 + steps: + - name: Check out code + uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: "1.24" + check-latest: true + - name: Generate mocks + run: make mocks + - name: Check for diffs + run: | + git diff --exit-code || { + echo "Please run 'make mocks' and commit the changes"; + exit 1; + } diff --git a/.github/workflows/pr_labeler.yml b/.github/workflows/pr_labeler.yml index b038490da2..187d9d6e1c 100644 --- a/.github/workflows/pr_labeler.yml +++ b/.github/workflows/pr_labeler.yml @@ -8,9 +8,9 @@ permissions: jobs: labeler: permissions: - contents: read # for actions/labeler to determine modified files - pull-requests: write # for actions/labeler to add labels to PRs - runs-on: ubuntu-latest + contents: read # for actions/labeler to determine modified files + pull-requests: write # for actions/labeler to add labels to PRs + runs-on: depot-ubuntu-22.04-4 steps: - uses: actions/labeler@v4 # v5 is broken, ref https://github.com/actions/labeler/issues/712. Do not bump. with: diff --git a/.github/workflows/proto-docker.yml b/.github/workflows/proto-docker.yml index dcec79ee07..947b073421 100644 --- a/.github/workflows/proto-docker.yml +++ b/.github/workflows/proto-docker.yml @@ -26,24 +26,25 @@ concurrency: jobs: build: - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 permissions: contents: read packages: write id-token: write + steps: # set VERSION to new version when making changes, when merged to main the image will automatically be pushed - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@57396166ad8aefe6098280995947635806a0e6ea + uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} # modify value when deploying a new version @@ -51,14 +52,16 @@ jobs: type=semver,pattern={{version}},value=${{ inputs.tags }} - name: Login to GitHub Container Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 if: ${{ github.event_name != 'pull_request' }} with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Setup Depot uses: depot/setup-action@v1 + - name: Publish to GHCR uses: depot/build-push-action@v1 with: diff --git a/.github/workflows/proto-registry.yml b/.github/workflows/proto-registry.yml index d754573e5a..11cf908dd9 100644 --- a/.github/workflows/proto-registry.yml +++ b/.github/workflows/proto-registry.yml @@ -1,20 +1,23 @@ -name: Buf-Push +# name: Buf Push # Protobuf runs buf (https://buf.build/) push updated proto files to https://buf.build/cosmos/cosmos-sdk # This workflow is only run when a .proto file has been changed -on: - push: - branches: - - main - paths: - - "proto/**" +# on: +# push: +# 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[0-9]+" # Push events to matching v*-rc*, i.e. v1.0-rc1, v20.15.10-rc2 +# - "v[0-9]+.[0-9]+.[0-9]+-beta[0-9]+" # Push events to matching v*-beta*, i.e. v1.0-beta1, v20.15.10-beta2 +# - "v[0-9]+.[0-9]+.[0-9]+-alpha[0-9]+" # Push events to matching v*-alpha*, i.e. v1.0-alpha1, v20.15.10-alpha2 +# paths: +# - "proto/**" -jobs: - push: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: bufbuild/buf-setup-action@v1.21.0 - - uses: bufbuild/buf-push-action@v1 - with: - input: "proto" - buf_token: ${{ secrets.BUF_TOKEN }} +# jobs: +# root: +# runs-on: depot-ubuntu-22.04-4 +# name: "Push to buf.build/cosmos/cosmos-sdk" +# steps: +# - uses: actions/checkout@v4 +# - uses: bufbuild/buf-setup-action@v1.29.0 +# - run: buf push proto --tag ${{ github.ref_type == 'tag' && github.ref_name || github.sha }} # https://github.com/bufbuild/buf-push-action/issues/20 + +## TODO at each module tag to their own buf repository diff --git a/.github/workflows/proto.yml b/.github/workflows/proto.yml index 1c997e8a65..4a2fe382ce 100644 --- a/.github/workflows/proto.yml +++ b/.github/workflows/proto.yml @@ -11,20 +11,20 @@ permissions: jobs: lint: - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 timeout-minutes: 5 steps: - - uses: actions/checkout@v3 - - uses: bufbuild/buf-setup-action@v1.21.0 + - uses: actions/checkout@v4 + - uses: bufbuild/buf-setup-action@v1.38.0 - uses: bufbuild/buf-lint-action@v1 with: input: "proto" break-check: - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 steps: - - uses: actions/checkout@v3 - - uses: bufbuild/buf-setup-action@v1.21.0 + - uses: actions/checkout@v4 + - uses: bufbuild/buf-setup-action@v1.38.0 - uses: bufbuild/buf-breaking-action@v1 with: input: "proto" diff --git a/.github/workflows/release-confix.yml b/.github/workflows/release-confix.yml index 61508e7662..6c295fe3c1 100644 --- a/.github/workflows/release-confix.yml +++ b/.github/workflows/release-confix.yml @@ -11,12 +11,12 @@ jobs: goreleaser: permissions: contents: write # for goreleaser/goreleaser-action to create a GitHub release - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: "1.23" + go-version: "1.24" check-latest: true # get 'v*.*.*' part from 'confix/v*.*.*' and save to $GITHUB_ENV - name: Set env diff --git a/.github/workflows/release-cosmovisor.yml b/.github/workflows/release-cosmovisor.yml index 0eef543672..395856cf76 100644 --- a/.github/workflows/release-cosmovisor.yml +++ b/.github/workflows/release-cosmovisor.yml @@ -11,12 +11,12 @@ jobs: goreleaser: permissions: contents: write # for goreleaser/goreleaser-action to create a GitHub release - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: "1.23" + go-version: "1.24" check-latest: true # get 'v*.*.*' part from 'cosmovisor/v*.*.*' and save to $GITHUB_ENV - name: Set env diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7287147012..936d57ea60 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,13 +14,13 @@ jobs: release: permissions: contents: write # for goreleaser/goreleaser-action to create a GitHub release - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 steps: - uses: actions/checkout@v4 - name: Install Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: - go-version: "1.23" + go-version: "1.24" check-latest: true - name: Unshallow run: git fetch --prune --unshallow @@ -34,10 +34,10 @@ jobs: release-success: needs: release if: ${{ success() }} - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 steps: - name: Notify Slack on success - uses: rtCamp/action-slack-notify@v2.2.1 + uses: rtCamp/action-slack-notify@v2.3.2 env: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} SLACK_CHANNEL: cosmos-tech diff --git a/.github/workflows/sims-045.yml b/.github/workflows/sims-045.yml index e837bd3d0f..4deb0e0dbf 100644 --- a/.github/workflows/sims-045.yml +++ b/.github/workflows/sims-045.yml @@ -21,7 +21,7 @@ jobs: ref: "release/v0.45.x" - uses: actions/setup-go@v4 with: - go-version: "1.23" + go-version: "1.24" check-latest: true - run: make build @@ -33,7 +33,7 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: "1.23" + go-version: "1.24" check-latest: true - name: Install runsim run: go install github.com/cosmos/tools/cmd/runsim@v1.0.0 @@ -51,7 +51,7 @@ jobs: ref: "release/v0.45.x" - uses: actions/setup-go@v4 with: - go-version: "1.23" + go-version: "1.24" check-latest: true - uses: actions/cache@v3 with: @@ -70,7 +70,7 @@ jobs: ref: "release/v0.45.x" - uses: actions/setup-go@v4 with: - go-version: "1.23" + go-version: "1.24" check-latest: true - uses: actions/cache@v3 with: @@ -90,7 +90,7 @@ jobs: ref: "release/v0.45.x" - uses: actions/setup-go@v4 with: - go-version: "1.23" + go-version: "1.24" check-latest: true - uses: actions/cache@v3 with: diff --git a/.github/workflows/sims-046.yml b/.github/workflows/sims-046.yml index 515a76997f..e8eef69cfc 100644 --- a/.github/workflows/sims-046.yml +++ b/.github/workflows/sims-046.yml @@ -21,7 +21,7 @@ jobs: ref: "release/v0.46.x" - uses: actions/setup-go@v4 with: - go-version: "1.23" + go-version: "1.24" check-latest: true - run: make build @@ -33,7 +33,7 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: "1.23" + go-version: "1.24" check-latest: true - name: Install runsim run: go install github.com/cosmos/tools/cmd/runsim@v1.0.0 @@ -52,7 +52,7 @@ jobs: ref: "release/v0.46.x" - uses: actions/setup-go@v4 with: - go-version: "1.23" + go-version: "1.24" check-latest: true - uses: actions/cache@v3 with: @@ -71,7 +71,7 @@ jobs: ref: "release/v0.46.x" - uses: actions/setup-go@v4 with: - go-version: "1.23" + go-version: "1.24" check-latest: true - uses: actions/cache@v3 with: @@ -90,7 +90,7 @@ jobs: ref: "release/v0.46.x" - uses: actions/setup-go@v4 with: - go-version: "1.23" + go-version: "1.24" check-latest: true - uses: actions/cache@v3 with: diff --git a/.github/workflows/sims-047.yml b/.github/workflows/sims-047.yml index a438c4ac08..d81f94028c 100644 --- a/.github/workflows/sims-047.yml +++ b/.github/workflows/sims-047.yml @@ -21,7 +21,7 @@ jobs: ref: "release/v0.47.x" - uses: actions/setup-go@v4 with: - go-version: "1.23" + go-version: "1.24" check-latest: true - run: make build @@ -33,7 +33,7 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: "1.23" + go-version: "1.24" check-latest: true - name: Install runsim run: go install github.com/cosmos/tools/cmd/runsim@v1.0.0 @@ -52,7 +52,7 @@ jobs: ref: "release/v0.47.x" - uses: actions/setup-go@v4 with: - go-version: "1.23" + go-version: "1.24" check-latest: true - uses: actions/cache@v3 with: @@ -71,7 +71,7 @@ jobs: ref: "release/v0.47.x" - uses: actions/setup-go@v4 with: - go-version: "1.23" + go-version: "1.24" check-latest: true - uses: actions/cache@v3 with: @@ -90,7 +90,7 @@ jobs: ref: "release/v0.47.x" - uses: actions/setup-go@v4 with: - go-version: "1.23" + go-version: "1.24" check-latest: true - uses: actions/cache@v3 with: diff --git a/.github/workflows/sims-050.yml b/.github/workflows/sims-050.yml new file mode 100644 index 0000000000..b72451983a --- /dev/null +++ b/.github/workflows/sims-050.yml @@ -0,0 +1,145 @@ +name: Sims release/0.50.x +# Sims workflow runs multiple types of simulations (nondeterminism, import-export, after-import, multi-seed-short) +# This workflow will run on all Pull Requests, if a .go, .mod or .sum file have been changed +on: + schedule: + - cron: "0 0,12 * * *" + release: + types: [published] + +concurrency: + group: ci-${{ github.ref }}-sims-050 + cancel-in-progress: true + +jobs: + build: + runs-on: depot-ubuntu-22.04-4 + if: "!contains(github.event.head_commit.message, 'skip-sims')" + steps: + - uses: actions/checkout@v4 + with: + ref: "release/v0.50.x" + - uses: actions/setup-go@v5 + with: + go-version: "1.24" + check-latest: true + - run: make build + + install-runsim: + permissions: + contents: none + runs-on: depot-ubuntu-22.04-4 + needs: build + steps: + - uses: actions/setup-go@v5 + with: + go-version: "1.24" + check-latest: true + - name: Install runsim + run: go install github.com/cosmos/tools/cmd/runsim@v1.0.0 + - uses: actions/cache@v4 + with: + path: ~/go/bin + key: ${{ runner.os }}-go-runsim-binary + + test-sim-import-export: + runs-on: depot-ubuntu-22.04-4 + needs: [build, install-runsim] + timeout-minutes: 60 + steps: + - uses: actions/checkout@v4 + with: + ref: "release/v0.50.x" + - uses: actions/setup-go@v5 + with: + go-version: "1.24" + check-latest: true + - uses: actions/cache@v4 + with: + path: ~/go/bin + key: ${{ runner.os }}-go-runsim-binary + - name: test-sim-import-export + run: | + make test-sim-import-export + + test-sim-after-import: + runs-on: depot-ubuntu-22.04-4 + needs: [build, install-runsim] + steps: + - uses: actions/checkout@v4 + with: + ref: "release/v0.50.x" + - uses: actions/setup-go@v5 + with: + go-version: "1.24" + check-latest: true + - uses: actions/cache@v4 + with: + path: ~/go/bin + key: ${{ runner.os }}-go-runsim-binary + - name: test-sim-after-import + run: | + make test-sim-after-import + + test-sim-multi-seed-short: + runs-on: depot-ubuntu-22.04-4 + needs: [build, install-runsim] + steps: + - uses: actions/checkout@v4 + with: + ref: "release/v0.50.x" + - uses: actions/setup-go@v5 + with: + go-version: "1.24" + check-latest: true + - uses: actions/cache@v4 + with: + path: ~/go/bin + key: ${{ runner.os }}-go-runsim-binary + - name: test-sim-multi-seed-short + run: | + make test-sim-multi-seed-short + + sims-notify-success: + needs: + [test-sim-multi-seed-short, test-sim-after-import, test-sim-import-export] + runs-on: depot-ubuntu-22.04-4 + if: ${{ success() }} + steps: + - uses: actions/checkout@v4 + - name: Get previous workflow status + uses: ./.github/actions/last-workflow-status + id: last_status + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + + - name: Notify Slack on success + if: ${{ steps.last_status.outputs.last_status == 'failure' }} + uses: rtCamp/action-slack-notify@v2.3.2 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + SLACK_CHANNEL: sdk-sims + SLACK_USERNAME: Sim Tests release/0.50.x + SLACK_ICON_EMOJI: ":white_check_mark:" + SLACK_COLOR: good + SLACK_MESSAGE: 0.50.x Sims are passing + SLACK_FOOTER: "" + + sims-notify-failure: + permissions: + contents: none + needs: + [test-sim-multi-seed-short, test-sim-after-import, test-sim-import-export] + runs-on: depot-ubuntu-22.04-4 + if: ${{ failure() }} + steps: + - name: Notify Slack on failure + uses: rtCamp/action-slack-notify@v2.3.2 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + SLACK_CHANNEL: sdk-sims + SLACK_USERNAME: Sim Tests release/0.50.x + SLACK_ICON_EMOJI: ":skull:" + SLACK_COLOR: danger + SLACK_MESSAGE: 0.50.x Sims are failing + SLACK_FOOTER: "" diff --git a/.github/workflows/sims-053.yml b/.github/workflows/sims-053.yml new file mode 100644 index 0000000000..f93572af01 --- /dev/null +++ b/.github/workflows/sims-053.yml @@ -0,0 +1,146 @@ +name: Sims release/0.53.x +# Sims workflow runs multiple types of simulations (nondeterminism, import-export, after-import, multi-seed-short) +# This workflow will run on all Pull Requests, if a .go, .mod or .sum file have been changed +on: + schedule: + - cron: "0 0,12 * * *" + release: + types: [published] + +concurrency: + group: ci-${{ github.ref }}-sims-053 + cancel-in-progress: true + +jobs: + build: + permissions: + contents: read # for actions/checkout to fetch code + runs-on: depot-ubuntu-22.04-16 + if: "!contains(github.event.head_commit.message, 'skip-sims')" + steps: + - uses: actions/checkout@v4 + with: + ref: "release/v0.53.x" + - uses: actions/setup-go@v5 + with: + go-version: "1.24" + check-latest: true + - run: make build + + test-sim-import-export: + runs-on: depot-ubuntu-22.04-16 + needs: [build] + timeout-minutes: 60 + steps: + - uses: actions/checkout@v4 + with: + ref: "release/v0.53.x" + - uses: actions/setup-go@v5 + with: + go-version: "1.24" + check-latest: true + - name: test-sim-import-export + run: | + make test-sim-import-export + + test-sim-after-import: + runs-on: depot-ubuntu-22.04-16 + needs: [build] + timeout-minutes: 60 + steps: + - uses: actions/checkout@v4 + with: + ref: "release/v0.53.x" + - uses: actions/setup-go@v5 + with: + go-version: "1.24" + check-latest: true + - name: test-sim-after-import + run: | + make test-sim-after-import + + test-sim-deterministic: + runs-on: depot-ubuntu-22.04-16 + needs: [build] + timeout-minutes: 60 + steps: + - uses: actions/checkout@v4 + with: + ref: "release/v0.53.x" + - uses: actions/setup-go@v5 + with: + go-version: "1.24" + check-latest: true + - name: test-sim-nondeterminism + run: | + make test-sim-nondeterminism + + test-sim-multi-seed-short: + runs-on: depot-ubuntu-22.04-16 + needs: [build] + timeout-minutes: 60 + steps: + - uses: actions/checkout@v4 + with: + ref: "release/v0.53.x" + - uses: actions/setup-go@v5 + with: + go-version: "1.24" + check-latest: true + - name: test-sim-multi-seed-short + run: | + make test-sim-multi-seed-short + + sims-notify-success: + needs: + [ + test-sim-multi-seed-short, + test-sim-after-import, + test-sim-import-export, + test-sim-deterministic, + ] + runs-on: depot-ubuntu-22.04-16 + if: ${{ success() }} + steps: + - uses: actions/checkout@v4 + - name: Get previous workflow status + uses: ./.github/actions/last-workflow-status + id: last_status + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + + - name: Notify Slack on success + if: ${{ steps.last_status.outputs.last_status == 'failure' }} + uses: rtCamp/action-slack-notify@v2.3.2 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + SLACK_CHANNEL: sdk-sims + SLACK_USERNAME: Sim Tests release/0.53.x + SLACK_ICON_EMOJI: ":white_check_mark:" + SLACK_COLOR: good + SLACK_MESSAGE: 0.53.x Sims are passing + SLACK_FOOTER: "" + + sims-notify-failure: + permissions: + contents: none + needs: + [ + test-sim-multi-seed-short, + test-sim-after-import, + test-sim-import-export, + test-sim-deterministic, + ] + runs-on: depot-ubuntu-22.04-16 + if: ${{ failure() }} + steps: + - name: Notify Slack on failure + uses: rtCamp/action-slack-notify@v2.3.2 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + SLACK_CHANNEL: sdk-sims + SLACK_USERNAME: Sim Tests release/0.53.x + SLACK_ICON_EMOJI: ":skull:" + SLACK_COLOR: danger + SLACK_MESSAGE: 0.53.x Sims are failing + SLACK_FOOTER: "" diff --git a/.github/workflows/sims-nightly.yml b/.github/workflows/sims-nightly.yml index 83a3ff09ea..f29c75a341 100644 --- a/.github/workflows/sims-nightly.yml +++ b/.github/workflows/sims-nightly.yml @@ -15,45 +15,27 @@ concurrency: cancel-in-progress: true jobs: - install-runsim: - permissions: - contents: none - runs-on: ubuntu-latest - steps: - - uses: actions/setup-go@v4 - with: - go-version: "1.23" - check-latest: true - - name: Install runsim - run: go install github.com/cosmos/tools/cmd/runsim@v1.0.0 - - uses: actions/cache@v3 - with: - path: ~/go/bin - key: ${{ runner.os }}-go-runsim-binary - test-sim-multi-seed-long: - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: "1.23" + go-version: "1.24" check-latest: true - - uses: actions/cache@v3 - with: - path: ~/go/bin - key: ${{ runner.os }}-go-runsim-binary - name: test-sim-multi-seed-long + env: + GOMEMLIMIT: 14GiB # reserve 2 GiB as buffer for GC to avoid OOM run: | make test-sim-multi-seed-long sims-notify-success: needs: [test-sim-multi-seed-long] - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 if: ${{ success() }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Get previous workflow status uses: ./.github/actions/last-workflow-status id: last_status @@ -62,7 +44,7 @@ jobs: - name: Notify Slack on success if: ${{ steps.last_status.outputs.last_status == 'failure' }} - uses: rtCamp/action-slack-notify@v2.2.0 + uses: rtCamp/action-slack-notify@v2.3.2 env: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} SLACK_CHANNEL: sdk-sims @@ -76,11 +58,11 @@ jobs: permissions: contents: none needs: [test-sim-multi-seed-long] - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 if: ${{ failure() }} steps: - name: Notify Slack on failure - uses: rtCamp/action-slack-notify@v2.2.0 + uses: rtCamp/action-slack-notify@v2.3.2 env: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} SLACK_CHANNEL: sdk-sims diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index ff951d2adc..95d4082f60 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -15,83 +15,85 @@ jobs: build: permissions: contents: read # for actions/checkout to fetch code - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-16 if: "!contains(github.event.head_commit.message, 'skip-sims')" steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: "1.23" + go-version: "1.24" check-latest: true - run: make build - - name: Install runsim - run: go install github.com/cosmos/tools/cmd/runsim@v1.0.0 - - uses: actions/cache@v3 - with: - path: ~/go/bin - key: ${{ runner.os }}-go-runsim-binary test-sim-import-export: - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-16 needs: [build] timeout-minutes: 60 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: "1.23" + go-version: "1.24" check-latest: true - - uses: actions/cache@v3 - with: - path: ~/go/bin - key: ${{ runner.os }}-go-runsim-binary - name: test-sim-import-export run: | make test-sim-import-export test-sim-after-import: - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-16 needs: [build] + timeout-minutes: 60 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: "1.23" + go-version: "1.24" check-latest: true - - uses: actions/cache@v3 - with: - path: ~/go/bin - key: ${{ runner.os }}-go-runsim-binary - name: test-sim-after-import run: | make test-sim-after-import - test-sim-multi-seed-short: - runs-on: ubuntu-latest + test-sim-deterministic: + runs-on: depot-ubuntu-22.04-16 needs: [build] timeout-minutes: 60 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: "1.23" + go-version: "1.24" check-latest: true - - uses: actions/cache@v3 + - name: test-sim-nondeterminism + run: | + make test-sim-nondeterminism + + test-sim-multi-seed-short: + runs-on: depot-ubuntu-22.04-16 + needs: [build] + timeout-minutes: 60 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - path: ~/go/bin - key: ${{ runner.os }}-go-runsim-binary + go-version: "1.24" + check-latest: true - name: test-sim-multi-seed-short run: | make test-sim-multi-seed-short sims-notify-success: needs: - [test-sim-multi-seed-short, test-sim-after-import, test-sim-import-export] - runs-on: ubuntu-latest + [ + test-sim-multi-seed-short, + test-sim-after-import, + test-sim-import-export, + test-sim-deterministic, + ] + runs-on: depot-ubuntu-22.04-16 if: ${{ success() }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Get previous workflow status uses: ./.github/actions/last-workflow-status id: last_status @@ -100,7 +102,7 @@ jobs: - name: Notify Slack on success if: ${{ steps.last_status.outputs.last_status == 'failure' }} - uses: rtCamp/action-slack-notify@v2.2.0 + uses: rtCamp/action-slack-notify@v2.3.2 env: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} SLACK_CHANNEL: sdk-sims @@ -114,12 +116,17 @@ jobs: permissions: contents: none needs: - [test-sim-multi-seed-short, test-sim-after-import, test-sim-import-export] - runs-on: ubuntu-latest + [ + test-sim-multi-seed-short, + test-sim-after-import, + test-sim-import-export, + test-sim-deterministic, + ] + runs-on: depot-ubuntu-22.04-16 if: ${{ failure() }} steps: - name: Notify Slack on failure - uses: rtCamp/action-slack-notify@v2.2.0 + uses: rtCamp/action-slack-notify@v2.3.2 env: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} SLACK_CHANNEL: sdk-sims diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 20630a1376..4874a3d593 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -11,9 +11,9 @@ jobs: permissions: issues: write # for actions/stale to close stale issues pull-requests: write # for actions/stale to close stale PRs - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 steps: - - uses: actions/stale@v8 + - uses: actions/stale@v9 with: repo-token: ${{ secrets.GITHUB_TOKEN }} stale-pr-message: "This pull request has been automatically marked as stale because it has not had diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f6fb5b6eb6..6e3ce73654 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,10 +4,11 @@ on: merge_group: push: branches: - - release/** + - main permissions: - contents: read + contents: write + pull-requests: write concurrency: group: ci-${{ github.ref }}-tests @@ -15,12 +16,12 @@ concurrency: jobs: split-test-files: - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: "1.23" + go-version: "1.24" check-latest: true - name: Create a file with all core Cosmos SDK pkgs run: go list ./... > pkgs.txt @@ -44,17 +45,17 @@ jobs: path: ./pkgs.txt.part.03 tests: - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 needs: split-test-files strategy: fail-fast: false matrix: part: ["00", "01", "02", "03"] steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: "1.23" + go-version: "1.24" check-latest: true cache: true cache-dependency-path: go.sum @@ -83,12 +84,12 @@ jobs: path: ./${{ matrix.part }}profile.out test-integration: - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: "1.23" + go-version: "1.24" check-latest: true cache: true cache-dependency-path: go.sum @@ -113,42 +114,11 @@ jobs: name: "${{ github.sha }}-integration-coverage" path: ./tests/integration-profile.out - test-e2e: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 - with: - go-version: "1.23" - check-latest: true - cache: true - cache-dependency-path: go.sum - - uses: technote-space/get-diff-action@v6.1.2 - id: git_diff - with: - PATTERNS: | - **/*.go - go.mod - go.sum - **/go.mod - **/go.sum - **/Makefile - Makefile - - name: e2e tests - if: env.GIT_DIFF - run: | - make test-e2e-cov - - uses: actions/upload-artifact@v4 - if: env.GIT_DIFF - with: - name: "${{ github.sha }}-e2e-coverage" - path: ./tests/e2e-profile.out - repo-analysis: - runs-on: ubuntu-latest - needs: [tests, test-integration, test-e2e] + runs-on: depot-ubuntu-22.04-4 + needs: [tests, test-integration] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: technote-space/get-diff-action@v6.1.2 id: git_diff with: @@ -183,13 +153,14 @@ jobs: with: name: "${{ github.sha }}-e2e-coverage" continue-on-error: true + test-sim-nondeterminism: - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: "1.23" + go-version: "1.24" check-latest: true cache: true cache-dependency-path: go.sum @@ -217,12 +188,12 @@ jobs: # They run when there is a diff in their respective directories. test-clientv2: - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: "1.23" + go-version: "1.24" check-latest: true cache: true cache-dependency-path: client/v2/go.sum @@ -237,15 +208,15 @@ jobs: if: env.GIT_DIFF run: | cd client/v2 - go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock rocksdb_build' ./... + go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./... test-core: - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: "1.23" + go-version: "1.24" check-latest: true cache: true cache-dependency-path: core/go.sum @@ -260,16 +231,16 @@ jobs: if: env.GIT_DIFF run: | cd core - go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock rocksdb_build' ./... + go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./... test-depinject: - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: "1.23" - check-latest: true + go-version: "1.22" + check-latest: false cache: true cache-dependency-path: depinject/go.sum - uses: technote-space/get-diff-action@v6.1.2 @@ -283,15 +254,15 @@ jobs: if: env.GIT_DIFF run: | cd depinject - go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock rocksdb_build' ./... + go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./... test-errors: - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: "1.23" + go-version: "1.22" check-latest: true cache: true cache-dependency-path: errors/go.sum @@ -306,15 +277,15 @@ jobs: if: env.GIT_DIFF run: | cd errors - go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock rocksdb_build' ./... + go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./... test-math: - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: "1.23" + go-version: "1.22" check-latest: true cache: true cache-dependency-path: math/go.sum @@ -329,43 +300,59 @@ jobs: if: env.GIT_DIFF run: | cd math - go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock rocksdb_build' ./... + go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./... - test-simapp: - runs-on: ubuntu-latest + test-schema: + runs-on: depot-ubuntu-22.04-4 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: "1.23" - check-latest: true + go-version: "1.12" cache: true - cache-dependency-path: simapp/go.sum + cache-dependency-path: schema/go.sum - uses: technote-space/get-diff-action@v6.1.2 id: git_diff with: PATTERNS: | - **/*.go - simapp/go.mod - simapp/go.sum - - name: tests simapp + schema/**/*.go + schema/go.mod + schema/go.sum + - name: tests if: env.GIT_DIFF run: | - cd simapp - go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock rocksdb_build' ./... - - name: tests simapp v1 + cd schema + go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./... + + test-schema-testing: + runs-on: depot-ubuntu-22.04-4 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: "1.24" + cache: true + cache-dependency-path: schema/testing/go.sum + - uses: technote-space/get-diff-action@v6.1.2 + id: git_diff + with: + PATTERNS: | + schema/testing/**/*.go + schema/testing/go.mod + schema/testing/go.sum + - name: tests if: env.GIT_DIFF run: | - cd simapp - go test -mod=readonly -timeout 30m -tags='app_v1 norace ledger test_ledger_mock rocksdb_build' ./... + cd schema + go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic ./... test-collections: - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: "1.23" + go-version: "1.24" check-latest: true cache: true cache-dependency-path: collections/go.sum @@ -380,15 +367,15 @@ jobs: if: env.GIT_DIFF run: | cd collections - go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock rocksdb_build' ./... + go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./... test-cosmovisor: - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: "1.23" + go-version: "1.24" check-latest: true cache: true cache-dependency-path: tools/cosmovisor/go.sum @@ -403,15 +390,15 @@ jobs: if: env.GIT_DIFF run: | cd tools/cosmovisor - go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock rocksdb_build' ./... + go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./... test-confix: - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: "1.23" + go-version: "1.24" check-latest: true cache: true cache-dependency-path: tools/confix/go.sum @@ -426,15 +413,15 @@ jobs: if: env.GIT_DIFF run: | cd tools/confix - go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock rocksdb_build' ./... + go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./... test-store: - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: "1.23" + go-version: "1.24" check-latest: true cache: true cache-dependency-path: store/go.sum @@ -449,15 +436,15 @@ jobs: if: env.GIT_DIFF run: | cd store - go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock rocksdb_build' ./... + go test -ldflags "-r /usr/local/lib" -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./... test-log: - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: "1.23" + go-version: "1.21" check-latest: true cache: true cache-dependency-path: log/go.sum @@ -472,7 +459,7 @@ jobs: if: env.GIT_DIFF run: | cd log - go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock rocksdb_build' ./... + go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./... ############################# ### Cosmos SDK x/{module} ### @@ -482,12 +469,12 @@ jobs: # They run when there is a diff in their respective directories. test-x-tx: - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: "1.23" + go-version: "1.24" check-latest: true cache: true cache-dependency-path: x/tx/go.sum @@ -502,15 +489,15 @@ jobs: if: env.GIT_DIFF run: | cd x/tx - go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock rocksdb_build' ./... + go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./... test-x-nft: - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: "1.23" + go-version: "1.24" check-latest: true cache: true cache-dependency-path: x/nft/go.sum @@ -525,15 +512,15 @@ jobs: if: env.GIT_DIFF run: | cd x/nft - go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock rocksdb_build' ./... + go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./... test-x-circuit: - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: "1.23" + go-version: "1.24" check-latest: true cache: true cache-dependency-path: x/circuit/go.sum @@ -548,15 +535,61 @@ jobs: if: env.GIT_DIFF run: | cd x/circuit - go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock rocksdb_build' ./... + go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./... + + test-x-distribution: + runs-on: depot-ubuntu-22.04-4 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: "1.24" + check-latest: true + cache: true + cache-dependency-path: x/distribution/go.sum + - uses: technote-space/get-diff-action@v6.1.2 + id: git_diff + with: + PATTERNS: | + x/distribution/**/*.go + x/distribution/go.mod + x/distribution/go.sum + - name: tests + if: env.GIT_DIFF + run: | + cd x/distribution + go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./... + + test-x-protocolpool: + runs-on: depot-ubuntu-22.04-4 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: "1.24" + check-latest: true + cache: true + cache-dependency-path: x/protocolpool/go.sum + - uses: technote-space/get-diff-action@v6.1.2 + id: git_diff + with: + PATTERNS: | + x/protocolpool/**/*.go + x/protocolpool/go.mod + x/protocolpool/go.sum + - name: tests + if: env.GIT_DIFF + run: | + cd x/protocolpool + go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./... test-x-feegrant: - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: "1.23" + go-version: "1.24" check-latest: true cache: true cache-dependency-path: x/feegrant/go.sum @@ -571,15 +604,15 @@ jobs: if: env.GIT_DIFF run: | cd x/feegrant - go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock rocksdb_build' ./... + go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./... test-x-evidence: - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: "1.23" + go-version: "1.24" check-latest: true cache: true cache-dependency-path: x/evidence/go.sum @@ -594,15 +627,15 @@ jobs: if: env.GIT_DIFF run: | cd x/evidence - go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock rocksdb_build' ./... - + go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./... + test-x-upgrade: - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: "1.23" + go-version: "1.24" check-latest: true cache: true cache-dependency-path: x/upgrade/go.sum @@ -617,16 +650,234 @@ jobs: if: env.GIT_DIFF run: | cd x/upgrade - go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock rocksdb_build' ./... + go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./... - test-system: # no system tests in v0.50, set to match required job - runs-on: ubuntu-latest + test-x-group: + runs-on: depot-ubuntu-22.04-4 steps: - - name: do nothing - run: echo "no system tests in v0.50" + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: "1.24" + check-latest: true + cache: true + cache-dependency-path: x/group/go.sum + - uses: technote-space/get-diff-action@v6.1.2 + id: git_diff + with: + PATTERNS: | + x/group/**/*.go + x/group/go.mod + x/group/go.sum + - name: tests + if: env.GIT_DIFF + run: | + cd x/group + go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./... - test-system-v2: # no system tests in v0.50, set to match required job - runs-on: ubuntu-latest + test-x-gov: + runs-on: depot-ubuntu-22.04-4 steps: - - name: do nothing - run: echo "no system tests in v0.50" + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: "1.24" + check-latest: true + cache: true + cache-dependency-path: x/gov/go.sum + - uses: technote-space/get-diff-action@v6.1.2 + id: git_diff + with: + PATTERNS: | + x/gov/**/*.go + x/gov/go.mod + x/gov/go.sum + - name: tests + if: env.GIT_DIFF + run: | + cd x/gov + go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./... + + test-x-slashing: + runs-on: depot-ubuntu-22.04-4 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: "1.24" + check-latest: true + cache: true + cache-dependency-path: x/slashing/go.sum + - uses: technote-space/get-diff-action@v6.1.2 + id: git_diff + with: + PATTERNS: | + x/slashing/**/*.go + x/slashing/go.mod + x/slashing/go.sum + - name: tests + if: env.GIT_DIFF + run: | + cd x/slashing + go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./... + + test-x-staking: + runs-on: depot-ubuntu-22.04-4 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: "1.24" + check-latest: true + cache: true + cache-dependency-path: x/staking/go.sum + - uses: technote-space/get-diff-action@v6.1.2 + id: git_diff + with: + PATTERNS: | + x/staking/**/*.go + x/staking/go.mod + x/staking/go.sum + - name: tests + if: env.GIT_DIFF + run: | + cd x/staking + go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./... + + test-x-authz: + runs-on: depot-ubuntu-22.04-4 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: "1.24" + check-latest: true + cache: true + cache-dependency-path: x/authz/go.sum + - uses: technote-space/get-diff-action@v6.1.2 + id: git_diff + with: + PATTERNS: | + x/authz/**/*.go + x/authz/go.mod + x/authz/go.sum + - name: tests + if: env.GIT_DIFF + run: | + cd x/authz + go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./... + + test-x-bank: + runs-on: depot-ubuntu-22.04-4 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: "1.24" + check-latest: true + cache: true + cache-dependency-path: x/bank/go.sum + - uses: technote-space/get-diff-action@v6.1.2 + id: git_diff + with: + PATTERNS: | + x/bank/**/*.go + x/bank/go.mod + x/bank/go.sum + - name: tests + if: env.GIT_DIFF + run: | + cd x/bank + go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./... + + test-x-mint: + runs-on: depot-ubuntu-22.04-4 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: "1.24" + check-latest: true + cache: true + cache-dependency-path: x/mint/go.sum + - uses: technote-space/get-diff-action@v6.1.2 + id: git_diff + with: + PATTERNS: | + x/mint/**/*.go + x/mint/go.mod + x/mint/go.sum + - name: tests + if: env.GIT_DIFF + run: | + cd x/mint + go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./... + + test-x-epochs: + runs-on: depot-ubuntu-22.04-4 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: "1.24" + check-latest: true + cache: true + cache-dependency-path: x/epochs/go.sum + - uses: technote-space/get-diff-action@v6.1.2 + id: git_diff + with: + PATTERNS: | + x/epochs/**/*.go + x/epochs/go.mod + x/epochs/go.sum + - name: tests + if: env.GIT_DIFF + run: | + cd x/epochs + go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./... + + test-x-consensus: + runs-on: depot-ubuntu-22.04-4 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: "1.24" + check-latest: true + cache: true + cache-dependency-path: x/consensus/go.sum + - uses: technote-space/get-diff-action@v6.1.2 + id: git_diff + with: + PATTERNS: | + x/consensus/**/*.go + x/consensus/go.mod + x/consensus/go.sum + - name: tests + if: env.GIT_DIFF + run: | + cd x/consensus + go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./... + + test-tools-benchmark: + runs-on: depot-ubuntu-22.04-4 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: "1.23.2" + check-latest: true + cache: true + cache-dependency-path: tools/benchmark/go.sum + - uses: technote-space/get-diff-action@v6.1.2 + id: git_diff + with: + PATTERNS: | + tools/benchmark/**/*.go + tools/benchmark/go.mod + tools/benchmark/go.sum + - name: tests + if: env.GIT_DIFF + run: | + cd tools/benchmark + go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace' ./...