Skip to content

Commit

Permalink
Cuonglm/merge master to fuzz packages (#9057)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cuong Manh Le authored Apr 6, 2021
1 parent bdec2b2 commit 82410fc
Show file tree
Hide file tree
Showing 1,445 changed files with 92,904 additions and 123,363 deletions.
2 changes: 1 addition & 1 deletion build.sh → .build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set -ue
# - DEBUG

# Source builder's functions library
. /usr/local/share/cosmos-sdk/buildlib.sh
. /usr/local/share/tendermint/buildlib.sh

# These variables are now available
# - BASEDIR
Expand Down
64 changes: 0 additions & 64 deletions .circleci/config.yml

This file was deleted.

9 changes: 6 additions & 3 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@ coverage:
threshold: 1% # allow this much decrease on project
app:
target: 70%
flags: app
flags:
- app
modules:
target: 70%
flags: modules
flags:
- modules
client:
flags: client
flags:
- client
changes: false

comment:
Expand Down
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"]
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
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
1 change: 1 addition & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Documentation
# This job builds and deploys documenation to github pages.
# It runs on every push to master.
on:
push:
branches:
- master

jobs:
build-and-deploy:
runs-on: ubuntu-latest
container:
image: tendermintdev/docker-website-deployment
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2.3.1
with:
persist-credentials: false
fetch-depth: 0

- name: Install and Build 🔧
run: |
apk add rsync
make build-docs LEDGER_ENABLED=false
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@4.1.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: ~/output
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.8.0
with:
workflow_id: 872925,1013614,1134055
access_token: ${{ github.token }}
2 changes: 1 addition & 1 deletion .github/workflows/linkchecker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: gaurav-nelson/github-action-markdown-link-check@1.0.8
- uses: gaurav-nelson/github-action-markdown-link-check@1.0.12
with:
folder-path: "docs"
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
53 changes: 53 additions & 0 deletions .github/workflows/proto-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Build & Push SDK Proto Builder
on:
pull_request:
push:
branches:
- master
paths:
- "contrib/devtools/dockerfile"

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Prepare
id: prep
run: |
DOCKER_IMAGE=tendermintdev/sdk-proto-gen
VERSION=noop
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
elif [[ $GITHUB_REF == refs/heads/* ]]; then
VERSION=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's#/+#-#g')
if [ "${{ github.event.repository.default_branch }}" = "$VERSION" ]; then
VERSION=latest
fi
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

- name: Login to DockerHub
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUBTM_USERNAME }}
password: ${{ secrets.DOCKERHUBTM_TOKEN }}

- name: Publish to Docker Hub
uses: docker/build-push-action@v2
with:
context: ./contrib/devtools
file: ./contrib/devtools/dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.prep.outputs.tags }}
17 changes: 13 additions & 4 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-docker
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-docker
run: make proto-check-breaking
if: env.GIT_DIFF
Loading

0 comments on commit 82410fc

Please sign in to comment.