Skip to content

Commit

Permalink
Merge branch 'main' into carlos/update-light-client-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
charleenfei authored Apr 3, 2024
2 parents e4e9db6 + 50d2a08 commit 3c4c2a7
Show file tree
Hide file tree
Showing 84 changed files with 2,702 additions and 530 deletions.
8 changes: 8 additions & 0 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,14 @@ pull_request_rules:
backport:
branches:
- release/v7.3.x
- name: backport patches to v7.4.x branch
conditions:
- base=main
- label=backport-to-v7.4.x
actions:
backport:
branches:
- release/v7.4.x
- name: backport patches to v8.0.x branch
conditions:
- base=main
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/callbacks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,16 @@ jobs:
run: |
cd modules/apps/callbacks
go test -v -mod=readonly ./...
code-analysis:
if: github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: sonarcloud
if: ${{ env.GIT_DIFF && !github.event.pull_request.draft && env.SONAR_TOKEN != null }}
uses: SonarSource/sonarcloud-github-action@v2.1.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: modules/apps/callbacks/
projectBaseDir: modules/apps/callbacks/
8 changes: 6 additions & 2 deletions .github/workflows/capability.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ jobs:
GOARCH=${{ matrix.go-arch }} go build ./...
tests:
if: github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -35,11 +34,16 @@ jobs:
run: |
cd modules/capability
go test -v -mod=readonly ./...
code-analysis:
if: github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: sonarcloud
if: ${{ env.GIT_DIFF && !github.event.pull_request.draft && env.SONAR_TOKEN != null }}
uses: SonarSource/sonarcloud-github-action@v2.1.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: modules/capability/
projectBaseDir: modules/capability/
33 changes: 33 additions & 0 deletions .github/workflows/e2emodule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: E2E Unit tests/Lint.
# This workflow runs when a PR is opened that targets code that is part of the e2e module.
on:
pull_request:
paths:
- '.github/workflows/e2emodule.yml'
- 'e2e/**'

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v5
with:
go-version: '1.21'
- uses: actions/checkout@v4
- uses: golangci/golangci-lint-action@v4.0.0
with:
version: v1.54.2
args: --timeout 5m
working-directory: e2e/

tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Go Test
run: |
cd e2e
go test -v -mod=readonly ./... -tags='test_e2e'
2 changes: 1 addition & 1 deletion .github/workflows/markdown-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: tj-actions/changed-files@v43
- uses: tj-actions/changed-files@v44
id: changed-files
with:
files: '**/*.md'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:
name: '${{ github.sha }}-${{ matrix.part }}-coverage'
path: ./${{ matrix.part }}profile.out

repo-analysis:
code-analysis:
if: github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]'
runs-on: ubuntu-latest
needs: [tests]
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/wasm-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ jobs:
GOARCH=${{ matrix.go-arch }} CGO_ENABLED=1 go build ./...
tests:
if: github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -56,6 +55,11 @@ jobs:
run: |
cd modules/light-clients/08-wasm
go test -v -mod=readonly ./...
code-analysis:
if: github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: sonarcloud
if: ${{ env.GIT_DIFF && !github.event.pull_request.draft && env.SONAR_TOKEN != null }}
uses: SonarSource/sonarcloud-github-action@v2.1.1
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Ref: https://keepachangelog.com/en/1.0.0/

* (core/02-client, light-clients) [\#5806](https://github.com/cosmos/ibc-go/pull/5806) Decouple light client routing from their encoding structure.
* (core/04-channel) [\#5991](https://github.com/cosmos/ibc-go/pull/5991) The client CLI `QueryLatestConsensusState` has been removed.
* (light-clients/06-solomachine) [\#6037](https://github.com/cosmos/ibc-go/pull/6037) Remove `Initialize` function from `ClientState` and move logic to `Initialize` function of `LightClientModule`.

### State Machine Breaking

Expand All @@ -51,6 +52,9 @@ Ref: https://keepachangelog.com/en/1.0.0/

### Features

* (apps/27-interchain-accounts) [\#5785](https://github.com/cosmos/ibc-go/pull/5785) Introduce a new tx message that ICA host submodule can use to query the chain (only those marked with `module_query_safe`) and write the responses to the acknowledgement.
* (core) [\#6055](https://github.com/cosmos/ibc-go/pull/6055) Introduce a new interface `ConsensusHost` used to validate an IBC `ClientState` and `ConsensusState` against the host chain's underlying consensus parameters.

### Bug Fixes

## [v8.1.0](https://github.com/cosmos/ibc-go/releases/tag/v8.1.0) - 2024-01-31
Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@ clean:

.PHONY: distclean clean

#? build-docker-wasm: Build wasm simapp with specified tag.
build-docker-wasm:
./scripts/build-wasm-simapp-docker.sh $(tag)

.PHONY: build-docker-wasm

###############################################################################
### Tools & Dependencies ###
###############################################################################
Expand Down Expand Up @@ -385,7 +391,6 @@ proto-update-deps:

.PHONY: proto-all proto-gen proto-gen-any proto-swagger-gen proto-format proto-lint proto-check-breaking proto-update-deps


#? help: Get more info on make commands
help: Makefile
@echo " Choose a command run in "$(PROJECT_NAME)":"
Expand Down
4 changes: 4 additions & 0 deletions docs/docs/05-migrations/13-v8-to-v9.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ The following functions have also been removed from the `ClientState` interface:

Please check also the [Light client developer guide](../03-light-clients/01-developer-guide/01-overview.md) for more information. The light client module implementation for `07-tendermint` may also be useful as reference.

### 06-solomachine

The `Initialize` function in `ClientState` has been removed and all its logic has been moved to the implemention of the `LightClientModule` interface `Initialize` function.

### 07-tendermint

The `IterateConsensusMetadata` function has been removed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func BeginBlocker(ctx sdk.Context, k keeper.Keeper) {
}
```

The above calls into the the 09-localhost `UpdateState` method of the `ClientState` .
The above calls into the 09-localhost `UpdateState` method of the `ClientState` .
It retrieves the current block height from the application context and sets the `LatestHeight` of the 09-localhost client.

```go
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type MsgPayPacketFee struct{
```

The `Fee` message contained in this synchronous fee payment method configures different fees which will be paid out for `MsgRecvPacket`, `MsgAcknowledgement`, and `MsgTimeout`/`MsgTimeoutOnClose`.
The amount of fees escrowed in total is the denomwise maxiumum of `RecvFee + AckFee` and `TimeoutFee`. This is because we do not know whether the packet will be successfully received and acknowledged or whether it will timeout.
The amount of fees escrowed in total is the denomwise maximum of `RecvFee + AckFee` and `TimeoutFee`. This is because we do not know whether the packet will be successfully received and acknowledged or whether it will timeout.

```go
type Fee struct {
Expand Down
8 changes: 4 additions & 4 deletions e2e/tests/interchain_accounts/base_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (s *InterchainAccountsTestSuite) testMsgSendTxSuccessfulTransfer(order chan
var err error
hostAccount, err = s.QueryInterchainAccount(ctx, chainA, controllerAddress, ibctesting.FirstConnectionID)
s.Require().NoError(err)
s.Require().NotZero(len(hostAccount))
s.Require().NotEmpty(hostAccount)

channels, err := relayer.GetChannels(ctx, s.GetRelayerExecReporter(), chainA.Config().ChainID)
s.Require().NoError(err)
Expand Down Expand Up @@ -189,7 +189,7 @@ func (s *InterchainAccountsTestSuite) TestMsgSendTx_FailedTransfer_InsufficientF
var err error
hostAccount, err = s.QueryInterchainAccount(ctx, chainA, controllerAddress, ibctesting.FirstConnectionID)
s.Require().NoError(err)
s.Require().NotZero(len(hostAccount))
s.Require().NotEmpty(hostAccount)

channels, err := relayer.GetChannels(ctx, s.GetRelayerExecReporter(), chainA.Config().ChainID)
s.Require().NoError(err)
Expand Down Expand Up @@ -287,7 +287,7 @@ func (s *InterchainAccountsTestSuite) TestMsgSendTx_SuccessfulTransfer_AfterReop
var err error
hostAccount, err = s.QueryInterchainAccount(ctx, chainA, controllerAddress, ibctesting.FirstConnectionID)
s.Require().NoError(err)
s.Require().NotZero(len(hostAccount))
s.Require().NotEmpty(hostAccount)

_, err = s.QueryChannel(ctx, chainA, portID, initialChannelID)
s.Require().NoError(err)
Expand Down Expand Up @@ -467,7 +467,7 @@ func (s *InterchainAccountsTestSuite) testMsgSendTxSuccessfulGovProposal(order c
var err error
hostAccount, err = s.QueryInterchainAccount(ctx, chainA, controllerAddress, ibctesting.FirstConnectionID)
s.Require().NoError(err)
s.Require().NotZero(len(hostAccount))
s.Require().NotEmpty(hostAccount)

channels, err := relayer.GetChannels(ctx, s.GetRelayerExecReporter(), chainA.Config().ChainID)
s.Require().NoError(err)
Expand Down
12 changes: 6 additions & 6 deletions e2e/tests/interchain_accounts/localhost_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_Localhost(
t.Run("verify interchain account registration and deposit funds", func(t *testing.T) {
interchainAccAddress, err := s.QueryInterchainAccount(ctx, chainA, userAWallet.FormattedAddress(), exported.LocalhostConnectionID)
s.Require().NoError(err)
s.Require().NotZero(len(interchainAccAddress))
s.Require().NotEmpty(interchainAccAddress)

walletAmount := ibc.WalletAmount{
Address: interchainAccAddress,
Expand All @@ -136,7 +136,7 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_Localhost(
t.Run("send packet localhost interchain accounts", func(t *testing.T) {
interchainAccAddress, err := s.QueryInterchainAccount(ctx, chainA, userAWallet.FormattedAddress(), exported.LocalhostConnectionID)
s.Require().NoError(err)
s.Require().NotZero(len(interchainAccAddress))
s.Require().NotEmpty(interchainAccAddress)

msgSend := &banktypes.MsgSend{
FromAddress: interchainAccAddress,
Expand Down Expand Up @@ -277,7 +277,7 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_ReopenChan
t.Run("verify interchain account registration and deposit funds", func(t *testing.T) {
interchainAccAddress, err := s.QueryInterchainAccount(ctx, chainA, userAWallet.FormattedAddress(), exported.LocalhostConnectionID)
s.Require().NoError(err)
s.Require().NotZero(len(interchainAccAddress))
s.Require().NotEmpty(interchainAccAddress)

walletAmount := ibc.WalletAmount{
Address: interchainAccAddress,
Expand All @@ -291,7 +291,7 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_ReopenChan
t.Run("send localhost interchain accounts packet with timeout", func(t *testing.T) {
interchainAccAddress, err := s.QueryInterchainAccount(ctx, chainA, userAWallet.FormattedAddress(), exported.LocalhostConnectionID)
s.Require().NoError(err)
s.Require().NotZero(len(interchainAccAddress))
s.Require().NotEmpty(interchainAccAddress)

msgSend := &banktypes.MsgSend{
FromAddress: interchainAccAddress,
Expand Down Expand Up @@ -407,7 +407,7 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_ReopenChan
t.Run("verify interchain account and existing balance", func(t *testing.T) {
interchainAccAddress, err := s.QueryInterchainAccount(ctx, chainA, userAWallet.FormattedAddress(), exported.LocalhostConnectionID)
s.Require().NoError(err)
s.Require().NotZero(len(interchainAccAddress))
s.Require().NotEmpty(interchainAccAddress)

balance, err := s.QueryBalance(ctx, chainA, interchainAccAddress, chainADenom)
s.Require().NoError(err)
Expand All @@ -419,7 +419,7 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_ReopenChan
t.Run("send packet localhost interchain accounts", func(t *testing.T) {
interchainAccAddress, err := s.QueryInterchainAccount(ctx, chainA, userAWallet.FormattedAddress(), exported.LocalhostConnectionID)
s.Require().NoError(err)
s.Require().NotZero(len(interchainAccAddress))
s.Require().NotEmpty(interchainAccAddress)

msgSend := &banktypes.MsgSend{
FromAddress: interchainAccAddress,
Expand Down
Loading

0 comments on commit 3c4c2a7

Please sign in to comment.