Skip to content

Commit

Permalink
Merge branch 'main' into feat/cosmos#20219
Browse files Browse the repository at this point in the history
  • Loading branch information
Teyz authored Oct 3, 2024
2 parents 169433d + a4a0107 commit 09aff1b
Show file tree
Hide file tree
Showing 326 changed files with 9,191 additions and 8,135 deletions.
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}`);
13 changes: 1 addition & 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
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
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,18 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i
* (client/keys) [#21829](https://github.com/cosmos/cosmos-sdk/pull/21829) Add support for importing hex key using standard input.
* (x/validate) [#21822](https://github.com/cosmos/cosmos-sdk/pull/21822) New module solely responsible for providing ante/post handlers and tx validators for v2. It can be extended by the app developer to provide extra tx validators.
* In comparison to x/auth/tx/config, there is no app config to skip ante/post handlers, as overwriting them in baseapp or not injecting the x/validate module has the same effect.
* (baeapp) [#21979](https://github.com/cosmos/cosmos-sdk/pull/21979) Create CheckTxHandler to allow extending the logic of CheckTx.

### Improvements

* (sims) [#21613](https://github.com/cosmos/cosmos-sdk/pull/21613) Add sims2 framework and factory methods for simpler message factories in modules
* (modules) [#21963](https://github.com/cosmos/cosmos-sdk/pull/21963) Duplicatable metrics are no more collected in modules. They were unecessary overhead.

### Bug Fixes

* (sims) [21906](https://github.com/cosmos/cosmos-sdk/pull/21906) Skip sims test when running dry on validators
* (sims) [#21952](https://github.com/cosmos/cosmos-sdk/pull/21952) Use liveness matrix for validator sign status in sims
* (sims) [#21906](https://github.com/cosmos/cosmos-sdk/pull/21906) Skip sims test when running dry on validators
* (cli) [#21919](https://github.com/cosmos/cosmos-sdk/pull/21919) Query address-by-acc-num by account_id instead of id.

### API Breaking Changes

Expand Down Expand Up @@ -138,6 +142,7 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i
* (internal) [#21412](https://github.com/cosmos/cosmos-sdk/pull/21412) Using unsafe.String and unsafe.SliceData.
* (client) [#21436](https://github.com/cosmos/cosmos-sdk/pull/21436) Use `address.Codec` from client.Context in `tx.Sign`.
* (x/genutil) [#21249](https://github.com/cosmos/cosmos-sdk/pull/21249) Incremental JSON parsing for AppGenesis where possible.
* (testnet) [#21941](https://github.com/cosmos/cosmos-sdk/pull/21941) Regenerate addrbook.json for in place testnet.

### Bug Fixes

Expand Down
2 changes: 1 addition & 1 deletion CODING_GUIDELINES.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Make sure your code is well tested:
We expect tests to use `require` or `assert` rather than `t.Skip` or `t.Fail`,
unless there is a reason to do otherwise.
When testing a function under a variety of different inputs, we prefer to use
[table driven tests](https://github.com/golang/go/wiki/TableDrivenTests).
[table driven tests](https://go.dev/wiki/TableDrivenTests).
Table driven test error messages should follow the following format
`<desc>, tc #<index>, i #<index>`.
`<desc>` is an optional short description of what's failing, `tc` is the
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ that you would like early feedback and tagging whoever you would like to receive
Codeowners are marked automatically as the reviewers.

All PRs require at least two review approvals before they can be merged (one review might be acceptable in
the case of minor changes to [docs](./.github/PULL_REQUEST_TEMPLATE/docs.md) changes that do not affect production code). Each PR template has a reviewers checklist that must be completed before the PR can be merged. Each reviewer is responsible
the case of minor changes to docs changes that do not affect production code). Each PR template has a reviewers checklist that must be completed before the PR can be merged. Each reviewer is responsible
for all checked items unless they have indicated otherwise by leaving their handle next to specific
items. In addition, use the following review explanations:

Expand Down Expand Up @@ -236,7 +236,7 @@ Within the Cosmos SDK we have two forms of documenting decisions, Request For Co

## Dependencies

We use [Go Modules](https://github.com/golang/go/wiki/Modules) to manage
We use [Go Modules](https://go.dev/wiki/Modules) to manage
dependency versions.

The main branch of every Cosmos repository should just build with `go get`,
Expand Down Expand Up @@ -300,7 +300,7 @@ For example, in vscode your `.vscode/settings.json` should look like:

User-facing repos should adhere to the trunk based development branching model: https://trunkbaseddevelopment.com. User branches should start with a user name, example: `{moniker}/{issue#}-branch-name`.

The Cosmos SDK repository is a [multi Go module](https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository) repository. It means that we have more than one Go module in a single repository.
The Cosmos SDK repository is a [multi Go module](https://go.dev/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository) repository. It means that we have more than one Go module in a single repository.

The Cosmos SDK utilizes [semantic versioning](https://semver.org/).

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ include scripts/build/build.mk

.DEFAULT_GOAL := help

#? go.sum: Run go mod tidy and ensure dependencies have not been modified
#? go.sum: Run go mod tidy and ensure dependencies have not been modified.
go.sum: go.mod
echo "Ensure dependencies have not been modified ..." >&2
go mod verify
Expand Down
7 changes: 1 addition & 6 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,8 @@ If you follow these guidelines when reporting an issue to us, we commit to:

### More information

* See [TIMELINE.md] for an example timeline of a disclosure.
* See [DISCLOSURE.md] to see more into the inner workings of the disclosure
process.
* See [EXAMPLES.md] for some of the examples that we are interested in for the
bug bounty program.

[h1]: https://hackerone.com/cosmos
[TIMELINE.md]: https://github.com/cosmos/security/blob/main/TIMELINE.md
[DISCLOSURE.md]: https://github.com/cosmos/security/blob/main/DISCLOSURE.md
[EXAMPLES.md]: https://github.com/cosmos/security/blob/main/EXAMPLES.md
[EXAMPLES.md]: https://github.com/interchainio/security/blob/main/resources/CLASSIFICATION_MATRIX.md#real-world-examples
2 changes: 1 addition & 1 deletion UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ simd config migrate v0.50

If you were using `<appd> config [key]` or `<appd> config [key] [value]` to set and get values from the `client.toml`, replace it with `<appd> config get client [key]` and `<appd> config set client [key] [value]`. The extra verbosity is due to the extra functionalities added in config.

More information about [confix](https://docs.cosmos.network/main/tooling/confix) and how to add it in your application binary in the [documentation](https://docs.cosmos.network/main/tooling/confix).
More information about [confix](https://docs.cosmos.network/main/build/tooling/confix) and how to add it in your application binary in the [documentation](https://docs.cosmos.network/main/build/tooling/confix).

#### gRPC-Web

Expand Down
Loading

0 comments on commit 09aff1b

Please sign in to comment.