diff --git a/app/apptesting/test_suite.go b/app/apptesting/test_suite.go index 1c7b4f569..2790a370a 100644 --- a/app/apptesting/test_suite.go +++ b/app/apptesting/test_suite.go @@ -57,8 +57,8 @@ func (s *KeeperTestHelper) CreateRollappWithNameWithProposer(name string) (strin }, } - aliceBal := sdk.NewCoins(s.App.RollappKeeper.GetParams(s.Ctx).RegistrationFee) - FundAccount(s.App, s.Ctx, sdk.MustAccAddressFromBech32(alice), aliceBal) + // aliceBal := sdk.NewCoins(s.App.RollappKeeper.GetParams(s.Ctx).RegistrationFee) TODO: enable after x/dymns hooks are wired + // FundAccount(s.App, s.Ctx, sdk.MustAccAddressFromBech32(alice), aliceBal) msgServer := rollappkeeper.NewMsgServerImpl(*s.App.RollappKeeper) _, err := msgServer.CreateRollapp(s.Ctx, &msgCreateRollapp) diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index d111971a3..378e3cba5 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -341,7 +341,6 @@ func (a *AppKeepers) InitKeepers( a.GetSubspace(rollappmoduletypes.ModuleName), a.IBCKeeper.ChannelKeeper, a.IBCKeeper.ClientKeeper, - a.BankKeeper, ) a.SequencerKeeper = *sequencermodulekeeper.NewKeeper( diff --git a/app/params/encoding.go b/app/params/encoding.go index b9e9a1634..65b78a0b1 100644 --- a/app/params/encoding.go +++ b/app/params/encoding.go @@ -15,7 +15,4 @@ type EncodingConfig struct { Amino *codec.LegacyAmino } -const ( - StakePerAccount = "stake_per_account" - InitiallyBondedValidators = "initially_bonded_validators" -) +const StakePerAccount = "stake_per_account" diff --git a/app/upgrades/v4/upgrade.go b/app/upgrades/v4/upgrade.go index 73dc96be8..f80548933 100644 --- a/app/upgrades/v4/upgrade.go +++ b/app/upgrades/v4/upgrade.go @@ -1,8 +1,6 @@ package v4 import ( - "strings" - "github.com/cometbft/cometbft/crypto" "github.com/cosmos/cosmos-sdk/baseapp" @@ -136,7 +134,6 @@ func migrateSequencers(ctx sdk.Context, sequencerkeeper sequencerkeeper.Keeper) func ConvertOldRollappToNew(oldRollapp rollapptypes.Rollapp) rollapptypes.Rollapp { bech32Prefix := oldRollapp.RollappId[:5] - alias := strings.Split(oldRollapp.RollappId, "_")[0] return rollapptypes.Rollapp{ RollappId: oldRollapp.RollappId, Owner: oldRollapp.Owner, @@ -147,8 +144,7 @@ func ConvertOldRollappToNew(oldRollapp rollapptypes.Rollapp) rollapptypes.Rollap // TODO: regarding missing data - https://github.com/dymensionxyz/dymension/issues/986 Bech32Prefix: bech32Prefix, // placeholder data GenesisChecksum: string(crypto.Sha256([]byte(oldRollapp.RollappId))), // placeholder data - Alias: alias, - VmType: rollapptypes.Rollapp_EVM, // placeholder data + VmType: rollapptypes.Rollapp_EVM, // placeholder data Metadata: &rollapptypes.RollappMetadata{ Website: "", Description: "", diff --git a/app/upgrades/v4/upgrade_test.go b/app/upgrades/v4/upgrade_test.go index 27a47079d..8e8de70dc 100644 --- a/app/upgrades/v4/upgrade_test.go +++ b/app/upgrades/v4/upgrade_test.go @@ -47,7 +47,6 @@ const ( expectDelayedackEpochIdentifier = "hour" expectDisputePeriodInBlocks = 3 - expectRegistrationFee = "10000000000000000000adym" ) var expectDelayedackBridgingFee = sdk.NewDecWithPrec(1, 3) @@ -154,8 +153,7 @@ func (s *UpgradeTestSuite) validateDelayedAckParamsMigration() error { func (s *UpgradeTestSuite) validateRollappParamsMigration() error { rollappParams := s.App.RollappKeeper.GetParams(s.Ctx) - cond := rollappParams.DisputePeriodInBlocks == expectDisputePeriodInBlocks && - rollappParams.RegistrationFee.String() == expectRegistrationFee + cond := rollappParams.DisputePeriodInBlocks == expectDisputePeriodInBlocks if !cond { return fmt.Errorf("rollapp parameters not set correctly") diff --git a/go.mod b/go.mod index 8bb2f38b6..394a70e12 100644 --- a/go.mod +++ b/go.mod @@ -7,6 +7,7 @@ require ( cosmossdk.io/errors v1.0.1 cosmossdk.io/math v1.3.0 cosmossdk.io/simapp v0.0.0-20230608160436-666c345ad23d + github.com/cockroachdb/errors v1.11.1 github.com/cometbft/cometbft v0.37.5 github.com/cometbft/cometbft-db v0.11.0 github.com/cosmos/cosmos-proto v1.0.0-beta.5 @@ -20,7 +21,6 @@ require ( github.com/dymensionxyz/sdk-utils v0.2.7-0.20240807091416-0717365f0f61 github.com/ethereum/go-ethereum v1.10.26 github.com/evmos/ethermint v0.22.0 - github.com/gogo/protobuf v1.3.3 github.com/golang/protobuf v1.5.4 github.com/gorilla/mux v1.8.1 github.com/grpc-ecosystem/grpc-gateway v1.16.0 @@ -70,7 +70,6 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/chzyer/readline v1.5.1 // indirect github.com/cockroachdb/apd/v2 v2.0.2 // indirect - github.com/cockroachdb/errors v1.11.1 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect github.com/cockroachdb/pebble v1.1.0 // indirect github.com/cockroachdb/redact v1.1.5 // indirect @@ -112,6 +111,7 @@ require ( github.com/go-stack/stack v1.8.1 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect + github.com/gogo/protobuf v1.3.3 // indirect github.com/golang/glog v1.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect diff --git a/ibctesting/utils_test.go b/ibctesting/utils_test.go index 9e71f3929..4d2ca00ba 100644 --- a/ibctesting/utils_test.go +++ b/ibctesting/utils_test.go @@ -106,11 +106,11 @@ func (s *utilSuite) rollappMsgServer() rollapptypes.MsgServer { func (s *utilSuite) SetupTest() { s.coordinator = ibctesting.NewCoordinator(s.T(), 2) // initializes test chains s.coordinator.Chains[rollappChainID()] = s.newTestChainWithSingleValidator(s.T(), s.coordinator, rollappChainID()) - s.fundSenderAccount() + // s.fundSenderAccount() // TODO: enable after x/dymns hooks are wired } func (s *utilSuite) fundSenderAccount() { - apptesting.FundAccount(s.hubApp(), s.hubCtx(), s.hubChain().SenderAccount.GetAddress(), sdk.NewCoins(rollapptypes.DefaultRegistrationFee)) + // apptesting.FundAccount(s.hubApp(), s.hubCtx(), s.hubChain().SenderAccount.GetAddress(), sdk.NewCoins(rollapptypes.DefaultRegistrationFee)) } // CreateRollappWithFinishedGenesis creates a rollapp whose 'genesis' protocol is complete: diff --git a/proto/dymensionxyz/dymension/rollapp/params.proto b/proto/dymensionxyz/dymension/rollapp/params.proto index a5f4bc06f..a03a1ea1a 100644 --- a/proto/dymensionxyz/dymension/rollapp/params.proto +++ b/proto/dymensionxyz/dymension/rollapp/params.proto @@ -17,7 +17,4 @@ message Params { [ (gogoproto.moretags) = "yaml:\"dispute_period_in_blocks\"" ]; reserved 2,3; - // registration_fee is the fee that is required to register a rollapp - cosmos.base.v1beta1.Coin registration_fee = 4 - [ (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"registration_fee\"" ]; } diff --git a/proto/dymensionxyz/dymension/rollapp/query.proto b/proto/dymensionxyz/dymension/rollapp/query.proto index 6bf372f71..5f723f908 100644 --- a/proto/dymensionxyz/dymension/rollapp/query.proto +++ b/proto/dymensionxyz/dymension/rollapp/query.proto @@ -29,12 +29,6 @@ service Query { "/dymensionxyz/dymension/rollapp/eip155/{eip155}"; } - rpc RollappByAlias(QueryGetRollappByAliasRequest) - returns (QueryGetRollappResponse) { - option (google.api.http).get = - "/dymensionxyz/dymension/rollapp/alias/{alias}"; - } - // Queries a list of Rollapp items. rpc RollappAll(QueryAllRollappRequest) returns (QueryAllRollappResponse) { option (google.api.http).get = "/dymensionxyz/dymension/rollapp/rollapp"; @@ -74,8 +68,6 @@ message QueryGetRollappRequest { string rollappId = 1; } message QueryGetRollappByEIP155Request { uint64 eip155 = 1; } -message QueryGetRollappByAliasRequest { string alias = 1; } - message QueryGetLatestHeightRequest { string rollappId = 1; bool finalized = 2; diff --git a/proto/dymensionxyz/dymension/rollapp/rollapp.proto b/proto/dymensionxyz/dymension/rollapp/rollapp.proto index 95d05cf4e..4e41d6c73 100644 --- a/proto/dymensionxyz/dymension/rollapp/rollapp.proto +++ b/proto/dymensionxyz/dymension/rollapp/rollapp.proto @@ -41,10 +41,8 @@ message Rollapp { repeated string registeredDenoms = 10; // unique bech32 prefix string bech32_prefix = 11; - // alias is the chain alias used for display and namespace system - string alias = 12; // checksum used to verify integrity of the genesis file - string genesis_checksum = 13; + string genesis_checksum = 12; // metadata is the rollapp metadata RollappMetadata metadata = 14; // initial_sequencer is an option to preset one or more coma-separated bech32-encoded addresses of the diff --git a/proto/dymensionxyz/dymension/rollapp/tx.proto b/proto/dymensionxyz/dymension/rollapp/tx.proto index 72d1175e1..5d1adc58d 100644 --- a/proto/dymensionxyz/dymension/rollapp/tx.proto +++ b/proto/dymensionxyz/dymension/rollapp/tx.proto @@ -57,12 +57,10 @@ message MsgUpdateRollappInformation { // sequencer that are allowed to initially serve this rollappId. // wildcard '*' means any sequencer is allowed to be the first proposer. string initial_sequencer = 3; - // alias is the chain alias used for display and namespace system - string alias = 4; // checksum used to verify integrity - string genesis_checksum = 5; + string genesis_checksum = 4; // metadata is the rollapp metadata - RollappMetadata metadata = 6 [(gogoproto.nullable) = true ]; + RollappMetadata metadata = 5 [(gogoproto.nullable) = true ]; } message MsgUpdateRollappInformationResponse { diff --git a/testutil/keeper/rollapp.go b/testutil/keeper/rollapp.go index 7c2ba5972..92a7f85cd 100644 --- a/testutil/keeper/rollapp.go +++ b/testutil/keeper/rollapp.go @@ -38,8 +38,8 @@ func RollappKeeper(t testing.TB) (*keeper.Keeper, sdk.Context) { memStoreKey, "RollappParams", ) - k := keeper.NewKeeper(cdc, storeKey, paramsSubspace, nil, nil, nil) + k := keeper.NewKeeper(cdc, storeKey, paramsSubspace, nil, nil) ctx := sdk.NewContext(stateStore, cometbftproto.Header{}, false, log.NewNopLogger()) // Initialize params diff --git a/x/common/types/stub_hooks.go b/x/common/types/stub_hooks.go new file mode 100644 index 000000000..27c5e4103 --- /dev/null +++ b/x/common/types/stub_hooks.go @@ -0,0 +1,9 @@ +package types + +import sdk "github.com/cosmos/cosmos-sdk/types" + +type StubGammHooks struct{} + +func (StubGammHooks) AfterJoinPool(sdk.Context, sdk.AccAddress, uint64, sdk.Coins, sdk.Int) {} +func (StubGammHooks) AfterExitPool(sdk.Context, sdk.AccAddress, uint64, sdk.Int, sdk.Coins) {} +func (StubGammHooks) AfterSwap(sdk.Context, sdk.AccAddress, uint64, sdk.Coins, sdk.Coins) {} diff --git a/x/delayedack/ibc_middleware.go b/x/delayedack/ibc_middleware.go index 8bcdd80fa..ce12233b6 100644 --- a/x/delayedack/ibc_middleware.go +++ b/x/delayedack/ibc_middleware.go @@ -12,6 +12,7 @@ import ( "github.com/dymensionxyz/dymension/v3/x/delayedack/keeper" "github.com/dymensionxyz/dymension/v3/x/delayedack/types" rollappkeeper "github.com/dymensionxyz/dymension/v3/x/rollapp/keeper" + rollapptypes "github.com/dymensionxyz/dymension/v3/x/rollapp/types" ) var _ porttypes.Middleware = &IBCMiddleware{} @@ -19,7 +20,8 @@ var _ porttypes.Middleware = &IBCMiddleware{} type IBCMiddleware struct { porttypes.IBCModule keeper.Keeper // keeper is an ics4 wrapper - raKeeper rollappkeeper.Keeper + rollapptypes.StubRollappCreatedHooks + raKeeper rollappkeeper.Keeper } type option func(*IBCMiddleware) diff --git a/x/delayedack/rollapp_hooks.go b/x/delayedack/rollapp_hooks.go index 873cd9545..f9dbee5c3 100644 --- a/x/delayedack/rollapp_hooks.go +++ b/x/delayedack/rollapp_hooks.go @@ -8,10 +8,6 @@ import ( var _ rollapptypes.RollappHooks = &IBCMiddleware{} -func (w IBCMiddleware) BeforeUpdateState(ctx sdk.Context, seqAddr string, rollappId string) error { - return nil -} - // AfterStateFinalized implements the RollappHooks interface func (w IBCMiddleware) AfterStateFinalized(ctx sdk.Context, rollappID string, stateInfo *rollapptypes.StateInfo) error { // Finalize the packets for the rollapp at the given height @@ -22,8 +18,3 @@ func (w IBCMiddleware) AfterStateFinalized(ctx sdk.Context, rollappID string, st func (w IBCMiddleware) FraudSubmitted(ctx sdk.Context, rollappID string, height uint64, seqAddr string) error { return w.HandleFraud(ctx, rollappID, w.IBCModule) } - -// RollappCreated implements types.RollappHooks. -func (im IBCMiddleware) RollappCreated(ctx sdk.Context, rollappID string) error { - return nil -} diff --git a/x/delayedack/types/genesis_test.go b/x/delayedack/types/genesis_test.go index 9f1c1073d..567d50bae 100644 --- a/x/delayedack/types/genesis_test.go +++ b/x/delayedack/types/genesis_test.go @@ -8,10 +8,14 @@ import ( chantypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" "github.com/stretchr/testify/require" + appparams "github.com/dymensionxyz/dymension/v3/app/params" ctypes "github.com/dymensionxyz/dymension/v3/x/common/types" "github.com/dymensionxyz/dymension/v3/x/delayedack/types" ) +// this is needed to register the correct BECH32 prefix +const _ = appparams.BaseDenom + func TestGenesisState_Validate(t *testing.T) { for _, tc := range []struct { desc string diff --git a/x/incentives/client/cli/query_test.go b/x/incentives/client/cli/query_test.go index 0d0326b50..dc7745065 100644 --- a/x/incentives/client/cli/query_test.go +++ b/x/incentives/client/cli/query_test.go @@ -28,7 +28,7 @@ type QueryTestSuite struct { // SetupLockAndGauge creates both a lock and a gauge. func (suite *QueryTestSuite) CreateDefaultRollapp() string { alice := sdk.AccAddress("addr1---------------") - suite.FundAcc(alice, sdk.NewCoins(rollapptypes.DefaultRegistrationFee)) + // suite.FundAcc(alice, sdk.NewCoins(rollapptypes.DefaultRegistrationFee)) TODO: enable after x/dymns hooks are wired msgCreateRollapp := rollapptypes.MsgCreateRollapp{ Creator: alice.String(), diff --git a/x/incentives/keeper/suite_test.go b/x/incentives/keeper/suite_test.go index 1c4cb6f6a..9f946ebd1 100644 --- a/x/incentives/keeper/suite_test.go +++ b/x/incentives/keeper/suite_test.go @@ -206,7 +206,7 @@ func (suite *KeeperTestSuite) SetupLockAndGauge(isPerpetual bool) (sdk.AccAddres // SetupLockAndGauge creates both a lock and a gauge. func (suite *KeeperTestSuite) CreateDefaultRollapp(addr sdk.AccAddress) string { - suite.FundAcc(addr, sdk.NewCoins(rollapptypes.DefaultRegistrationFee)) + // suite.FundAcc(addr, sdk.NewCoins(rollapptypes.DefaultRegistrationFee)) TODO: enable after x/dymns hooks are wired msgCreateRollapp := rollapptypes.MsgCreateRollapp{ Creator: addr.String(), diff --git a/x/rollapp/client/cli/flags.go b/x/rollapp/client/cli/flags.go index 693c00039..ad272fc6b 100644 --- a/x/rollapp/client/cli/flags.go +++ b/x/rollapp/client/cli/flags.go @@ -7,9 +7,7 @@ import ( const ( FlagInitSequencer = "init-sequencer" FlagGenesisChecksum = "genesis-checksum" - FlagAlias = "alias" FlagMetadata = "metadata" - FlagByAlias = "by-alias" ) // FlagSetCreateRollapp returns flags for creating rollapps. @@ -25,7 +23,6 @@ func FlagSetUpdateRollapp() *flag.FlagSet { fs.String(FlagInitSequencer, "", "The address of the sequencer that will be used to initialize the rollapp") fs.String(FlagGenesisChecksum, "", "The checksum of the genesis file of the rollapp") - fs.String(FlagAlias, "", "The alias of the rollapp") fs.String(FlagMetadata, "", "The metadata of the rollapp") return fs diff --git a/x/rollapp/client/cli/query.go b/x/rollapp/client/cli/query.go index 76a36db04..457aeadba 100644 --- a/x/rollapp/client/cli/query.go +++ b/x/rollapp/client/cli/query.go @@ -2,13 +2,9 @@ package cli import ( "fmt" - // "strings" - - "github.com/spf13/cobra" "github.com/cosmos/cosmos-sdk/client" - // "github.com/cosmos/cosmos-sdk/client/flags" - // sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/spf13/cobra" "github.com/dymensionxyz/dymension/v3/x/rollapp/types" ) diff --git a/x/rollapp/client/cli/query_rollapp.go b/x/rollapp/client/cli/query_rollapp.go index e366dfeb1..d9b99da3f 100644 --- a/x/rollapp/client/cli/query_rollapp.go +++ b/x/rollapp/client/cli/query_rollapp.go @@ -5,7 +5,6 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/gogo/protobuf/proto" "github.com/spf13/cobra" "github.com/dymensionxyz/dymension/v3/x/rollapp/types" @@ -46,24 +45,19 @@ func CmdListRollapp() *cobra.Command { func CmdShowRollapp() *cobra.Command { cmd := &cobra.Command{ - Use: "show [rollapp-id] [by-alias]", - Short: "Query the rollapp associated with the specified rollapp-id or alias", + Use: "show [rollapp-id]", + Short: "Query the rollapp associated with the specified rollapp-id", Args: cobra.ExactArgs(1), - Example: "dymd query rollapp show ROLLAPP_CHAIN_ID, dymd query rollapp show ROLLAPP_ALIAS --by-alias", + Example: "dymd query rollapp show ROLLAPP_CHAIN_ID", RunE: func(cmd *cobra.Command, args []string) error { clientCtx := client.GetClientContextFromCmd(cmd) queryClient := types.NewQueryClient(clientCtx) - argRollapp := args[0] - - var ( - res proto.Message - err error - ) - if byAlias, _ := cmd.Flags().GetBool(FlagByAlias); byAlias { - res, err = rollappByAlias(cmd.Context(), queryClient, argRollapp) - } else { - res, err = rollappByID(cmd.Context(), queryClient, argRollapp) + + params := &types.QueryGetRollappRequest{ + RollappId: args[0], } + + res, err := queryClient.Rollapp(cmd.Context(), params) if err != nil { return err } @@ -72,32 +66,7 @@ func CmdShowRollapp() *cobra.Command { }, } - cmd.Flags().BoolP(FlagByAlias, "a", false, "Query the rollapp by alias") flags.AddQueryFlagsToCmd(cmd) return cmd } - -func rollappByID(ctx context.Context, queryClient types.QueryClient, rollappID string) (*types.QueryGetRollappResponse, error) { - params := &types.QueryGetRollappRequest{ - RollappId: rollappID, - } - - res, err := queryClient.Rollapp(ctx, params) - if err != nil { - return nil, err - } - return res, nil -} - -func rollappByAlias(ctx context.Context, queryClient types.QueryClient, alias string) (*types.QueryGetRollappResponse, error) { - params := &types.QueryGetRollappByAliasRequest{ - Alias: alias, - } - - res, err := queryClient.RollappByAlias(ctx, params) - if err != nil { - return nil, err - } - return res, nil -} diff --git a/x/rollapp/client/cli/tx_update_rollapp.go b/x/rollapp/client/cli/tx_update_rollapp.go index f4f6e7949..24022f32f 100644 --- a/x/rollapp/client/cli/tx_update_rollapp.go +++ b/x/rollapp/client/cli/tx_update_rollapp.go @@ -12,9 +12,9 @@ import ( func CmdUpdateRollapp() *cobra.Command { cmd := &cobra.Command{ - Use: "update-rollapp [rollapp-id] [init-sequencer] [genesis_checksum] [alias] [metadata]", + Use: "update-rollapp [rollapp-id] [init-sequencer] [genesis_checksum] [metadata]", Short: "Update a new rollapp", - Example: "dymd tx rollapp update-rollapp ROLLAPP_CHAIN_ID --init-sequencer ',' --genesis-checksum --alias Rollapp --metadata metadata.json", + Example: "dymd tx rollapp update-rollapp ROLLAPP_CHAIN_ID --init-sequencer ',' --genesis-checksum --metadata metadata.json", Args: cobra.MinimumNArgs(1), RunE: func(cmd *cobra.Command, args []string) (err error) { argRollappId := args[0] @@ -29,11 +29,6 @@ func CmdUpdateRollapp() *cobra.Command { return } - alias, err := cmd.Flags().GetString(FlagAlias) - if err != nil { - return - } - metadataFlag, err := cmd.Flags().GetString(FlagMetadata) if err != nil { return @@ -56,7 +51,6 @@ func CmdUpdateRollapp() *cobra.Command { argRollappId, initSequencer, genesisChecksum, - alias, metadata, ) diff --git a/x/rollapp/keeper/block_height_to_finalization_queue_test.go b/x/rollapp/keeper/block_height_to_finalization_queue_test.go index 62cc5f5e6..83abd3e99 100644 --- a/x/rollapp/keeper/block_height_to_finalization_queue_test.go +++ b/x/rollapp/keeper/block_height_to_finalization_queue_test.go @@ -641,4 +641,6 @@ func (m mockRollappHooks) AfterStateFinalized(_ sdk.Context, _ string, stateInfo } func (m mockRollappHooks) BeforeUpdateState(sdk.Context, string, string) error { return nil } func (m mockRollappHooks) FraudSubmitted(sdk.Context, string, uint64, string) error { return nil } -func (m mockRollappHooks) RollappCreated(sdk.Context, string) error { return nil } +func (m mockRollappHooks) RollappCreated(sdk.Context, string, string, sdk.AccAddress) error { + return nil +} diff --git a/x/rollapp/keeper/grpc_query_get_state_info_by_height_test.go b/x/rollapp/keeper/grpc_query_get_state_info_by_height_test.go index b919259c0..14059aac3 100644 --- a/x/rollapp/keeper/grpc_query_get_state_info_by_height_test.go +++ b/x/rollapp/keeper/grpc_query_get_state_info_by_height_test.go @@ -57,29 +57,29 @@ func createNStateInfoAndIndex(keeper *keeper.Keeper, ctx sdk.Context, n int, rol } func TestStateInfoByHeightLatestStateInfoIndex(t *testing.T) { - keeper, ctx := keepertest.RollappKeeper(t) + k, ctx := keepertest.RollappKeeper(t) wctx := sdk.WrapSDKContext(ctx) rollappId := "rollappid_1234-1" - keeper.SetRollapp(ctx, types.Rollapp{ + k.SetRollapp(ctx, types.Rollapp{ RollappId: rollappId, }) request := &types.QueryGetStateInfoRequest{ RollappId: rollappId, Height: 100, } - _, err := keeper.StateInfo(wctx, request) + _, err := k.StateInfo(wctx, request) require.EqualError(t, err, errorsmod.Wrapf(types.ErrNotFound, "LatestStateInfoIndex wasn't found for rollappId=%s", rollappId).Error()) } func TestStateInfoByHeightMissingStateInfo(t *testing.T) { - keeper, ctx := keepertest.RollappKeeper(t) + k, ctx := keepertest.RollappKeeper(t) wctx := sdk.WrapSDKContext(ctx) rollappId := urand.RollappID() - keeper.SetRollapp(ctx, types.Rollapp{ + k.SetRollapp(ctx, types.Rollapp{ RollappId: rollappId, }) - keeper.SetLatestStateInfoIndex(ctx, types.StateInfoIndex{ + k.SetLatestStateInfoIndex(ctx, types.StateInfoIndex{ RollappId: rollappId, Index: uint64(85), }) @@ -87,7 +87,7 @@ func TestStateInfoByHeightMissingStateInfo(t *testing.T) { RollappId: rollappId, Height: 100, } - _, err := keeper.StateInfo(wctx, request) + _, err := k.StateInfo(wctx, request) require.EqualError(t, err, errorsmod.Wrapf(types.ErrNotFound, "StateInfo wasn't found for rollappId=%s, index=%d", rollappId, 85).Error()) @@ -121,10 +121,10 @@ func TestStateInfoByHeightMissingStateInfo1(t *testing.T) { } func TestStateInfoByHeightErr(t *testing.T) { - keeper, ctx := keepertest.RollappKeeper(t) + k, ctx := keepertest.RollappKeeper(t) wctx := sdk.WrapSDKContext(ctx) rollappID := urand.RollappID() - msgs := createNStateInfoAndIndex(keeper, ctx, 4, rollappID) + msgs := createNStateInfoAndIndex(k, ctx, 4, rollappID) for _, tc := range []struct { desc string request *types.QueryGetStateInfoRequest @@ -185,7 +185,7 @@ func TestStateInfoByHeightErr(t *testing.T) { }, } { t.Run(tc.desc, func(t *testing.T) { - response, err := keeper.StateInfo(wctx, tc.request) + response, err := k.StateInfo(wctx, tc.request) if tc.err != nil { require.ErrorIs(t, err, tc.err) } else { @@ -200,11 +200,11 @@ func TestStateInfoByHeightErr(t *testing.T) { } func TestStateInfoByHeightValidIncreasingBlockBatches(t *testing.T) { - keeper, ctx := keepertest.RollappKeeper(t) + k, ctx := keepertest.RollappKeeper(t) wctx := sdk.WrapSDKContext(ctx) numOfMsg := 20 rollappID := urand.RollappID() - msgs := createNStateInfoAndIndex(keeper, ctx, numOfMsg, rollappID) + msgs := createNStateInfoAndIndex(k, ctx, numOfMsg, rollappID) for i := 0; i < numOfMsg; i += 1 { for height := msgs[i].StartHeight; height < msgs[i].StartHeight+msgs[i].NumBlocks; height += 1 { @@ -212,7 +212,7 @@ func TestStateInfoByHeightValidIncreasingBlockBatches(t *testing.T) { RollappId: rollappID, Height: height, } - response, err := keeper.StateInfo(wctx, request) + response, err := k.StateInfo(wctx, request) require.NoError(t, err) require.Equal(t, nullify.Fill(&types.QueryGetStateInfoResponse{StateInfo: msgs[i]}), @@ -223,11 +223,11 @@ func TestStateInfoByHeightValidIncreasingBlockBatches(t *testing.T) { } func TestStateInfoByHeightValidDecreasingBlockBatches(t *testing.T) { - keeper, ctx := keepertest.RollappKeeper(t) + k, ctx := keepertest.RollappKeeper(t) wctx := sdk.WrapSDKContext(ctx) numOfMsg := 20 rollappID := urand.RollappID() - msgs := createNStateInfoAndIndex(keeper, ctx, numOfMsg, rollappID) + msgs := createNStateInfoAndIndex(k, ctx, numOfMsg, rollappID) for i := 0; i < numOfMsg; i += 1 { for height := msgs[i].StartHeight; height < msgs[i].StartHeight+msgs[i].NumBlocks; height += 1 { @@ -235,7 +235,7 @@ func TestStateInfoByHeightValidDecreasingBlockBatches(t *testing.T) { RollappId: rollappID, Height: height, } - response, err := keeper.StateInfo(wctx, request) + response, err := k.StateInfo(wctx, request) require.NoError(t, err) require.Equal(t, nullify.Fill(&types.QueryGetStateInfoResponse{StateInfo: msgs[i]}), diff --git a/x/rollapp/keeper/grpc_query_params_test.go b/x/rollapp/keeper/grpc_query_params_test.go index 8e52d2ce4..29aeb4313 100644 --- a/x/rollapp/keeper/grpc_query_params_test.go +++ b/x/rollapp/keeper/grpc_query_params_test.go @@ -19,5 +19,4 @@ func TestParamsQuery(t *testing.T) { response, err := keeper.Params(wctx, &types.QueryParamsRequest{}) require.NoError(t, err) require.EqualValues(t, params.DisputePeriodInBlocks, response.Params.DisputePeriodInBlocks) - require.Equal(t, params.RegistrationFee, response.Params.RegistrationFee) } diff --git a/x/rollapp/keeper/grpc_query_rollapp.go b/x/rollapp/keeper/grpc_query_rollapp.go index 2859d81be..7dc437a24 100644 --- a/x/rollapp/keeper/grpc_query_rollapp.go +++ b/x/rollapp/keeper/grpc_query_rollapp.go @@ -46,10 +46,6 @@ func (k Keeper) RollappByEIP155(c context.Context, req *types.QueryGetRollappByE return queryRollapp[types.QueryGetRollappByEIP155Request](c, k, req, k.GetRollappByEIP155, req.GetEip155) } -func (k Keeper) RollappByAlias(c context.Context, req *types.QueryGetRollappByAliasRequest) (*types.QueryGetRollappResponse, error) { - return queryRollapp[types.QueryGetRollappByAliasRequest](c, k, req, k.GetRollappByAlias, req.GetAlias) -} - type ( queryRollappFn[T any] func(ctx sdk.Context, q T) (val types.Rollapp, found bool) queryRollappGetArgFn[T any] func() T diff --git a/x/rollapp/keeper/keeper.go b/x/rollapp/keeper/keeper.go index 565da90a4..7eab7de2a 100644 --- a/x/rollapp/keeper/keeper.go +++ b/x/rollapp/keeper/keeper.go @@ -21,7 +21,6 @@ type Keeper struct { ibcClientKeeper types.IBCClientKeeper channelKeeper types.ChannelKeeper - bankKeeper types.BankKeeper finalizePending func(ctx sdk.Context, stateInfoIndex types.StateInfoIndex) error } @@ -32,7 +31,6 @@ func NewKeeper( ps paramtypes.Subspace, channelKeeper types.ChannelKeeper, ibcclientKeeper types.IBCClientKeeper, - bankKeeper types.BankKeeper, ) *Keeper { // set KeyTable if it has not already been set if !ps.HasKeyTable() { @@ -46,7 +44,6 @@ func NewKeeper( hooks: nil, channelKeeper: channelKeeper, ibcClientKeeper: ibcclientKeeper, - bankKeeper: bankKeeper, } k.SetFinalizePendingFn(k.finalizePendingState) return k diff --git a/x/rollapp/keeper/msg_server_create_rollapp.go b/x/rollapp/keeper/msg_server_create_rollapp.go index 5fb1be23d..b5d5a75ce 100644 --- a/x/rollapp/keeper/msg_server_create_rollapp.go +++ b/x/rollapp/keeper/msg_server_create_rollapp.go @@ -10,16 +10,23 @@ import ( ) func (k msgServer) CreateRollapp(goCtx context.Context, msg *types.MsgCreateRollapp) (*types.MsgCreateRollappResponse, error) { - if msg == nil { - return nil, types.ErrInvalidRequest - } - ctx := sdk.UnwrapSDKContext(goCtx) - if err := k.RegisterRollapp(ctx, msg.GetRollapp()); err != nil { + // Already validated chain id in ValidateBasic, so we assume it's valid + rollappId := types.MustNewChainID(msg.RollappId) + + if err := k.CheckIfRollappExists(ctx, rollappId); err != nil { return nil, err } + k.SetRollapp(ctx, msg.GetRollapp()) + + creator := sdk.MustAccAddressFromBech32(msg.Creator) + + if err := k.hooks.RollappCreated(ctx, msg.RollappId, msg.Alias, creator); err != nil { + return nil, fmt.Errorf("rollapp created hook: %w", err) + } + if err := ctx.EventManager().EmitTypedEvent(msg); err != nil { return nil, fmt.Errorf("emit event: %w", err) } diff --git a/x/rollapp/keeper/msg_server_create_rollapp_test.go b/x/rollapp/keeper/msg_server_create_rollapp_test.go index 0e7f50eb8..ee5d99445 100644 --- a/x/rollapp/keeper/msg_server_create_rollapp_test.go +++ b/x/rollapp/keeper/msg_server_create_rollapp_test.go @@ -1,7 +1,6 @@ package keeper_test import ( - "fmt" "strings" "github.com/cometbft/cometbft/libs/rand" @@ -18,6 +17,7 @@ func (suite *RollappTestSuite) TestCreateRollapp() { } func (suite *RollappTestSuite) TestCreateRollappUnauthorizedRollappCreator() { + suite.T().Skip() // TODO: enable after x/dymns hook is wired suite.SetupTest() suite.createRollappWithCreatorAndVerify(types.ErrFeePayment, bob) // bob is broke } @@ -88,38 +88,6 @@ func (suite *RollappTestSuite) TestCreateRollappAlreadyExists() { } } -func (suite *RollappTestSuite) TestCreateRollappAliasAlreadyExists() { - suite.T().Skip() // TODO: delete test - suite.SetupTest() - - goCtx := sdk.WrapSDKContext(suite.Ctx) - alias := "rollapp" - - rollapp := types.MsgCreateRollapp{ - Creator: alice, - RollappId: urand.RollappID(), - InitialSequencer: sample.AccAddress(), - Bech32Prefix: "rol", - GenesisChecksum: "checksum", - Alias: alias, - VmType: types.Rollapp_EVM, - } - _, err := suite.msgServer.CreateRollapp(goCtx, &rollapp) - suite.Require().Nil(err) - - rollapp = types.MsgCreateRollapp{ - Creator: alice, - RollappId: urand.RollappID(), - InitialSequencer: sample.AccAddress(), - Bech32Prefix: "rol", - GenesisChecksum: "checksum", - Alias: alias, - VmType: types.Rollapp_EVM, - } - _, err = suite.msgServer.CreateRollapp(goCtx, &rollapp) - suite.ErrorIs(err, types.ErrRollappAliasExists) -} - func (suite *RollappTestSuite) TestCreateRollappId() { suite.SetupTest() @@ -271,14 +239,13 @@ func (suite *RollappTestSuite) TestOverwriteEIP155Key() { suite.Run(test.name, func() { suite.SetupTest() goCtx := sdk.WrapSDKContext(suite.Ctx) - alias := strings.NewReplacer("_", "", "-", "").Replace(test.rollappId) // reuse rollapp ID to avoid alias conflicts rollapp := types.MsgCreateRollapp{ Creator: alice, RollappId: test.rollappId, InitialSequencer: sample.AccAddress(), Bech32Prefix: "rol", GenesisChecksum: "checksum", - Alias: alias, + Alias: "alias", VmType: types.Rollapp_EVM, } _, err := suite.msgServer.CreateRollapp(goCtx, &rollapp) @@ -340,16 +307,13 @@ func (suite *RollappTestSuite) createRollappWithCreatorAndVerify(expectedErr err // generate sequencer address address := sample.AccAddress() // rollapp is the rollapp to create - rollappID := fmt.Sprintf("%s%d", "rollapp", rand.Int63()) //nolint:gosec // this is for a test - alias := strings.NewReplacer("_", "", "-", "").Replace(rollappID) // reuse rollapp ID to avoid alias conflicts - rollapp := types.MsgCreateRollapp{ Creator: creator, RollappId: urand.RollappID(), InitialSequencer: address, Bech32Prefix: "rol", GenesisChecksum: "checksum", - Alias: alias, + Alias: "alias", VmType: types.Rollapp_EVM, Metadata: &mockRollappMetadata, } @@ -360,7 +324,6 @@ func (suite *RollappTestSuite) createRollappWithCreatorAndVerify(expectedErr err InitialSequencer: rollapp.GetInitialSequencer(), GenesisChecksum: rollapp.GetGenesisChecksum(), Bech32Prefix: rollapp.GetBech32Prefix(), - Alias: rollapp.GetAlias(), VmType: types.Rollapp_EVM, Metadata: rollapp.GetMetadata(), } @@ -380,13 +343,6 @@ func (suite *RollappTestSuite) createRollappWithCreatorAndVerify(expectedErr err suite.Require().Nil(err) suite.Require().EqualValues(&rollappExpect, &queryResponse.Rollapp) - // query the specific rollapp by alias - queryResponse, err = suite.queryClient.RollappByAlias(goCtx, &types.QueryGetRollappByAliasRequest{ - Alias: rollapp.GetAlias(), - }) - suite.Require().Nil(err) - suite.Require().EqualValues(&rollappExpect, &queryResponse.Rollapp) - rollappSummaryExpect := types.RollappSummary{ RollappId: rollappExpect.RollappId, } diff --git a/x/rollapp/keeper/msg_server_update_rollapp.go b/x/rollapp/keeper/msg_server_update_rollapp.go index 3f4a38cab..029da7d89 100644 --- a/x/rollapp/keeper/msg_server_update_rollapp.go +++ b/x/rollapp/keeper/msg_server_update_rollapp.go @@ -10,17 +10,16 @@ import ( ) func (k msgServer) UpdateRollappInformation(goCtx context.Context, msg *types.MsgUpdateRollappInformation) (*types.MsgUpdateRollappInformationResponse, error) { - if msg == nil { - return nil, types.ErrInvalidRequest - } - ctx := sdk.UnwrapSDKContext(goCtx) - if err := k.UpdateRollapp(ctx, msg); err != nil { + updated, err := k.CheckAndUpdateRollappFields(ctx, msg) + if err != nil { return nil, err } - if err := ctx.EventManager().EmitTypedEvent(msg); err != nil { + k.SetRollapp(ctx, updated) + + if err = ctx.EventManager().EmitTypedEvent(msg); err != nil { return nil, fmt.Errorf("emit event: %w", err) } diff --git a/x/rollapp/keeper/msg_server_update_rollapp_test.go b/x/rollapp/keeper/msg_server_update_rollapp_test.go index 9ec440c32..c5b7b76bc 100644 --- a/x/rollapp/keeper/msg_server_update_rollapp_test.go +++ b/x/rollapp/keeper/msg_server_update_rollapp_test.go @@ -31,7 +31,6 @@ func (suite *RollappTestSuite) TestUpdateRollapp() { Owner: alice, RollappId: rollappId, InitialSequencer: initialSequencerAddress, - Alias: "rolly", GenesisChecksum: "new_checksum", Metadata: &mockRollappMetadata, }, @@ -42,7 +41,6 @@ func (suite *RollappTestSuite) TestUpdateRollapp() { InitialSequencer: initialSequencerAddress, Bech32Prefix: "rol", GenesisChecksum: "new_checksum", - Alias: "rolly", VmType: types.Rollapp_EVM, Metadata: &mockRollappMetadata, }, @@ -80,15 +78,6 @@ func (suite *RollappTestSuite) TestUpdateRollapp() { }, sealed: true, expError: types.ErrImmutableFieldUpdateAfterSealed, - }, { - name: "Update rollapp: fail - try to update alias when sealed", - update: &types.MsgUpdateRollappInformation{ - Owner: alice, - RollappId: rollappId, - Alias: "rolly", - }, - sealed: true, - expError: types.ErrImmutableFieldUpdateAfterSealed, }, { name: "Update rollapp: fail - try to update genesis checksum when sealed", update: &types.MsgUpdateRollappInformation{ @@ -115,7 +104,6 @@ func (suite *RollappTestSuite) TestUpdateRollapp() { ChannelId: "", Frozen: false, Bech32Prefix: "rol", - Alias: "Rollapp2", RegisteredDenoms: nil, Sealed: true, VmType: types.Rollapp_EVM, @@ -138,7 +126,6 @@ func (suite *RollappTestSuite) TestUpdateRollapp() { Frozen: tc.frozen, Sealed: tc.sealed, Bech32Prefix: "rol", - Alias: "Rollapp2", RegisteredDenoms: nil, VmType: types.Rollapp_EVM, Metadata: &types.RollappMetadata{ @@ -172,9 +159,9 @@ func (suite *RollappTestSuite) TestCreateAndUpdateRollapp() { const rollappId = "rollapp_1234-1" // 1. register rollapp - err := suite.App.RollappKeeper.RegisterRollapp(suite.Ctx, types.Rollapp{ + _, err := suite.msgServer.CreateRollapp(suite.Ctx, &types.MsgCreateRollapp{ RollappId: rollappId, - Owner: alice, + Creator: alice, GenesisChecksum: "", InitialSequencer: "", Alias: "default", @@ -191,12 +178,11 @@ func (suite *RollappTestSuite) TestCreateAndUpdateRollapp() { initSeqPubKey := ed25519.GenPrivKey().PubKey() addrInit := sdk.AccAddress(initSeqPubKey.Address()).String() - err = suite.App.RollappKeeper.UpdateRollapp(suite.Ctx, &types.MsgUpdateRollappInformation{ + _, err = suite.msgServer.UpdateRollappInformation(suite.Ctx, &types.MsgUpdateRollappInformation{ Owner: alice, RollappId: rollappId, InitialSequencer: addrInit, GenesisChecksum: "checksum1", - Alias: "alias", }) suite.Require().NoError(err) @@ -212,10 +198,10 @@ func (suite *RollappTestSuite) TestCreateAndUpdateRollapp() { suite.Require().True(rollapp.Sealed) // 5. try to update rollapp immutable fields - should fail because rollapp is sealed - err = suite.App.RollappKeeper.UpdateRollapp(suite.Ctx, &types.MsgUpdateRollappInformation{ - Owner: alice, - RollappId: rollappId, - Alias: "rolly", + _, err = suite.msgServer.UpdateRollappInformation(suite.Ctx, &types.MsgUpdateRollappInformation{ + Owner: alice, + RollappId: rollappId, + GenesisChecksum: "checksum2", }) suite.Require().ErrorIs(err, types.ErrImmutableFieldUpdateAfterSealed) diff --git a/x/rollapp/keeper/msg_server_update_state_test.go b/x/rollapp/keeper/msg_server_update_state_test.go index 8a19dcd10..f70477bcf 100644 --- a/x/rollapp/keeper/msg_server_update_state_test.go +++ b/x/rollapp/keeper/msg_server_update_state_test.go @@ -25,7 +25,6 @@ func (suite *RollappTestSuite) TestFirstUpdateState() { InitialSequencer: sample.AccAddress(), GenesisChecksum: "checksum", Bech32Prefix: "rol", - Alias: "Rollapp", Metadata: &types.RollappMetadata{ Website: "https://dymension.xyz", Description: "Sample description", @@ -210,7 +209,6 @@ func (suite *RollappTestSuite) TestUpdateStateUnknownSequencer() { InitialSequencer: sample.AccAddress(), Bech32Prefix: "rol", GenesisChecksum: "checksum", - Alias: "Rollapp", } suite.App.RollappKeeper.SetRollapp(suite.Ctx, rollapp) diff --git a/x/rollapp/keeper/params.go b/x/rollapp/keeper/params.go index 9aa15aaa6..3159a9391 100644 --- a/x/rollapp/keeper/params.go +++ b/x/rollapp/keeper/params.go @@ -10,7 +10,6 @@ import ( func (k Keeper) GetParams(ctx sdk.Context) types.Params { return types.NewParams( k.DisputePeriodInBlocks(ctx), - k.RegistrationFee(ctx), ) } @@ -24,8 +23,3 @@ func (k Keeper) DisputePeriodInBlocks(ctx sdk.Context) (res uint64) { k.paramstore.Get(ctx, types.KeyDisputePeriodInBlocks, &res) return } - -func (k Keeper) RegistrationFee(ctx sdk.Context) (res sdk.Coin) { - k.paramstore.Get(ctx, types.KeyRegistrationFee, &res) - return -} diff --git a/x/rollapp/keeper/params_test.go b/x/rollapp/keeper/params_test.go index 2b1a81966..e079e64dc 100644 --- a/x/rollapp/keeper/params_test.go +++ b/x/rollapp/keeper/params_test.go @@ -3,7 +3,6 @@ package keeper_test import ( "testing" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" testkeeper "github.com/dymensionxyz/dymension/v3/testutil/keeper" @@ -17,15 +16,4 @@ func TestGetParams(t *testing.T) { k.SetParams(ctx, params) require.EqualValues(t, params.DisputePeriodInBlocks, k.DisputePeriodInBlocks(ctx)) - require.EqualValues(t, params.RegistrationFee, k.RegistrationFee(ctx)) -} - -func TestGetParamsWithRegistrationFee(t *testing.T) { - k, ctx := testkeeper.RollappKeeper(t) - params := types.DefaultParams() - - params.RegistrationFee, _ = sdk.ParseCoinNormalized(registrationFee) - k.SetParams(ctx, params) - - require.EqualValues(t, params.RegistrationFee, k.RegistrationFee(ctx)) } diff --git a/x/rollapp/keeper/rollapp.go b/x/rollapp/keeper/rollapp.go index 4bb735aae..1ce97245b 100644 --- a/x/rollapp/keeper/rollapp.go +++ b/x/rollapp/keeper/rollapp.go @@ -1,7 +1,6 @@ package keeper import ( - "errors" "fmt" errorsmod "cosmossdk.io/errors" @@ -13,52 +12,7 @@ import ( "github.com/dymensionxyz/dymension/v3/x/rollapp/types" ) -func (k Keeper) RegisterRollapp(ctx sdk.Context, rollapp types.Rollapp) error { - // Already validated chain id in ValidateBasic, so we assume it's valid - rollappId := types.MustNewChainID(rollapp.RollappId) - if err := k.checkIfRollappExists(ctx, rollappId, rollapp.Alias); err != nil { - return err - } - - // Already validated chain id in ValidateBasic, so we assume it's valid - creator := sdk.MustAccAddressFromBech32(rollapp.Owner) - registrationFee := sdk.NewCoins(k.RegistrationFee(ctx)) - - if !registrationFee.IsZero() { - if err := k.bankKeeper.SendCoinsFromAccountToModule(ctx, creator, types.ModuleName, registrationFee); err != nil { - return errors.Join(types.ErrFeePayment, err) - } - - if err := k.bankKeeper.BurnCoins(ctx, types.ModuleName, registrationFee); err != nil { - return fmt.Errorf("burn coins: %w", err) - } - } - - k.SetRollapp(ctx, rollapp) - - if err := k.hooks.RollappCreated(ctx, rollapp.RollappId); err != nil { - return fmt.Errorf("rollapp created hook: %w", err) - } - - return nil -} - -func (k Keeper) UpdateRollapp(ctx sdk.Context, msg *types.MsgUpdateRollappInformation) error { - if err := msg.ValidateBasic(); err != nil { - return fmt.Errorf("validate update: %w", err) - } - - updated, err := k.canUpdateRollapp(ctx, msg) - if err != nil { - return err - } - - k.SetRollapp(ctx, updated) - - return nil -} - -func (k Keeper) canUpdateRollapp(ctx sdk.Context, update *types.MsgUpdateRollappInformation) (types.Rollapp, error) { +func (k Keeper) CheckAndUpdateRollappFields(ctx sdk.Context, update *types.MsgUpdateRollappInformation) (types.Rollapp, error) { current, found := k.GetRollapp(ctx, update.RollappId) if !found { return current, errRollappNotFound @@ -77,12 +31,6 @@ func (k Keeper) canUpdateRollapp(ctx sdk.Context, update *types.MsgUpdateRollapp return current, types.ErrImmutableFieldUpdateAfterSealed } - var err error - current.Alias, err = k.canUpdateAlias(ctx, current.Alias, update.Alias) - if err != nil { - return current, err - } - if update.InitialSequencer != "" { current.InitialSequencer = update.InitialSequencer } @@ -95,39 +43,21 @@ func (k Keeper) canUpdateRollapp(ctx sdk.Context, update *types.MsgUpdateRollapp current.Metadata = update.Metadata } - if err = current.ValidateBasic(); err != nil { + if err := current.ValidateBasic(); err != nil { return current, fmt.Errorf("validate rollapp: %w", err) } return current, nil } -func (k Keeper) canUpdateAlias( - ctx sdk.Context, - currentAlias, updateAlias string, -) (string, error) { - if updateAlias == "" || currentAlias == updateAlias { - return currentAlias, nil - } - - if _, isFound := k.GetRollappByAlias(ctx, updateAlias); isFound { - return "", gerrc.ErrAlreadyExists - } - return updateAlias, nil -} - -// checkIfRollappExists checks if a rollapp with the same ID or alias already exists in the store. +// CheckIfRollappExists checks if a rollapp with the same ID or alias already exists in the store. // An exception is made for when the rollapp is frozen, in which case it is allowed to replace the existing rollapp (forking). -func (k Keeper) checkIfRollappExists(ctx sdk.Context, rollappId types.ChainID, alias string) error { +func (k Keeper) CheckIfRollappExists(ctx sdk.Context, rollappId types.ChainID) error { // check to see if the RollappId has been registered before if _, isFound := k.GetRollapp(ctx, rollappId.GetChainID()); isFound { return types.ErrRollappExists } - if _, isFound := k.GetRollappByAlias(ctx, alias); isFound { - return types.ErrRollappAliasExists - } - existingRollapp, isFound := k.GetRollappByEIP155(ctx, rollappId.GetEIP155ID()) // allow replacing EIP155 only when forking (previous rollapp is frozen) if !isFound { @@ -161,12 +91,6 @@ func (k Keeper) SetRollapp(ctx sdk.Context, rollapp types.Rollapp) { rollapp.RollappId, ), b) - // save mapping for rollapp-by-alias - store = prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.RollappByAliasPrefix)) - store.Set(types.RollappByAliasKey( - rollapp.GetAlias(), - ), []byte(rollapp.RollappId)) - // no err check as rollapp is already validated rollappID := types.MustNewChainID(rollapp.RollappId) @@ -182,7 +106,7 @@ func (k Keeper) SealRollapp(ctx sdk.Context, rollappId string) error { return gerrc.ErrNotFound } - if rollapp.GenesisChecksum == "" || rollapp.Alias == "" || rollapp.InitialSequencer == "" { + if rollapp.GenesisChecksum == "" || rollapp.InitialSequencer == "" { return types.ErrSealWithImmutableFieldsNotSet } @@ -205,18 +129,6 @@ func (k Keeper) GetRollappByEIP155(ctx sdk.Context, eip155 uint64) (val types.Ro return k.GetRollapp(ctx, string(id)) } -func (k Keeper) GetRollappByAlias(ctx sdk.Context, alias string) (val types.Rollapp, ok bool) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.RollappByAliasPrefix)) - id := store.Get(types.RollappByAliasKey( - alias, - )) - if id == nil { - return val, false - } - - return k.GetRollapp(ctx, string(id)) -} - // GetRollapp returns a rollapp from its chain name func (k Keeper) GetRollapp( ctx sdk.Context, diff --git a/x/rollapp/keeper/rollapp_suite_test.go b/x/rollapp/keeper/rollapp_suite_test.go index 73d53c879..574ef5bb2 100644 --- a/x/rollapp/keeper/rollapp_suite_test.go +++ b/x/rollapp/keeper/rollapp_suite_test.go @@ -44,7 +44,7 @@ func (suite *RollappTestSuite) SetupTest() { err = app.BankKeeper.SetParams(ctx, banktypes.DefaultParams()) suite.Require().NoError(err) regFee, _ := sdk.ParseCoinNormalized(registrationFee) - app.RollappKeeper.SetParams(ctx, types.NewParams(2, regFee)) + app.RollappKeeper.SetParams(ctx, types.NewParams(2)) aliceBal := sdk.NewCoins(regFee.AddAmount(regFee.Amount.Mul(sdk.NewInt(10)))) apptesting.FundAccount(app, ctx, sdk.MustAccAddressFromBech32(alice), aliceBal) diff --git a/x/rollapp/types/errors.go b/x/rollapp/types/errors.go index bc1109871..6a7963ff3 100644 --- a/x/rollapp/types/errors.go +++ b/x/rollapp/types/errors.go @@ -42,7 +42,6 @@ var ( ErrUnauthorizedSigner = errorsmod.Wrap(gerrc.ErrPermissionDenied, "unauthorized signer") ErrSameOwner = errorsmod.Wrap(gerrc.ErrInvalidArgument, "same owner") ErrInvalidRequest = errorsmod.Wrap(gerrc.ErrInvalidArgument, "invalid request") - ErrRollappAliasExists = errorsmod.Wrap(gerrc.ErrInvalidArgument, "rollapp already exists for this alias; must use new alias") ErrInvalidVMType = errorsmod.Wrap(gerrc.ErrInvalidArgument, "invalid vm type") /* ------------------------------ fraud related ----------------------------- */ diff --git a/x/rollapp/types/expected_keepers.go b/x/rollapp/types/expected_keepers.go index 3d708334f..3279dc73f 100644 --- a/x/rollapp/types/expected_keepers.go +++ b/x/rollapp/types/expected_keepers.go @@ -13,8 +13,3 @@ type IBCClientKeeper interface { type ChannelKeeper interface { GetChannelClientState(ctx sdk.Context, portID, channelID string) (string, exported.ClientState, error) } - -type BankKeeper interface { - SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error - BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error -} diff --git a/x/rollapp/types/genesis_test.go b/x/rollapp/types/genesis_test.go index c3bbebee5..2b38d03c2 100644 --- a/x/rollapp/types/genesis_test.go +++ b/x/rollapp/types/genesis_test.go @@ -3,7 +3,6 @@ package types_test import ( "testing" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" "github.com/dymensionxyz/dymension/v3/x/rollapp/types" @@ -25,7 +24,6 @@ func TestGenesisState_Validate(t *testing.T) { genState: &types.GenesisState{ Params: types.Params{ DisputePeriodInBlocks: types.DefaultGenesis().Params.DisputePeriodInBlocks, - RegistrationFee: sdk.NewCoin("adym", sdk.NewInt(1000)), }, RollappList: []types.Rollapp{ { @@ -73,7 +71,6 @@ func TestGenesisState_Validate(t *testing.T) { genState: &types.GenesisState{ Params: types.Params{ DisputePeriodInBlocks: types.DefaultGenesis().Params.DisputePeriodInBlocks, - RegistrationFee: sdk.NewCoin("adym", sdk.NewInt(1000)), }, RollappList: []types.Rollapp{{RollappId: "0"}, {RollappId: "0"}}, StateInfoList: []types.StateInfo{}, @@ -87,7 +84,6 @@ func TestGenesisState_Validate(t *testing.T) { genState: &types.GenesisState{ Params: types.Params{ DisputePeriodInBlocks: types.MinDisputePeriodInBlocks - 1, - RegistrationFee: sdk.NewCoin("adym", sdk.NewInt(1000)), }, RollappList: []types.Rollapp{{RollappId: "0"}}, StateInfoList: []types.StateInfo{}, @@ -129,20 +125,6 @@ func TestGenesisState_Validate(t *testing.T) { }, valid: false, }, - { - desc: "invalid registration fee", - genState: &types.GenesisState{ - Params: types.Params{ - DisputePeriodInBlocks: types.DefaultGenesis().Params.DisputePeriodInBlocks, - RegistrationFee: sdk.NewCoin("cosmos", sdk.NewInt(0)), - }, - RollappList: []types.Rollapp{}, - StateInfoList: []types.StateInfo{}, - LatestStateInfoIndexList: []types.StateInfoIndex{}, - BlockHeightToFinalizationQueueList: []types.BlockHeightToFinalizationQueue{}, - }, - valid: false, - }, } { t.Run(tc.desc, func(t *testing.T) { err := tc.genState.Validate() diff --git a/x/rollapp/types/hooks.go b/x/rollapp/types/hooks.go index d3d003c45..fc4ec70cd 100644 --- a/x/rollapp/types/hooks.go +++ b/x/rollapp/types/hooks.go @@ -14,7 +14,7 @@ type RollappHooks interface { BeforeUpdateState(ctx sdk.Context, seqAddr string, rollappId string) error // Must be called when a rollapp's state changes AfterStateFinalized(ctx sdk.Context, rollappID string, stateInfo *StateInfo) error // Must be called when a rollapp's state changes FraudSubmitted(ctx sdk.Context, rollappID string, height uint64, seqAddr string) error - RollappCreated(ctx sdk.Context, rollappID string) error + RollappCreated(ctx sdk.Context, rollappID, alias string, creator sdk.AccAddress) error } var _ RollappHooks = MultiRollappHooks{} @@ -58,12 +58,23 @@ func (h MultiRollappHooks) FraudSubmitted(ctx sdk.Context, rollappID string, hei } // RollappCreated implements RollappHooks. -func (h MultiRollappHooks) RollappCreated(ctx sdk.Context, rollappID string) error { +func (h MultiRollappHooks) RollappCreated(ctx sdk.Context, rollappID, alias string, creatorAddr sdk.AccAddress) error { for i := range h { - err := h[i].RollappCreated(ctx, rollappID) + err := h[i].RollappCreated(ctx, rollappID, alias, creatorAddr) if err != nil { return err } } return nil } + +type StubRollappCreatedHooks struct{} + +func (StubRollappCreatedHooks) RollappCreated(sdk.Context, string, string, sdk.AccAddress) error { + return nil +} +func (StubRollappCreatedHooks) BeforeUpdateState(sdk.Context, string, string) error { return nil } +func (StubRollappCreatedHooks) FraudSubmitted(sdk.Context, string, uint64, string) error { return nil } +func (StubRollappCreatedHooks) AfterStateFinalized(sdk.Context, string, *StateInfo) error { + return nil +} diff --git a/x/rollapp/types/key_rollapp.go b/x/rollapp/types/key_rollapp.go index 90d5a20dd..4a93293aa 100644 --- a/x/rollapp/types/key_rollapp.go +++ b/x/rollapp/types/key_rollapp.go @@ -8,7 +8,6 @@ const ( // RollappKeyPrefix is the prefix to retrieve all Rollapp RollappKeyPrefix = "Rollapp/value/" RollappByEIP155KeyPrefix = "RollappByEIP155/value/" - RollappByAliasPrefix = "RollappByAlias/value/" ) // RollappKey returns the store key to retrieve a Rollapp from the index fields @@ -37,15 +36,3 @@ func RollappByEIP155Key( return key } - -func RollappByAliasKey( - alias string, -) []byte { - var key []byte - - aliasBytes := []byte(alias) - key = append(key, aliasBytes...) - key = append(key, []byte("/")...) - - return key -} diff --git a/x/rollapp/types/message_create_rollapp.go b/x/rollapp/types/message_create_rollapp.go index 23bea6ee0..16b6328c9 100644 --- a/x/rollapp/types/message_create_rollapp.go +++ b/x/rollapp/types/message_create_rollapp.go @@ -58,7 +58,6 @@ func (msg *MsgCreateRollapp) GetRollapp() Rollapp { msg.InitialSequencer, msg.Bech32Prefix, msg.GenesisChecksum, - msg.Alias, msg.VmType, msg.Metadata, false, @@ -66,6 +65,10 @@ func (msg *MsgCreateRollapp) GetRollapp() Rollapp { } func (msg *MsgCreateRollapp) ValidateBasic() error { + if len(msg.Alias) == 0 { + return ErrInvalidAlias + } + rollapp := msg.GetRollapp() if err := rollapp.ValidateBasic(); err != nil { return err diff --git a/x/rollapp/types/message_create_rollapp_test.go b/x/rollapp/types/message_create_rollapp_test.go index 016c62371..6968ecca1 100644 --- a/x/rollapp/types/message_create_rollapp_test.go +++ b/x/rollapp/types/message_create_rollapp_test.go @@ -143,19 +143,6 @@ func TestMsgCreateRollapp_ValidateBasic(t *testing.T) { }, err: ErrInvalidBech32Prefix, }, - { - name: "invalid alias: too long", - msg: MsgCreateRollapp{ - Creator: sample.AccAddress(), - Bech32Prefix: bech32Prefix, - InitialSequencer: sample.AccAddress(), - RollappId: "dym_100-1", - GenesisChecksum: "checksum", - VmType: Rollapp_EVM, - Alias: strings.Repeat("a", maxAliasLength+1), - }, - err: ErrInvalidAlias, - }, { name: "invalid metadata: invalid logo data uri", msg: MsgCreateRollapp{ diff --git a/x/rollapp/types/message_update_rollapp.go b/x/rollapp/types/message_update_rollapp.go index 5ad2b23f2..4c7486928 100644 --- a/x/rollapp/types/message_update_rollapp.go +++ b/x/rollapp/types/message_update_rollapp.go @@ -13,8 +13,7 @@ func NewMsgUpdateRollappInformation( creator, rollappId, initSequencer, - genesisChecksum, - alias string, + genesisChecksum string, metadata *RollappMetadata, ) *MsgUpdateRollappInformation { return &MsgUpdateRollappInformation{ @@ -22,7 +21,6 @@ func NewMsgUpdateRollappInformation( RollappId: rollappId, InitialSequencer: initSequencer, GenesisChecksum: genesisChecksum, - Alias: alias, Metadata: metadata, } } @@ -56,10 +54,6 @@ func (msg *MsgUpdateRollappInformation) ValidateBasic() error { } } - if err := validateAlias(msg.Alias); err != nil { - return err - } - if len(msg.GenesisChecksum) > maxGenesisChecksumLength { return ErrInvalidGenesisChecksum } @@ -72,5 +66,5 @@ func (msg *MsgUpdateRollappInformation) ValidateBasic() error { } func (msg *MsgUpdateRollappInformation) UpdatingImmutableValues() bool { - return msg.InitialSequencer != "" || msg.GenesisChecksum != "" || msg.Alias != "" + return msg.InitialSequencer != "" || msg.GenesisChecksum != "" } diff --git a/x/rollapp/types/message_update_rollapp_test.go b/x/rollapp/types/message_update_rollapp_test.go index 384dc332e..c39a57ea0 100644 --- a/x/rollapp/types/message_update_rollapp_test.go +++ b/x/rollapp/types/message_update_rollapp_test.go @@ -22,7 +22,6 @@ func TestMsgUpdateRollappInformation_ValidateBasic(t *testing.T) { RollappId: "dym_100-1", InitialSequencer: sample.AccAddress(), GenesisChecksum: "checksum", - Alias: "Rollapp", Metadata: &RollappMetadata{ Website: "https://dymension.xyz", Description: "Sample description", @@ -40,21 +39,9 @@ func TestMsgUpdateRollappInformation_ValidateBasic(t *testing.T) { InitialSequencer: "invalid_address", RollappId: "dym_100-1", GenesisChecksum: "checksum", - Alias: "Rollapp", }, err: ErrInvalidInitialSequencer, }, - { - name: "invalid alias: too long", - msg: MsgUpdateRollappInformation{ - Owner: sample.AccAddress(), - InitialSequencer: sample.AccAddress(), - RollappId: "dym_100-1", - GenesisChecksum: "checksum", - Alias: strings.Repeat("a", maxAliasLength+1), - }, - err: ErrInvalidAlias, - }, { name: "invalid metadata: invalid logo data uri", msg: MsgUpdateRollappInformation{ @@ -62,7 +49,6 @@ func TestMsgUpdateRollappInformation_ValidateBasic(t *testing.T) { InitialSequencer: sample.AccAddress(), RollappId: "dym_100-1", GenesisChecksum: "checksum", - Alias: "alias", Metadata: &RollappMetadata{ Website: "https://dymension.xyz", Description: "Sample description", @@ -78,7 +64,6 @@ func TestMsgUpdateRollappInformation_ValidateBasic(t *testing.T) { InitialSequencer: sample.AccAddress(), RollappId: "dym_100-1", GenesisChecksum: strings.Repeat("a", maxGenesisChecksumLength+1), - Alias: "alias", }, err: ErrInvalidGenesisChecksum, }, diff --git a/x/rollapp/types/params.go b/x/rollapp/types/params.go index ae9c18ef2..c4b42d1e9 100644 --- a/x/rollapp/types/params.go +++ b/x/rollapp/types/params.go @@ -3,26 +3,14 @@ package types import ( "errors" "fmt" - "math/big" - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" - "github.com/dymensionxyz/gerr-cosmos/gerrc" "gopkg.in/yaml.v2" - - appparams "github.com/dymensionxyz/dymension/v3/app/params" ) var _ paramtypes.ParamSet = (*Params)(nil) var ( - // KeyRegistrationFee is store's key for RegistrationFee Params - KeyRegistrationFee = []byte("RegistrationFee") - // DYM is the integer representation of 1 DYM - DYM = sdk.NewIntFromBigInt(new(big.Int).Exp(big.NewInt(10), big.NewInt(18), nil)) - // DefaultRegistrationFee is the default registration fee - DefaultRegistrationFee = sdk.NewCoin(appparams.BaseDenom, DYM.Mul(sdk.NewInt(10))) // 10DYM // KeyDisputePeriodInBlocks is store's key for DisputePeriodInBlocks Params KeyDisputePeriodInBlocks = []byte("DisputePeriodInBlocks") DefaultDisputePeriodInBlocks uint64 = 3 @@ -36,36 +24,27 @@ func ParamKeyTable() paramtypes.KeyTable { } // NewParams creates a new Params instance -func NewParams( - disputePeriodInBlocks uint64, - registrationFee sdk.Coin, -) Params { +func NewParams(disputePeriodInBlocks uint64) Params { return Params{ DisputePeriodInBlocks: disputePeriodInBlocks, - RegistrationFee: registrationFee, } } // DefaultParams returns a default set of parameters func DefaultParams() Params { - return NewParams(DefaultDisputePeriodInBlocks, DefaultRegistrationFee) + return NewParams(DefaultDisputePeriodInBlocks) } // ParamSetPairs get the params.ParamSet func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { return paramtypes.ParamSetPairs{ paramtypes.NewParamSetPair(KeyDisputePeriodInBlocks, &p.DisputePeriodInBlocks, validateDisputePeriodInBlocks), - paramtypes.NewParamSetPair(KeyRegistrationFee, &p.RegistrationFee, validateRegistrationFee), } } // Validate validates the set of params func (p Params) Validate() error { - if err := validateDisputePeriodInBlocks(p.DisputePeriodInBlocks); err != nil { - return err - } - - return validateRegistrationFee(p.RegistrationFee) + return validateDisputePeriodInBlocks(p.DisputePeriodInBlocks) } // String implements the Stringer interface. @@ -87,21 +66,3 @@ func validateDisputePeriodInBlocks(v interface{}) error { return nil } - -// validateRegistrationFee validates the RegistrationFee param -func validateRegistrationFee(v interface{}) error { - registrationFee, ok := v.(sdk.Coin) - if !ok { - return fmt.Errorf("invalid parameter type: %T", v) - } - - if !registrationFee.IsValid() { - return errorsmod.Wrapf(gerrc.ErrInvalidArgument, "registration fee: %s", registrationFee) - } - - if registrationFee.Denom != appparams.BaseDenom { - return errorsmod.Wrapf(gerrc.ErrInvalidArgument, "registration fee denom: %s", registrationFee) - } - - return nil -} diff --git a/x/rollapp/types/params.pb.go b/x/rollapp/types/params.pb.go index 4b45f9911..fb4acc808 100644 --- a/x/rollapp/types/params.pb.go +++ b/x/rollapp/types/params.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" io "io" @@ -30,8 +30,6 @@ type Params struct { // to change a status of a state from received to finalized. // during that period, any user could submit fraud proof DisputePeriodInBlocks uint64 `protobuf:"varint,1,opt,name=dispute_period_in_blocks,json=disputePeriodInBlocks,proto3" json:"dispute_period_in_blocks,omitempty" yaml:"dispute_period_in_blocks"` - // registration_fee is the fee that is required to register a rollapp - RegistrationFee types.Coin `protobuf:"bytes,4,opt,name=registration_fee,json=registrationFee,proto3" json:"registration_fee" yaml:"registration_fee"` } func (m *Params) Reset() { *m = Params{} } @@ -73,13 +71,6 @@ func (m *Params) GetDisputePeriodInBlocks() uint64 { return 0 } -func (m *Params) GetRegistrationFee() types.Coin { - if m != nil { - return m.RegistrationFee - } - return types.Coin{} -} - func init() { proto.RegisterType((*Params)(nil), "dymensionxyz.dymension.rollapp.Params") } @@ -89,28 +80,24 @@ func init() { } var fileDescriptor_75a44aa904ae1ba5 = []byte{ - // 325 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0x41, 0x6b, 0xfa, 0x30, - 0x18, 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xea, 0x19, 0x8f, 0x85, 0x36, 0x19, 0x33, 0x02, - 0x64, 0xf0, 0xcc, 0x79, 0xd3, 0x6e, 0xa3, 0xce, 0xff, 0xeb, 0x0b, 0x52, 0x66, 0x24, 0xdb, 0x8c, - 0x64, 0x97, 0x91, 0xdc, 0x82, 0x90, 0xbe, 0x3b, 0x5f, 0xba, 0xd6, 0x66, 0xe9, 0x9e, 0x97, 0xa6, - 0x7f, 0x1f, 0xf0, 0x46, 0x27, 0x87, 0xab, 0x3b, 0xce, 0xfb, 0xf6, 0xc7, 0xa7, 0x6b, 0x0d, 0xec, - 0xda, 0xbf, 0x7a, 0x65, 0x60, 0xd7, 0x2a, 0x75, 0xdb, 0x7f, 0x98, 0xaf, 0x30, 0x5a, 0xac, 0x30, - 0xfa, 0x59, 0x61, 0xf4, 0xbe, 0xc6, 0xd6, 0x62, 0x8d, 0xad, 0xaf, 0x35, 0xb6, 0x1e, 0x6f, 0x62, - 0x61, 0x5e, 0x26, 0x21, 0x89, 0x20, 0xa5, 0x47, 0x9a, 0x98, 0xf6, 0xe8, 0x6c, 0x5f, 0x87, 0xc9, - 0x15, 0xd7, 0x61, 0xb5, 0xf8, 0xb8, 0xde, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9d, 0x9a, 0x26, - 0xc0, 0xbd, 0x01, 0x00, 0x00, + // 259 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x4e, 0xa9, 0xcc, 0x4d, + 0xcd, 0x2b, 0xce, 0xcc, 0xcf, 0xab, 0xa8, 0xac, 0xd2, 0x87, 0x73, 0xf4, 0x8b, 0xf2, 0x73, 0x72, + 0x12, 0x0b, 0x0a, 0xf4, 0x0b, 0x12, 0x8b, 0x12, 0x73, 0x8b, 0xf5, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, + 0x85, 0xe4, 0x90, 0x15, 0xeb, 0xc1, 0x39, 0x7a, 0x50, 0xc5, 0x52, 0x22, 0xe9, 0xf9, 0xe9, 0xf9, + 0x60, 0xa5, 0xfa, 0x20, 0x16, 0x44, 0x97, 0x94, 0x5c, 0x72, 0x7e, 0x71, 0x6e, 0x7e, 0xb1, 0x7e, + 0x52, 0x62, 0x71, 0xaa, 0x7e, 0x99, 0x61, 0x52, 0x6a, 0x49, 0xa2, 0xa1, 0x7e, 0x72, 0x7e, 0x66, + 0x1e, 0x44, 0x5e, 0xa9, 0x82, 0x8b, 0x2d, 0x00, 0x6c, 0x8b, 0x50, 0x0c, 0x97, 0x44, 0x4a, 0x66, + 0x71, 0x41, 0x69, 0x49, 0x6a, 0x7c, 0x41, 0x6a, 0x51, 0x66, 0x7e, 0x4a, 0x7c, 0x66, 0x5e, 0x7c, + 0x52, 0x4e, 0x7e, 0x72, 0x76, 0xb1, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x8b, 0x93, 0xf2, 0xa7, 0x7b, + 0xf2, 0xf2, 0x95, 0x89, 0xb9, 0x39, 0x56, 0x4a, 0xb8, 0x54, 0x2a, 0x05, 0x89, 0x42, 0xa5, 0x02, + 0xc0, 0x32, 0x9e, 0x79, 0x4e, 0x60, 0x71, 0x2b, 0x96, 0x19, 0x0b, 0xe4, 0x19, 0xbc, 0x58, 0x38, + 0x98, 0x04, 0x98, 0xbd, 0x58, 0x38, 0x98, 0x05, 0x58, 0x9c, 0xfc, 0x4e, 0x3c, 0x92, 0x63, 0xbc, + 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, + 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0xca, 0x24, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, + 0x57, 0x1f, 0x47, 0x08, 0x95, 0x19, 0xeb, 0x57, 0xc0, 0x83, 0xa9, 0xa4, 0xb2, 0x20, 0xb5, 0x38, + 0x89, 0x0d, 0xec, 0x21, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf0, 0x4f, 0x87, 0xea, 0x55, + 0x01, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -133,16 +120,6 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - { - size, err := m.RegistrationFee.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 if m.DisputePeriodInBlocks != 0 { i = encodeVarintParams(dAtA, i, uint64(m.DisputePeriodInBlocks)) i-- @@ -171,8 +148,6 @@ func (m *Params) Size() (n int) { if m.DisputePeriodInBlocks != 0 { n += 1 + sovParams(uint64(m.DisputePeriodInBlocks)) } - l = m.RegistrationFee.Size() - n += 1 + l + sovParams(uint64(l)) return n } @@ -230,39 +205,6 @@ func (m *Params) Unmarshal(dAtA []byte) error { break } } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RegistrationFee", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.RegistrationFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipParams(dAtA[iNdEx:]) diff --git a/x/rollapp/types/query.pb.go b/x/rollapp/types/query.pb.go index 3fe6f40cc..9d9ff80e2 100644 --- a/x/rollapp/types/query.pb.go +++ b/x/rollapp/types/query.pb.go @@ -201,50 +201,6 @@ func (m *QueryGetRollappByEIP155Request) GetEip155() uint64 { return 0 } -type QueryGetRollappByAliasRequest struct { - Alias string `protobuf:"bytes,1,opt,name=alias,proto3" json:"alias,omitempty"` -} - -func (m *QueryGetRollappByAliasRequest) Reset() { *m = QueryGetRollappByAliasRequest{} } -func (m *QueryGetRollappByAliasRequest) String() string { return proto.CompactTextString(m) } -func (*QueryGetRollappByAliasRequest) ProtoMessage() {} -func (*QueryGetRollappByAliasRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00a0238fb38306fa, []int{4} -} -func (m *QueryGetRollappByAliasRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetRollappByAliasRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetRollappByAliasRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryGetRollappByAliasRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetRollappByAliasRequest.Merge(m, src) -} -func (m *QueryGetRollappByAliasRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryGetRollappByAliasRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetRollappByAliasRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetRollappByAliasRequest proto.InternalMessageInfo - -func (m *QueryGetRollappByAliasRequest) GetAlias() string { - if m != nil { - return m.Alias - } - return "" -} - type QueryGetLatestHeightRequest struct { RollappId string `protobuf:"bytes,1,opt,name=rollappId,proto3" json:"rollappId,omitempty"` Finalized bool `protobuf:"varint,2,opt,name=finalized,proto3" json:"finalized,omitempty"` @@ -254,7 +210,7 @@ func (m *QueryGetLatestHeightRequest) Reset() { *m = QueryGetLatestHeigh func (m *QueryGetLatestHeightRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetLatestHeightRequest) ProtoMessage() {} func (*QueryGetLatestHeightRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00a0238fb38306fa, []int{5} + return fileDescriptor_00a0238fb38306fa, []int{4} } func (m *QueryGetLatestHeightRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -305,7 +261,7 @@ func (m *QueryGetLatestHeightResponse) Reset() { *m = QueryGetLatestHeig func (m *QueryGetLatestHeightResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetLatestHeightResponse) ProtoMessage() {} func (*QueryGetLatestHeightResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00a0238fb38306fa, []int{6} + return fileDescriptor_00a0238fb38306fa, []int{5} } func (m *QueryGetLatestHeightResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -350,7 +306,7 @@ func (m *QueryGetLatestStateIndexRequest) Reset() { *m = QueryGetLatestS func (m *QueryGetLatestStateIndexRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetLatestStateIndexRequest) ProtoMessage() {} func (*QueryGetLatestStateIndexRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00a0238fb38306fa, []int{7} + return fileDescriptor_00a0238fb38306fa, []int{6} } func (m *QueryGetLatestStateIndexRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -401,7 +357,7 @@ func (m *QueryGetLatestStateIndexResponse) Reset() { *m = QueryGetLatest func (m *QueryGetLatestStateIndexResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetLatestStateIndexResponse) ProtoMessage() {} func (*QueryGetLatestStateIndexResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00a0238fb38306fa, []int{8} + return fileDescriptor_00a0238fb38306fa, []int{7} } func (m *QueryGetLatestStateIndexResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -451,7 +407,7 @@ func (m *QueryGetRollappResponse) Reset() { *m = QueryGetRollappResponse func (m *QueryGetRollappResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetRollappResponse) ProtoMessage() {} func (*QueryGetRollappResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00a0238fb38306fa, []int{9} + return fileDescriptor_00a0238fb38306fa, []int{8} } func (m *QueryGetRollappResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -523,7 +479,7 @@ func (m *QueryAllRollappRequest) Reset() { *m = QueryAllRollappRequest{} func (m *QueryAllRollappRequest) String() string { return proto.CompactTextString(m) } func (*QueryAllRollappRequest) ProtoMessage() {} func (*QueryAllRollappRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00a0238fb38306fa, []int{10} + return fileDescriptor_00a0238fb38306fa, []int{9} } func (m *QueryAllRollappRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -568,7 +524,7 @@ func (m *QueryAllRollappResponse) Reset() { *m = QueryAllRollappResponse func (m *QueryAllRollappResponse) String() string { return proto.CompactTextString(m) } func (*QueryAllRollappResponse) ProtoMessage() {} func (*QueryAllRollappResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00a0238fb38306fa, []int{11} + return fileDescriptor_00a0238fb38306fa, []int{10} } func (m *QueryAllRollappResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -622,7 +578,7 @@ func (m *QueryGetStateInfoRequest) Reset() { *m = QueryGetStateInfoReque func (m *QueryGetStateInfoRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetStateInfoRequest) ProtoMessage() {} func (*QueryGetStateInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00a0238fb38306fa, []int{12} + return fileDescriptor_00a0238fb38306fa, []int{11} } func (m *QueryGetStateInfoRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -687,7 +643,7 @@ func (m *QueryGetStateInfoResponse) Reset() { *m = QueryGetStateInfoResp func (m *QueryGetStateInfoResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetStateInfoResponse) ProtoMessage() {} func (*QueryGetStateInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00a0238fb38306fa, []int{13} + return fileDescriptor_00a0238fb38306fa, []int{12} } func (m *QueryGetStateInfoResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -728,7 +684,6 @@ func init() { proto.RegisterType((*QueryParamsResponse)(nil), "dymensionxyz.dymension.rollapp.QueryParamsResponse") proto.RegisterType((*QueryGetRollappRequest)(nil), "dymensionxyz.dymension.rollapp.QueryGetRollappRequest") proto.RegisterType((*QueryGetRollappByEIP155Request)(nil), "dymensionxyz.dymension.rollapp.QueryGetRollappByEIP155Request") - proto.RegisterType((*QueryGetRollappByAliasRequest)(nil), "dymensionxyz.dymension.rollapp.QueryGetRollappByAliasRequest") proto.RegisterType((*QueryGetLatestHeightRequest)(nil), "dymensionxyz.dymension.rollapp.QueryGetLatestHeightRequest") proto.RegisterType((*QueryGetLatestHeightResponse)(nil), "dymensionxyz.dymension.rollapp.QueryGetLatestHeightResponse") proto.RegisterType((*QueryGetLatestStateIndexRequest)(nil), "dymensionxyz.dymension.rollapp.QueryGetLatestStateIndexRequest") @@ -745,67 +700,64 @@ func init() { } var fileDescriptor_00a0238fb38306fa = []byte{ - // 957 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xcf, 0x6f, 0xdc, 0x44, - 0x14, 0xce, 0x24, 0x9b, 0x2d, 0x79, 0x44, 0x50, 0x0d, 0x21, 0xa4, 0x4b, 0x70, 0x23, 0x1f, 0xda, - 0xb4, 0x80, 0x47, 0x9b, 0x74, 0xd3, 0x56, 0x81, 0xd2, 0x44, 0x90, 0x10, 0x09, 0xaa, 0xe0, 0x72, - 0xa1, 0x08, 0x95, 0x49, 0x77, 0xe2, 0x18, 0x79, 0x6d, 0x77, 0xed, 0x54, 0xbb, 0x5d, 0xed, 0x05, - 0x21, 0xce, 0x48, 0x5c, 0xb8, 0xf2, 0x0f, 0x70, 0xe0, 0xc2, 0x91, 0x03, 0x97, 0x1c, 0x38, 0x54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0x33, 0x19, 0x18, 0xc9, 0x6f, 0x49, 0xf2, 0x9b, - 0xf4, 0x76, 0x11, 0x79, 0x35, 0x75, 0x1e, 0xaa, 0x6e, 0x97, 0xaa, 0x83, 0xbf, 0x08, 0x5c, 0xcc, - 0x7e, 0x75, 0xd0, 0xf7, 0xc6, 0x63, 0x95, 0xfb, 0x1c, 0xaa, 0xdd, 0x9d, 0xdc, 0x01, 0x4a, 0xdb, - 0x91, 0xd2, 0xee, 0xd2, 0x3b, 0x25, 0xa5, 0x45, 0xdf, 0xd8, 0x4d, 0xd1, 0x49, 0xe9, 0x3b, 0x21, - 0x30, 0x17, 0xb7, 0x5b, 0x7a, 0xab, 0x2c, 0xaf, 0xec, 0xb4, 0xa9, 0xdd, 0x9e, 0x00, 0x39, 0xae, - 0x94, 0xe1, 0xff, 0x84, 0xa4, 0x04, 0xd6, 0x93, 0xaa, 0xfa, 0xdb, 0xf7, 0x4e, 0x4e, 0x35, 0xf2, - 0xec, 0x54, 0x23, 0xff, 0x9c, 0x6a, 0xe4, 0xbb, 0x33, 0x6d, 0xea, 0xd9, 0x99, 0x36, 0xf5, 0xe7, - 0x99, 0x36, 0xf5, 0xe0, 0x86, 0x65, 0x87, 0x47, 0xc7, 0x07, 0xc6, 0x23, 0xaf, 0x75, 0x5e, 0x8c, - 0x27, 0xeb, 0xac, 0x13, 0x07, 0x0a, 0xbb, 0xbe, 0x08, 0x0e, 0xaa, 0xf2, 0xcf, 0xc8, 0xfa, 0x7f, - 0x01, 0x00, 0x00, 0xff, 0xff, 0x23, 0x2a, 0x94, 0x44, 0xc6, 0x0d, 0x00, 0x00, + // 904 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4f, 0x6f, 0xe3, 0x44, + 0x14, 0x8f, 0x9b, 0x34, 0x4b, 0x1e, 0x2b, 0xb1, 0x1a, 0x4a, 0xc9, 0x86, 0xca, 0x5b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0x64, 0x60, 0x14, 0xbf, 0xc9, 0xc5, 0xaf, 0x91, 0xd5, 0x34, + 0xf1, 0xa2, 0x67, 0x1f, 0x89, 0x5e, 0x11, 0xab, 0xa2, 0x3f, 0x25, 0x78, 0x94, 0x9c, 0xd9, 0xe4, + 0xbd, 0xf1, 0x54, 0x0d, 0x3d, 0x26, 0x2a, 0x1b, 0x93, 0x3b, 0xc0, 0xd0, 0xb6, 0x79, 0x68, 0x1b, + 0x64, 0x3d, 0x63, 0x68, 0xc1, 0x53, 0xb3, 0xc9, 0xba, 0xb1, 0xf8, 0xae, 0x25, 0x28, 0x85, 0xcd, + 0x8a, 0xac, 0x64, 0xd5, 0x95, 0xec, 0xd5, 0x95, 0xd5, 0x09, 0x90, 0xe3, 0x86, 0x32, 0x78, 0x2e, + 0x47, 0x43, 0xa0, 0x97, 0x3c, 0xaa, 0xab, 0xad, 0xbd, 0xeb, 0x5b, 0x59, 0xba, 0xb9, 0x95, 0xa5, + 0xbf, 0x6f, 0x65, 0xe9, 0xbb, 0x3b, 0x39, 0x77, 0x73, 0x27, 0xe7, 0xfe, 0xb8, 0x93, 0x73, 0x87, + 0x2f, 0x0d, 0xd3, 0x3f, 0xed, 0x34, 0xd4, 0x63, 0xa7, 0x75, 0x1f, 0xc7, 0x79, 0x8d, 0x76, 0x43, + 0x22, 0xbf, 0xe7, 0x32, 0xaf, 0x51, 0xe4, 0x6f, 0xf2, 0xda, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, + 0xf6, 0x20, 0x3a, 0x1b, 0xcd, 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -826,7 +778,6 @@ type QueryClient interface { Rollapp(ctx context.Context, in *QueryGetRollappRequest, opts ...grpc.CallOption) (*QueryGetRollappResponse, error) // Queries a Rollapp by index. RollappByEIP155(ctx context.Context, in *QueryGetRollappByEIP155Request, opts ...grpc.CallOption) (*QueryGetRollappResponse, error) - RollappByAlias(ctx context.Context, in *QueryGetRollappByAliasRequest, opts ...grpc.CallOption) (*QueryGetRollappResponse, error) // Queries a list of Rollapp items. RollappAll(ctx context.Context, in *QueryAllRollappRequest, opts ...grpc.CallOption) (*QueryAllRollappResponse, error) // Queries a LatestHeight by rollapp-id. @@ -872,15 +823,6 @@ func (c *queryClient) RollappByEIP155(ctx context.Context, in *QueryGetRollappBy return out, nil } -func (c *queryClient) RollappByAlias(ctx context.Context, in *QueryGetRollappByAliasRequest, opts ...grpc.CallOption) (*QueryGetRollappResponse, error) { - out := new(QueryGetRollappResponse) - err := c.cc.Invoke(ctx, "/dymensionxyz.dymension.rollapp.Query/RollappByAlias", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *queryClient) RollappAll(ctx context.Context, in *QueryAllRollappRequest, opts ...grpc.CallOption) (*QueryAllRollappResponse, error) { out := new(QueryAllRollappResponse) err := c.cc.Invoke(ctx, "/dymensionxyz.dymension.rollapp.Query/RollappAll", in, out, opts...) @@ -925,7 +867,6 @@ type QueryServer interface { Rollapp(context.Context, *QueryGetRollappRequest) (*QueryGetRollappResponse, error) // Queries a Rollapp by index. RollappByEIP155(context.Context, *QueryGetRollappByEIP155Request) (*QueryGetRollappResponse, error) - RollappByAlias(context.Context, *QueryGetRollappByAliasRequest) (*QueryGetRollappResponse, error) // Queries a list of Rollapp items. RollappAll(context.Context, *QueryAllRollappRequest) (*QueryAllRollappResponse, error) // Queries a LatestHeight by rollapp-id. @@ -949,9 +890,6 @@ func (*UnimplementedQueryServer) Rollapp(ctx context.Context, req *QueryGetRolla func (*UnimplementedQueryServer) RollappByEIP155(ctx context.Context, req *QueryGetRollappByEIP155Request) (*QueryGetRollappResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RollappByEIP155 not implemented") } -func (*UnimplementedQueryServer) RollappByAlias(ctx context.Context, req *QueryGetRollappByAliasRequest) (*QueryGetRollappResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RollappByAlias not implemented") -} func (*UnimplementedQueryServer) RollappAll(ctx context.Context, req *QueryAllRollappRequest) (*QueryAllRollappResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RollappAll not implemented") } @@ -1023,24 +961,6 @@ func _Query_RollappByEIP155_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } -func _Query_RollappByAlias_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetRollappByAliasRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).RollappByAlias(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/dymensionxyz.dymension.rollapp.Query/RollappByAlias", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).RollappByAlias(ctx, req.(*QueryGetRollappByAliasRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _Query_RollappAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryAllRollappRequest) if err := dec(in); err != nil { @@ -1129,10 +1049,6 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "RollappByEIP155", Handler: _Query_RollappByEIP155_Handler, }, - { - MethodName: "RollappByAlias", - Handler: _Query_RollappByAlias_Handler, - }, { MethodName: "RollappAll", Handler: _Query_RollappAll_Handler, @@ -1268,36 +1184,6 @@ func (m *QueryGetRollappByEIP155Request) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *QueryGetRollappByAliasRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryGetRollappByAliasRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetRollappByAliasRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Alias) > 0 { - i -= len(m.Alias) - copy(dAtA[i:], m.Alias) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Alias))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func (m *QueryGetLatestHeightRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1729,19 +1615,6 @@ func (m *QueryGetRollappByEIP155Request) Size() (n int) { return n } -func (m *QueryGetRollappByAliasRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Alias) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - func (m *QueryGetLatestHeightRequest) Size() (n int) { if m == nil { return 0 @@ -2177,88 +2050,6 @@ func (m *QueryGetRollappByEIP155Request) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGetRollappByAliasRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryGetRollappByAliasRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetRollappByAliasRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Alias", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Alias = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *QueryGetLatestHeightRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/rollapp/types/query.pb.gw.go b/x/rollapp/types/query.pb.gw.go index e3d33f071..2e0fad094 100644 --- a/x/rollapp/types/query.pb.gw.go +++ b/x/rollapp/types/query.pb.gw.go @@ -159,60 +159,6 @@ func local_request_Query_RollappByEIP155_0(ctx context.Context, marshaler runtim } -func request_Query_RollappByAlias_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetRollappByAliasRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["alias"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "alias") - } - - protoReq.Alias, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "alias", err) - } - - msg, err := client.RollappByAlias(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_RollappByAlias_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetRollappByAliasRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["alias"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "alias") - } - - protoReq.Alias, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "alias", err) - } - - msg, err := server.RollappByAlias(ctx, &protoReq) - return msg, metadata, err - -} - var ( filter_Query_RollappAll_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -562,29 +508,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_RollappByAlias_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_RollappByAlias_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_RollappByAlias_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_Query_RollappAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -778,26 +701,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_RollappByAlias_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_RollappByAlias_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_RollappByAlias_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_Query_RollappAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -888,8 +791,6 @@ var ( pattern_Query_RollappByEIP155_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 3}, []string{"dymensionxyz", "dymension", "rollapp", "eip155"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_RollappByAlias_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 3}, []string{"dymensionxyz", "dymension", "rollapp", "alias"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_RollappAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 2}, []string{"dymensionxyz", "dymension", "rollapp"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_LatestHeight_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"dymensionxyz", "dymension", "rollapp", "latest_height", "rollappId"}, "", runtime.AssumeColonVerbOpt(false))) @@ -906,8 +807,6 @@ var ( forward_Query_RollappByEIP155_0 = runtime.ForwardResponseMessage - forward_Query_RollappByAlias_0 = runtime.ForwardResponseMessage - forward_Query_RollappAll_0 = runtime.ForwardResponseMessage forward_Query_LatestHeight_0 = runtime.ForwardResponseMessage diff --git a/x/rollapp/types/rollapp.go b/x/rollapp/types/rollapp.go index 49f09d8aa..77d1208ca 100644 --- a/x/rollapp/types/rollapp.go +++ b/x/rollapp/types/rollapp.go @@ -6,7 +6,6 @@ import ( "net/url" "regexp" "strings" - "unicode" errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" @@ -19,8 +18,7 @@ func NewRollapp( rollappId, initSequencer, bech32Prefix, - genesisChecksum, - alias string, + genesisChecksum string, vmType Rollapp_VMType, metadata *RollappMetadata, transfersEnabled bool, @@ -31,7 +29,6 @@ func NewRollapp( InitialSequencer: initSequencer, GenesisChecksum: genesisChecksum, Bech32Prefix: bech32Prefix, - Alias: alias, VmType: vmType, Metadata: metadata, GenesisState: RollappGenesisState{ @@ -41,7 +38,6 @@ func NewRollapp( } const ( - maxAliasLength = 64 maxDescriptionLength = 512 maxURLLength = 256 maxGenesisChecksumLength = 64 @@ -75,14 +71,6 @@ func (r Rollapp) ValidateBasic() error { return errorsmod.Wrap(ErrInvalidGenesisChecksum, "GenesisChecksum") } - if len(r.Alias) == 0 { - return ErrInvalidAlias - } - - if err = validateAlias(r.Alias); err != nil { - return ErrInvalidAlias - } - if r.VmType == 0 { return ErrInvalidVMType } @@ -116,20 +104,6 @@ func validateInitialSequencer(initialSequencer string) error { return nil } -func validateAlias(alias string) error { - if len(alias) > maxAliasLength { - return ErrInvalidAlias - } - // only allow alphanumeric characters and underscores - for _, c := range alias { - if !unicode.IsLetter(c) && !unicode.IsNumber(c) && c != '_' { - return ErrInvalidAlias - } - } - - return nil -} - func validateBech32Prefix(prefix string) error { bechAddr, err := sdk.Bech32ifyAddressBytes(prefix, sample.Acc()) if err != nil { diff --git a/x/rollapp/types/rollapp.pb.go b/x/rollapp/types/rollapp.pb.go index 7cdaa0657..2fcfc3fc0 100644 --- a/x/rollapp/types/rollapp.pb.go +++ b/x/rollapp/types/rollapp.pb.go @@ -121,10 +121,8 @@ type Rollapp struct { RegisteredDenoms []string `protobuf:"bytes,10,rep,name=registeredDenoms,proto3" json:"registeredDenoms,omitempty"` // unique bech32 prefix Bech32Prefix string `protobuf:"bytes,11,opt,name=bech32_prefix,json=bech32Prefix,proto3" json:"bech32_prefix,omitempty"` - // alias is the chain alias used for display and namespace system - Alias string `protobuf:"bytes,12,opt,name=alias,proto3" json:"alias,omitempty"` // checksum used to verify integrity of the genesis file - GenesisChecksum string `protobuf:"bytes,13,opt,name=genesis_checksum,json=genesisChecksum,proto3" json:"genesis_checksum,omitempty"` + GenesisChecksum string `protobuf:"bytes,12,opt,name=genesis_checksum,json=genesisChecksum,proto3" json:"genesis_checksum,omitempty"` // metadata is the rollapp metadata Metadata *RollappMetadata `protobuf:"bytes,14,opt,name=metadata,proto3" json:"metadata,omitempty"` // initial_sequencer is an option to preset one or more coma-separated bech32-encoded addresses of the @@ -220,13 +218,6 @@ func (m *Rollapp) GetBech32Prefix() string { return "" } -func (m *Rollapp) GetAlias() string { - if m != nil { - return m.Alias - } - return "" -} - func (m *Rollapp) GetGenesisChecksum() string { if m != nil { return m.GenesisChecksum @@ -339,47 +330,47 @@ func init() { } var fileDescriptor_d4ef2bec3aea5528 = []byte{ - // 640 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x5d, 0x6f, 0xd3, 0x3c, - 0x14, 0x6e, 0xd6, 0xbe, 0xfd, 0x70, 0xf7, 0x91, 0xf9, 0x9d, 0x20, 0x4c, 0x2c, 0x54, 0xe5, 0xa6, - 0xc0, 0x48, 0xb4, 0x95, 0x3f, 0xc0, 0x60, 0x8c, 0x0d, 0x15, 0xa1, 0x14, 0x86, 0xb4, 0x0b, 0x2a, - 0x37, 0x39, 0x4d, 0x2d, 0x12, 0x3b, 0xc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0x34, 0x1b, 0x8e, 0xfa, 0x8e, 0xcf, - 0xe3, 0xab, 0xbe, 0x90, 0x71, 0xdb, 0x9d, 0xcc, 0xbf, 0x85, 0xfc, 0x4d, 0x45, 0xbf, 0x2c, 0x3f, - 0x85, 0xf6, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x8c, 0x57, 0x1b, 0x88, 0x13, 0x05, 0x00, 0x00, + // 629 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0xcf, 0x6e, 0xd3, 0x4e, + 0x10, 0x8e, 0x9b, 0xfc, 0xf2, 0x67, 0xd3, 0x3f, 0xee, 0xfe, 0x2a, 0x30, 0x15, 0x35, 0x51, 0xb8, + 0x04, 0x28, 0xb6, 0xda, 0xf0, 0x02, 0x14, 0x4a, 0x69, 0x51, 0x10, 0x72, 0xa0, 0x48, 0x3d, 0x10, + 0x6d, 0xec, 0x89, 0xb3, 0xc2, 0xde, 0x35, 0xde, 0x4d, 0x48, 0xfa, 0x14, 0x3c, 0x56, 0x8f, 0x3d, + 0x72, 0x42, 0x55, 0xfb, 0x12, 0x1c, 0x91, 0xd7, 0x9b, 0x50, 0xa9, 0x94, 0x56, 0x9c, 0xd6, 0xf3, + 0xcd, 0xcc, 0xf7, 0xcd, 0xcc, 0x8e, 0x17, 0x6d, 0x06, 0xd3, 0x18, 0x98, 0xa0, 0x9c, 0x4d, 0xa6, + 0xc7, 0xee, 0xdc, 0x70, 0x53, 0x1e, 0x45, 0x24, 0x49, 0x66, 0xa7, 0x93, 0xa4, 0x5c, 0x72, 0x6c, + 0x5f, 0x8e, 0x76, 0xe6, 0x86, 0xa3, 0xa3, 0xd6, 0xd7, 0x42, 0x1e, 0x72, 0x15, 0xea, 0x66, 0x5f, + 0x79, 0xd6, 0xba, 0xed, 0x73, 0x11, 0x73, 0xe1, 0xf6, 0x89, 0x00, 0x77, 0xbc, 0xd5, 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 0x99, 0xee, 0x28, 0x8e, 0x49, + 0x3a, 0xc5, 0xf7, 0xd1, 0xef, 0xbd, 0xba, 0xba, 0x68, 0x47, 0xc8, 0x8c, 0x88, 0x04, 0x21, 0xd5, + 0x06, 0xec, 0xb3, 0x00, 0x26, 0x6a, 0xe7, 0xea, 0x37, 0xb7, 0xa3, 0x33, 0x06, 0x5c, 0x65, 0x79, + 0x57, 0x78, 0x70, 0x84, 0xee, 0xe5, 0xd8, 0x2b, 0xca, 0x48, 0x44, 0x8f, 0x21, 0xb8, 0x24, 0x52, + 0xfc, 0x27, 0x91, 0xeb, 0x09, 0x77, 0xde, 0x9e, 0x9c, 0xdb, 0xc6, 0xe9, 0xb9, 0x6d, 0x9c, 0x9d, + 0xdb, 0xc6, 0xb7, 0x0b, 0xbb, 0x70, 0x7a, 0x61, 0x17, 0xbe, 0x5f, 0xd8, 0x85, 0xa3, 0x67, 0x21, + 0x95, 0xc3, 0x51, 0xdf, 0xf1, 0x79, 0x7c, 0xdd, 0x63, 0x31, 0x6e, 0xbb, 0x93, 0xf9, 0x03, 0x90, + 0xdd, 0xa9, 0xe8, 0x97, 0xd5, 0xef, 0xdf, 0xfe, 0x15, 0x00, 0x00, 0xff, 0xff, 0x5a, 0xdc, 0x89, + 0xcb, 0xfd, 0x04, 0x00, 0x00, } func (m *RollappGenesisState) Marshal() (dAtA []byte, err error) { @@ -478,13 +469,6 @@ func (m *Rollapp) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.GenesisChecksum) i = encodeVarintRollapp(dAtA, i, uint64(len(m.GenesisChecksum))) i-- - dAtA[i] = 0x6a - } - if len(m.Alias) > 0 { - i -= len(m.Alias) - copy(dAtA[i:], m.Alias) - i = encodeVarintRollapp(dAtA, i, uint64(len(m.Alias))) - i-- dAtA[i] = 0x62 } if len(m.Bech32Prefix) > 0 { @@ -657,10 +641,6 @@ func (m *Rollapp) Size() (n int) { if l > 0 { n += 1 + l + sovRollapp(uint64(l)) } - l = len(m.Alias) - if l > 0 { - n += 1 + l + sovRollapp(uint64(l)) - } l = len(m.GenesisChecksum) if l > 0 { n += 1 + l + sovRollapp(uint64(l)) @@ -1022,38 +1002,6 @@ func (m *Rollapp) Unmarshal(dAtA []byte) error { m.Bech32Prefix = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Alias", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRollapp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRollapp - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRollapp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Alias = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 13: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field GenesisChecksum", wireType) } diff --git a/x/rollapp/types/tx.pb.go b/x/rollapp/types/tx.pb.go index 7ba4ce497..ac59160ae 100644 --- a/x/rollapp/types/tx.pb.go +++ b/x/rollapp/types/tx.pb.go @@ -186,12 +186,10 @@ type MsgUpdateRollappInformation struct { // sequencer that are allowed to initially serve this rollappId. // wildcard '*' means any sequencer is allowed to be the first proposer. InitialSequencer string `protobuf:"bytes,3,opt,name=initial_sequencer,json=initialSequencer,proto3" json:"initial_sequencer,omitempty"` - // alias is the chain alias used for display and namespace system - Alias string `protobuf:"bytes,4,opt,name=alias,proto3" json:"alias,omitempty"` // checksum used to verify integrity - GenesisChecksum string `protobuf:"bytes,5,opt,name=genesis_checksum,json=genesisChecksum,proto3" json:"genesis_checksum,omitempty"` + GenesisChecksum string `protobuf:"bytes,4,opt,name=genesis_checksum,json=genesisChecksum,proto3" json:"genesis_checksum,omitempty"` // metadata is the rollapp metadata - Metadata *RollappMetadata `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` + Metadata *RollappMetadata `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"` } func (m *MsgUpdateRollappInformation) Reset() { *m = MsgUpdateRollappInformation{} } @@ -248,13 +246,6 @@ func (m *MsgUpdateRollappInformation) GetInitialSequencer() string { return "" } -func (m *MsgUpdateRollappInformation) GetAlias() string { - if m != nil { - return m.Alias - } - return "" -} - func (m *MsgUpdateRollappInformation) GetGenesisChecksum() string { if m != nil { return m.GenesisChecksum @@ -551,55 +542,55 @@ func init() { } var fileDescriptor_1a86300fb8647ecb = []byte{ - // 768 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xcd, 0x4e, 0xdb, 0x4a, - 0x14, 0x8e, 0x49, 0x48, 0xe0, 0x24, 0x40, 0x18, 0x21, 0xae, 0x15, 0xb8, 0xbe, 0x51, 0xd0, 0xd5, - 0xe5, 0xfe, 0xd9, 0x6d, 0xa0, 0x55, 0x45, 0xbb, 0x69, 0x40, 0x2a, 0xb4, 0x4a, 0xa1, 0x86, 0x76, - 0xd1, 0x4d, 0xe4, 0x38, 0x83, 0x63, 0x11, 0x7b, 0x5c, 0xcf, 0x24, 0x24, 0xed, 0xae, 0x9b, 0x56, - 0xea, 0xa6, 0x0f, 0x50, 0xa9, 0x52, 0x9f, 0xa0, 0x8f, 0xc1, 0x92, 0x65, 0x57, 0x55, 0x05, 0x8b, - 0xbe, 0x45, 0x55, 0xd9, 0x1e, 0x3b, 0x81, 0x10, 0x12, 0xe8, 0x6a, 0x72, 0xce, 0x7c, 0xdf, 0x99, - 0xe3, 0xef, 0x3b, 0x63, 0x07, 0xfe, 0xaa, 0x75, 0x2c, 0x6c, 0x53, 0x93, 0xd8, 0xed, 0xce, 0x4b, - 0x25, 0x0a, 0x14, 0x97, 0x34, 0x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, 0xd6, 0x7f, 0x81, 0x1c, 0xb5, 0xd7, 0x84, 0x74, 0xef, - 0xa0, 0xcb, 0x23, 0xd7, 0xf4, 0xf1, 0xb9, 0xdb, 0x57, 0xc3, 0x47, 0xc7, 0xbe, 0x11, 0x60, 0xb6, - 0x7f, 0x8a, 0x56, 0x47, 0xa8, 0xd6, 0xc7, 0xca, 0xdd, 0xbb, 0x0e, 0x2b, 0xec, 0xa4, 0xf4, 0xf8, - 0xe8, 0x44, 0x12, 0x8e, 0x4f, 0x24, 0xe1, 0xdb, 0x89, 0x24, 0xbc, 0x3f, 0x95, 0x62, 0xc7, 0xa7, - 0x52, 0xec, 0xcb, 0xa9, 0x14, 0x7b, 0xbe, 0x6a, 0x98, 0xac, 0xde, 0xac, 0xca, 0x3a, 0xb1, 0x94, - 0x01, 0xdf, 0xd1, 0xd6, 0x8a, 0xd2, 0xee, 0xfe, 0x27, 0xe8, 0x38, 0x98, 0x56, 0x93, 0xfe, 0x47, - 0x73, 0xe5, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe7, 0xba, 0xf9, 0x3b, 0x42, 0x08, 0x00, 0x00, + // 763 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0x4f, 0x53, 0xd3, 0x4e, + 0x18, 0xc7, 0x1b, 0x5a, 0x5a, 0xba, 0x2d, 0x50, 0x76, 0x18, 0x7e, 0x99, 0xc2, 0x2f, 0x76, 0xca, + 0x38, 0xe2, 0xbf, 0x44, 0x0b, 0x3a, 0x0e, 0x7a, 0xb1, 0x30, 0x23, 0xe8, 0x54, 0x30, 0xa0, 0x07, + 0x2f, 0x9d, 0x34, 0x5d, 0xd2, 0x0c, 0x4d, 0x36, 0x66, 0xb7, 0xa5, 0xd5, 0x9b, 0x17, 0x75, 0xbc, + 0xf8, 0x02, 0x3c, 0xf9, 0x0a, 0x7c, 0x19, 0x1c, 0x39, 0x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xe4, 0xc5, 0xd8, 0xe1, 0xcf, 0x2b, 0x42, 0x07, 0xfc, 0x2a, + 0xf0, 0x78, 0xf9, 0x6f, 0x95, 0xbf, 0x0a, 0x16, 0xcf, 0x41, 0x11, 0x22, 0xfb, 0x23, 0x80, 0xa9, + 0x50, 0xb7, 0x43, 0x35, 0x8a, 0xce, 0x99, 0xeb, 0x05, 0xd0, 0xe1, 0xd2, 0x0b, 0x2a, 0x07, 0x52, + 0x84, 0x6a, 0x2e, 0xdd, 0x40, 0xa6, 0x51, 0xa3, 0x0c, 0x51, 0x4c, 0xed, 0x4e, 0x79, 0x7e, 0xbb, + 0x61, 0x15, 0xbd, 0x63, 0x4d, 0x18, 0x96, 0x98, 0xda, 0x49, 0xc0, 0x39, 0x10, 0x5f, 0x7f, 0xbc, + 0xad, 0xd1, 0x1a, 0xc3, 0x91, 0x54, 0x79, 0x04, 0x37, 0x40, 0xb4, 0xb8, 0x4e, 0xc4, 0x04, 0x63, + 0x74, 0x67, 0x18, 0x23, 0x56, 0x6c, 0x3d, 0xfc, 0x66, 0x10, 0x06, 0x29, 0xa2, 0x7a, 0x25, 0x7a, + 0xe6, 0x29, 0x9e, 0x49, 0xe4, 0x45, 0x30, 0x77, 0xfa, 0xfd, 0x43, 0x34, 0x9f, 0x05, 0x30, 0x5b, + 0x22, 0xc6, 0xae, 0xab, 0xd9, 0x64, 0x0f, 0xb9, 0x5b, 0x1e, 0x56, 0x52, 0x33, 0x1d, 0xef, 0x48, + 0xea, 0x0d, 0xd7, 0x45, 0x36, 0x2d, 0x77, 0x8f, 0x53, 0x9a, 0x27, 0x99, 0x10, 0xce, 0x83, 0xa4, + 0x8d, 0x0e, 0xb8, 0xc0, 0x67, 0x35, 0x61, 0xa3, 0x83, 0xad, 0x3e, 0x23, 0x17, 0x3d, 0x43, 0x72, + 0x15, 0x7a, 0x7d, 0x9e, 0x7e, 0x46, 0x5e, 0x02, 0x0b, 0xfd, 0x9a, 0x09, 0xba, 0x2d, 0x7c, 0x8b, + 0x81, 0x68, 0x89, 0x18, 0xf0, 0x1d, 0x98, 0x3c, 0xfd, 0x99, 0x1a, 0x4a, 0xec, 0xec, 0x71, 0xca, + 0x3e, 0xb8, 0xa8, 0x23, 0x68, 0x02, 0x7e, 0x15, 0x80, 0x38, 0xf0, 0xf4, 0x3d, 0x1c, 0xa1, 0xec, + 0x20, 0x73, 0x76, 0xed, 0x1f, 0xcc, 0x61, 0x7b, 0x0d, 0x90, 0xea, 0x1e, 0x74, 0x79, 0xe4, 0x9a, + 0x4c, 0x9f, 0xbd, 0x7f, 0x31, 0x7d, 0xf8, 0xd8, 0x0f, 0x02, 0x98, 0xe9, 0x9d, 0xa2, 0x95, 0x11, + 0xaa, 0xf5, 0xb8, 0xb2, 0x8f, 0x2e, 0xe3, 0x0a, 0x3a, 0x29, 0x3e, 0x3f, 0x3c, 0x96, 0x84, 0xa3, + 0x63, 0x49, 0xf8, 0x75, 0x2c, 0x09, 0x5f, 0x4e, 0xa4, 0xc8, 0xd1, 0x89, 0x14, 0xf9, 0x71, 0x22, + 0x45, 0x5e, 0xaf, 0x18, 0x26, 0xad, 0x35, 0x2a, 0xb2, 0x8e, 0x2d, 0x65, 0xc0, 0x1f, 0xb3, 0xb9, + 0xac, 0xb4, 0x3a, 0x7f, 0xff, 0xb6, 0x83, 0x48, 0x25, 0xce, 0x7e, 0x8f, 0xcb, 0x7f, 0x03, 0x00, + 0x00, 0xff, 0xff, 0x43, 0x42, 0xbb, 0x8e, 0x2c, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -927,20 +918,13 @@ func (m *MsgUpdateRollappInformation) MarshalToSizedBuffer(dAtA []byte) (int, er i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x32 + dAtA[i] = 0x2a } if len(m.GenesisChecksum) > 0 { i -= len(m.GenesisChecksum) copy(dAtA[i:], m.GenesisChecksum) i = encodeVarintTx(dAtA, i, uint64(len(m.GenesisChecksum))) i-- - dAtA[i] = 0x2a - } - if len(m.Alias) > 0 { - i -= len(m.Alias) - copy(dAtA[i:], m.Alias) - i = encodeVarintTx(dAtA, i, uint64(len(m.Alias))) - i-- dAtA[i] = 0x22 } if len(m.InitialSequencer) > 0 { @@ -1222,10 +1206,6 @@ func (m *MsgUpdateRollappInformation) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Alias) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } l = len(m.GenesisChecksum) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -1793,38 +1773,6 @@ func (m *MsgUpdateRollappInformation) Unmarshal(dAtA []byte) error { m.InitialSequencer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Alias", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Alias = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field GenesisChecksum", wireType) } @@ -1856,7 +1804,7 @@ func (m *MsgUpdateRollappInformation) Unmarshal(dAtA []byte) error { } m.GenesisChecksum = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) } diff --git a/x/sequencer/keeper/hook_listener.go b/x/sequencer/keeper/hook_listener.go index 8e751f77f..f5a947aa1 100644 --- a/x/sequencer/keeper/hook_listener.go +++ b/x/sequencer/keeper/hook_listener.go @@ -11,14 +11,13 @@ var _ rollapptypes.RollappHooks = rollappHook{} // Hooks wrapper struct for rollapp keeper. type rollappHook struct { + rollapptypes.StubRollappCreatedHooks k Keeper } // RollappHooks returns the wrapper struct. func (k Keeper) RollappHooks() rollapptypes.RollappHooks { - return rollappHook{ - k, - } + return rollappHook{k: k} } func (hook rollappHook) BeforeUpdateState(ctx sdk.Context, seqAddr string, rollappId string) error { @@ -44,13 +43,9 @@ func (hook rollappHook) BeforeUpdateState(ctx sdk.Context, seqAddr string, rolla return nil } -func (hook rollappHook) AfterStateFinalized(ctx sdk.Context, rollappID string, stateInfo *rollapptypes.StateInfo) error { - return nil -} - // FraudSubmitted implements the RollappHooks interface // It slashes the sequencer and unbonds all other bonded sequencers -func (hook rollappHook) FraudSubmitted(ctx sdk.Context, rollappID string, height uint64, seqAddr string) error { +func (hook rollappHook) FraudSubmitted(ctx sdk.Context, rollappID string, _ uint64, seqAddr string) error { err := hook.k.Slashing(ctx, seqAddr) if err != nil { return err @@ -67,8 +62,3 @@ func (hook rollappHook) FraudSubmitted(ctx sdk.Context, rollappID string, height return nil } - -// RollappCreated implements types.RollappHooks. -func (hook rollappHook) RollappCreated(ctx sdk.Context, rollappID string) error { - return nil -} diff --git a/x/sequencer/keeper/msg_server_create_sequencer.go b/x/sequencer/keeper/msg_server_create_sequencer.go index 435b39dae..14fb94baa 100644 --- a/x/sequencer/keeper/msg_server_create_sequencer.go +++ b/x/sequencer/keeper/msg_server_create_sequencer.go @@ -71,7 +71,7 @@ func (k msgServer) CreateSequencer(goCtx context.Context, msg *types.MsgCreateSe ) } - seqAcc, _ := sdk.AccAddressFromBech32(msg.Creator) + seqAcc := sdk.MustAccAddressFromBech32(msg.Creator) err := k.bankKeeper.SendCoinsFromAccountToModule(ctx, seqAcc, types.ModuleName, sdk.NewCoins(msg.Bond)) if err != nil { return nil, err diff --git a/x/sequencer/keeper/msg_server_create_sequencer_test.go b/x/sequencer/keeper/msg_server_create_sequencer_test.go index 9a680fdb0..8ad594d41 100644 --- a/x/sequencer/keeper/msg_server_create_sequencer_test.go +++ b/x/sequencer/keeper/msg_server_create_sequencer_test.go @@ -121,7 +121,6 @@ func (suite *SequencerTestSuite) TestCreateSequencer() { Owner: alice, Bech32Prefix: bech32Prefix, GenesisChecksum: "1234567890abcdefg", - Alias: "Rollapp", Sealed: true, Metadata: &rollapptypes.RollappMetadata{ Website: "https://dymension.xyz", diff --git a/x/sequencer/keeper/sequencer_suite_test.go b/x/sequencer/keeper/sequencer_suite_test.go index f808bbe29..610130d66 100644 --- a/x/sequencer/keeper/sequencer_suite_test.go +++ b/x/sequencer/keeper/sequencer_suite_test.go @@ -56,7 +56,6 @@ func (suite *SequencerTestSuite) CreateRollappWithInitialSequencer(initSeq strin Owner: sample.AccAddress(), GenesisChecksum: "checksum", InitialSequencer: initSeq, - Alias: "alias", } suite.App.RollappKeeper.SetRollapp(suite.Ctx, rollapp) return rollapp.GetRollappId() diff --git a/x/streamer/keeper/hooks.go b/x/streamer/keeper/hooks.go index 550a33701..bf216cf82 100644 --- a/x/streamer/keeper/hooks.go +++ b/x/streamer/keeper/hooks.go @@ -1,16 +1,20 @@ package keeper import ( - rollapptypes "github.com/dymensionxyz/dymension/v3/x/rollapp/types" - "github.com/dymensionxyz/dymension/v3/x/streamer/types" epochstypes "github.com/osmosis-labs/osmosis/v15/x/epochs/types" gammtypes "github.com/osmosis-labs/osmosis/v15/x/gamm/types" + ctypes "github.com/dymensionxyz/dymension/v3/x/common/types" + rollapptypes "github.com/dymensionxyz/dymension/v3/x/rollapp/types" + "github.com/dymensionxyz/dymension/v3/x/streamer/types" + sdk "github.com/cosmos/cosmos-sdk/types" ) // Hooks is the wrapper struct for the streamer keeper. type Hooks struct { + ctypes.StubGammHooks + rollapptypes.StubRollappCreatedHooks k Keeper } @@ -22,7 +26,7 @@ var ( // Hooks returns the hook wrapper struct. func (k Keeper) Hooks() Hooks { - return Hooks{k} + return Hooks{k: k} } /* -------------------------------------------------------------------------- */ @@ -92,38 +96,13 @@ func (h Hooks) AfterPoolCreated(ctx sdk.Context, sender sdk.AccAddress, poolId u } } -// AfterJoinPool hook is a noop. -func (h Hooks) AfterJoinPool(ctx sdk.Context, sender sdk.AccAddress, poolId uint64, enterCoins sdk.Coins, shareOutAmount sdk.Int) { -} - -// AfterExitPool hook is a noop. -func (h Hooks) AfterExitPool(ctx sdk.Context, sender sdk.AccAddress, poolId uint64, shareInAmount sdk.Int, exitCoins sdk.Coins) { -} - -// AfterSwap hook is a noop. -func (h Hooks) AfterSwap(ctx sdk.Context, sender sdk.AccAddress, poolId uint64, input sdk.Coins, output sdk.Coins) { -} - /* -------------------------------------------------------------------------- */ /* rollapp hooks */ /* -------------------------------------------------------------------------- */ // AfterStateFinalized implements types.RollappHooks. -func (h Hooks) AfterStateFinalized(ctx sdk.Context, rollappID string, stateInfo *rollapptypes.StateInfo) error { - return nil -} - -// BeforeUpdateState implements types.RollappHooks. -func (h Hooks) BeforeUpdateState(ctx sdk.Context, seqAddr string, rollappId string) error { - return nil -} - -// FraudSubmitted implements types.RollappHooks. -func (h Hooks) FraudSubmitted(ctx sdk.Context, rollappID string, height uint64, seqAddr string) error { - return nil -} // RollappCreated implements types.RollappHooks. -func (h Hooks) RollappCreated(ctx sdk.Context, rollappID string) error { +func (h Hooks) RollappCreated(ctx sdk.Context, rollappID, _ string, _ sdk.AccAddress) error { err := h.k.CreateRollappGauge(ctx, rollappID) if err != nil { ctx.Logger().Error("Failed to create rollapp gauge", "error", err)