Skip to content

Commit

Permalink
Merge branch 'master' into aaronc/6513-textual-json-proto
Browse files Browse the repository at this point in the history
  • Loading branch information
fedekunze authored May 2, 2021
2 parents ba0e9cc + 72873a0 commit 9f22fb4
Show file tree
Hide file tree
Showing 1,317 changed files with 67,186 additions and 144,367 deletions.
20 changes: 20 additions & 0 deletions .deepsource.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version = 1

test_patterns = [
"tests/**",
"**_test.go"
]

exclude_patterns = [
"third_party/proto/**",
"testutil/**",
"proto/cosmos/**",
"contrib/**"
]

[[analyzers]]
name = "go"
enabled = true

[analyzers.meta]
import_paths = ["github.com/cosmos/cosmos-sdk"]
7 changes: 1 addition & 6 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
# NOTE: Order is important; the last matching pattern takes the
# most precedence.

# Secondary repo maintainers, substitutes of the primary
# maintainers when they become MIA
* @cwgoes @sunnya97

# Primary repo maintainers
* @aaronc @alexanderbez @alessio

* @aaronc @alexanderbez

40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE/module-readiness-checklist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: Module Readiness Checklist
about: Pre-flight checklist that modules must pass in order to be included in a release of the Cosmos SDK
labels: 'module-readiness-checklist'
---

## x/{MODULE_NAME} Module Readiness Checklist

This checklist is to be used for tracking the final internal audit of new Cosmos SDK modules prior to inclusion in a published release.

### 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 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)
- [ ] 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
- [ ] 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
- [ ] Assess potential risks of any new third party dependencies and decide whether a dependency audit is needed
- [ ] Completeness audit, fully implemented with tests (at least 1 person) (@assignee)
- [ ] 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)

### Published Release Checklist

After the above checks have been audited and the module is included in a tagged Release Candidate, the following additional checklist should be undertaken for live testing, and potentially a 3rd party audit (if deemed necessary):

- [ ] Testnet / devnet testing (2-3 people) (@assignee1, @assignee2, @assignee3)
- [ ] All Msg methods have been tested especially in light of any potential threats identified
- [ ] Genesis import and export has been tested
- [ ] Nice to have (and needed in some cases if threats could be high): Official 3rd party audit
57 changes: 57 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
"Scope: x/auth":
- x/auth/**/*
"Scope: x/authz":
- x/authz/**/*
"Scope: x/bank":
- x/bank/**/*
"Scope: x/capability":
- x/capability/**/*
"Scope: x/crisis":
- x/crisis/**/*
"Scope: x/distribution":
- x/distribution/**/*
"Scope: x/evidence":
- x/evidence/**/*
"Scope: x/feegrant":
- x/feegrant/**/*
"Scope: x/genutil":
- x/genutil/**/*
"Scope: x/gov":
- x/gov/**/*
"Scope: x/mint":
- x/mint/**/*
"Scope: x/params":
- x/params/**/*
"Scope: Simulations":
- x/simulation/**/*
- x/*/simulation/**/*
"Scope: x/slashing":
- x/slashing/**/*
"Scope: x/staking":
- x/staking/**/*
"Scope: x/upgrade":
- x/upgrade/**/*
"Scope: Cosmovisor":
- cosmovisor/**/*
"Scope: Rosetta":
- contrib/rosetta/**/*
"Scope: Keys":
- client/keys/**/*
"Type: Build":
- Makefile
- Dockerfile
- docker-compose.yml
- scripts/*
"Type: CI":
- .github/**/*.yml
- buf.yaml
- .mergify.yml
- .golangci.yml
"Scope: CLI":
- client/**/*
- x/*/client/**/*
"Type: Docs":
- docs/**/*
- x/*/spec/**/*
"Type: ADR":
- docs/architecture/**/*
58 changes: 58 additions & 0 deletions .github/workflows/atlas.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Atlas
# Atlas checks if a modules atlas manifest has been touched, if so it publishes the updated version
on:
push:
branches:
- master
paths:
- "x/**/atlas/*"
pull_request:
paths:
- "x/**/atlas/*"

jobs:
auth:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: technote-space/get-diff-action@v4
id: git_diff
with:
PATTERNS: |
x/auth/atlas/**
- uses: marbar3778/atlas_action@main
with:
token: ${{ secrets.ATLAS_TOKEN }}
path: ./x/auth/atlas/atlas.toml
dry-run: ${{ github.event_name != 'pull_request' }}
if: env.GIT_DIFF
bank:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: technote-space/get-diff-action@v4
id: git_diff
with:
PATTERNS: |
x/bank/atlas/**
- uses: marbar3778/atlas_action@main
with:
token: ${{ secrets.ATLAS_TOKEN }}
path: ./x/bank/atlas/atlas.toml
dry-run: ${{ github.event_name != 'pull_request' }}
if: env.GIT_DIFF
evidence:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: technote-space/get-diff-action@v4
id: git_diff
with:
PATTERNS: |
x/evidence/atlas/**
- uses: marbar3778/atlas_action@main
with:
token: ${{ secrets.ATLAS_TOKEN }}
path: ./x/evidence/atlas/manifest.toml
dry-run: ${{ github.event_name != 'pull_request' }}
if: env.GIT_DIFF
25 changes: 25 additions & 0 deletions .github/workflows/check-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Check docs build
# This workflow runs when a PR is labeled with `docs`
# This will check if the docs build successfully by running `npm run build`
on:
pull_request:
types: [ labeled ]

jobs:
check-docs-build:
if: ${{ github.event.label.name == 'docs' }}

name: Check docs build
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2.3.1
with:
persist-credentials: false
fetch-depth: 0

- name: Install dependencies and build docs 🧱
run: |
cd docs
npm install
npm run build
31 changes: 0 additions & 31 deletions .github/workflows/docs.yml

This file was deleted.

16 changes: 16 additions & 0 deletions .github/workflows/janitor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Janitor
# Janitor cleans up previous runs of various workflows
# Cancels Sims and Tests
on:
pull_request:

jobs:
cancel:
name: "Cancel Previous Runs"
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- uses: styfle/cancel-workflow-action@0.9.0
with:
workflow_id: 872925,1013614,1134055
access_token: ${{ github.token }}
11 changes: 11 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: "Pull Request Labeler"
on:
- pull_request_target

jobs:
labeler:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@main
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- uses: golangci/golangci-lint-action@master
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.28
version: v1.39
args: --timeout 10m
github-token: ${{ secrets.github_token }}
if: env.GIT_DIFF
7 changes: 7 additions & 0 deletions .github/workflows/proto-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ jobs:
fi
TAGS="${DOCKER_IMAGE}:${VERSION}"
echo ::set-output name=tags::${TAGS}
- name: Set up QEMU
uses: docker/setup-qemu-action@master
with:
platforms: all

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

Expand All @@ -42,5 +48,6 @@ jobs:
with:
context: ./contrib/devtools
file: ./contrib/devtools/dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.prep.outputs.tags }}
13 changes: 11 additions & 2 deletions .github/workflows/proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,28 @@ name: Protobuf
# This workflow is only run when a .proto file has been changed
on:
pull_request:
paths:
- "**.proto"

jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@master
- uses: technote-space/get-diff-action@v4
with:
PATTERNS: |
**/**.proto
- name: lint
run: make proto-lint
if: env.GIT_DIFF
breakage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: technote-space/get-diff-action@v4
with:
PATTERNS: |
**/**.proto
- name: check-breakage
run: make proto-check-breaking
if: env.GIT_DIFF
12 changes: 2 additions & 10 deletions .github/workflows/release-sims.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,6 @@ on:
- "rc**"

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'"

build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip-sims')"
Expand All @@ -30,7 +22,7 @@ jobs:
- name: install runsim
run: |
export GO111MODULE="on" && go get github.com/cosmos/tools/cmd/runsim@v1.0.0
- uses: actions/cache@v2.1.3
- uses: actions/cache@v2.1.5
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
Expand All @@ -40,7 +32,7 @@ jobs:
needs: [build, install-runsim]
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2.1.3
- uses: actions/cache@v2.1.5
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
Expand Down
Loading

0 comments on commit 9f22fb4

Please sign in to comment.