diff --git a/Dockerfile b/Dockerfile index 86f1d52..7c5cb1d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM golang:1.22-alpine3.19 AS go-builder #ARG arch=x86_64 # See https://github.com/initia-labs/movevm/releases -ENV LIBMOVEVM_VERSION=v0.2.8 +ENV LIBMOVEVM_VERSION=v0.3.0 # this comes from standard alpine nightly file # https://github.com/rust-lang/docker-rust-nightly/blob/master/alpine3.12/Dockerfile diff --git a/app/app.go b/app/app.go index d466deb..34ca85f 100644 --- a/app/app.go +++ b/app/app.go @@ -97,6 +97,7 @@ import ( solomachine "github.com/cosmos/ibc-go/v8/modules/light-clients/06-solomachine" ibctm "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint" + appheaderinfo "github.com/initia-labs/initia/app/header_info" "github.com/initia-labs/initia/app/params" ibchooks "github.com/initia-labs/initia/x/ibc-hooks" ibchookskeeper "github.com/initia-labs/initia/x/ibc-hooks/keeper" @@ -146,9 +147,9 @@ import ( appkeepers "github.com/initia-labs/minimove/app/keepers" // noble forwarding keeper - forwarding "github.com/noble-assets/forwarding/x/forwarding" - forwardingkeeper "github.com/noble-assets/forwarding/x/forwarding/keeper" - forwardingtypes "github.com/noble-assets/forwarding/x/forwarding/types" + forwarding "github.com/noble-assets/forwarding/v2/x/forwarding" + forwardingkeeper "github.com/noble-assets/forwarding/v2/x/forwarding/keeper" + forwardingtypes "github.com/noble-assets/forwarding/v2/x/forwarding/types" // kvindexer indexer "github.com/initia-labs/kvindexer" @@ -275,6 +276,13 @@ func NewMinitiaApp( appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), ) *MinitiaApp { + // load the configs + mempoolTxs := cast.ToInt(appOpts.Get(server.FlagMempoolMaxTxs)) + queryGasLimit := cast.ToInt(appOpts.Get(server.FlagQueryGasLimit)) + + logger.Info("mempool max txs", "max_txs", mempoolTxs) + logger.Info("query gas limit", "gas_limit", queryGasLimit) + encodingConfig := params.MakeEncodingConfig() std.RegisterLegacyAminoCodec(encodingConfig.Amino) std.RegisterInterfaces(encodingConfig.InterfaceRegistry) @@ -491,6 +499,8 @@ func NewMinitiaApp( app.Logger(), runtime.NewKVStoreService(keys[forwardingtypes.StoreKey]), runtime.NewTransientStoreService(tkeys[forwardingtypes.TransientStoreKey]), + appheaderinfo.NewHeaderInfoService(), + authorityAddr, app.AccountKeeper, app.BankKeeper, app.IBCKeeper.ChannelKeeper, @@ -863,7 +873,7 @@ func NewMinitiaApp( Logger: app.Logger(), TxEncoder: app.txConfig.TxEncoder(), TxDecoder: app.txConfig.TxDecoder(), - MaxBlockSpace: math.LegacyMustNewDecFromStr("0.05"), + MaxBlockSpace: math.LegacyMustNewDecFromStr("0.01"), MaxTxs: 1, SignerExtractor: signerExtractor, }, opchildlanes.SystemLaneMatchHandler()) @@ -873,7 +883,7 @@ func NewMinitiaApp( Logger: app.Logger(), TxEncoder: app.txConfig.TxEncoder(), TxDecoder: app.txConfig.TxDecoder(), - MaxBlockSpace: math.LegacyMustNewDecFromStr("0.15"), + MaxBlockSpace: math.LegacyMustNewDecFromStr("0.09"), MaxTxs: 100, SignerExtractor: signerExtractor, }, factory, factory.MatchHandler()) @@ -882,7 +892,7 @@ func NewMinitiaApp( Logger: app.Logger(), TxEncoder: app.txConfig.TxEncoder(), TxDecoder: app.txConfig.TxDecoder(), - MaxBlockSpace: math.LegacyMustNewDecFromStr("0.2"), + MaxBlockSpace: math.LegacyMustNewDecFromStr("0.1"), MaxTxs: 100, SignerExtractor: signerExtractor, }, opchildlanes.NewFreeLaneMatchHandler(ac, app.OPChildKeeper).MatchHandler()) @@ -891,8 +901,8 @@ func NewMinitiaApp( Logger: app.Logger(), TxEncoder: app.txConfig.TxEncoder(), TxDecoder: app.txConfig.TxDecoder(), - MaxBlockSpace: math.LegacyMustNewDecFromStr("0.6"), - MaxTxs: 1000, + MaxBlockSpace: math.LegacyMustNewDecFromStr("0.8"), + MaxTxs: mempoolTxs, SignerExtractor: signerExtractor, }) diff --git a/cmd/minitiad/config.go b/cmd/minitiad/config.go index 56efe42..fec7d9a 100644 --- a/cmd/minitiad/config.go +++ b/cmd/minitiad/config.go @@ -39,6 +39,8 @@ func initAppConfig() (string, interface{}) { // // In simapp, we set the min gas prices to 0. srvCfg.MinGasPrices = fmt.Sprintf("0%s", types.BaseDenom) + srvCfg.Mempool.MaxTxs = 2000 + srvCfg.QueryGasLimit = 3000000 // Enable API and unsafe CORS (CORS allowed from any host) srvCfg.API.Enable = true diff --git a/go.mod b/go.mod index a5c680f..957eb0a 100644 --- a/go.mod +++ b/go.mod @@ -22,22 +22,22 @@ require ( github.com/cosmos/gogoproto v1.4.12 github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8 v8.0.2 github.com/cosmos/ibc-go/modules/capability v1.0.0 - github.com/cosmos/ibc-go/v8 v8.2.0 + github.com/cosmos/ibc-go/v8 v8.2.1 github.com/golang/mock v1.6.0 github.com/gorilla/mux v1.8.1 - github.com/initia-labs/OPinit v0.2.9 - github.com/initia-labs/initia v0.2.10 + github.com/initia-labs/OPinit v0.3.0 + github.com/initia-labs/initia v0.3.0 github.com/initia-labs/kvindexer v0.1.3 github.com/initia-labs/kvindexer/submodules/block v0.1.0 github.com/initia-labs/kvindexer/submodules/move-nft v0.1.2 github.com/initia-labs/kvindexer/submodules/pair v0.1.1 github.com/initia-labs/kvindexer/submodules/tx v0.1.0 // we also need to update `LIBMOVEVM_VERSION` of images/private/Dockerfile#5 - github.com/initia-labs/movevm v0.2.8 - github.com/noble-assets/forwarding v0.0.0-20240416085758-ed8e9efaf69a + github.com/initia-labs/movevm v0.3.0 + github.com/noble-assets/forwarding/v2 v2.0.0-20240514101621-172acc02aac6 github.com/pkg/errors v0.9.1 github.com/rakyll/statik v0.1.7 - github.com/skip-mev/block-sdk/v2 v2.1.1 + github.com/skip-mev/block-sdk/v2 v2.1.2 github.com/skip-mev/slinky v0.4.3 github.com/spf13/cast v1.6.0 github.com/spf13/cobra v1.8.0 @@ -158,7 +158,7 @@ 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/api v0.2.6 // indirect + github.com/initia-labs/OPinit/api v0.3.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect github.com/jsternberg/zap-logfmt v1.3.0 // indirect @@ -265,5 +265,4 @@ replace ( 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/ibc-go/v8 => github.com/initia-labs/ibc-go/v8 v8.0.0-20240419124350-4275a05abe2c - github.com/noble-assets/forwarding => github.com/initia-labs/forwarding v0.0.0-20240513113423-5c2833d87227 ) diff --git a/go.sum b/go.sum index 1e412cb..c330278 100644 --- a/go.sum +++ b/go.sum @@ -784,22 +784,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.2.9 h1:K8AUwti2EQ3lbtjEd6hprZgI7WWJYbE6d50mqogVwDM= -github.com/initia-labs/OPinit v0.2.9/go.mod h1:nm0Cm1iHwiXjIFPvifSi/vu/61TXkJDmVmh+YiXqyw0= -github.com/initia-labs/OPinit/api v0.2.6 h1:his/7339UJbBcHOY4TcRzGxNWBtcpdt9bzfGKBh/d8w= -github.com/initia-labs/OPinit/api v0.2.6/go.mod h1:oo8VsUFo1vVRg1jXhTMzlm5IF1JjU0I0u0OF/jo6iO4= +github.com/initia-labs/OPinit v0.3.0 h1:s3q6f4br75g/BuNR9d9Da1/hxKpC1vGwvVv8LKddEsk= +github.com/initia-labs/OPinit v0.3.0/go.mod h1:pHU2472uQZpiKXBOa/D7/aDYn0gtTiddKvhloyliOQU= +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-20240503082631-d98d5e638a38 h1:yNlY5QpMazwZ7C7S4vKWrNYvWoSWf2bdEuG7jOAPU/0= github.com/initia-labs/cometbft v0.0.0-20240503082631-d98d5e638a38/go.mod h1:+W1nh53IVhT5VG86zofNq2I2Tw0RQIoYSmpTHJ9Lex8= 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/forwarding v0.0.0-20240513113423-5c2833d87227 h1:mwX9VHlvdOCJxhTNttt3u6yXywkBWgFJ4gFsjyG9dMw= -github.com/initia-labs/forwarding v0.0.0-20240513113423-5c2833d87227/go.mod h1:nMEL3w1pf7+2LAQ3jqX+XaK0GWcdnwXjwlBnX7QO9ho= 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.2.10 h1:wX5EDpPEk15aM3hVEi3YU4ygZZ0O1wlTMuJIoALlpjQ= -github.com/initia-labs/initia v0.2.10/go.mod h1:Ehh3gMaGOrt9qCQrggxZsiD3XAJh4IYzmOiueDRlw3Y= +github.com/initia-labs/initia v0.3.0 h1:0MJBNYKfvgtdZR0cXMUJniFFqIjnh2UCHwBaSRl3J9I= +github.com/initia-labs/initia v0.3.0/go.mod h1:+5YUKMLFmsBmM36wldxgc9DMWZmm0sRB8PPrw8fY9kc= 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= @@ -810,8 +808,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.2.8 h1:4UCUOrYSRQbfBLHEryqG2U1i9Qme/ms14HoVhcpmUNI= -github.com/initia-labs/movevm v0.2.8/go.mod h1:6MxR4GP5zH3JUc1IMgfqAe1e483mZVS7fshPknZPJ30= +github.com/initia-labs/movevm v0.3.0 h1:uIAFlhkMrwrISRmkSw7Ts78N9aVq2a3k9jAgeHxvoUA= +github.com/initia-labs/movevm v0.3.0/go.mod h1:6MxR4GP5zH3JUc1IMgfqAe1e483mZVS7fshPknZPJ30= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= @@ -940,6 +938,8 @@ 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/noble-assets/forwarding/v2 v2.0.0-20240514101621-172acc02aac6 h1:YQ6I+9F24PD9U/Q83/t/DCPwye8IeHXOrQWorPx2aSE= +github.com/noble-assets/forwarding/v2 v2.0.0-20240514101621-172acc02aac6/go.mod h1:fkfElMT7VJZXXqywx+OE6qsEXddT/fwKX5XNdIl747U= 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= @@ -1084,8 +1084,8 @@ github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrf github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/skip-mev/block-sdk/v2 v2.1.1 h1:Audcf6Dtev16JRewV8M8GfjEDDsu6ayxlz9GHAt8tXs= -github.com/skip-mev/block-sdk/v2 v2.1.1/go.mod h1:AOjFICNrPpq/Cq1f97CcC7ljWhxCzmfmyz4/Ir8/xFM= +github.com/skip-mev/block-sdk/v2 v2.1.2 h1:fNKbrb+PVVzuU0JiSuWgBV4Afj5zZ1VeHQJp88wSl1g= +github.com/skip-mev/block-sdk/v2 v2.1.2/go.mod h1:kIq7SMva0/eHKTCiG/oI5XGxD4HNVK0t71TrUZqHcvA= github.com/skip-mev/chaintestutil v0.0.0-20240116134208-3e49bf514803 h1:VRRVYN3wsOIOqVT3e3nDh3vyUl6RvF9QwdK4BvgPP9c= github.com/skip-mev/chaintestutil v0.0.0-20240116134208-3e49bf514803/go.mod h1:LF2koCTmygQnz11yjSfHvNP8axdyZ2lTEw0EwI+dnno= github.com/skip-mev/slinky v0.4.3 h1:4LWqeDa2and84GXG3HgAAmDa145+TG2WQ0uRDAU7AzA= diff --git a/images/private/Dockerfile b/images/private/Dockerfile index dc3bbf2..2d821e5 100644 --- a/images/private/Dockerfile +++ b/images/private/Dockerfile @@ -2,7 +2,7 @@ FROM golang:1.22-alpine3.19 AS go-builder #ARG arch=x86_64 # See https://github.com/initia-labs/movevm/releases -ARG LIBMOVEVM_VERSION=v0.2.8 +ARG LIBMOVEVM_VERSION=v0.3.0 # this comes from standard alpine nightly file # https://github.com/rust-lang/docker-rust-nightly/blob/master/alpine3.12/Dockerfile