From 6859058459d8648c7b4db46fb48977a24ee08dda Mon Sep 17 00:00:00 2001 From: beer-1 <147697694+beer-1@users.noreply.github.com> Date: Fri, 19 Jan 2024 12:14:35 +0900 Subject: [PATCH 1/9] fix oracle prometheus server to be finished properly --- cmd/initiad/post_setup.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/initiad/post_setup.go b/cmd/initiad/post_setup.go index 0a73d878..eec8dc09 100644 --- a/cmd/initiad/post_setup.go +++ b/cmd/initiad/post_setup.go @@ -22,7 +22,7 @@ func postSetup(svrCtx *server.Context, clientCtx client.Context, ctx context.Con initiaApp.OraclePrometheusServer.Start() }() - ctx.Done() + <-ctx.Done() logger.Info("stopping oracle prometheus server...") initiaApp.OraclePrometheusServer.Close() From 0f0d140ffc01ab244f663f1e5e126a0c8920418d Mon Sep 17 00:00:00 2001 From: beer-1 <147697694+beer-1@users.noreply.github.com> Date: Sat, 20 Jan 2024 13:35:15 +0900 Subject: [PATCH 2/9] fix slasing cli --- x/slashing/client/cli/tx.go | 58 +++++++++++++++++++++++++++++++++++++ x/slashing/module.go | 12 ++++++++ 2 files changed, 70 insertions(+) create mode 100644 x/slashing/client/cli/tx.go diff --git a/x/slashing/client/cli/tx.go b/x/slashing/client/cli/tx.go new file mode 100644 index 00000000..700c794b --- /dev/null +++ b/x/slashing/client/cli/tx.go @@ -0,0 +1,58 @@ +package cli + +import ( + "cosmossdk.io/core/address" + "github.com/spf13/cobra" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/client/tx" + "github.com/cosmos/cosmos-sdk/x/slashing/types" +) + +// NewTxCmd returns a root CLI command handler for all x/slashing transaction commands. +func NewTxCmd(vc address.Codec) *cobra.Command { + slashingTxCmd := &cobra.Command{ + Use: types.ModuleName, + Short: "Slashing transaction subcommands", + DisableFlagParsing: true, + SuggestionsMinimumDistance: 2, + RunE: client.ValidateCmd, + } + + slashingTxCmd.AddCommand(NewUnjailTxCmd(vc)) + return slashingTxCmd +} + +// NewUnjailTxCmd returns a CLI command handler for creating a MsgUnjail transaction. +func NewUnjailTxCmd(vc address.Codec) *cobra.Command { + cmd := &cobra.Command{ + Use: "unjail", + Args: cobra.NoArgs, + Short: "unjail validator previously jailed for downtime", + Long: `unjail a jailed validator: + +$ tx slashing unjail --from mykey +`, + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + valAddr := clientCtx.GetFromAddress() + valAddrStr, err := vc.BytesToString(valAddr) + if err != nil { + return err + + } + + msg := types.NewMsgUnjail(valAddrStr) + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} diff --git a/x/slashing/module.go b/x/slashing/module.go index 7676cb61..73466f85 100644 --- a/x/slashing/module.go +++ b/x/slashing/module.go @@ -6,6 +6,7 @@ import ( "fmt" "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/spf13/cobra" "cosmossdk.io/core/appmodule" @@ -16,6 +17,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/x/slashing/types" + "github.com/initia-labs/initia/x/slashing/client/cli" "github.com/initia-labs/initia/x/slashing/keeper" ) @@ -77,6 +79,16 @@ func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *r } } +// GetTxCmd returns no root tx command for the mint module. +func (b AppModuleBasic) GetTxCmd() *cobra.Command { + return cli.NewTxCmd(b.cdc.InterfaceRegistry().SigningContext().ValidatorAddressCodec()) +} + +// GetQueryCmd returns the root query command for the mint module. +func (AppModuleBasic) GetQueryCmd() *cobra.Command { + return nil +} + // AppModule implements an application module for the slashing module. type AppModule struct { AppModuleBasic From 6f7d4e0b7bb639ab3f3531aa4b925ad30c311245 Mon Sep 17 00:00:00 2001 From: beer-1 <147697694+beer-1@users.noreply.github.com> Date: Sun, 21 Jan 2024 09:29:30 +0900 Subject: [PATCH 3/9] apply checksum cache update --- go.mod | 2 +- go.sum | 4 ++-- x/move/config/config.go | 27 +++++++++++++++++++-------- x/move/keeper/keeper.go | 10 +++++++--- 4 files changed, 29 insertions(+), 14 deletions(-) diff --git a/go.mod b/go.mod index c98c437a..8c7c6021 100644 --- a/go.mod +++ b/go.mod @@ -36,7 +36,7 @@ require ( github.com/hashicorp/go-metrics v0.5.2 github.com/initia-labs/OPinit v0.2.0-beta.1 // we also need to update `LIBINITIAVM_VERSION` of images/private/Dockerfile#5 - github.com/initia-labs/initiavm v0.2.0-beta.1 + github.com/initia-labs/initiavm v0.2.0-beta.1.0.20240120172108-7e0822826f09 github.com/novifinancial/serde-reflection/serde-generate/runtime/golang v0.0.0-20220519162058-e5cd3c3b3f3a github.com/pelletier/go-toml v1.9.5 github.com/pkg/errors v0.9.1 diff --git a/go.sum b/go.sum index 5dbb22ce..7041feaf 100644 --- a/go.sum +++ b/go.sum @@ -721,8 +721,8 @@ github.com/initia-labs/OPinit v0.2.0-beta.1 h1:98LhxGZ3ZOcqziSGJgcasq6Wh4tp1KqHk github.com/initia-labs/OPinit v0.2.0-beta.1/go.mod h1:1dn1iseG1S4wfXUtnb4mUkraJdL9/lWBQPpI+HbVzL0= github.com/initia-labs/cosmos-sdk v0.0.0-20240116115600-110a2328c217 h1:lp7GBF9EggJkXhcHJweIPBPyVdVdtQNPacHP2cSPckI= github.com/initia-labs/cosmos-sdk v0.0.0-20240116115600-110a2328c217/go.mod h1:tlrkY1sntOt1q0OX/rqF0zRJtmXNoffAS6VFTcky+w8= -github.com/initia-labs/initiavm v0.2.0-beta.1 h1:IEJrJu38qXSdcoWNqaj9BiXos/WswnjzmJDxnK7snI8= -github.com/initia-labs/initiavm v0.2.0-beta.1/go.mod h1:6LNXn8eRv2jBzvM1gyQMgA1GRzZJh65VGVKCYDtbh18= +github.com/initia-labs/initiavm v0.2.0-beta.1.0.20240120172108-7e0822826f09 h1:MG/ua3hbcMmDUFcR3+gdMgw9itkfcRYlWoXZclnDSN8= +github.com/initia-labs/initiavm v0.2.0-beta.1.0.20240120172108-7e0822826f09/go.mod h1:6LNXn8eRv2jBzvM1gyQMgA1GRzZJh65VGVKCYDtbh18= github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= diff --git a/x/move/config/config.go b/x/move/config/config.go index 42a63f35..260817e0 100644 --- a/x/move/config/config.go +++ b/x/move/config/config.go @@ -7,8 +7,11 @@ import ( servertypes "github.com/cosmos/cosmos-sdk/server/types" ) -// DefaultCacheCapacity the number of modules can be stay in module cache -const DefaultCacheCapacity = uint64(1_000) +// DefaultModuleCacheCapacity the number of modules can be stay in module cache +const DefaultModuleCacheCapacity = uint64(5_000) + +// DefaultScriptCacheCapacity the number of modules can be stay in module cache +const DefaultScriptCacheCapacity = uint64(1_000) // DefaultContractQueryGasLimit - default max query gas for external query const DefaultContractQueryGasLimit = uint64(3_000_000) @@ -17,14 +20,16 @@ const DefaultContractQueryGasLimit = uint64(3_000_000) const DefaultContractSimulationGasLimit = uint64(3_000_000) const ( - flagCacheCapacity = "move.cache-capacity" + flagModuleCacheCapacity = "move.module-cache-capacity" + flagScriptCacheCapacity = "move.script-cache-capacity" flagContractSimulationGasLimit = "move.contract-simulation-gas-limit" flagContractQueryGasLimit = "move.contract-query-gas-limit" ) // MoveConfig is the extra config required for move type MoveConfig struct { - CacheCapacity uint64 `mapstructure:"cache-capacity"` + ModuleCacheCapacity uint64 `mapstructure:"module-cache-capacity"` + ScriptCacheCapacity uint64 `mapstructure:"script-cache-capacity"` ContractSimulationGasLimit uint64 `mapstructure:"contract-simulation-gas-limit"` ContractQueryGasLimit uint64 `mapstructure:"contract-query-gas-limit"` } @@ -32,7 +37,8 @@ type MoveConfig struct { // DefaultMoveConfig returns the default settings for MoveConfig func DefaultMoveConfig() MoveConfig { return MoveConfig{ - CacheCapacity: DefaultCacheCapacity, + ModuleCacheCapacity: DefaultModuleCacheCapacity, + ScriptCacheCapacity: DefaultScriptCacheCapacity, ContractSimulationGasLimit: DefaultContractSimulationGasLimit, ContractQueryGasLimit: DefaultContractQueryGasLimit, } @@ -41,7 +47,8 @@ func DefaultMoveConfig() MoveConfig { // GetConfig load config values from the app options func GetConfig(appOpts servertypes.AppOptions) MoveConfig { return MoveConfig{ - CacheCapacity: cast.ToUint64(appOpts.Get(flagCacheCapacity)), + ModuleCacheCapacity: cast.ToUint64(appOpts.Get(flagModuleCacheCapacity)), + ScriptCacheCapacity: cast.ToUint64(appOpts.Get(flagScriptCacheCapacity)), ContractSimulationGasLimit: cast.ToUint64(appOpts.Get(flagContractSimulationGasLimit)), ContractQueryGasLimit: cast.ToUint64(appOpts.Get(flagContractQueryGasLimit)), } @@ -49,7 +56,8 @@ func GetConfig(appOpts servertypes.AppOptions) MoveConfig { // AddConfigFlags implements servertypes.MoveConfigFlags interface. func AddConfigFlags(startCmd *cobra.Command) { - startCmd.Flags().Uint64(flagCacheCapacity, DefaultCacheCapacity, "Set the max simulation gas for move contract execution") + startCmd.Flags().Uint64(flagModuleCacheCapacity, DefaultModuleCacheCapacity, "Set the number of modules which can stay in the cache") + startCmd.Flags().Uint64(flagScriptCacheCapacity, DefaultScriptCacheCapacity, "Set the number of scripts which can stay in the cache") startCmd.Flags().Uint64(flagContractSimulationGasLimit, DefaultContractSimulationGasLimit, "Set the max simulation gas for move contract execution") startCmd.Flags().Uint64(flagContractQueryGasLimit, DefaultContractQueryGasLimit, "Set the max gas that can be spent on executing a query with a Move contract") } @@ -62,7 +70,10 @@ const DefaultConfigTemplate = ` [move] # The number of modules can be live in module cache. -cache-capacity = "{{ .MoveConfig.CacheCapacity }}" +module-cache-capacity = "{{ .MoveConfig.ModuleCacheCapacity }}" + +# The number of modules can be live in script cache. +script-cache-capacity = "{{ .MoveConfig.ScriptCacheCapacity }}" # The maximum gas amount can be used in a tx simulation call. contract-simulation-gas-limit = "{{ .MoveConfig.ContractSimulationGasLimit }}" diff --git a/x/move/keeper/keeper.go b/x/move/keeper/keeper.go index 99707dfe..0225c2eb 100644 --- a/x/move/keeper/keeper.go +++ b/x/move/keeper/keeper.go @@ -76,8 +76,12 @@ func NewKeeper( panic("authority is not a valid acc address") } - if moveConfig.CacheCapacity == 0 { - moveConfig.CacheCapacity = moveconfig.DefaultCacheCapacity + if moveConfig.ModuleCacheCapacity == 0 { + moveConfig.ModuleCacheCapacity = moveconfig.DefaultModuleCacheCapacity + } + + if moveConfig.ScriptCacheCapacity == 0 { + moveConfig.ScriptCacheCapacity = moveconfig.DefaultScriptCacheCapacity } if moveConfig.ContractSimulationGasLimit == 0 { @@ -88,7 +92,7 @@ func NewKeeper( moveConfig.ContractQueryGasLimit = moveconfig.DefaultContractQueryGasLimit } - moveVM := vm.NewVM(moveConfig.CacheCapacity) + moveVM := vm.NewVM(moveConfig.ModuleCacheCapacity, moveConfig.ScriptCacheCapacity) sb := collections.NewSchemaBuilder(storeService) k := &Keeper{ From e0f8758037532a4207bd06af8c6b097e20630114 Mon Sep 17 00:00:00 2001 From: beer-1 <147697694+beer-1@users.noreply.github.com> Date: Mon, 22 Jan 2024 14:07:29 +0900 Subject: [PATCH 4/9] fix error message to avoid app hash crash --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 8c7c6021..333f1fd0 100644 --- a/go.mod +++ b/go.mod @@ -36,7 +36,7 @@ require ( github.com/hashicorp/go-metrics v0.5.2 github.com/initia-labs/OPinit v0.2.0-beta.1 // we also need to update `LIBINITIAVM_VERSION` of images/private/Dockerfile#5 - github.com/initia-labs/initiavm v0.2.0-beta.1.0.20240120172108-7e0822826f09 + github.com/initia-labs/initiavm v0.2.0-beta.1.0.20240122041854-a241a929caee github.com/novifinancial/serde-reflection/serde-generate/runtime/golang v0.0.0-20220519162058-e5cd3c3b3f3a github.com/pelletier/go-toml v1.9.5 github.com/pkg/errors v0.9.1 diff --git a/go.sum b/go.sum index 7041feaf..156420bd 100644 --- a/go.sum +++ b/go.sum @@ -721,8 +721,8 @@ github.com/initia-labs/OPinit v0.2.0-beta.1 h1:98LhxGZ3ZOcqziSGJgcasq6Wh4tp1KqHk github.com/initia-labs/OPinit v0.2.0-beta.1/go.mod h1:1dn1iseG1S4wfXUtnb4mUkraJdL9/lWBQPpI+HbVzL0= github.com/initia-labs/cosmos-sdk v0.0.0-20240116115600-110a2328c217 h1:lp7GBF9EggJkXhcHJweIPBPyVdVdtQNPacHP2cSPckI= github.com/initia-labs/cosmos-sdk v0.0.0-20240116115600-110a2328c217/go.mod h1:tlrkY1sntOt1q0OX/rqF0zRJtmXNoffAS6VFTcky+w8= -github.com/initia-labs/initiavm v0.2.0-beta.1.0.20240120172108-7e0822826f09 h1:MG/ua3hbcMmDUFcR3+gdMgw9itkfcRYlWoXZclnDSN8= -github.com/initia-labs/initiavm v0.2.0-beta.1.0.20240120172108-7e0822826f09/go.mod h1:6LNXn8eRv2jBzvM1gyQMgA1GRzZJh65VGVKCYDtbh18= +github.com/initia-labs/initiavm v0.2.0-beta.1.0.20240122041854-a241a929caee h1:28wj5qnH3JoK/VGg8aZgN4MgxlBs6/epFoAlpBjiJmU= +github.com/initia-labs/initiavm v0.2.0-beta.1.0.20240122041854-a241a929caee/go.mod h1:6LNXn8eRv2jBzvM1gyQMgA1GRzZJh65VGVKCYDtbh18= github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= From b4a44cf66e3eb94a5c3b4a6ab0aea46110dcec4c Mon Sep 17 00:00:00 2001 From: beer-1 <147697694+beer-1@users.noreply.github.com> Date: Mon, 22 Jan 2024 16:58:56 +0900 Subject: [PATCH 5/9] rebuild prebuild-go --- go.mod | 3 ++- go.sum | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 333f1fd0..102050ea 100644 --- a/go.mod +++ b/go.mod @@ -36,7 +36,7 @@ require ( github.com/hashicorp/go-metrics v0.5.2 github.com/initia-labs/OPinit v0.2.0-beta.1 // we also need to update `LIBINITIAVM_VERSION` of images/private/Dockerfile#5 - github.com/initia-labs/initiavm v0.2.0-beta.1.0.20240122041854-a241a929caee + github.com/initia-labs/initiavm v0.2.0-beta.1.0.20240122071548-2ddbcc185cce github.com/novifinancial/serde-reflection/serde-generate/runtime/golang v0.0.0-20220519162058-e5cd3c3b3f3a github.com/pelletier/go-toml v1.9.5 github.com/pkg/errors v0.9.1 @@ -71,6 +71,7 @@ require ( github.com/99designs/keyring v1.2.1 // indirect github.com/DataDog/datadog-go v3.2.0+incompatible // indirect github.com/DataDog/zstd v1.5.5 // indirect + github.com/aptos-labs/serde-reflection/serde-generate/runtime/golang v0.0.0-20231213012317-73b6bbf74833 // indirect github.com/aws/aws-sdk-go v1.44.224 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect diff --git a/go.sum b/go.sum index 156420bd..aec820b8 100644 --- a/go.sum +++ b/go.sum @@ -257,6 +257,8 @@ github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk5 github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/aptos-labs/serde-reflection/serde-generate/runtime/golang v0.0.0-20231213012317-73b6bbf74833 h1:/OtHsUoaVegyyGQ9/Ycm5vrC3xTTyj4+N/HsJ0wwAGA= +github.com/aptos-labs/serde-reflection/serde-generate/runtime/golang v0.0.0-20231213012317-73b6bbf74833/go.mod h1:zUz5maIUAS+tl1lC+lJR7HUf0vVnHk6W7bCvN+DzjME= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= @@ -721,8 +723,8 @@ github.com/initia-labs/OPinit v0.2.0-beta.1 h1:98LhxGZ3ZOcqziSGJgcasq6Wh4tp1KqHk github.com/initia-labs/OPinit v0.2.0-beta.1/go.mod h1:1dn1iseG1S4wfXUtnb4mUkraJdL9/lWBQPpI+HbVzL0= github.com/initia-labs/cosmos-sdk v0.0.0-20240116115600-110a2328c217 h1:lp7GBF9EggJkXhcHJweIPBPyVdVdtQNPacHP2cSPckI= github.com/initia-labs/cosmos-sdk v0.0.0-20240116115600-110a2328c217/go.mod h1:tlrkY1sntOt1q0OX/rqF0zRJtmXNoffAS6VFTcky+w8= -github.com/initia-labs/initiavm v0.2.0-beta.1.0.20240122041854-a241a929caee h1:28wj5qnH3JoK/VGg8aZgN4MgxlBs6/epFoAlpBjiJmU= -github.com/initia-labs/initiavm v0.2.0-beta.1.0.20240122041854-a241a929caee/go.mod h1:6LNXn8eRv2jBzvM1gyQMgA1GRzZJh65VGVKCYDtbh18= +github.com/initia-labs/initiavm v0.2.0-beta.1.0.20240122071548-2ddbcc185cce h1:NfJEYcJLF1hOMP/UFn1x0ES81WDynpUEROlTXAPwbEs= +github.com/initia-labs/initiavm v0.2.0-beta.1.0.20240122071548-2ddbcc185cce/go.mod h1:KTdC3W2wgeOiL0YYIu6MEvK4j8envSpLjH14sMKMD6k= github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= From cfdce512dcbde20ab9baee9d31917cfdee6391df Mon Sep 17 00:00:00 2001 From: beer-1 <147697694+beer-1@users.noreply.github.com> Date: Mon, 22 Jan 2024 17:01:23 +0900 Subject: [PATCH 6/9] use aptos serde --- go.mod | 3 +-- go.sum | 2 -- x/move/client/cli/utils.go | 4 ++-- x/move/ibc-middleware/ibc_middleware.go | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index 102050ea..e3c9f1b6 100644 --- a/go.mod +++ b/go.mod @@ -19,6 +19,7 @@ require ( cosmossdk.io/x/tx v0.13.0 cosmossdk.io/x/upgrade v0.1.1 github.com/IGLOU-EU/go-wildcard v1.0.3 + github.com/aptos-labs/serde-reflection/serde-generate/runtime/golang v0.0.0-20231213012317-73b6bbf74833 github.com/bits-and-blooms/bitset v1.13.0 github.com/cometbft/cometbft v0.38.2 github.com/cosmos/cosmos-db v1.0.0 @@ -37,7 +38,6 @@ require ( github.com/initia-labs/OPinit v0.2.0-beta.1 // we also need to update `LIBINITIAVM_VERSION` of images/private/Dockerfile#5 github.com/initia-labs/initiavm v0.2.0-beta.1.0.20240122071548-2ddbcc185cce - github.com/novifinancial/serde-reflection/serde-generate/runtime/golang v0.0.0-20220519162058-e5cd3c3b3f3a github.com/pelletier/go-toml v1.9.5 github.com/pkg/errors v0.9.1 github.com/rakyll/statik v0.1.7 @@ -71,7 +71,6 @@ require ( github.com/99designs/keyring v1.2.1 // indirect github.com/DataDog/datadog-go v3.2.0+incompatible // indirect github.com/DataDog/zstd v1.5.5 // indirect - github.com/aptos-labs/serde-reflection/serde-generate/runtime/golang v0.0.0-20231213012317-73b6bbf74833 // indirect github.com/aws/aws-sdk-go v1.44.224 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect diff --git a/go.sum b/go.sum index aec820b8..703d74ee 100644 --- a/go.sum +++ b/go.sum @@ -842,8 +842,6 @@ github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxzi github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/novifinancial/serde-reflection/serde-generate/runtime/golang v0.0.0-20220519162058-e5cd3c3b3f3a h1:oMG8C4E7DFkat7WQicw4JNa/dYUaqO7RvLPbkFdADIA= -github.com/novifinancial/serde-reflection/serde-generate/runtime/golang v0.0.0-20220519162058-e5cd3c3b3f3a/go.mod h1:NrRYJCFtaewjIRr4B9V2AyWsAEMW0Zqdjs8Bm+bACbM= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= diff --git a/x/move/client/cli/utils.go b/x/move/client/cli/utils.go index e478f892..3094438f 100644 --- a/x/move/client/cli/utils.go +++ b/x/move/client/cli/utils.go @@ -12,9 +12,9 @@ import ( "cosmossdk.io/core/address" sdkmath "cosmossdk.io/math" + "github.com/aptos-labs/serde-reflection/serde-generate/runtime/golang/bcs" + "github.com/aptos-labs/serde-reflection/serde-generate/runtime/golang/serde" "github.com/initia-labs/initia/x/move/types" - "github.com/novifinancial/serde-reflection/serde-generate/runtime/golang/bcs" - "github.com/novifinancial/serde-reflection/serde-generate/runtime/golang/serde" flag "github.com/spf13/pflag" ) diff --git a/x/move/ibc-middleware/ibc_middleware.go b/x/move/ibc-middleware/ibc_middleware.go index 59f32fa5..54a1ffb9 100644 --- a/x/move/ibc-middleware/ibc_middleware.go +++ b/x/move/ibc-middleware/ibc_middleware.go @@ -265,5 +265,5 @@ func (im IBCMiddleware) execMsg(ctx sdk.Context, msg *movetypes.MsgExecute) (*mo } moveMsgServer := movekeeper.NewMsgServerImpl(*im.moveKeeper) - return moveMsgServer.Execute(sdk.WrapSDKContext(ctx), msg) + return moveMsgServer.Execute(ctx, msg) } From d36770ce514e2db6ad90489d616d0ccec465dacf Mon Sep 17 00:00:00 2001 From: beer-1 <147697694+beer-1@users.noreply.github.com> Date: Fri, 16 Feb 2024 12:28:00 +0900 Subject: [PATCH 7/9] fix core dump --- Dockerfile | 2 +- go.mod | 2 +- go.sum | 4 ++-- images/private/Dockerfile | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8bc2c5e2..50cd5442 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM golang:1.21-alpine AS go-builder #ARG arch=x86_64 # See https://github.com/initia-labs/initiavm/releases -ENV LIBINITIAVM_VERSION=v0.2.0-beta.2 +ENV LIBINITIAVM_VERSION=v0.2.0-beta.2.1 # this comes from standard alpine nightly file # https://github.com/rust-lang/docker-rust-nightly/blob/master/alpine3.12/Dockerfile diff --git a/go.mod b/go.mod index b72ebf13..6849c188 100644 --- a/go.mod +++ b/go.mod @@ -38,7 +38,7 @@ require ( github.com/hashicorp/go-metrics v0.5.2 github.com/initia-labs/OPinit v0.2.0-beta.1 // we also need to update `LIBINITIAVM_VERSION` of images/private/Dockerfile#5 - github.com/initia-labs/initiavm v0.2.0-beta.2 + github.com/initia-labs/initiavm v0.2.0-beta.2.1 github.com/novifinancial/serde-reflection/serde-generate/runtime/golang v0.0.0-20220519162058-e5cd3c3b3f3a github.com/pelletier/go-toml v1.9.5 github.com/pkg/errors v0.9.1 diff --git a/go.sum b/go.sum index d7071a3d..7022f500 100644 --- a/go.sum +++ b/go.sum @@ -725,8 +725,8 @@ github.com/initia-labs/cosmos-sdk v0.0.0-20240123082052-77e8b246064a h1:wD9ynlE7 github.com/initia-labs/cosmos-sdk v0.0.0-20240123082052-77e8b246064a/go.mod h1:tlrkY1sntOt1q0OX/rqF0zRJtmXNoffAS6VFTcky+w8= github.com/initia-labs/iavl v0.0.0-20240208034922-5d81c449d4c0 h1:GQ7/UD5mB6q104roqZK5jxb6ff9sBk0/uwFxgERQIaU= github.com/initia-labs/iavl v0.0.0-20240208034922-5d81c449d4c0/go.mod h1:CmTGqMnRnucjxbjduneZXT+0vPgNElYvdefjX2q9tYc= -github.com/initia-labs/initiavm v0.2.0-beta.2 h1:aSUZok4fQAWVJF9RA5mkF2mrdZq1gtqDllCHgBPjV58= -github.com/initia-labs/initiavm v0.2.0-beta.2/go.mod h1:KTdC3W2wgeOiL0YYIu6MEvK4j8envSpLjH14sMKMD6k= +github.com/initia-labs/initiavm v0.2.0-beta.2.1 h1:L6UHFS5LB/somGfgMO0N2tpkas0v+lTBIMkDvZw+S1M= +github.com/initia-labs/initiavm v0.2.0-beta.2.1/go.mod h1:KTdC3W2wgeOiL0YYIu6MEvK4j8envSpLjH14sMKMD6k= github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= diff --git a/images/private/Dockerfile b/images/private/Dockerfile index e1323cc6..84a7ce86 100644 --- a/images/private/Dockerfile +++ b/images/private/Dockerfile @@ -2,7 +2,7 @@ FROM golang:1.21-alpine AS go-builder #ARG arch=x86_64 # See https://github.com/initia-labs/initiavm/releases -ARG LIBINITIAVM_VERSION=v0.2.0-beta.2 +ARG LIBINITIAVM_VERSION=v0.2.0-beta.2.1 # this comes from standard alpine nightly file # https://github.com/rust-lang/docker-rust-nightly/blob/master/alpine3.12/Dockerfile From 6bdd9e076a1e5bd00d0a1b143521c466e998f775 Mon Sep 17 00:00:00 2001 From: beer-1 <147697694+beer-1@users.noreply.github.com> Date: Fri, 16 Feb 2024 19:09:49 +0900 Subject: [PATCH 8/9] bump initiavm --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 681e8098..05c27b62 100644 --- a/go.mod +++ b/go.mod @@ -230,7 +230,7 @@ replace ( github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 - github.com/initia-labs/initiavm => github.com/initia-labs/initiavm v0.2.0-beta.2.0.20240201084548-c1e4e7843d77 + github.com/initia-labs/initiavm => github.com/initia-labs/initiavm v0.2.0-beta.2.1.0.20240216100531-8cf24388583e // Downgraded to avoid bugs in following commits which caused simulations to fail. github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 diff --git a/go.sum b/go.sum index a021306e..2202b6f7 100644 --- a/go.sum +++ b/go.sum @@ -725,8 +725,8 @@ github.com/initia-labs/cosmos-sdk v0.0.0-20240123082052-77e8b246064a h1:wD9ynlE7 github.com/initia-labs/cosmos-sdk v0.0.0-20240123082052-77e8b246064a/go.mod h1:tlrkY1sntOt1q0OX/rqF0zRJtmXNoffAS6VFTcky+w8= github.com/initia-labs/iavl v0.0.0-20240208034922-5d81c449d4c0 h1:GQ7/UD5mB6q104roqZK5jxb6ff9sBk0/uwFxgERQIaU= github.com/initia-labs/iavl v0.0.0-20240208034922-5d81c449d4c0/go.mod h1:CmTGqMnRnucjxbjduneZXT+0vPgNElYvdefjX2q9tYc= -github.com/initia-labs/initiavm v0.2.0-beta.2.0.20240201084548-c1e4e7843d77 h1:e45vhcLBEJnir5trW4ZONCrXnvsYNj1TSN2s5/n7pCk= -github.com/initia-labs/initiavm v0.2.0-beta.2.0.20240201084548-c1e4e7843d77/go.mod h1:KTdC3W2wgeOiL0YYIu6MEvK4j8envSpLjH14sMKMD6k= +github.com/initia-labs/initiavm v0.2.0-beta.2.1.0.20240216100531-8cf24388583e h1:ts/RenGu2S8VydR6q3Dc8jTWEKW2gkSEVVsfyi12kwc= +github.com/initia-labs/initiavm v0.2.0-beta.2.1.0.20240216100531-8cf24388583e/go.mod h1:KTdC3W2wgeOiL0YYIu6MEvK4j8envSpLjH14sMKMD6k= github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= From 8f070d8fead44685b646cfff02274fed4ce42862 Mon Sep 17 00:00:00 2001 From: beer-1 <147697694+beer-1@users.noreply.github.com> Date: Mon, 26 Feb 2024 17:35:06 +0900 Subject: [PATCH 9/9] use latest vm --- go.mod | 4 +--- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 05c27b62..24ee4236 100644 --- a/go.mod +++ b/go.mod @@ -39,7 +39,7 @@ require ( github.com/hashicorp/go-metrics v0.5.2 github.com/initia-labs/OPinit v0.2.0-beta.1 // we also need to update `LIBINITIAVM_VERSION` of images/private/Dockerfile#5 - github.com/initia-labs/initiavm v0.2.0-beta.2.1 + github.com/initia-labs/initiavm v0.2.0-beta.2.0.20240226025020-6e778c96c52f github.com/pelletier/go-toml v1.9.5 github.com/pkg/errors v0.9.1 github.com/rakyll/statik v0.1.7 @@ -230,8 +230,6 @@ replace ( github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 - github.com/initia-labs/initiavm => github.com/initia-labs/initiavm v0.2.0-beta.2.1.0.20240216100531-8cf24388583e - // Downgraded to avoid bugs in following commits which caused simulations to fail. github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 ) diff --git a/go.sum b/go.sum index 2202b6f7..2bf84a9e 100644 --- a/go.sum +++ b/go.sum @@ -725,8 +725,8 @@ github.com/initia-labs/cosmos-sdk v0.0.0-20240123082052-77e8b246064a h1:wD9ynlE7 github.com/initia-labs/cosmos-sdk v0.0.0-20240123082052-77e8b246064a/go.mod h1:tlrkY1sntOt1q0OX/rqF0zRJtmXNoffAS6VFTcky+w8= github.com/initia-labs/iavl v0.0.0-20240208034922-5d81c449d4c0 h1:GQ7/UD5mB6q104roqZK5jxb6ff9sBk0/uwFxgERQIaU= github.com/initia-labs/iavl v0.0.0-20240208034922-5d81c449d4c0/go.mod h1:CmTGqMnRnucjxbjduneZXT+0vPgNElYvdefjX2q9tYc= -github.com/initia-labs/initiavm v0.2.0-beta.2.1.0.20240216100531-8cf24388583e h1:ts/RenGu2S8VydR6q3Dc8jTWEKW2gkSEVVsfyi12kwc= -github.com/initia-labs/initiavm v0.2.0-beta.2.1.0.20240216100531-8cf24388583e/go.mod h1:KTdC3W2wgeOiL0YYIu6MEvK4j8envSpLjH14sMKMD6k= +github.com/initia-labs/initiavm v0.2.0-beta.2.0.20240226025020-6e778c96c52f h1:zNxqfWC8MymWOakk2JL+PkzVHIX309cNBCnMJJRfUJM= +github.com/initia-labs/initiavm v0.2.0-beta.2.0.20240226025020-6e778c96c52f/go.mod h1:Yq+GksFbLNwnyNHKd84yDUTqFpzye3F1ic7Ax9sur10= github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=