Skip to content

Commit

Permalink
Merge branch 'main' into fumpt
Browse files Browse the repository at this point in the history
  • Loading branch information
vuong177 authored May 9, 2022
2 parents 0ab4208 + af3d522 commit 848d8ab
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 70 deletions.
42 changes: 21 additions & 21 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,6 @@ pull_request_rules:
commit_message_template: |
{{ title }} (#{{ number }})
{{ body }}
- name: backport patches to v1.1.x branch
conditions:
- base=main
- label=backport-to-v1.1.x
actions:
backport:
branches:
- release/v1.1.x
- name: backport patches to v1.2.x branch
conditions:
- base=main
- label=backport-to-v1.2.x
actions:
backport:
branches:
- release/v1.2.x
- name: backport patches to v1.3.x branch
conditions:
- base=main
Expand All @@ -49,15 +33,15 @@ pull_request_rules:
actions:
backport:
branches:
- release/v1.4.x
- name: backport patches to v2.0.x branch
- release/v1.4.x
- name: backport patches to v1.5.x branch
conditions:
- base=main
- label=backport-to-v2.0.x
- label=backport-to-v1.5.x
actions:
backport:
branches:
- release/v2.0.x
- release/v1.5.x
- name: backport patches to v2.1.x branch
conditions:
- base=main
Expand All @@ -73,7 +57,15 @@ pull_request_rules:
actions:
backport:
branches:
- release/v2.2.x
- release/v2.2.x
- name: backport patches to v2.3.x branch
conditions:
- base=main
- label=backport-to-v2.3.x
actions:
backport:
branches:
- release/v2.3.x
- name: backport patches to v3.0.x branch
conditions:
- base=main
Expand All @@ -82,3 +74,11 @@ pull_request_rules:
backport:
branches:
- release/v3.0.x
- name: backport patches to v3.1.x branch
conditions:
- base=main
- label=backport-to-v3.1.x
actions:
backport:
branches:
- release/v3.1.x
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ Ref: https://keepachangelog.com/en/1.0.0/

### Dependencies

* [\#1247](https://github.com/cosmos/ibc-go/pull/1247) Bump SDK version to v0.45.3 and Tendermint to version 0.34.19
* [\#1300](https://github.com/cosmos/ibc-go/pull/1300) Bump SDK version to v0.45.4

### API Breaking

* (transfer) [\#1250](https://github.com/cosmos/ibc-go/pull/1250) Deprecate `GetTransferAccount` since the `transfer` module account is never used.
* (modules/29-fee)[\#1338](https://github.com/cosmos/ibc-go/pull/1338) Renaming `Result` field in `IncentivizedAcknowledgement` to `AppAcknowledgement`.

### State Machine Breaking

Expand Down
2 changes: 1 addition & 1 deletion docs/ibc/proto-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ IncentivizedAcknowledgement is the acknowledgement format to be used by applicat

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `result` | [bytes](#bytes) | | the underlying app acknowledgement result bytes |
| `app_acknowledgement` | [bytes](#bytes) | | the underlying app acknowledgement bytes |
| `forward_relayer_address` | [string](#string) | | the relayer address which submits the recv packet message |
| `underlying_app_success` | [bool](#bool) | | success flag of the base application callback |

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alp
require (
github.com/armon/go-metrics v0.3.11
github.com/confio/ics23/go v0.7.0
github.com/cosmos/cosmos-sdk v0.45.3
github.com/cosmos/cosmos-sdk v0.45.4
github.com/gogo/protobuf v1.3.3
github.com/golang/protobuf v1.5.2
github.com/gorilla/mux v1.8.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfc
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/cosmos/btcutil v1.0.4 h1:n7C2ngKXo7UC9gNyMNLbzqz7Asuf+7Qv4gnX/rOdQ44=
github.com/cosmos/btcutil v1.0.4/go.mod h1:Ffqc8Hn6TJUdDgHBwIZLtrLQC1KdJ9jGJl/TvgUaxbU=
github.com/cosmos/cosmos-sdk v0.45.3 h1:PiVSU3IkNEDPhoxOZHk2lPnhwBBJgEYAtAR0jGXRN4g=
github.com/cosmos/cosmos-sdk v0.45.3/go.mod h1:qYm5JEr0ZlbnmoP/Q3b+dYMOliHf4ddHirpILiwZzqg=
github.com/cosmos/cosmos-sdk v0.45.4 h1:eStDAhJdMY8n5arbBRe+OwpNeBSunxSBHp1g55ulfdA=
github.com/cosmos/cosmos-sdk v0.45.4/go.mod h1:WOqtDxN3eCCmnYLVla10xG7lEXkFjpTaqm2a2WasgCc=
github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y=
github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY=
github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw=
Expand Down
4 changes: 2 additions & 2 deletions modules/apps/29-fee/ibc_middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ func (im IBCMiddleware) OnAcknowledgementPacket(
// for fee enabled channels
//
// Please see ADR 004 for more information.
return im.app.OnAcknowledgementPacket(ctx, packet, ack.Result, relayer)
return im.app.OnAcknowledgementPacket(ctx, packet, ack.AppAcknowledgement, relayer)
}

packetID := channeltypes.NewPacketId(packet.SourcePort, packet.SourceChannel, packet.Sequence)
Expand All @@ -239,7 +239,7 @@ func (im IBCMiddleware) OnAcknowledgementPacket(
}

// call underlying callback
return im.app.OnAcknowledgementPacket(ctx, packet, ack.Result, relayer)
return im.app.OnAcknowledgementPacket(ctx, packet, ack.AppAcknowledgement, relayer)
}

// OnTimeoutPacket implements the IBCMiddleware interface
Expand Down
10 changes: 5 additions & 5 deletions modules/apps/29-fee/ibc_middleware_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ func (suite *FeeTestSuite) TestOnRecvPacket() {
forwardAddr, _ := suite.chainB.GetSimApp().IBCFeeKeeper.GetCounterpartyAddress(suite.chainB.GetContext(), suite.chainA.SenderAccount.GetAddress().String(), suite.path.EndpointB.ChannelID)

expectedAck := types.IncentivizedAcknowledgement{
Result: ibcmock.MockAcknowledgement.Acknowledgement(),
AppAcknowledgement: ibcmock.MockAcknowledgement.Acknowledgement(),
ForwardRelayerAddress: forwardAddr,
UnderlyingAppSuccess: true,
}
Expand All @@ -544,7 +544,7 @@ func (suite *FeeTestSuite) TestOnRecvPacket() {

case !tc.forwardRelayer:
expectedAck := types.IncentivizedAcknowledgement{
Result: ibcmock.MockAcknowledgement.Acknowledgement(),
AppAcknowledgement: ibcmock.MockAcknowledgement.Acknowledgement(),
ForwardRelayerAddress: "",
UnderlyingAppSuccess: true,
}
Expand Down Expand Up @@ -583,7 +583,7 @@ func (suite *FeeTestSuite) TestOnAcknowledgementPacket() {
suite.chainA.GetSimApp().IBCFeeKeeper.DeleteFeesInEscrow(suite.chainA.GetContext(), packetID)

ack = types.IncentivizedAcknowledgement{
Result: ibcmock.MockAcknowledgement.Acknowledgement(),
AppAcknowledgement: ibcmock.MockAcknowledgement.Acknowledgement(),
ForwardRelayerAddress: suite.chainA.SenderAccount.GetAddress().String(),
}.Acknowledgement()

Expand Down Expand Up @@ -625,7 +625,7 @@ func (suite *FeeTestSuite) TestOnAcknowledgementPacket() {
blockedAddr := suite.chainA.GetSimApp().AccountKeeper.GetModuleAccount(suite.chainA.GetContext(), transfertypes.ModuleName).GetAddress()

ack = types.IncentivizedAcknowledgement{
Result: ibcmock.MockAcknowledgement.Acknowledgement(),
AppAcknowledgement: ibcmock.MockAcknowledgement.Acknowledgement(),
ForwardRelayerAddress: blockedAddr.String(),
}.Acknowledgement()

Expand Down Expand Up @@ -672,7 +672,7 @@ func (suite *FeeTestSuite) TestOnAcknowledgementPacket() {

// must be changed explicitly
ack = types.IncentivizedAcknowledgement{
Result: ibcmock.MockAcknowledgement.Acknowledgement(),
AppAcknowledgement: ibcmock.MockAcknowledgement.Acknowledgement(),
ForwardRelayerAddress: relayerAddr.String(),
}.Acknowledgement()

Expand Down
2 changes: 1 addition & 1 deletion modules/apps/29-fee/types/ack.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
// NewIncentivizedAcknowledgement creates a new instance of IncentivizedAcknowledgement
func NewIncentivizedAcknowledgement(relayer string, ack []byte, success bool) IncentivizedAcknowledgement {
return IncentivizedAcknowledgement{
Result: ack,
AppAcknowledgement: ack,
ForwardRelayerAddress: relayer,
UnderlyingAppSuccess: success,
}
Expand Down
69 changes: 35 additions & 34 deletions modules/apps/29-fee/types/ack.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions proto/ibc/applications/fee/v1/ack.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import "gogoproto/gogo.proto";

// IncentivizedAcknowledgement is the acknowledgement format to be used by applications wrapped in the fee middleware
message IncentivizedAcknowledgement {
// the underlying app acknowledgement result bytes
bytes result = 1;
// the underlying app acknowledgement bytes
bytes app_acknowledgement = 1 [(gogoproto.moretags) = "yaml:\"app_acknowledgement\""];
// the relayer address which submits the recv packet message
string forward_relayer_address = 2 [(gogoproto.moretags) = "yaml:\"forward_relayer_address\""];
// success flag of the base application callback
Expand Down

0 comments on commit 848d8ab

Please sign in to comment.