Skip to content

Commit

Permalink
Merge branch 'main' into charly/1916_solomachine_assert
Browse files Browse the repository at this point in the history
  • Loading branch information
charleenfei committed Nov 15, 2022
2 parents 5a95a05 + 3e072a1 commit bcb9e09
Show file tree
Hide file tree
Showing 33 changed files with 496 additions and 299 deletions.
35 changes: 29 additions & 6 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,41 @@ are the most critical to review.

closes: #XXXX


### Commit Message / Changelog Entry

```bash
type: commit message
```

see the [guidelines](../CONTRIBUTING.md#commit-messages) for commit messages. (view raw markdown for examples)


<!--
Example commit messages:
fix: skip emission of unpopulated memo field in ics20
deps: updating sdk to v0.46.4
chore: removed unused variables
e2e: adding e2e upgrade test for ibc-go/v6
docs: ics27 v6 documentation updates
feat: add semantic version utilities for e2e tests
feat(api)!: this is an api breaking feature
fix(statemachine)!: this is a statemachine breaking fix
-->

---

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

- [ ] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting)).
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/building-modules/10-structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing).
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`).
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md`
- [ ] Re-reviewed `Files changed` in the Github PR explorer
- [ ] Review `Codecov Report` in the comment section below once CI passes
- [ ] Provide a [commit message](../CONTRIBUTING.md#commit-messages) to be used for the changelog entry in the PR description for review.
- [ ] Re-reviewed `Files changed` in the Github PR explorer.
- [ ] Review `Codecov Report` in the comment section below once CI passes.
10 changes: 10 additions & 0 deletions .github/compatibility-test-matrices/unreleased/client.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"chain-a": ["release-v6.0.x", "release-v5.1.x", "release-v5.0.x", "release-v4.2.x", "release-v3.4.x", "release-v2.5.x"],
"chain-b": ["release-v6.0.x", "release-v5.1.x", "release-v5.0.x", "release-v4.2.x", "release-v3.4.x", "release-v2.5.x"],
"entrypoint": ["TestClientTestSuite"],
"test": [
"TestClientUpdateProposal_Succeeds"
],
"chain-binary": ["simd"],
"chain-image": ["ghcr.io/cosmos/ibc-go-simd"]
}
10 changes: 10 additions & 0 deletions .github/compatibility-test-matrices/unreleased/connection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"chain-a": ["release-v6.0.x", "release-v5.1.x", "release-v5.0.x", "release-v4.2.x", "release-v3.4.x", "release-v2.5.x"],
"chain-b": ["release-v6.0.x", "release-v5.1.x", "release-v5.0.x", "release-v4.2.x", "release-v3.4.x", "release-v2.5.x"],
"entrypoint": ["TestConnectionTestSuite"],
"test": [
"TestMaxExpectedTimePerBlockParam"
],
"chain-binary": ["simd"],
"chain-image": ["ghcr.io/cosmos/ibc-go-simd"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"chain-a": ["release-v6.0.x", "release-v5.1.x", "release-v5.0.x", "release-v4.2.x"],
"chain-b": ["release-v6.0.x", "release-v5.1.x", "release-v5.0.x", "release-v4.2.x"],
"entrypoint": ["TestIncentivizedTransferTestSuite"],
"test": [
"TestMsgPayPacketFee_AsyncSingleSender_Succeeds",
"TestMsgPayPacketFee_InvalidReceiverAccount",
"TestMultiMsg_MsgPayPacketFeeSingleSender",
"TestMsgPayPacketFee_SingleSender_TimesOut",
"TestPayPacketFeeAsync_SingleSender_NoCounterPartyAddress",
"TestMsgPayPacketFee_AsyncMultipleSenders_Succeeds"
],
"chain-binary": ["simd"],
"chain-image": ["ghcr.io/cosmos/ibc-go-simd"]
}
15 changes: 15 additions & 0 deletions .github/compatibility-test-matrices/unreleased/transfer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"chain-a": ["release-v6.0.x", "release-v5.1.x", "release-v4.2.x", "release-v3.4.x", "release-v2.5.x"],
"chain-b": ["release-v6.0.x", "release-v5.1.x", "release-v4.2.x", "release-v3.4.x", "release-v2.5.x"],
"entrypoint": ["TestTransferTestSuite"],
"test": [
"TestMsgTransfer_Succeeds_Nonincentivized",
"TestMsgTransfer_Fails_InvalidAddress",
"TestMsgTransfer_Timeout_Nonincentivized",
"TestMsgTransfer_WithMemo",
"TestSendEnabledParam",
"TestReceiveEnabledParam"
],
"chain-binary": ["simd"],
"chain-image": ["ghcr.io/cosmos/ibc-go-simd"]
}
6 changes: 3 additions & 3 deletions .github/workflows/e2e-compatibility-workflow-call.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
on:
workflow_call:
inputs:
docker-tag:
description: 'Docker tag being used'
test-file-directory:
description: 'Directory containing compatibility matrices'
required: true
type: string
test-suite:
Expand All @@ -21,7 +21,7 @@ jobs:
- run: |
# use jq -c to put the full json contents on a single line. This is required when using the json body
# to create the matrix in the following job.
test_matrix="$(cat .github/compatibility-test-matrices/${{ inputs.docker-tag }}/${{ inputs.test-suite }}.json | jq -c)"
test_matrix="$(cat .github/compatibility-test-matrices/${{ inputs.test-file-directory }}/${{ inputs.test-suite }}.json | jq -c)"
echo $test_matrix
echo "::set-output name=test-matrix::$test_matrix"
id: set-test-matrix
Expand Down
60 changes: 39 additions & 21 deletions .github/workflows/e2e-compatibility.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
workflow_dispatch:
inputs:
release-branch:
description: 'Release branch to test'
description: 'Release branch to test (unreleased to run all release branches against each other)'
required: true
type: choice
options:
Expand All @@ -13,6 +13,7 @@ on:
- release/v5.0.x
- release/v5.1.x
- release/v6.0.x
- unreleased

env:
REGISTRY: ghcr.io
Expand All @@ -21,49 +22,66 @@ env:
RELEASE_BRANCH: '${{ inputs.release-branch }}'

jobs:
determine-docker-tag:
determine-test-directory:
runs-on: ubuntu-latest
outputs:
docker-tag: ${{ steps.set-docker-tag.outputs.docker-tag }}
test-directory: ${{ steps.set-test-dir.outputs.test-directory }}
steps:
- run: |
docker_tag="$(echo $RELEASE_BRANCH | sed 's/\//-/')"
echo $docker_tag
echo "::set-output name=docker-tag::$docker_tag"
id: set-docker-tag
test_dir="$(echo $RELEASE_BRANCH | sed 's/\//-/')"
echo $test_dir
echo "::set-output name=test-directory::$test_dir"
id: set-test-dir
build-release-image:
# build-release-images builds all docker images that are relevant for the compatibility tests. If a single release
# branch is specified, only that image will be built, e.g. release-v6.0.x but if 'unreleased' is specified
# every image will be built.
build-release-images:
runs-on: ubuntu-latest
needs: determine-docker-tag
strategy:
matrix:
release-branch:
- release/v2.5.x
- release/v3.4.x
- release/v4.2.x
- release/v5.0.x
- release/v5.1.x
- release/v6.0.x
steps:
- uses: actions/checkout@v3
if: env.RELEASE_BRANCH == 'unreleased' || env.RELEASE_BRANCH == matrix.release-branch
with:
ref: "${{ env.RELEASE_BRANCH }}"
ref: "${{ matrix.release-branch }}"
fetch-depth: 0
- name: Log in to the Container registry
if: env.RELEASE_BRANCH == 'unreleased' || env.RELEASE_BRANCH == matrix.release-branch
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Fetch Makefile dependencies
if: env.RELEASE_BRANCH == 'unreleased' || env.RELEASE_BRANCH == matrix.release-branch
run: |
mkdir -p contrib/devtools
curl https://raw.githubusercontent.com/cosmos/ibc-go/main/contrib/devtools/Makefile -o contrib/devtools/Makefile
- name: Fetch latest Dockerfile
if: env.RELEASE_BRANCH == 'unreleased' || env.RELEASE_BRANCH == matrix.release-branch
run: curl https://raw.githubusercontent.com/cosmos/ibc-go/main/Dockerfile -o Dockerfile
- name: Build image
if: env.RELEASE_BRANCH == 'unreleased' || env.RELEASE_BRANCH == matrix.release-branch
run: |
docker build . -t "${REGISTRY}/${ORG}/${IMAGE_NAME}:${{ needs.determine-docker-tag.outputs.docker-tag }}"
docker push "${REGISTRY}/${ORG}/${IMAGE_NAME}:${{ needs.determine-docker-tag.outputs.docker-tag }}"
docker_tag="$(echo ${{ matrix.release-branch }} | sed 's/\//-/')"
docker build . -t "${REGISTRY}/${ORG}/${IMAGE_NAME}:$docker_tag"
docker push "${REGISTRY}/${ORG}/${IMAGE_NAME}:$docker_tag"
transfer:
needs:
- build-release-image
- determine-docker-tag
- build-release-images
- determine-test-directory
uses: ./.github/workflows/e2e-compatibility-workflow-call.yaml
with:
docker-tag: "${{ needs.determine-docker-tag.outputs.docker-tag }}"
test-file-directory: "${{ needs.determine-test-directory.outputs.test-directory }}"
test-suite: "transfer"

transfer-params:
Expand All @@ -86,18 +104,18 @@ jobs:

client:
needs:
- build-release-image
- determine-docker-tag
- build-release-images
- determine-test-directory
uses: ./.github/workflows/e2e-compatibility-workflow-call.yaml
with:
docker-tag: "${{ needs.determine-docker-tag.outputs.docker-tag }}"
test-file-directory: "${{ needs.determine-test-directory.outputs.test-directory }}"
test-suite: "client"

incentivized-transfer:
needs:
- build-release-image
- determine-docker-tag
- build-release-images
- determine-test-directory
uses: ./.github/workflows/e2e-compatibility-workflow-call.yaml
with:
docker-tag: "${{ needs.determine-docker-tag.outputs.docker-tag }}"
test-file-directory: "${{ needs.determine-test-directory.outputs.test-directory }}"
test-suite: "incentivized-transfer"
2 changes: 1 addition & 1 deletion .github/workflows/golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
go-version: 1.18
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3.3.0
uses: golangci/golangci-lint-action@v3.3.1
with:
version: latest
args: --timeout 5m
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Types of changes (Stanzas):
"Bug Fixes" for any bug fixes.
"Client Breaking" for breaking CLI commands and REST routes used by end-users.
"API Breaking" for breaking exported APIs used by developers building on SDK.
"State Machine Breaking" for any changes that result in a different AppState given same genesisState and txList.
"State Machine Breaking" for any changes that result in a different AppState given the same genesisState and txList.
Ref: https://keepachangelog.com/en/1.0.0/
-->

Expand Down Expand Up @@ -69,6 +69,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
### State Machine Breaking

* (light-clients/07-tendermint) [\#2554](https://github.com/cosmos/ibc-go/pull/2554) Forbid negative values for `TrustingPeriod`, `UnbondingPeriod` and `MaxClockDrift` (as specified in ICS-07).
* (06-solomachine) [\#2744](https://github.com/cosmos/ibc-go/pull/2744) `Misbehaviour.ValidateBasic()` now only enforces that signature data does not match when the signature paths are different.

### Improvements

Expand Down
23 changes: 23 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,29 @@ All PRs require an approval from at least one CODEOWNER before merge. PRs which
- If you sat down with the PR submitter and did a pairing review please note that in the `Approval`, or your PR comments.
- If you are only making "surface level" reviews, submit any notes as `Comments` without adding a review.

### Commit Messages

Commit messages should be [conventional](https://www.conventionalcommits.org/en/v1.0.0/).

If opening a PR, include the proposed commit message in the PR description.

The commit message type should be one of:

* `feat` / `feature` for feature work.
* `bug` / `fix` for bug fixes.
* `imp` / `improvements` for improvements.
* `doc` / `docs` / `documentation` for any documentation changes.
* `test` / `e2e` for addition or improvements of unit, integration and e2e tests or their corresponding infrastructure.
* `deprecated` for deprecation changes.
* `deps` / `build` for changes to dependencies.
* `chore` / `misc` / `nit` for any miscellaneous changes that don't fit into another category.

**Note**: If any change is breaking, the following format must be used:
* `type` + `(api)!` for api breaking changes, e.g. `fix(api)!: api breaking fix`
* `type` + `(statemachine)!` for state machine breaking changes, e.g. `fix(statemachine)!: state machine breaking fix`

**`api` breaking changes take precedence over `statemachine` breaking changes.**

### Updating Documentation

If you open a PR on ibc-go, it is mandatory to update the relevant documentation in /docs.
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ view-docs:
@cd docs && \
npm install && npm run serve


changelog:
docker run --rm -v "$$(pwd)"/.git:/app/ -v "$$(pwd)/cliff.toml":/app/cliff.toml orhunp/git-cliff:latest --unreleased --tag $(tag)

.PHONY: build-docs

###############################################################################
Expand Down
Loading

0 comments on commit bcb9e09

Please sign in to comment.