Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update to 0.47 #2672

Merged
merged 64 commits into from
Jan 13, 2023
Merged
Changes from 1 commit
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
4ac4c4e
fix some tests and codegen
tac0turtle Nov 3, 2022
a7c259c
remove third party
tac0turtle Nov 3, 2022
a09e632
`make proto-gen`
julienrbrt Nov 3, 2022
88a9127
more changes
tac0turtle Nov 3, 2022
be4e24a
build
tac0turtle Nov 3, 2022
361893d
remove pulsar and use untagged version 0.47
julienrbrt Nov 3, 2022
884abbf
update ibctest
julienrbrt Nov 3, 2022
6eead9b
updates
julienrbrt Nov 4, 2022
fe2f2c2
bump go + cleanup
julienrbrt Nov 4, 2022
b24bce6
Merge branch 'main' into marko/0.47-test
crodriguezvega Dec 5, 2022
3ca60cf
update imports
crodriguezvega Dec 6, 2022
6282362
chore: update ics23 proto to cosmos/ics23 buf tag
colin-axner Dec 7, 2022
a5aa59a
chore: update imports, bump deps to cosmos/ics23 latest commit, sdk v…
colin-axner Dec 7, 2022
6ac95e1
fix: use our custom SignAndDeliver function
colin-axner Dec 7, 2022
1293374
Merge branch 'main' of github.com:cosmos/ibc-go into marko/0.47-test
colin-axner Dec 7, 2022
bda2e77
chore: remove unnecessary function
colin-axner Dec 7, 2022
e668b89
Merge branch 'main' of github.com:cosmos/ibc-go into marko/0.47-test
colin-axner Dec 7, 2022
e86ca8b
fix: migration tests
colin-axner Dec 7, 2022
778af45
Merge branch 'main' into marko/0.47-test
crodriguezvega Dec 8, 2022
aa56946
fix for interchain accounts tests
crodriguezvega Dec 12, 2022
4f3435e
setting the legacy router at the right location
crodriguezvega Dec 12, 2022
48b73c0
fix rosetta in root.go (#2914)
faddat Dec 12, 2022
3c9878c
chore: apply fix from Carlos, remove mock from blocked address list
colin-axner Dec 12, 2022
b0b636f
Merge branch 'main' into marko/0.47-test
colin-axner Dec 12, 2022
3d2135f
chore: bump e2e go.mod
colin-axner Dec 12, 2022
a5badea
chore: remove ignore on ics23 proofs.proto
colin-axner Dec 12, 2022
334d0eb
chore: uncomment test
colin-axner Dec 12, 2022
52f5587
pinning buf deps
damiannolan Dec 12, 2022
9e96ae1
use configuration value instead of constant
crodriguezvega Dec 12, 2022
0a5d8b7
Merge branch 'marko/0.47-test' of https://github.com/cosmos/ibc-go in…
crodriguezvega Dec 12, 2022
a40a22d
revert sdk buf dependency and readd comment
damiannolan Dec 12, 2022
645fbe2
Merge branch 'main' of github.com:cosmos/ibc-go into marko/0.47-test
colin-axner Dec 12, 2022
241db2c
Merge branch 'main' into marko/0.47-test
colin-axner Dec 12, 2022
65d5b06
Merge branch 'main' of github.com:cosmos/ibc-go into marko/0.47-test
colin-axner Dec 12, 2022
b9a7cbc
Merge branch 'marko/0.47-test' of github.com:cosmos/ibc-go into marko…
colin-axner Dec 12, 2022
30963e4
update genutil app module basic
julienrbrt Dec 12, 2022
ded2d7a
Merge branch 'main' into marko/0.47-test
charleenfei Dec 12, 2022
66d363e
Merge branch 'main' into marko/0.47-test
crodriguezvega Dec 12, 2022
d230ffe
remove unnecessary conversion
crodriguezvega Dec 12, 2022
6a9f0d7
Merge branch 'marko/0.47-test' of https://github.com/cosmos/ibc-go in…
crodriguezvega Dec 12, 2022
f1410da
use ibctest 0.47 branch
julienrbrt Dec 13, 2022
b4aa89b
Dynamically determine gov genesis state (#2931)
chatton Dec 14, 2022
3226aeb
Merge branch 'main' into marko/0.47-test
damiannolan Dec 15, 2022
39a9be4
use latest sdk with pointer for upgrade module in app (#2955)
faddat Dec 19, 2022
7a47bb8
update to latest sdk
damiannolan Dec 20, 2022
2f3cacf
Merge branch 'main' into marko/0.47-test
damiannolan Dec 20, 2022
6e26617
go mod tidy
damiannolan Dec 20, 2022
476e813
updating to go 1.19 in dockerfile
damiannolan Dec 20, 2022
73b7d81
go mod tidy e2e
damiannolan Dec 20, 2022
69ad106
readding module name event emissions across core and apps
damiannolan Dec 20, 2022
10d1737
Merge branch 'main' into marko/0.47-test
damiannolan Dec 20, 2022
1261891
Merge branch 'main' into marko/0.47-test
tac0turtle Jan 12, 2023
0b7b448
update
tac0turtle Jan 12, 2023
f0c2c0f
chore: using newest relayer tag
chatton Jan 12, 2023
f778f3d
chore: updating e2e go mod
chatton Jan 12, 2023
12ec55b
chore: updating go sum
chatton Jan 12, 2023
e0fb890
chore: fixing NewMsgSubmitProposal signature
chatton Jan 12, 2023
fb2c8bf
chore: bump to latest version of 0.47 ibctest PR
chatton Jan 12, 2023
ef2d585
chore: updating to latest ibctest changes
chatton Jan 13, 2023
ddceea4
chore: tests passing with new relayer image
chatton Jan 13, 2023
2dbecfc
chore: merge main
chatton Jan 13, 2023
95c70a6
chore: register all types in the e2e codec
chatton Jan 13, 2023
54e5782
chore: adding additional types to codec
chatton Jan 13, 2023
7c6453c
chore: ensure proposal messages pass validate basic
chatton Jan 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Dynamically determine gov genesis state (#2931)
* chore: dynamically determine gov genesis state

* chore: bump relayer version

* chore: remove duplicate event emissions  (#2934)

* chore: remove duplicate event emissions

* chore: remove additional duplicate events and fix test

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
chatton and colin-axner authored Dec 14, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit b4aa89b0993cbd10bdf5ee426faf189b1dd273ec
2 changes: 1 addition & 1 deletion e2e/testsuite/semver.go → e2e/semverutil/semver.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package testsuite
package semverutil

import (
"golang.org/x/mod/semver"
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package testsuite_test
package semverutil_test

import (
"testing"

"github.com/stretchr/testify/require"

"github.com/cosmos/ibc-go/e2e/testsuite"
"github.com/cosmos/ibc-go/e2e/semverutil"
)

func TestIsSupported(t *testing.T) {
releases := testsuite.FeatureReleases{
releases := semverutil.FeatureReleases{
MajorVersion: "v6",
MinorVersions: []string{
"v2.5",
68 changes: 52 additions & 16 deletions e2e/testconfig/testconfig.go
Original file line number Diff line number Diff line change
@@ -10,11 +10,14 @@ import (
"github.com/cosmos/cosmos-sdk/types/module/testutil"
genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
gogoproto "github.com/cosmos/gogoproto/proto"
"github.com/strangelove-ventures/ibctest/v6/ibc"
tmjson "github.com/tendermint/tendermint/libs/json"
tmtypes "github.com/tendermint/tendermint/types"

"github.com/cosmos/ibc-go/e2e/semverutil"
"github.com/cosmos/ibc-go/e2e/testvalues"
)

@@ -37,7 +40,7 @@ const (
defaultBinary = "simd"
// defaultRlyTag is the tag that will be used if no relayer tag is specified.
// all images are here https://github.com/cosmos/relayer/pkgs/container/relayer/versions
defaultRlyTag = "v2.1.2"
defaultRlyTag = "v2.2.0-rc2"
// defaultChainTag is the tag that will be used for the chains if none is specified.
defaultChainTag = "main"
)
@@ -176,6 +179,12 @@ func newDefaultSimappConfig(cc ChainConfig, name, chainID, denom string) ibc.Cha
}
}

// govGenesisFeatureReleases represents the releases the governance module genesis
// was upgraded from v1beta1 to v1.
var govGenesisFeatureReleases = semverutil.FeatureReleases{
MajorVersion: "v7",
}

// defaultModifyGenesis will only modify governance params to ensure the voting period and minimum deposit
// are functional for e2e testing purposes.
func defaultModifyGenesis() func(ibc.ChainConfig, []byte) ([]byte, error) {
@@ -190,22 +199,9 @@ func defaultModifyGenesis() func(ibc.ChainConfig, []byte) ([]byte, error) {
return nil, fmt.Errorf("failed to unmarshal genesis bytes into app state: %w", err)
}

cfg := testutil.MakeTestEncodingConfig()
govv1beta1.RegisterInterfaces(cfg.InterfaceRegistry)
cdc := codec.NewProtoCodec(cfg.InterfaceRegistry)

govGenesisState := &govv1beta1.GenesisState{}
if err := cdc.UnmarshalJSON(appState[govtypes.ModuleName], govGenesisState); err != nil {
return nil, fmt.Errorf("failed to unmarshal genesis bytes into gov genesis state: %w", err)
}

// set correct minimum deposit using configured denom
govGenesisState.DepositParams.MinDeposit = sdk.NewCoins(sdk.NewCoin(chainConfig.Denom, govv1beta1.DefaultMinDepositTokens))
govGenesisState.VotingParams.VotingPeriod = testvalues.VotingPeriod

govGenBz, err := cdc.MarshalJSON(govGenesisState)
govGenBz, err := modifyGovAppState(chainConfig, appState[govtypes.ModuleName])
if err != nil {
return nil, fmt.Errorf("failed to marshal gov genesis state: %w", err)
return nil, err
}

appState[govtypes.ModuleName] = govGenBz
@@ -223,3 +219,43 @@ func defaultModifyGenesis() func(ibc.ChainConfig, []byte) ([]byte, error) {
return bz, nil
}
}

// modifyGovAppState takes the existing gov app state and marshals it to either a govv1 GenesisState
// or a govv1beta1 GenesisState depending on the simapp version.
func modifyGovAppState(chainConfig ibc.ChainConfig, govAppState json.RawMessage) ([]byte, error) {
cfg := testutil.MakeTestEncodingConfig()

cdc := codec.NewProtoCodec(cfg.InterfaceRegistry)
govv1.RegisterInterfaces(cfg.InterfaceRegistry)
govv1beta1.RegisterInterfaces(cfg.InterfaceRegistry)

shouldUseGovV1 := govGenesisFeatureReleases.IsSupported(chainConfig.Images[0].Version)

var govGenesisState gogoproto.Message
if shouldUseGovV1 {
govGenesisState = &govv1.GenesisState{}
} else {
govGenesisState = &govv1beta1.GenesisState{}
}

if err := cdc.UnmarshalJSON(govAppState, govGenesisState); err != nil {
return nil, fmt.Errorf("failed to unmarshal genesis bytes into gov genesis state: %w", err)
}

switch v := govGenesisState.(type) {
case *govv1.GenesisState:
// set correct minimum deposit using configured denom
v.Params.MinDeposit = sdk.NewCoins(sdk.NewCoin(chainConfig.Denom, govv1beta1.DefaultMinDepositTokens))
vp := testvalues.VotingPeriod
v.Params.VotingPeriod = &vp
case *govv1beta1.GenesisState:
v.DepositParams.MinDeposit = sdk.NewCoins(sdk.NewCoin(chainConfig.Denom, govv1beta1.DefaultMinDepositTokens))
v.VotingParams.VotingPeriod = testvalues.VotingPeriod
}
govGenBz, err := cdc.MarshalJSON(govGenesisState)
if err != nil {
return nil, fmt.Errorf("failed to marshal gov genesis state: %w", err)
}

return govGenBz, nil
}
3 changes: 2 additions & 1 deletion e2e/tests/transfer/base_test.go
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@ import (
test "github.com/strangelove-ventures/ibctest/v6/testutil"
"github.com/stretchr/testify/suite"

"github.com/cosmos/ibc-go/e2e/semverutil"
"github.com/cosmos/ibc-go/e2e/testsuite"
"github.com/cosmos/ibc-go/e2e/testvalues"
transfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types"
@@ -379,7 +380,7 @@ func (s *TransferTestSuite) TestReceiveEnabledParam() {
}

// memoFeatureReleases represents the releases the memo field was released in.
var memoFeatureReleases = testsuite.FeatureReleases{
var memoFeatureReleases = semverutil.FeatureReleases{
MajorVersion: "v6",
MinorVersions: []string{
"v2.5",
Original file line number Diff line number Diff line change
@@ -13,7 +13,6 @@ import (
// details if any.
func EmitAcknowledgementEvent(ctx sdk.Context, packet exported.PacketI, ack exported.Acknowledgement, err error) {
attributes := []sdk.Attribute{
sdk.NewAttribute(sdk.AttributeKeyModule, icatypes.ModuleName),
sdk.NewAttribute(icatypes.AttributeKeyControllerChannelID, packet.GetDestChannel()),
sdk.NewAttribute(icatypes.AttributeKeyAckSuccess, fmt.Sprintf("%t", ack.Success())),
}
Original file line number Diff line number Diff line change
@@ -83,9 +83,8 @@ func (suite *KeeperTestSuite) TestRegisterInterchainAccount_MsgServer() {
suite.Require().Equal(expectedChannelID, res.ChannelId)

events := ctx.EventManager().Events()
suite.Require().Len(events, 2)
suite.Require().Len(events, 1)
suite.Require().Equal(events[0].Type, channeltypes.EventTypeChannelOpenInit)
suite.Require().Equal(events[1].Type, sdk.EventTypeMessage)
} else {
suite.Require().Error(err)
suite.Require().Nil(res)
1 change: 0 additions & 1 deletion modules/apps/27-interchain-accounts/host/keeper/events.go
Original file line number Diff line number Diff line change
@@ -13,7 +13,6 @@ import (
// details if any.
func EmitAcknowledgementEvent(ctx sdk.Context, packet exported.PacketI, ack exported.Acknowledgement, err error) {
attributes := []sdk.Attribute{
sdk.NewAttribute(sdk.AttributeKeyModule, icatypes.ModuleName),
sdk.NewAttribute(icatypes.AttributeKeyHostChannelID, packet.GetDestChannel()),
sdk.NewAttribute(icatypes.AttributeKeyAckSuccess, fmt.Sprintf("%t", ack.Success())),
}
12 changes: 0 additions & 12 deletions modules/apps/29-fee/keeper/events.go
Original file line number Diff line number Diff line change
@@ -37,10 +37,6 @@ func EmitIncentivizedPacketEvent(ctx sdk.Context, packetID channeltypes.PacketId
sdk.NewAttribute(types.AttributeKeyAckFee, totalAckFees.String()),
sdk.NewAttribute(types.AttributeKeyTimeoutFee, totalTimeoutFees.String()),
),
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName),
),
})
}

@@ -53,10 +49,6 @@ func EmitRegisterPayeeEvent(ctx sdk.Context, relayer, payee, channelID string) {
sdk.NewAttribute(types.AttributeKeyPayee, payee),
sdk.NewAttribute(types.AttributeKeyChannelID, channelID),
),
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName),
),
})
}

@@ -69,9 +61,5 @@ func EmitRegisterCounterpartyPayeeEvent(ctx sdk.Context, relayer, counterpartyPa
sdk.NewAttribute(types.AttributeKeyCounterpartyPayee, counterpartyPayee),
sdk.NewAttribute(types.AttributeKeyChannelID, channelID),
),
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName),
),
})
}
3 changes: 0 additions & 3 deletions modules/apps/transfer/ibc_module.go
Original file line number Diff line number Diff line change
@@ -189,7 +189,6 @@ func (im IBCModule) OnRecvPacket(
}

eventAttributes := []sdk.Attribute{
sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName),
sdk.NewAttribute(sdk.AttributeKeySender, data.Sender),
sdk.NewAttribute(types.AttributeKeyReceiver, data.Receiver),
sdk.NewAttribute(types.AttributeKeyDenom, data.Denom),
@@ -236,7 +235,6 @@ func (im IBCModule) OnAcknowledgementPacket(
ctx.EventManager().EmitEvent(
sdk.NewEvent(
types.EventTypePacket,
sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName),
sdk.NewAttribute(sdk.AttributeKeySender, data.Sender),
sdk.NewAttribute(types.AttributeKeyReceiver, data.Receiver),
sdk.NewAttribute(types.AttributeKeyDenom, data.Denom),
@@ -284,7 +282,6 @@ func (im IBCModule) OnTimeoutPacket(
ctx.EventManager().EmitEvent(
sdk.NewEvent(
types.EventTypeTimeout,
sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName),
sdk.NewAttribute(types.AttributeKeyRefundReceiver, data.Sender),
sdk.NewAttribute(types.AttributeKeyRefundDenom, data.Denom),
sdk.NewAttribute(types.AttributeKeyRefundAmount, data.Amount),
4 changes: 0 additions & 4 deletions modules/apps/transfer/keeper/msg_server.go
Original file line number Diff line number Diff line change
@@ -50,10 +50,6 @@ func (k Keeper) Transfer(goCtx context.Context, msg *types.MsgTransfer) (*types.
sdk.NewAttribute(types.AttributeKeyDenom, msg.Token.Denom),
sdk.NewAttribute(types.AttributeKeyMemo, msg.Memo),
),
sdk.NewEvent(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the recent SDK changes, you need to re-add that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, missed this when pulling in the latest sdk, reverting the changes atm. Thanks for the getting the updates to baseapp in so quick 🧙

sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName),
),
})

return &types.MsgTransferResponse{Sequence: sequence}, nil
12 changes: 0 additions & 12 deletions modules/core/02-client/keeper/events.go
Original file line number Diff line number Diff line change
@@ -23,10 +23,6 @@ func EmitCreateClientEvent(ctx sdk.Context, clientID string, clientState exporte
sdk.NewAttribute(types.AttributeKeyClientType, clientState.ClientType()),
sdk.NewAttribute(types.AttributeKeyConsensusHeight, clientState.GetLatestHeight().String()),
),
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
),
})
}

@@ -58,10 +54,6 @@ func EmitUpdateClientEvent(ctx sdk.Context, clientID string, clientType string,
sdk.NewAttribute(types.AttributeKeyConsensusHeights, strings.Join(consensusHeightsAttr, ",")),
sdk.NewAttribute(types.AttributeKeyHeader, clientMsgStr),
),
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
),
})
}

@@ -74,10 +66,6 @@ func EmitUpgradeClientEvent(ctx sdk.Context, clientID string, clientState export
sdk.NewAttribute(types.AttributeKeyClientType, clientState.ClientType()),
sdk.NewAttribute(types.AttributeKeyConsensusHeight, clientState.GetLatestHeight().String()),
),
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
),
})
}

16 changes: 0 additions & 16 deletions modules/core/03-connection/keeper/events.go
Original file line number Diff line number Diff line change
@@ -16,10 +16,6 @@ func EmitConnectionOpenInitEvent(ctx sdk.Context, connectionID string, clientID
sdk.NewAttribute(types.AttributeKeyCounterpartyClientID, counterparty.ClientId),
sdk.NewAttribute(types.AttributeKeyCounterpartyConnectionID, counterparty.ConnectionId),
),
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
),
})
}

@@ -33,10 +29,6 @@ func EmitConnectionOpenTryEvent(ctx sdk.Context, connectionID string, clientID s
sdk.NewAttribute(types.AttributeKeyCounterpartyClientID, counterparty.ClientId),
sdk.NewAttribute(types.AttributeKeyCounterpartyConnectionID, counterparty.ConnectionId),
),
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
),
})
}

@@ -50,10 +42,6 @@ func EmitConnectionOpenAckEvent(ctx sdk.Context, connectionID string, connection
sdk.NewAttribute(types.AttributeKeyCounterpartyClientID, connectionEnd.Counterparty.ClientId),
sdk.NewAttribute(types.AttributeKeyCounterpartyConnectionID, connectionEnd.Counterparty.ConnectionId),
),
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
),
})
}

@@ -67,9 +55,5 @@ func EmitConnectionOpenConfirmEvent(ctx sdk.Context, connectionID string, connec
sdk.NewAttribute(types.AttributeKeyCounterpartyClientID, connectionEnd.Counterparty.ClientId),
sdk.NewAttribute(types.AttributeKeyCounterpartyConnectionID, connectionEnd.Counterparty.ConnectionId),
),
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
),
})
}
49 changes: 0 additions & 49 deletions modules/core/04-channel/keeper/events.go
Original file line number Diff line number Diff line change
@@ -23,13 +23,6 @@ func EmitChannelOpenInitEvent(ctx sdk.Context, portID string, channelID string,
sdk.NewAttribute(types.AttributeVersion, channel.Version),
),
})

ctx.EventManager().EmitEvents(sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
),
})
}

// EmitChannelOpenTryEvent emits a channel open try event
@@ -45,12 +38,6 @@ func EmitChannelOpenTryEvent(ctx sdk.Context, portID string, channelID string, c
sdk.NewAttribute(types.AttributeVersion, channel.Version),
),
})
ctx.EventManager().EmitEvents(sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
),
})
}

// EmitChannelOpenAckEvent emits a channel open acknowledge event
@@ -64,10 +51,6 @@ func EmitChannelOpenAckEvent(ctx sdk.Context, portID string, channelID string, c
sdk.NewAttribute(types.AttributeCounterpartyChannelID, channel.Counterparty.ChannelId),
sdk.NewAttribute(types.AttributeKeyConnectionID, channel.ConnectionHops[0]),
),
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
),
})
}

@@ -82,10 +65,6 @@ func EmitChannelOpenConfirmEvent(ctx sdk.Context, portID string, channelID strin
sdk.NewAttribute(types.AttributeCounterpartyChannelID, channel.Counterparty.ChannelId),
sdk.NewAttribute(types.AttributeKeyConnectionID, channel.ConnectionHops[0]),
),
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
),
})
}

@@ -100,10 +79,6 @@ func EmitChannelCloseInitEvent(ctx sdk.Context, portID string, channelID string,
sdk.NewAttribute(types.AttributeCounterpartyChannelID, channel.Counterparty.ChannelId),
sdk.NewAttribute(types.AttributeKeyConnectionID, channel.ConnectionHops[0]),
),
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
),
})
}

@@ -118,10 +93,6 @@ func EmitChannelCloseConfirmEvent(ctx sdk.Context, portID string, channelID stri
sdk.NewAttribute(types.AttributeCounterpartyChannelID, channel.Counterparty.ChannelId),
sdk.NewAttribute(types.AttributeKeyConnectionID, channel.ConnectionHops[0]),
),
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
),
})
}

@@ -145,10 +116,6 @@ func EmitSendPacketEvent(ctx sdk.Context, packet exported.PacketI, channel types
// (is it going to a chain I am connected to)
sdk.NewAttribute(types.AttributeKeyConnection, channel.ConnectionHops[0]),
),
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
),
})
}

@@ -172,10 +139,6 @@ func EmitRecvPacketEvent(ctx sdk.Context, packet exported.PacketI, channel types
// (is it going to a chain I am connected to)
sdk.NewAttribute(types.AttributeKeyConnection, channel.ConnectionHops[0]),
),
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
),
})
}

@@ -199,10 +162,6 @@ func EmitWriteAcknowledgementEvent(ctx sdk.Context, packet exported.PacketI, cha
// (is it going to a chain I am connected to)
sdk.NewAttribute(types.AttributeKeyConnection, channel.ConnectionHops[0]),
),
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
),
})
}

@@ -224,10 +183,6 @@ func EmitAcknowledgePacketEvent(ctx sdk.Context, packet exported.PacketI, channe
// (is it going to a chain I am connected to)
sdk.NewAttribute(types.AttributeKeyConnection, channel.ConnectionHops[0]),
),
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
),
})
}

@@ -246,10 +201,6 @@ func EmitTimeoutPacketEvent(ctx sdk.Context, packet exported.PacketI, channel ty
sdk.NewAttribute(types.AttributeKeyDstChannel, packet.GetDestChannel()),
sdk.NewAttribute(types.AttributeKeyChannelOrdering, channel.Ordering.String()),
),
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
),
})
}