From 44ba6a4d01d2444da7ffd72fda0457c000a2a19d Mon Sep 17 00:00:00 2001 From: beer-1 <147697694+beer-1@users.noreply.github.com> Date: Thu, 27 Jun 2024 16:05:50 +0900 Subject: [PATCH] feat: emit error event at hook failed (#27) * emit error event * bump dependencies to latest --- app/app_test.go | 1 + app/ibc-hooks/ack.go | 49 ++++++++++++++++++++++++++++++++++++++++ app/ibc-hooks/timeout.go | 49 ++++++++++++++++++++++++++++++++++++++++ go.mod | 15 +++++++----- go.sum | 24 ++++++++++---------- integration-tests/go.mod | 17 ++++++++------ integration-tests/go.sum | 24 ++++++++++---------- 7 files changed, 142 insertions(+), 37 deletions(-) diff --git a/app/app_test.go b/app/app_test.go index 6b1c758..9b3c372 100644 --- a/app/app_test.go +++ b/app/app_test.go @@ -79,6 +79,7 @@ func TestInitGenesisOnMigration(t *testing.T) { mockModule.EXPECT().ConsensusVersion().Times(1).Return(uint64(0)) app.ModuleManager.Modules["mock"] = mockModule + app.ModuleManager.OrderMigrations = []string{"mock"} // Run migrations only for "mock" module. We exclude it from // the VersionMap to simulate upgrading with a new module. diff --git a/app/ibc-hooks/ack.go b/app/ibc-hooks/ack.go index 70b9053..d68b4df 100644 --- a/app/ibc-hooks/ack.go +++ b/app/ibc-hooks/ack.go @@ -8,6 +8,7 @@ import ( nfttransfertypes "github.com/initia-labs/initia/x/ibc/nft-transfer/types" ibchooks "github.com/initia-labs/initia/x/ibc-hooks" + "github.com/initia-labs/initia/x/ibc-hooks/types" evmtypes "github.com/initia-labs/minievm/x/evm/types" ) @@ -28,6 +29,12 @@ func (h EVMHooks) onAckIcs20Packet( return nil } else if err != nil { h.evmKeeper.Logger(ctx).Error("failed to parse memo", "error", err) + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeHookFailed, + sdk.NewAttribute(types.AttributeKeyReason, "failed to parse memo"), + sdk.NewAttribute(types.AttributeKeyError, err.Error()), + )) + return nil } @@ -38,9 +45,21 @@ func (h EVMHooks) onAckIcs20Packet( callback := hookData.AsyncCallback if allowed, err := h.checkACL(im, cacheCtx, callback.ContractAddress); err != nil { h.evmKeeper.Logger(cacheCtx).Error("failed to check ACL", "error", err) + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeHookFailed, + sdk.NewAttribute(types.AttributeKeyReason, "failed to check ACL"), + sdk.NewAttribute(types.AttributeKeyError, err.Error()), + )) + return nil } else if !allowed { h.evmKeeper.Logger(cacheCtx).Error("failed to check ACL", "not allowed") + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeHookFailed, + sdk.NewAttribute(types.AttributeKeyReason, "failed to check ACL"), + sdk.NewAttribute(types.AttributeKeyError, "not allowed"), + )) + return nil } @@ -57,6 +76,12 @@ func (h EVMHooks) onAckIcs20Packet( }) if err != nil { h.evmKeeper.Logger(cacheCtx).Error("failed to execute callback", "error", err) + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeHookFailed, + sdk.NewAttribute(types.AttributeKeyReason, "failed to execute callback"), + sdk.NewAttribute(types.AttributeKeyError, err.Error()), + )) + return nil } @@ -83,6 +108,12 @@ func (h EVMHooks) onAckIcs721Packet( return nil } else if err != nil { h.evmKeeper.Logger(ctx).Error("failed to parse memo", "error", err) + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeHookFailed, + sdk.NewAttribute(types.AttributeKeyReason, "failed to parse memo"), + sdk.NewAttribute(types.AttributeKeyError, err.Error()), + )) + return nil } @@ -93,9 +124,21 @@ func (h EVMHooks) onAckIcs721Packet( callback := hookData.AsyncCallback if allowed, err := h.checkACL(im, cacheCtx, callback.ContractAddress); err != nil { h.evmKeeper.Logger(cacheCtx).Error("failed to check ACL", "error", err) + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeHookFailed, + sdk.NewAttribute(types.AttributeKeyReason, "failed to check ACL"), + sdk.NewAttribute(types.AttributeKeyError, err.Error()), + )) + return nil } else if !allowed { h.evmKeeper.Logger(cacheCtx).Error("failed to check ACL", "not allowed") + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeHookFailed, + sdk.NewAttribute(types.AttributeKeyReason, "failed to check ACL"), + sdk.NewAttribute(types.AttributeKeyError, "not allowed"), + )) + return nil } @@ -112,6 +155,12 @@ func (h EVMHooks) onAckIcs721Packet( }) if err != nil { h.evmKeeper.Logger(cacheCtx).Error("failed to execute callback", "error", err) + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeHookFailed, + sdk.NewAttribute(types.AttributeKeyReason, "failed to execute callback"), + sdk.NewAttribute(types.AttributeKeyError, err.Error()), + )) + return nil } diff --git a/app/ibc-hooks/timeout.go b/app/ibc-hooks/timeout.go index 25232bc..ae74c43 100644 --- a/app/ibc-hooks/timeout.go +++ b/app/ibc-hooks/timeout.go @@ -7,6 +7,7 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" ibchooks "github.com/initia-labs/initia/x/ibc-hooks" + "github.com/initia-labs/initia/x/ibc-hooks/types" nfttransfertypes "github.com/initia-labs/initia/x/ibc/nft-transfer/types" evmtypes "github.com/initia-labs/minievm/x/evm/types" @@ -28,6 +29,12 @@ func (h EVMHooks) onTimeoutIcs20Packet( return nil } else if err != nil { h.evmKeeper.Logger(ctx).Error("failed to parse memo", "error", err) + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeHookFailed, + sdk.NewAttribute(types.AttributeKeyReason, "failed to parse memo"), + sdk.NewAttribute(types.AttributeKeyError, err.Error()), + )) + return nil } @@ -38,9 +45,21 @@ func (h EVMHooks) onTimeoutIcs20Packet( callback := hookData.AsyncCallback if allowed, err := h.checkACL(im, cacheCtx, callback.ContractAddress); err != nil { h.evmKeeper.Logger(cacheCtx).Error("failed to check ACL", "error", err) + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeHookFailed, + sdk.NewAttribute(types.AttributeKeyReason, "failed to check ACL"), + sdk.NewAttribute(types.AttributeKeyError, err.Error()), + )) + return nil } else if !allowed { h.evmKeeper.Logger(cacheCtx).Error("failed to check ACL", "not allowed") + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeHookFailed, + sdk.NewAttribute(types.AttributeKeyReason, "failed to check ACL"), + sdk.NewAttribute(types.AttributeKeyError, "not allowed"), + )) + return nil } @@ -57,6 +76,12 @@ func (h EVMHooks) onTimeoutIcs20Packet( }) if err != nil { h.evmKeeper.Logger(cacheCtx).Error("failed to execute callback", "error", err) + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeHookFailed, + sdk.NewAttribute(types.AttributeKeyReason, "failed to execute callback"), + sdk.NewAttribute(types.AttributeKeyError, err.Error()), + )) + return nil } @@ -82,6 +107,12 @@ func (h EVMHooks) onTimeoutIcs721Packet( return nil } else if err != nil { h.evmKeeper.Logger(ctx).Error("failed to parse memo", "error", err) + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeHookFailed, + sdk.NewAttribute(types.AttributeKeyReason, "failed to parse memo"), + sdk.NewAttribute(types.AttributeKeyError, err.Error()), + )) + return nil } @@ -92,9 +123,21 @@ func (h EVMHooks) onTimeoutIcs721Packet( callback := hookData.AsyncCallback if allowed, err := h.checkACL(im, cacheCtx, callback.ContractAddress); err != nil { h.evmKeeper.Logger(cacheCtx).Error("failed to check ACL", "error", err) + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeHookFailed, + sdk.NewAttribute(types.AttributeKeyReason, "failed to check ACL"), + sdk.NewAttribute(types.AttributeKeyError, err.Error()), + )) + return nil } else if !allowed { h.evmKeeper.Logger(cacheCtx).Error("failed to check ACL", "not allowed") + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeHookFailed, + sdk.NewAttribute(types.AttributeKeyReason, "failed to check ACL"), + sdk.NewAttribute(types.AttributeKeyError, "not allowed"), + )) + return nil } @@ -111,6 +154,12 @@ func (h EVMHooks) onTimeoutIcs721Packet( }) if err != nil { h.evmKeeper.Logger(cacheCtx).Error("failed to execute callback", "error", err) + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeHookFailed, + sdk.NewAttribute(types.AttributeKeyReason, "failed to execute callback"), + sdk.NewAttribute(types.AttributeKeyError, err.Error()), + )) + return nil } diff --git a/go.mod b/go.mod index 62bacdc..dee8835 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.22 toolchain go1.22.2 require ( - cosmossdk.io/api v0.7.4 + cosmossdk.io/api v0.7.5 cosmossdk.io/client/v2 v2.0.0-beta.1.0.20240124105859-5ad1805d0e79 cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.11.0 @@ -20,7 +20,7 @@ require ( github.com/cometbft/cometbft v0.38.7 github.com/cosmos/cosmos-db v1.0.2 github.com/cosmos/cosmos-proto v1.0.0-beta.5 - github.com/cosmos/cosmos-sdk v0.50.6 + github.com/cosmos/cosmos-sdk v0.50.7 github.com/cosmos/go-bip39 v1.0.0 github.com/cosmos/gogoproto v1.4.12 github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8 v8.0.2 @@ -33,8 +33,8 @@ require ( github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/hashicorp/go-metrics v0.5.3 github.com/holiman/uint256 v1.2.4 - github.com/initia-labs/OPinit v0.3.1 - github.com/initia-labs/initia v0.3.2 + github.com/initia-labs/OPinit v0.3.2 + github.com/initia-labs/initia v0.3.3 github.com/initia-labs/kvindexer v0.1.3 github.com/initia-labs/kvindexer/submodules/block v0.1.0 github.com/initia-labs/kvindexer/submodules/pair v0.1.1 @@ -257,6 +257,10 @@ replace ( // use cosmos fork of keyring github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0 + // Use latest iavl version to fix following issue: + // https://github.com/cosmos/iavl/pull/943 + github.com/cosmos/iavl => github.com/cosmos/iavl v1.1.4 + // dgrijalva/jwt-go is deprecated and doesn't receive security updates. // TODO: remove it: https://github.com/cosmos/cosmos-sdk/issues/13134 github.com/dgrijalva/jwt-go => github.com/golang-jwt/jwt/v4 v4.4.2 @@ -274,8 +278,7 @@ replace ( // initia custom replace ( github.com/cometbft/cometbft => github.com/initia-labs/cometbft v0.0.0-20240621094738-408dc5262680 - github.com/cosmos/cosmos-sdk => github.com/initia-labs/cosmos-sdk v0.0.0-20240502043911-a4bdb8e06769 - github.com/cosmos/iavl => github.com/initia-labs/iavl v0.0.0-20240415085037-7e81233cdd9e + github.com/cosmos/cosmos-sdk => github.com/initia-labs/cosmos-sdk v0.0.0-20240627065534-d2180fcfd501 github.com/cosmos/ibc-go/v8 => github.com/initia-labs/ibc-go/v8 v8.0.0-20240419124350-4275a05abe2c github.com/ethereum/go-ethereum => github.com/initia-labs/evm v0.0.0-20240620024053-f13ebda716b7 ) diff --git a/go.sum b/go.sum index b826333..0611f31 100644 --- a/go.sum +++ b/go.sum @@ -184,8 +184,8 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cosmossdk.io/api v0.7.4 h1:sPo8wKwCty1lht8kgL3J7YL1voJywP3YWuA5JKkBz30= -cosmossdk.io/api v0.7.4/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/api v0.7.5 h1:eMPTReoNmGUm8DeiQL9DyM8sYDjEhWzL1+nLbI9DqtQ= +cosmossdk.io/api v0.7.5/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= cosmossdk.io/client/v2 v2.0.0-beta.1.0.20240124105859-5ad1805d0e79 h1:Hr1t0fCq1nbFC7hLs0Xvy9WAiH7Iti5iVLXMM5C37F0= cosmossdk.io/client/v2 v2.0.0-beta.1.0.20240124105859-5ad1805d0e79/go.mod h1:8pN6LSVReNnIxrC2QGcvuIJ/m1pJN6FNYn2kAYtYftI= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= @@ -407,6 +407,8 @@ github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= +github.com/cosmos/iavl v1.1.4 h1:Z0cVVjeQqOUp78/nWt/uhQy83vYluWlAMGQ4zbH9G34= +github.com/cosmos/iavl v1.1.4/go.mod h1:vCYmRQUJU1wwj0oRD3wMEtOM9sJNDP+GFMaXmIxZ/rU= github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8 v8.0.2 h1:dyLNlDElY6+5zW/BT/dO/3Ad9FpQblfh+9dQpYQodbA= github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8 v8.0.2/go.mod h1:82hPO/tRawbuFad2gPwChvpZ0JEIoNi91LwVneAYCeM= github.com/cosmos/ibc-go/modules/capability v1.0.0 h1:r/l++byFtn7jHYa09zlAdSeevo8ci1mVZNO9+V0xsLE= @@ -806,22 +808,20 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/initia-labs/OPinit v0.3.1 h1:uffngNx8a7hQl3ENhVbdSAJ8j5MYksiaiCLVI6xunjA= -github.com/initia-labs/OPinit v0.3.1/go.mod h1:pHU2472uQZpiKXBOa/D7/aDYn0gtTiddKvhloyliOQU= +github.com/initia-labs/OPinit v0.3.2 h1:TeELD5GeSJJ9meY5b5YIXDdmCZt9kZOA2Chz+IwxUHc= +github.com/initia-labs/OPinit v0.3.2/go.mod h1:XlYsBFAKOFS6/wRIHB1vVbfonqX8QrC8cWK2GJvmX20= github.com/initia-labs/OPinit/api v0.3.0 h1:OY8ijwmgZLoYwtw9LI1mSY3VC8PY+gtxJFitB6ZNFl4= github.com/initia-labs/OPinit/api v0.3.0/go.mod h1:Xy/Nt3ubXLQ4zKn0m7RuQOM1sj8TVdlNNyek21TGYR0= github.com/initia-labs/cometbft v0.0.0-20240621094738-408dc5262680 h1:4tcP5F26DdqiV1Y/XOllL4LUhyUV6HITfjVJnzR/Krs= github.com/initia-labs/cometbft v0.0.0-20240621094738-408dc5262680/go.mod h1:qGaJePRWAc2OL3OGNd//8fqgypCaFjmwZcy/cNner84= -github.com/initia-labs/cosmos-sdk v0.0.0-20240502043911-a4bdb8e06769 h1:R+cOwxp14K9+UAJ7MI4YyqXSL+Fm8W+wTBbXL315EMA= -github.com/initia-labs/cosmos-sdk v0.0.0-20240502043911-a4bdb8e06769/go.mod h1:lVkRY6cdMJ0fG3gp8y4hFrsKZqF4z7y0M2UXFb9Yt40= +github.com/initia-labs/cosmos-sdk v0.0.0-20240627065534-d2180fcfd501 h1:OcLFeu3V9T156H4n6WzPNfKWjIUKdkC0P0EBA8zEWFE= +github.com/initia-labs/cosmos-sdk v0.0.0-20240627065534-d2180fcfd501/go.mod h1:84xDDJEHttRT7NDGwBaUOLVOMN0JNE9x7NbsYIxXs1s= github.com/initia-labs/evm v0.0.0-20240620024053-f13ebda716b7 h1:V7K8wvE5FVVv6WTeITI+nqWfo4b9WlZyXQH0Olz5UVI= github.com/initia-labs/evm v0.0.0-20240620024053-f13ebda716b7/go.mod h1:x2gtBG0WHLgY08FE97lfhjtpcR5vcSAZbi34JnrsBbQ= -github.com/initia-labs/iavl v0.0.0-20240415085037-7e81233cdd9e h1:1gkMWkAgVhYFhEv7K4tX+8uJJLdiTKlQhl5+wGaxdMg= -github.com/initia-labs/iavl v0.0.0-20240415085037-7e81233cdd9e/go.mod h1:jLeUvm6bGT1YutCaL2fIar/8vGUE8cPZvh/gXEWDaDM= github.com/initia-labs/ibc-go/v8 v8.0.0-20240419124350-4275a05abe2c h1:FDwh5zZbm9v7C37ni4FytQQ9Os5XxYp1px5U7Nqdu2Y= github.com/initia-labs/ibc-go/v8 v8.0.0-20240419124350-4275a05abe2c/go.mod h1:wj3qx75iC/XNnsMqbPDCIGs0G6Y3E/lo3bdqCyoCy+8= -github.com/initia-labs/initia v0.3.2 h1:nvVCgUiiDxDcFdC+ordooSlqUHXR8mFGDvCgwptTaAg= -github.com/initia-labs/initia v0.3.2/go.mod h1:CXKYIajY7mj7EogHO1VcgaXnKZFpeRfSc0KxbqbxWjY= +github.com/initia-labs/initia v0.3.3 h1:82ZkXki6CG+F+rPDBVpTzzSQY8NalXIZ0LnYSWNd+3U= +github.com/initia-labs/initia v0.3.3/go.mod h1:1yWifo9GnhIvwDtCTTN6kb2mfq2On+oel6ha/rBXaQQ= github.com/initia-labs/kvindexer v0.1.3 h1:TLkgJjp5TiPnH+OzYfk7ZKQTKqGOfSte59Y3gasob+o= github.com/initia-labs/kvindexer v0.1.3/go.mod h1:rvAmgCAmEs4KM8sRRPcyTqNNwi8s2JiHybiFkYfp4KE= github.com/initia-labs/kvindexer/submodules/block v0.1.0 h1:y+EXnksd/I2F96mzIoQA64nZUZON2P+99YrSzeLCLoY= @@ -830,8 +830,8 @@ github.com/initia-labs/kvindexer/submodules/pair v0.1.1 h1:o151gA4jIbqEl+pWTOCiz github.com/initia-labs/kvindexer/submodules/pair v0.1.1/go.mod h1:8X1GE1ZLkH7z8TKb5MUh7UClTkcqVFIwXIIRdsqeUZY= github.com/initia-labs/kvindexer/submodules/tx v0.1.0 h1:6kbf6wmzXPN0XCQLasiFgq1AlZHkt5K3/ZG+IWw1nNs= github.com/initia-labs/kvindexer/submodules/tx v0.1.0/go.mod h1:i0XeLbLa6xdgTR01WF8kaAO50vMmwxbeq0fKexwpFHU= -github.com/initia-labs/movevm v0.3.1 h1:vydw0mdqsLyPN9W2DVq1/gDXDR3snbr6c4Wy/sTYVxY= -github.com/initia-labs/movevm v0.3.1/go.mod h1:6MxR4GP5zH3JUc1IMgfqAe1e483mZVS7fshPknZPJ30= +github.com/initia-labs/movevm v0.3.3 h1:xUH5VvjBSfJP4jg3axefmBlcdZ/7qfVYnUU09R4oN4g= +github.com/initia-labs/movevm v0.3.3/go.mod h1:6MxR4GP5zH3JUc1IMgfqAe1e483mZVS7fshPknZPJ30= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 460ea31..5bc6c31 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -7,10 +7,10 @@ toolchain go1.22.2 require ( cosmossdk.io/math v1.3.0 github.com/cometbft/cometbft v0.38.7 - github.com/cosmos/cosmos-sdk v0.50.6 + github.com/cosmos/cosmos-sdk v0.50.7 github.com/cosmos/ibc-go/v8 v8.2.1 github.com/ethereum/go-ethereum v1.14.2 - github.com/initia-labs/initia v0.3.2 + github.com/initia-labs/initia v0.3.3 github.com/initia-labs/minievm v0.3.0 github.com/stretchr/testify v1.9.0 ) @@ -21,7 +21,7 @@ require ( cloud.google.com/go/compute/metadata v0.2.3 // indirect cloud.google.com/go/iam v1.1.6 // indirect cloud.google.com/go/storage v1.37.0 // indirect - cosmossdk.io/api v0.7.4 // indirect + cosmossdk.io/api v0.7.5 // indirect cosmossdk.io/client/v2 v2.0.0-beta.1.0.20240124105859-5ad1805d0e79 // indirect cosmossdk.io/collections v0.4.0 // indirect cosmossdk.io/core v0.11.0 // indirect @@ -143,13 +143,13 @@ require ( github.com/iancoleman/strcase v0.3.0 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/initia-labs/OPinit v0.3.1 // indirect + github.com/initia-labs/OPinit v0.3.2 // indirect github.com/initia-labs/OPinit/api v0.3.0 // indirect github.com/initia-labs/kvindexer v0.1.3 // indirect github.com/initia-labs/kvindexer/submodules/block v0.1.0 // indirect github.com/initia-labs/kvindexer/submodules/pair v0.1.1 // indirect github.com/initia-labs/kvindexer/submodules/tx v0.1.0 // indirect - github.com/initia-labs/movevm v0.3.1 // indirect + github.com/initia-labs/movevm v0.3.3 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect github.com/klauspost/compress v1.17.8 // indirect @@ -249,6 +249,10 @@ replace ( // use cosmos fork of keyring github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0 + // Use latest iavl version to fix following issue: + // https://github.com/cosmos/iavl/pull/943 + github.com/cosmos/iavl => github.com/cosmos/iavl v1.1.4 + // dgrijalva/jwt-go is deprecated and doesn't receive security updates. // TODO: remove it: https://github.com/cosmos/cosmos-sdk/issues/13134 github.com/dgrijalva/jwt-go => github.com/golang-jwt/jwt/v4 v4.4.2 @@ -266,8 +270,7 @@ replace ( // initia custom replace ( github.com/cometbft/cometbft => github.com/initia-labs/cometbft v0.0.0-20240621094738-408dc5262680 - github.com/cosmos/cosmos-sdk => github.com/initia-labs/cosmos-sdk v0.0.0-20240502043911-a4bdb8e06769 - github.com/cosmos/iavl => github.com/initia-labs/iavl v0.0.0-20240415085037-7e81233cdd9e + github.com/cosmos/cosmos-sdk => github.com/initia-labs/cosmos-sdk v0.0.0-20240627065534-d2180fcfd501 github.com/cosmos/ibc-go/v8 => github.com/initia-labs/ibc-go/v8 v8.0.0-20240419124350-4275a05abe2c github.com/ethereum/go-ethereum => github.com/initia-labs/evm v0.0.0-20240620024053-f13ebda716b7 ) diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 74aba03..703ac96 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -184,8 +184,8 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cosmossdk.io/api v0.7.4 h1:sPo8wKwCty1lht8kgL3J7YL1voJywP3YWuA5JKkBz30= -cosmossdk.io/api v0.7.4/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/api v0.7.5 h1:eMPTReoNmGUm8DeiQL9DyM8sYDjEhWzL1+nLbI9DqtQ= +cosmossdk.io/api v0.7.5/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= cosmossdk.io/client/v2 v2.0.0-beta.1.0.20240124105859-5ad1805d0e79 h1:Hr1t0fCq1nbFC7hLs0Xvy9WAiH7Iti5iVLXMM5C37F0= cosmossdk.io/client/v2 v2.0.0-beta.1.0.20240124105859-5ad1805d0e79/go.mod h1:8pN6LSVReNnIxrC2QGcvuIJ/m1pJN6FNYn2kAYtYftI= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= @@ -384,6 +384,8 @@ github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= +github.com/cosmos/iavl v1.1.4 h1:Z0cVVjeQqOUp78/nWt/uhQy83vYluWlAMGQ4zbH9G34= +github.com/cosmos/iavl v1.1.4/go.mod h1:vCYmRQUJU1wwj0oRD3wMEtOM9sJNDP+GFMaXmIxZ/rU= github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8 v8.0.2 h1:dyLNlDElY6+5zW/BT/dO/3Ad9FpQblfh+9dQpYQodbA= github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8 v8.0.2/go.mod h1:82hPO/tRawbuFad2gPwChvpZ0JEIoNi91LwVneAYCeM= github.com/cosmos/ibc-go/modules/capability v1.0.0 h1:r/l++byFtn7jHYa09zlAdSeevo8ci1mVZNO9+V0xsLE= @@ -768,22 +770,20 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/initia-labs/OPinit v0.3.1 h1:uffngNx8a7hQl3ENhVbdSAJ8j5MYksiaiCLVI6xunjA= -github.com/initia-labs/OPinit v0.3.1/go.mod h1:pHU2472uQZpiKXBOa/D7/aDYn0gtTiddKvhloyliOQU= +github.com/initia-labs/OPinit v0.3.2 h1:TeELD5GeSJJ9meY5b5YIXDdmCZt9kZOA2Chz+IwxUHc= +github.com/initia-labs/OPinit v0.3.2/go.mod h1:XlYsBFAKOFS6/wRIHB1vVbfonqX8QrC8cWK2GJvmX20= github.com/initia-labs/OPinit/api v0.3.0 h1:OY8ijwmgZLoYwtw9LI1mSY3VC8PY+gtxJFitB6ZNFl4= github.com/initia-labs/OPinit/api v0.3.0/go.mod h1:Xy/Nt3ubXLQ4zKn0m7RuQOM1sj8TVdlNNyek21TGYR0= github.com/initia-labs/cometbft v0.0.0-20240621094738-408dc5262680 h1:4tcP5F26DdqiV1Y/XOllL4LUhyUV6HITfjVJnzR/Krs= github.com/initia-labs/cometbft v0.0.0-20240621094738-408dc5262680/go.mod h1:qGaJePRWAc2OL3OGNd//8fqgypCaFjmwZcy/cNner84= -github.com/initia-labs/cosmos-sdk v0.0.0-20240502043911-a4bdb8e06769 h1:R+cOwxp14K9+UAJ7MI4YyqXSL+Fm8W+wTBbXL315EMA= -github.com/initia-labs/cosmos-sdk v0.0.0-20240502043911-a4bdb8e06769/go.mod h1:lVkRY6cdMJ0fG3gp8y4hFrsKZqF4z7y0M2UXFb9Yt40= +github.com/initia-labs/cosmos-sdk v0.0.0-20240627065534-d2180fcfd501 h1:OcLFeu3V9T156H4n6WzPNfKWjIUKdkC0P0EBA8zEWFE= +github.com/initia-labs/cosmos-sdk v0.0.0-20240627065534-d2180fcfd501/go.mod h1:84xDDJEHttRT7NDGwBaUOLVOMN0JNE9x7NbsYIxXs1s= github.com/initia-labs/evm v0.0.0-20240620024053-f13ebda716b7 h1:V7K8wvE5FVVv6WTeITI+nqWfo4b9WlZyXQH0Olz5UVI= github.com/initia-labs/evm v0.0.0-20240620024053-f13ebda716b7/go.mod h1:x2gtBG0WHLgY08FE97lfhjtpcR5vcSAZbi34JnrsBbQ= -github.com/initia-labs/iavl v0.0.0-20240415085037-7e81233cdd9e h1:1gkMWkAgVhYFhEv7K4tX+8uJJLdiTKlQhl5+wGaxdMg= -github.com/initia-labs/iavl v0.0.0-20240415085037-7e81233cdd9e/go.mod h1:jLeUvm6bGT1YutCaL2fIar/8vGUE8cPZvh/gXEWDaDM= github.com/initia-labs/ibc-go/v8 v8.0.0-20240419124350-4275a05abe2c h1:FDwh5zZbm9v7C37ni4FytQQ9Os5XxYp1px5U7Nqdu2Y= github.com/initia-labs/ibc-go/v8 v8.0.0-20240419124350-4275a05abe2c/go.mod h1:wj3qx75iC/XNnsMqbPDCIGs0G6Y3E/lo3bdqCyoCy+8= -github.com/initia-labs/initia v0.3.2 h1:nvVCgUiiDxDcFdC+ordooSlqUHXR8mFGDvCgwptTaAg= -github.com/initia-labs/initia v0.3.2/go.mod h1:CXKYIajY7mj7EogHO1VcgaXnKZFpeRfSc0KxbqbxWjY= +github.com/initia-labs/initia v0.3.3 h1:82ZkXki6CG+F+rPDBVpTzzSQY8NalXIZ0LnYSWNd+3U= +github.com/initia-labs/initia v0.3.3/go.mod h1:1yWifo9GnhIvwDtCTTN6kb2mfq2On+oel6ha/rBXaQQ= github.com/initia-labs/kvindexer v0.1.3 h1:TLkgJjp5TiPnH+OzYfk7ZKQTKqGOfSte59Y3gasob+o= github.com/initia-labs/kvindexer v0.1.3/go.mod h1:rvAmgCAmEs4KM8sRRPcyTqNNwi8s2JiHybiFkYfp4KE= github.com/initia-labs/kvindexer/submodules/block v0.1.0 h1:y+EXnksd/I2F96mzIoQA64nZUZON2P+99YrSzeLCLoY= @@ -792,8 +792,8 @@ github.com/initia-labs/kvindexer/submodules/pair v0.1.1 h1:o151gA4jIbqEl+pWTOCiz github.com/initia-labs/kvindexer/submodules/pair v0.1.1/go.mod h1:8X1GE1ZLkH7z8TKb5MUh7UClTkcqVFIwXIIRdsqeUZY= github.com/initia-labs/kvindexer/submodules/tx v0.1.0 h1:6kbf6wmzXPN0XCQLasiFgq1AlZHkt5K3/ZG+IWw1nNs= github.com/initia-labs/kvindexer/submodules/tx v0.1.0/go.mod h1:i0XeLbLa6xdgTR01WF8kaAO50vMmwxbeq0fKexwpFHU= -github.com/initia-labs/movevm v0.3.1 h1:vydw0mdqsLyPN9W2DVq1/gDXDR3snbr6c4Wy/sTYVxY= -github.com/initia-labs/movevm v0.3.1/go.mod h1:6MxR4GP5zH3JUc1IMgfqAe1e483mZVS7fshPknZPJ30= +github.com/initia-labs/movevm v0.3.3 h1:xUH5VvjBSfJP4jg3axefmBlcdZ/7qfVYnUU09R4oN4g= +github.com/initia-labs/movevm v0.3.3/go.mod h1:6MxR4GP5zH3JUc1IMgfqAe1e483mZVS7fshPknZPJ30= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls=