diff --git a/CHANGELOG.md b/CHANGELOG.md index 73356091..272cebdf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,11 @@ -# [](https://github.com/dymensionxyz/rollapp-evm/compare/v2.2.0-alpha...v) (2024-04-25) +# [](https://github.com/dymensionxyz/rollapp-evm/compare/v2.2.0-alpha...v) (2024-04-26) ### Bug Fixes * **app:** fixed bech32 on account keeper to not be hardcoded ([#165](https://github.com/dymensionxyz/rollapp-evm/issues/165)) ([750d1e7](https://github.com/dymensionxyz/rollapp-evm/commit/750d1e70ad052daf7b2942bcecaf0dddfbc17d90)) * **deps:** bumps `block-explorer-rpc-cosmos v1.0.3` & `evm-block-explorer-rpc-cosmos` v1.0.3 ([#142](https://github.com/dymensionxyz/rollapp-evm/issues/142)) ([ea5e5fd](https://github.com/dymensionxyz/rollapp-evm/commit/ea5e5fdc854d5a4fa4079c4d79b79732e78cf9d8)) +* **local script:** updated default genesis created on extended guide with EIP 3855 ([#183](https://github.com/dymensionxyz/rollapp-evm/issues/183)) ([d201be4](https://github.com/dymensionxyz/rollapp-evm/commit/d201be4ee6757c912ecae568207c1ea358387cae)) * multiple fixes to advance readme features ([#141](https://github.com/dymensionxyz/rollapp-evm/issues/141)) ([469d39f](https://github.com/dymensionxyz/rollapp-evm/commit/469d39fc79591cdae4455839db1546cc5bd9c053)) * **readme:** broken links have been renewed. ([#78](https://github.com/dymensionxyz/rollapp-evm/issues/78)) ([c7df6f2](https://github.com/dymensionxyz/rollapp-evm/commit/c7df6f29c8b9981d7a998be4091d2e96c19647a3)) * **scripts:** add an option to skip evm base fees ([#162](https://github.com/dymensionxyz/rollapp-evm/issues/162)) ([ea51eee](https://github.com/dymensionxyz/rollapp-evm/commit/ea51eee8d66dbba587d6ec00395418a1f08b99a8)) diff --git a/README.md b/README.md index 7fc7c3ba..6e7cea51 100644 --- a/README.md +++ b/README.md @@ -182,12 +182,26 @@ rollapp-evm start ### Install dymension relayer ```shell -git clone https://github.com/dymensionxyz/go-relayer.git --branch v0.2.0-v2.3.1-relayer +git clone https://github.com/dymensionxyz/go-relayer.git --branch v0.3.0-v2.5.2-relayer cd go-relayer && make install ``` ### Establish IBC channel +Setup block time to be 3s for easy ibc channel establishment + +Linux: + +```shell +sed -i 's/empty_blocks_max_time = "1h0m0s"/empty_blocks_max_time = "3s"/' "${ROLLAPP_HOME_DIR}/config/dymint.toml" +``` + +Mac: + +```shell +sed -i '' 's/empty_blocks_max_time = "1h0m0s"/empty_blocks_max_time = "3s"/' "${ROLLAPP_HOME_DIR}/config/dymint.toml" +``` + Verify you have all the environment variables defined earlier set. while the rollapp and the local dymension hub node running, run: @@ -205,16 +219,18 @@ Stop the rollapp: kill $(pgrep rollapp-evm) ``` +Change back to 1hr block time: + Linux: ```shell -sed -i 's/empty_blocks_max_time = "3s"/empty_blocks_max_time = "3600s"/' ${ROLLAPP_HOME_DIR}/config/dymint.toml +sed -i 's/empty_blocks_max_time = "3s"/empty_blocks_max_time = "1h0m0s"/' ${ROLLAPP_HOME_DIR}/config/dymint.toml ``` Mac: ```shell -sed -i '' 's/empty_blocks_max_time = "3s"/empty_blocks_max_time = "3600s"/' ${ROLLAPP_HOME_DIR}/config/dymint.toml +sed -i '' 's/empty_blocks_max_time = "3s"/empty_blocks_max_time = "1h0m0s"/' ${ROLLAPP_HOME_DIR}/config/dymint.toml ``` Start the rollapp: diff --git a/app/app.go b/app/app.go index a5c4f2ec..245ffecd 100644 --- a/app/app.go +++ b/app/app.go @@ -501,6 +501,7 @@ func NewRollapp( AddRoute(distrtypes.RouterKey, distr.NewCommunityPoolSpendProposalHandler(app.DistrKeeper)). AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.UpgradeKeeper)). AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)). + AddRoute(seqtypes.RouterKey, sequencers.NewUpdatePermissionProposalHandler(&app.SequencersKeeper)). AddRoute(erc20types.RouterKey, erc20.NewErc20ProposalHandler(&app.Erc20Keeper)) govConfig := govtypes.DefaultConfig() @@ -532,10 +533,10 @@ func NewRollapp( app.DenomMetadataKeeper = denommetadatamodulekeeper.NewKeeper( appCodec, keys[denommetadatamoduletypes.StoreKey], + app.SequencersKeeper, app.BankKeeper, app.TransferKeeper, denomMetadataHooks, - app.GetSubspace(denommetadatamoduletypes.ModuleName), ) app.TransferKeeper = transferkeeper.NewKeeper( @@ -549,8 +550,8 @@ func NewRollapp( app.HubGenesisKeeper = hubgenkeeper.NewKeeper( appCodec, keys[hubgentypes.StoreKey], - app.GetSubspace(hubgentypes.ModuleName), app.IBCKeeper.ChannelKeeper, + app.SequencersKeeper, app.BankKeeper, app.AccountKeeper, ) @@ -1028,14 +1029,12 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govv1.ParamKeyTable()) paramsKeeper.Subspace(ibctransfertypes.ModuleName) paramsKeeper.Subspace(ibchost.ModuleName) - paramsKeeper.Subspace(hubgentypes.ModuleName) // ethermint subspaces paramsKeeper.Subspace(evmtypes.ModuleName) paramsKeeper.Subspace(feemarkettypes.ModuleName) // evmos subspaces paramsKeeper.Subspace(erc20types.ModuleName) - paramsKeeper.Subspace(denommetadatamoduletypes.ModuleName) return paramsKeeper } diff --git a/go.mod b/go.mod index 07aa27db..6f37c958 100644 --- a/go.mod +++ b/go.mod @@ -8,8 +8,8 @@ require ( github.com/bcdevtools/evm-block-explorer-rpc-cosmos v1.1.1-de github.com/cosmos/cosmos-sdk v0.46.16 github.com/cosmos/ibc-go/v6 v6.2.1 - github.com/dymensionxyz/dymension-rdk v1.5.0-beta.0.20240423161402-f6997e0d1a5c - github.com/dymensionxyz/dymint v1.0.1-alpha.0.20240421140132-71ee964252d1 + github.com/dymensionxyz/dymension-rdk v1.1.0-rc02 + github.com/dymensionxyz/dymint v1.1.0-rc01 github.com/ethereum/go-ethereum v1.10.26 github.com/evmos/ethermint v0.22.0 github.com/gorilla/mux v1.8.1 @@ -262,7 +262,6 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.15.0 // indirect github.com/status-im/keycard-go v0.2.0 // indirect - github.com/stretchr/objx v0.5.0 // indirect github.com/stretchr/testify v1.8.4 // indirect github.com/subosito/gotenv v1.4.2 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect diff --git a/go.sum b/go.sum index fb51047d..420a6ded 100644 --- a/go.sum +++ b/go.sum @@ -549,12 +549,12 @@ github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQx github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/dymensionxyz/cosmosclient v0.4.2-beta.0.20240421130646-b8980ec7aade h1:LHbwDuI4hPNGSA+gWQz4ev0xt8p+ztPLEcZWR7e5YzA= github.com/dymensionxyz/cosmosclient v0.4.2-beta.0.20240421130646-b8980ec7aade/go.mod h1:UxhLdtWOWg7l6+5Hpkm39Khd23wcr5H62YxM04rMbh8= -github.com/dymensionxyz/dymension-rdk v1.5.0-beta.0.20240423161402-f6997e0d1a5c h1:ee4pw3mkuYLQzwhTbiwD5msPvwoDvuCHrEMSBrZMcPc= -github.com/dymensionxyz/dymension-rdk v1.5.0-beta.0.20240423161402-f6997e0d1a5c/go.mod h1:kzNFKt3yfFzZ2u3+47Nlpobub3/UXsICOg1WmGud3DE= +github.com/dymensionxyz/dymension-rdk v1.1.0-rc02 h1:SpBEv1QgEkatsonE1DsqxoqpqJAd23YEFJQk6Z1mJg8= +github.com/dymensionxyz/dymension-rdk v1.1.0-rc02/go.mod h1:17+Fcqq3VXwWwhBshPxlLe3WzPEwdl4zDEYEiP5SiZ8= github.com/dymensionxyz/dymension/v3 v3.1.0-rc03.0.20240411195658-f7cd96f53b56 h1:cmpJYdRviuUfmlJdHrcAND8Jd6JIY4rp63bWAQzPr54= github.com/dymensionxyz/dymension/v3 v3.1.0-rc03.0.20240411195658-f7cd96f53b56/go.mod h1:3Pfrr8j/BR9ztNKztGfC5PqDiO6CcrzMLCJtFtPEVW4= -github.com/dymensionxyz/dymint v1.0.1-alpha.0.20240421140132-71ee964252d1 h1:LfliShxbxcazXnkZIIttsbFukfo5keTXFbsP+DS0sNY= -github.com/dymensionxyz/dymint v1.0.1-alpha.0.20240421140132-71ee964252d1/go.mod h1:QSXwtiNaxGQLguAsDMubrr18fY4ss72sEBVOu+nVLj8= +github.com/dymensionxyz/dymint v1.1.0-rc01 h1:kiN+HSXOMi7V3cVOPvjrWTRIS0kyKJnooJ1T8v/2umk= +github.com/dymensionxyz/dymint v1.1.0-rc01/go.mod h1:QSXwtiNaxGQLguAsDMubrr18fY4ss72sEBVOu+nVLj8= github.com/dymensionxyz/ethermint v0.22.0-dymension-v0.4.1.0.20240425133751-6d4e0eb538c0 h1:qv+ZyOSgkbKmJ7AZ8Bdznyn6UfGMY70RuBzGwA4QLes= github.com/dymensionxyz/ethermint v0.22.0-dymension-v0.4.1.0.20240425133751-6d4e0eb538c0/go.mod h1:I4zuwDF3uFyjBpP7EFwc6szdCP9yqOQ/cwjoa0oL6/E= github.com/dymensionxyz/go-libp2p-pubsub v0.0.0-20231219183151-4504d4995913 h1:sR3nGYRlktL2Xfj5pcOhgG2bvlBOZ14meqdu2TKkSCU= diff --git a/ra_evm_be_rpc/backend/backend.go b/ra_evm_be_rpc/backend/backend.go index 67c69343..4433edee 100644 --- a/ra_evm_be_rpc/backend/backend.go +++ b/ra_evm_be_rpc/backend/backend.go @@ -2,10 +2,10 @@ package backend import ( "context" + "github.com/bcdevtools/block-explorer-rpc-cosmos/be_rpc/config" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/server" - hubgentypes "github.com/dymensionxyz/dymension-rdk/x/hub-genesis/types" sequencerstypes "github.com/dymensionxyz/dymension-rdk/x/sequencers/types" raeberpctypes "github.com/dymensionxyz/rollapp-evm/ra_evm_be_rpc/types" "github.com/tendermint/tendermint/libs/log" @@ -15,7 +15,6 @@ type RollAppEvmBackendI interface { // Misc GetSequencersModuleParams() (*sequencerstypes.Params, error) - GetHubGenesisModuleParams() (*hubgentypes.Params, error) } var _ RollAppEvmBackendI = (*RollAppEvmBackend)(nil) diff --git a/ra_evm_be_rpc/backend/hub_genesis.go b/ra_evm_be_rpc/backend/hub_genesis.go deleted file mode 100644 index 8b68aad6..00000000 --- a/ra_evm_be_rpc/backend/hub_genesis.go +++ /dev/null @@ -1,13 +0,0 @@ -package backend - -import ( - hubgentypes "github.com/dymensionxyz/dymension-rdk/x/hub-genesis/types" -) - -func (m *RollAppEvmBackend) GetHubGenesisModuleParams() (*hubgentypes.Params, error) { - res, err := m.queryClient.HubGenesisQueryClient.Params(m.ctx, &hubgentypes.QueryParamsRequest{}) - if err != nil { - return nil, err - } - return &res.Params, nil -} diff --git a/ra_evm_be_rpc/backend/rollapp_evm_interceptor.go b/ra_evm_be_rpc/backend/rollapp_evm_interceptor.go index 38d62845..69b0575c 100644 --- a/ra_evm_be_rpc/backend/rollapp_evm_interceptor.go +++ b/ra_evm_be_rpc/backend/rollapp_evm_interceptor.go @@ -49,13 +49,6 @@ func (m *RollAppEvmRequestInterceptor) GetModuleParams(moduleName string) (inter } else { params = *sequencersParams } - case "hub-genesis": - hubGenesisParams, errFetch := m.backend.GetHubGenesisModuleParams() - if errFetch != nil { - err = errors.Wrap(errFetch, "failed to get hub genesis params") - } else { - params = *hubGenesisParams - } default: return m.defaultInterceptor.GetModuleParams(moduleName) } diff --git a/scripts/ibc/rollapp.json b/scripts/ibc/rollapp.json index 26c8d7ed..ea465524 100644 --- a/scripts/ibc/rollapp.json +++ b/scripts/ibc/rollapp.json @@ -2,8 +2,8 @@ "type": "cosmos", "value": { "key": "relayer-rollapp-key", - "chain-id": "rollappevm_4321-1", - "rpc-addr": "http://127.0.0.1:26657", + "chain-id": "rollappevm_8888-1", + "rpc-addr": "tcp://localhost:26657", "account-prefix": "ethm", "keyring-backend": "test", "gas-adjustment": 1.2, diff --git a/scripts/update_genesis_file.sh b/scripts/update_genesis_file.sh index a2be6e93..2dcfd336 100755 --- a/scripts/update_genesis_file.sh +++ b/scripts/update_genesis_file.sh @@ -73,9 +73,15 @@ elevated_address=$("$EXECUTABLE" keys show "$KEY_NAME_ROLLAPP" --keyring-backend elevated_address_json=$(jq -n \ --arg address "$elevated_address" \ '[{ - "address": $address + "address": $address, + "permission_list": { + "permissions": [ + "hubgenesis", + "denommetadata" + ] + } }]') -jq --argjson elevated_address_json "$elevated_address_json" '.app_state.hubgenesis.params.genesis_triggerer_allowlist += $elevated_address_json' "$GENESIS_FILE" >"$tmp" && mv "$tmp" "$GENESIS_FILE" +jq --argjson elevated_address_json "$elevated_address_json" '.app_state.sequencers.address_permissions += $elevated_address_json' "$GENESIS_FILE" >"$tmp" && mv "$tmp" "$GENESIS_FILE" # ---------------------------- add denom metadata ---------------------------- # denom_metadata=$(cat "$ROLLAPP_SETTLEMENT_INIT_DIR_PATH"/denommetadata.json)