Skip to content

Commit

Permalink
Merge branch 'main' into marko/serverv2-adr
Browse files Browse the repository at this point in the history
  • Loading branch information
tac0turtle authored Oct 4, 2024
2 parents c0af712 + dc14960 commit 197a549
Show file tree
Hide file tree
Showing 872 changed files with 31,142 additions and 20,764 deletions.
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
/server/v2/stf/ @testinginprod @kocubinski @cosmos/sdk-core-dev
/server/v2/appmanager/ @testinginprod @facundomedica @cosmos/sdk-core-dev
/server/v2/cometbft/ @facundomedica @sontrinh16 @cosmos/sdk-core-dev
/simsx @alpe @facundomedica @kocubinski @cosmos/sdk-core-dev
/simapp/ @facundomedica @julienrbrt @cosmos/sdk-core-dev
/simapp/v2/ @kocubinski @julienrbrt @cosmos/sdk-core-dev
/store/ @cool-develope @kocubinski @cosmos/sdk-core-dev
Expand All @@ -37,11 +38,13 @@
/tools/hubl @julienrbrt @JulianToledano @cosmos/sdk-core-dev
/tools/cosmovisor @julienrbrt @facundomedica @cosmos/sdk-core-dev
/tools/confix @julienrbrt @akhilkumarpilli @cosmos/sdk-core-dev
/tests/integration/aminojson @kocubinski @cosmos/sdk-core-dev

# x modules

/x/accounts/ @testinginprod @sontrinh16 @cosmos/sdk-core-dev
/x/auth/ @facundomedica @testinginprod @aaronc @cosmos/sdk-core-dev
/x/auth/tx/config @julienrbrt @akhilkumarpilli @kocubinski @cosmos/sdk-core-dev
/x/authz/ @akhilkumarpilli @raynaudoe @cosmos/sdk-core-dev
/x/bank/ @julienrbrt @sontrinh16 @cosmos/sdk-core-dev
/x/bank/v2 @julienrbrt @hieuvubk @akhilkumarpilli @cosmos/sdk-core-dev
Expand All @@ -63,6 +66,7 @@
/x/staking/ @facundomedica @testinginprod @JulianToledano @ziscky @cosmos/sdk-core-dev
/x/tx/ @kocubinski @testinginprod @aaronc @cosmos/sdk-core-dev
/x/upgrade/ @facundomedica @cool-develope @akhilkumarpilli @lucaslopezf @cosmos/sdk-core-dev
/x/validate @julienrbrt @akhilkumarpilli @kocubinski @cosmos/sdk-core-dev

# go mods

Expand Down
4 changes: 3 additions & 1 deletion .github/ISSUE_TEMPLATE/qa.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,20 @@ v without deliberation
* [ ] Audit x/auth
* [ ] Audit x/authz
* [ ] Audit x/bank
* [ ] Audit x/bank/v2
* [ ] Audit x/circuit
* [ ] Audit x/consensus
* [ ] Audit x/crisis
* [ ] 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/simulation
* [ ] Audit x/protocolpool
* [ ] Audit x/slashing
* [ ] Audit x/staking
* [ ] Audit x/tx
Expand Down
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,15 @@ updates:
labels:
- "A:automerge"
- dependencies
- package-ecosystem: gomod
directory: "x/accounts/defaults/base"
schedule:
interval: weekly
day: wednesday
time: "02:45"
labels:
- "A:automerge"
- dependencies
- package-ecosystem: gomod
directory: "x/accounts/defaults/multisig"
schedule:
Expand Down
6 changes: 6 additions & 0 deletions .github/pr_labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
"C:Keys":
- client/keys/**/*
"C:Simulations":
- types/simulation/**/*
- x/simulation/**/*
- x/*/simulation/**/*
- simsx/**/*
"C:Store":
- store/**/*
"C:collections":
Expand All @@ -28,6 +30,8 @@
- indexer/postgres/**/*
"C:x/accounts":
- x/accounts/**/*
"C:x/accounts/base":
- x/accounts/defaults/base/**/*
"C:x/accounts/multisig":
- x/accounts/defaults/multisig/**/*
"C:x/accounts/lockup":
Expand Down Expand Up @@ -76,6 +80,8 @@
- x/upgrade/**/*
"C:x/epochs":
- x/epochs/**/*
"C:x/validate":
- x/validate/**/*
"C:server/v2":
- server/v2/**/*
"C:server/v2 stf":
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/auto-assign-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Auto Assign Reviewers

on:
pull_request:
types: [opened, edited, review_requested]

jobs:
assign-reviewers:
runs-on: ubuntu-latest

steps:
- name: Check out the repository
uses: actions/checkout@v4

- name: Assign reviewers as assignees
uses: actions/github-script@v7
with:
github-token: ${{ secrets.PRBOT_PAT }}
script: |
const { owner, repo } = context.repo;
async function getCurrentPR() {
if (context.payload.pull_request) {
return context.payload.pull_request;
}
const allPRs = await github.rest.pulls.list({
owner,
repo,
state: 'open',
});
return allPRs.data.find(pr => pr.head.sha === context.sha);
}
const pr = await getCurrentPR();
if (!pr) {
console.log('No matching PR found.');
return;
}
console.log(`Processing PR #${pr.number}`);
const reviewers = pr.requested_reviewers.map(reviewer => reviewer.login);
if (reviewers.length === 0) {
console.log('No reviewers found for this PR.');
return;
}
console.log(`Current reviewers: ${reviewers.join(', ')}`);
await github.rest.issues.addAssignees({
owner,
repo,
issue_number: pr.number,
assignees: reviewers,
});
console.log(`Assigned ${reviewers.join(', ')} as assignees to PR #${pr.number}`);
2 changes: 1 addition & 1 deletion .github/workflows/dependabot-update-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,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"
52 changes: 52 additions & 0 deletions .github/workflows/pr-reminder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: PR Review Reminder

on:
schedule:
- cron: '0 9 * * 1-5' # Every weekday at 9:00 AM UTC

permissions:
pull-requests: read

jobs:
pr-review:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: List open pull requests using GitHub Script
uses: actions/github-script@v7
id: pr-list
with:
script: |
const { data: pullRequests } = await github.rest.pulls.list({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
});
let table = '';
pullRequests.forEach(pr => {
const assignees = pr.assignees.length > 0 ? `Assignees: ${pr.assignees.map(assignee => assignee.login).join(', ')}` : 'No assignees';
table += pr.draft ? '' : `
Title: ${pr.title}
Link: <${pr.html_url}>
Assigness: ${assignees}
`;
});
return table;
- name: Send Slack Reminder
if: steps.pr-list.outputs.result != ''
uses: rtCamp/[email protected]
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: pr-github
SLACK_USERNAME: PR-Reminder
MSG_MINIMAL: true
SLACK_ICON_EMOJI: ":think:"
SLACK_COLOR: good
SLACKIFY_MARKDOWN: true
SLACK_TITLE: Daily Pull Request Review Reminder
SLACK_MESSAGE: |
${{ steps.pr-list.outputs.result }}
36 changes: 24 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,7 @@ jobs:
name: "${{ github.sha }}-e2e-coverage"
path: ./tests/e2e-profile.out

test-system:
needs: [tests, test-integration, test-e2e]
test-system: # v2 system tests are in v2-test.yml
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -175,16 +174,6 @@ jobs:
run: |
sudo apt-get install -y musl
- name: system tests v1
if: env.GIT_DIFF
run: |
COSMOS_BUILD_OPTIONS=legacy make test-system
- uses: actions/upload-artifact@v3
if: failure()
with:
name: "testnet-setup"
path: ./systemtests/testnet/
retention-days: 3
- name: system tests v2
if: env.GIT_DIFF
run: |
make test-system
Expand Down Expand Up @@ -937,6 +926,29 @@ jobs:
with:
projectBaseDir: x/accounts/

test-x-accounts-base:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.23"
check-latest: true
cache: true
cache-dependency-path: x/accounts/defaults/base/go.sum
- uses: technote-space/[email protected]
id: git_diff
with:
PATTERNS: |
x/accounts/defaults/base/**/*.go
x/accounts/defaults/base/go.mod
x/accounts/defaults/base/go.sum
- name: tests
if: env.GIT_DIFF
run: |
cd x/accounts/defaults/base
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./...
test-x-accounts-lockup:
runs-on: ubuntu-latest
steps:
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/v2-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,43 @@ jobs:
if: env.GIT_DIFF
run: |
cd server/v2/cometbft && go test -mod=readonly -race -timeout 30m -tags='ledger test_ledger_mock'
test-system-v2:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-tags: true
- uses: actions/setup-go@v5
with:
go-version: "1.23"
check-latest: true
cache: true
cache-dependency-path: |
simapp/v2/go.sum
systemtest/go.sum
- uses: technote-space/[email protected]
id: git_diff
with:
PATTERNS: |
**/*.go
go.mod
go.sum
**/go.mod
**/go.sum
**/Makefile
Makefile
- name: Install musl lib for simd (docker) binary
if: env.GIT_DIFF
run: |
sudo apt-get install -y musl
- name: system tests v2
if: env.GIT_DIFF
run: |
COSMOS_BUILD_OPTIONS=v2 make test-system
- uses: actions/upload-artifact@v3
if: failure()
with:
name: "testnet-setup"
path: ./systemtests/testnet/
retention-days: 3
12 changes: 6 additions & 6 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ linters:
- dogsled
- errcheck
- errorlint
- exportloopref
- copyloopvar
- gci
- goconst
- gocritic
Expand Down Expand Up @@ -45,15 +45,15 @@ issues:
- crypto/keys/secp256k1/internal/*
- types/coin_regex.go
exclude-rules:
- text: "ST1003:"
- text: "ST1003:" # We are fine with our current naming
linters:
- stylecheck
# FIXME: Disabled until golangci-lint updates stylecheck with this fix:
# https://github.com/dominikh/go-tools/issues/389
- text: "ST1016:"
- text: "ST1016:" # Ok with inconsistent receiver names
linters:
- stylecheck
- path: "migrations"
- path: "migrations" # migraitions always use deprecated code
text: "SA1019:"
linters:
- staticcheck
Expand All @@ -72,9 +72,9 @@ issues:
- text: "SA1019: params.SendEnabled is deprecated" # TODO remove once ready to remove from the sdk
linters:
- staticcheck
- text: "SA1029: Inappropriate key in context.WithValue" # TODO remove this when dependency is updated
- text: "G115: integer overflow conversion" # We are doing this everywhere.
linters:
- staticcheck
- gosec
- text: "leading space"
linters:
- nolintlint
Expand Down
Loading

0 comments on commit 197a549

Please sign in to comment.