From 0be4b39dac30cd500c6c2c823b2da621c73303d9 Mon Sep 17 00:00:00 2001 From: Omri Date: Thu, 12 Dec 2024 18:22:30 +0100 Subject: [PATCH 01/10] fix(genesis-templates): fixed genesis template generator and drs 1,2 templates (#402) --- genesis-templates/DRS/1/genesis-mainnet.json | 4 +++- genesis-templates/DRS/1/genesis-testnet.json | 4 +++- genesis-templates/DRS/2/genesis-mainnet.json | 6 ++++-- genesis-templates/DRS/2/genesis-testnet.json | 6 ++++-- scripts/generate-genesis-template.sh | 2 +- 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/genesis-templates/DRS/1/genesis-mainnet.json b/genesis-templates/DRS/1/genesis-mainnet.json index ac411f6..838998c 100644 --- a/genesis-templates/DRS/1/genesis-mainnet.json +++ b/genesis-templates/DRS/1/genesis-mainnet.json @@ -129,7 +129,9 @@ "evm_denom": "aevmos", "enable_create": true, "enable_call": true, - "extra_eips": "3855", + "extra_eips": [ + "3855" + ], "chain_config": { "homestead_block": "0", "dao_fork_block": "0", diff --git a/genesis-templates/DRS/1/genesis-testnet.json b/genesis-templates/DRS/1/genesis-testnet.json index 180b48c..e402cd4 100644 --- a/genesis-templates/DRS/1/genesis-testnet.json +++ b/genesis-templates/DRS/1/genesis-testnet.json @@ -129,7 +129,9 @@ "evm_denom": "aevmos", "enable_create": true, "enable_call": true, - "extra_eips": "3855", + "extra_eips": [ + "3855" + ], "chain_config": { "homestead_block": "0", "dao_fork_block": "0", diff --git a/genesis-templates/DRS/2/genesis-mainnet.json b/genesis-templates/DRS/2/genesis-mainnet.json index d0fd72e..7b30e25 100644 --- a/genesis-templates/DRS/2/genesis-mainnet.json +++ b/genesis-templates/DRS/2/genesis-mainnet.json @@ -1,5 +1,5 @@ { - "genesis_time": "2024-12-12T14:04:22.649885Z", + "genesis_time": "2024-12-12T17:19:38.388208Z", "chain_id": "rollappevm_1234-1", "initial_height": "1", "consensus_params": { @@ -130,7 +130,9 @@ "evm_denom": "aevmos", "enable_create": true, "enable_call": true, - "extra_eips": "3855", + "extra_eips": [ + "3855" + ], "chain_config": { "homestead_block": "0", "dao_fork_block": "0", diff --git a/genesis-templates/DRS/2/genesis-testnet.json b/genesis-templates/DRS/2/genesis-testnet.json index bb88998..d0f2ac8 100644 --- a/genesis-templates/DRS/2/genesis-testnet.json +++ b/genesis-templates/DRS/2/genesis-testnet.json @@ -1,5 +1,5 @@ { - "genesis_time": "2024-12-12T14:04:05.281694Z", + "genesis_time": "2024-12-12T17:19:55.783133Z", "chain_id": "rollappevm_1234-1", "initial_height": "1", "consensus_params": { @@ -130,7 +130,9 @@ "evm_denom": "aevmos", "enable_create": true, "enable_call": true, - "extra_eips": "3855", + "extra_eips": [ + "3855" + ], "chain_config": { "homestead_block": "0", "dao_fork_block": "0", diff --git a/scripts/generate-genesis-template.sh b/scripts/generate-genesis-template.sh index 0ee0705..2777576 100755 --- a/scripts/generate-genesis-template.sh +++ b/scripts/generate-genesis-template.sh @@ -46,7 +46,7 @@ update_params() { # Update jq command to use temp file - if ! jq '.app_state.evm.params.extra_eips = "3855"' "$TEMP_GENESIS" > "${TEMP_DIR}/temp.json"; then + if ! jq '.app_state.evm.params.extra_eips = ["3855"]' "$TEMP_GENESIS" > "${TEMP_DIR}/temp.json"; then echo "Error updating JSON file" success=false else From da6e5617220647519277115cf11c7f960fccd1ab Mon Sep 17 00:00:00 2001 From: keruch <53012408+keruch@users.noreply.github.com> Date: Thu, 12 Dec 2024 20:51:27 +0300 Subject: [PATCH 02/10] feat(script): added replacement for gas_denom (#403) --- go.mod | 2 +- scripts/init.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 2bc033e..7c6ad66 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,6 @@ require ( github.com/bcdevtools/evm-block-explorer-rpc-cosmos v1.1.4 github.com/cosmos/cosmos-sdk v0.46.16 github.com/cosmos/ibc-go/v6 v6.2.1 - github.com/dymensionxyz/cosmosclient v0.4.2-beta.0.20241121093220-e0d7ad456fbd github.com/dymensionxyz/dymension-rdk v1.6.1-0.20241212094010-b3df828e7611 github.com/dymensionxyz/dymint v1.2.0-rc01.0.20241210155059-b7f6555f960c github.com/ethereum/go-ethereum v1.12.0 @@ -118,6 +117,7 @@ require ( github.com/dop251/goja v0.0.0-20230122112309-96b1610dd4f7 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.5.0 // indirect + github.com/dymensionxyz/cosmosclient v0.4.2-beta.0.20241121093220-e0d7ad456fbd // indirect github.com/dymensionxyz/gerr-cosmos v1.0.0 // indirect github.com/dymensionxyz/sdk-utils v0.1.2-0.20240909101947-e1b483ada9c8 // indirect github.com/edsrzf/mmap-go v1.0.0 // indirect diff --git a/scripts/init.sh b/scripts/init.sh index 6bfb3d8..4b367fd 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -66,6 +66,7 @@ set_denom() { dasel put -f "$GENESIS_FILE" '.app_state.staking.params.bond_denom' -v "$denom" || success=false dasel put -t string -f "$GENESIS_FILE" '.app_state.gov.deposit_params.min_deposit.[0].denom' -v "$denom" || success=false dasel put -f "$GENESIS_FILE" '.app_state.evm.params.evm_denom' -v "$denom" || success=false + dasel put -f "$GENESIS_FILE" '.app_state.evm.params.gas_denom' -v "$denom" || success=false dasel put -f "$GENESIS_FILE" '.app_state.claims.params.claims_denom' -v "$denom" || success=false if [ "$success" = false ]; then From 23ecd7a07f42132656b31af6708034dd209a752c Mon Sep 17 00:00:00 2001 From: Sergi Rene Date: Thu, 12 Dec 2024 18:57:39 +0100 Subject: [PATCH 03/10] fix(drs): drs-2 migration default gas denom fix (#404) --- app/upgrades/drs-2/upgrade.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/upgrades/drs-2/upgrade.go b/app/upgrades/drs-2/upgrade.go index 137226d..7846c35 100644 --- a/app/upgrades/drs-2/upgrade.go +++ b/app/upgrades/drs-2/upgrade.go @@ -7,7 +7,6 @@ import ( rollappparamskeeper "github.com/dymensionxyz/dymension-rdk/x/rollappparams/keeper" rollappparamstypes "github.com/dymensionxyz/dymension-rdk/x/rollappparams/types" evmkeeper "github.com/evmos/evmos/v12/x/evm/keeper" - evmtypes "github.com/evmos/evmos/v12/x/evm/types" ) func CreateUpgradeHandler( @@ -28,9 +27,9 @@ func CreateUpgradeHandler( return nil, err } //migrate evm params with missing gasDenom - evmOldParams := evmKeeper.GetParams(ctx) - evmOldParams.GasDenom = evmtypes.DefaultParams().GasDenom - err = evmKeeper.SetParams(ctx, evmOldParams) + evmParams := evmKeeper.GetParams(ctx) + evmParams.GasDenom = evmParams.EvmDenom + err = evmKeeper.SetParams(ctx, evmParams) if err != nil { return nil, err } From 70dddc2adf670dac8c9c315a7afef4d6645b9105 Mon Sep 17 00:00:00 2001 From: Omri Date: Fri, 13 Dec 2024 16:31:26 +0100 Subject: [PATCH 04/10] feat(build): add ability to override bech32 with env var (#405) Co-authored-by: Victor Pham --- cmd/rollappd/cmd/root.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmd/rollappd/cmd/root.go b/cmd/rollappd/cmd/root.go index e95af1b..7492e8c 100644 --- a/cmd/rollappd/cmd/root.go +++ b/cmd/rollappd/cmd/root.go @@ -156,7 +156,12 @@ func initRootCmd( ) { // Set config sdkconfig := sdk.GetConfig() - rdk_utils.SetPrefixes(sdkconfig, app.AccountAddressPrefix) + // Add ability to override bech32 prefix from env variable + prefix := app.AccountAddressPrefix + if overridePrefix := os.Getenv("OVERRIDE_BECH32"); overridePrefix != "" { + prefix = overridePrefix + } + rdk_utils.SetPrefixes(sdkconfig, prefix) utils.SetBip44CoinType(sdkconfig) sdkconfig.Seal() From 9687bbc71b8274799c0d1803cf40e68b4c08c407 Mon Sep 17 00:00:00 2001 From: Nguyen Thanh Nhan | Decentrio Date: Sat, 14 Dec 2024 00:25:53 +0700 Subject: [PATCH 05/10] chore(ci): Add CI to run `generate-genesis-template` after each build (#390) Co-authored-by: anhductn2001 --- .../workflows/generate_genesis_template.yml | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/generate_genesis_template.yml diff --git a/.github/workflows/generate_genesis_template.yml b/.github/workflows/generate_genesis_template.yml new file mode 100644 index 0000000..392bcfc --- /dev/null +++ b/.github/workflows/generate_genesis_template.yml @@ -0,0 +1,26 @@ +name: Generate Genesis Template +on: ["push"] +jobs: + build: + runs-on: ubuntu-latest + name: Generate Genesis Template + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: "1.23.1" + + - name: Install Dasel + run: | + curl -sSLf https://github.com/TomWright/dasel/releases/latest/download/dasel_linux_amd64 -o /usr/local/bin/dasel + chmod +x /usr/local/bin/dasel + + - name: Generate genesis template mainnet + run: make generate-genesis env=mainnet + env: + BECH32_PREFIX: ethm + + - name: Generate genesis template testnet + run: make generate-genesis env=testnet + env: + BECH32_PREFIX: ethm \ No newline at end of file From 1d691fc23e8af48d8b86f72306768b775c975d9e Mon Sep 17 00:00:00 2001 From: ducnt131 <62016666+anhductn2001@users.noreply.github.com> Date: Mon, 16 Dec 2024 16:13:31 +0700 Subject: [PATCH 06/10] chore: Add devd tool to image for erc20 tests (#407) --- Dockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 32e1eaa..fc38f5c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ FROM ubuntu:latest as go-builder # Install necessary dependencies RUN apt-get update && apt-get install -y \ - wget make git \ + wget make git build-essential \ && rm -rf /var/lib/apt/lists/* # Download and install Go 1.21 @@ -17,8 +17,6 @@ ENV GOROOT=/usr/local/go ENV GOPATH=$HOME/go ENV PATH=$GOPATH/bin:$GOROOT/bin:$PATH -RUN apt-get update -y -RUN apt-get install build-essential -y # Set the working directory WORKDIR /app @@ -40,6 +38,8 @@ RUN ARCH=$(uname -m) && WASMVM_VERSION=$(go list -m github.com/CosmWasm/wasmvm | wget https://github.com/CosmWasm/wasmvm/releases/download/$WASMVM_VERSION/libwasmvm.aarch64.so \ -O /lib/libwasmvm.aarch64.so +RUN go install -v github.com/bcdevtools/devd/v2/cmd/devd@latest + # Copy the remaining files COPY . . @@ -48,7 +48,9 @@ RUN make build BECH32_PREFIX=ethm FROM ubuntu:latest RUN apt-get update -y +RUN apt-get install -y curl +COPY --from=go-builder /go/bin/devd /usr/local/bin/devd COPY --from=go-builder /app/build/rollapp-evm /usr/local/bin/rollappd COPY --from=go-builder /lib/libwasmvm.x86_64.so /lib/libwasmvm.x86_64.so COPY --from=go-builder /lib/libwasmvm.aarch64.so /lib/libwasmvm.aarch64.so From 60422347276e50609b7f3178396f6c1212ae230e Mon Sep 17 00:00:00 2001 From: zale144 Date: Mon, 16 Dec 2024 14:52:46 +0100 Subject: [PATCH 07/10] feat: add DRS3 upgrade handler (#409) --- Makefile | 2 +- app/app.go | 3 ++- app/upgrades/drs-2/upgrade.go | 38 ++++++++++++++++++++++----------- app/upgrades/drs-3/constants.go | 17 +++++++++++++++ app/upgrades/drs-3/upgrade.go | 33 ++++++++++++++++++++++++++++ 5 files changed, 78 insertions(+), 15 deletions(-) create mode 100644 app/upgrades/drs-3/constants.go create mode 100644 app/upgrades/drs-3/upgrade.go diff --git a/Makefile b/Makefile index 2b06657..aa72709 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ PROJECT_NAME=rollappd BRANCH := $(shell git rev-parse --abbrev-ref HEAD) COMMIT := $(shell git log -1 --format='%H') LEDGER_ENABLED ?= true -DRS_VERSION = 2 +DRS_VERSION = 3 #ifndef $(CELESTIA_NETWORK) # CELESTIA_NETWORK=mock diff --git a/app/app.go b/app/app.go index 5dc703d..4dd4502 100644 --- a/app/app.go +++ b/app/app.go @@ -160,6 +160,7 @@ import ( "github.com/dymensionxyz/rollapp-evm/app/upgrades" drs2 "github.com/dymensionxyz/rollapp-evm/app/upgrades/drs-2" + drs3 "github.com/dymensionxyz/rollapp-evm/app/upgrades/drs-3" ) const ( @@ -185,7 +186,7 @@ var ( erc20types.StoreKey, } // Upgrades contains the upgrade handlers for the application - Upgrades = []upgrades.Upgrade{drs2.Upgrade} + Upgrades = []upgrades.Upgrade{drs2.Upgrade, drs3.Upgrade} ) func getGovProposalHandlers() []govclient.ProposalHandler { diff --git a/app/upgrades/drs-2/upgrade.go b/app/upgrades/drs-2/upgrade.go index 7846c35..ad866dd 100644 --- a/app/upgrades/drs-2/upgrade.go +++ b/app/upgrades/drs-2/upgrade.go @@ -16,23 +16,35 @@ func CreateUpgradeHandler( configurator module.Configurator, ) upgradetypes.UpgradeHandler { return func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { - - //migrate rollapp params with missing min-gas-prices and updating drs to 2 - err := rpKeeper.SetVersion(ctx, uint32(2)) - if err != nil { - return nil, err - } - err = rpKeeper.SetMinGasPrices(ctx, rollappparamstypes.DefaultParams().MinGasPrices) - if err != nil { + // upgrade drs to 2 + if err := rpKeeper.SetVersion(ctx, uint32(2)); err != nil { return nil, err } - //migrate evm params with missing gasDenom - evmParams := evmKeeper.GetParams(ctx) - evmParams.GasDenom = evmParams.EvmDenom - err = evmKeeper.SetParams(ctx, evmParams) - if err != nil { + + if err := HandleUpgrade(ctx, rpKeeper, evmKeeper); err != nil { return nil, err } return mm.RunMigrations(ctx, configurator, fromVM) } } + +func HandleUpgrade( + ctx sdk.Context, + rpKeeper rollappparamskeeper.Keeper, + evmKeeper *evmkeeper.Keeper, +) error { + // migrate rollapp params with missing min-gas-prices + if err := rpKeeper.SetMinGasPrices(ctx, rollappparamstypes.DefaultParams().MinGasPrices); err != nil { + return err + } + + // migrate evm params with missing gasDenom + evmParams := evmKeeper.GetParams(ctx) + evmParams.GasDenom = evmParams.EvmDenom + + if err := evmKeeper.SetParams(ctx, evmParams); err != nil { + return err + } + + return nil +} diff --git a/app/upgrades/drs-3/constants.go b/app/upgrades/drs-3/constants.go new file mode 100644 index 0000000..21af7af --- /dev/null +++ b/app/upgrades/drs-3/constants.go @@ -0,0 +1,17 @@ +package drs3 + +import ( + storetypes "github.com/cosmos/cosmos-sdk/store/types" + + "github.com/dymensionxyz/rollapp-evm/app/upgrades" +) + +const ( + UpgradeName = "drs-3" +) + +var Upgrade = upgrades.Upgrade{ + Name: UpgradeName, + CreateHandler: CreateUpgradeHandler, + StoreUpgrades: storetypes.StoreUpgrades{}, +} diff --git a/app/upgrades/drs-3/upgrade.go b/app/upgrades/drs-3/upgrade.go new file mode 100644 index 0000000..6e880e8 --- /dev/null +++ b/app/upgrades/drs-3/upgrade.go @@ -0,0 +1,33 @@ +package drs3 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + rollappparamskeeper "github.com/dymensionxyz/dymension-rdk/x/rollappparams/keeper" + evmkeeper "github.com/evmos/evmos/v12/x/evm/keeper" + + drs2 "github.com/dymensionxyz/rollapp-evm/app/upgrades/drs-2" +) + +func CreateUpgradeHandler( + rpKeeper rollappparamskeeper.Keeper, + evmKeeper *evmkeeper.Keeper, + mm *module.Manager, + configurator module.Configurator, +) upgradetypes.UpgradeHandler { + return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + if rpKeeper.GetParams(ctx).DrsVersion == 1 { + // first run drs-2 migration + if err := drs2.HandleUpgrade(ctx, rpKeeper, evmKeeper); err != nil { + return nil, err + } + } + // upgrade drs to 3 + err := rpKeeper.SetVersion(ctx, uint32(3)) + if err != nil { + return nil, err + } + return mm.RunMigrations(ctx, configurator, fromVM) + } +} From 268dc22cb51220d8c81e79b94d460571a22e8b45 Mon Sep 17 00:00:00 2001 From: Omri Date: Mon, 16 Dec 2024 14:53:01 +0100 Subject: [PATCH 08/10] fix(deps): bumped evmos to fix foreign gas denom rpc call (#410) --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 7c6ad66..d4f2f7c 100644 --- a/go.mod +++ b/go.mod @@ -361,7 +361,7 @@ replace ( // Dymension Forks replace ( github.com/cosmos/cosmos-sdk => github.com/dymensionxyz/cosmos-sdk v0.46.17-0.20241128210616-e9dfe47b8c73 - github.com/evmos/evmos/v12 => github.com/dymensionxyz/evmos/v12 v12.1.7-0.20241212094620-9bc1b171a7f9 + github.com/evmos/evmos/v12 => github.com/dymensionxyz/evmos/v12 v12.1.7-0.20241216121604-1d72cc626449 github.com/gorilla/rpc => github.com/dymensionxyz/rpc v1.3.1 github.com/osmosis-labs/osmosis/v15 => github.com/dymensionxyz/osmosis/v15 v15.2.0-dymension-v1.1.2 github.com/tendermint/tendermint => github.com/dymensionxyz/cometbft v0.34.29-0.20241128205759-2a9d5f015da5 diff --git a/go.sum b/go.sum index 8adca6c..3a19801 100644 --- a/go.sum +++ b/go.sum @@ -581,8 +581,8 @@ github.com/dymensionxyz/dymension-rdk v1.6.1-0.20241212094010-b3df828e7611 h1:uQ github.com/dymensionxyz/dymension-rdk v1.6.1-0.20241212094010-b3df828e7611/go.mod h1:L6vBXdlUPxHFUz3kjWwXdOun0uX3SrsD9KkpxWQkUy4= github.com/dymensionxyz/dymint v1.2.0-rc01.0.20241210155059-b7f6555f960c h1:y6RSUu2GnWZaV6TRZIZaKRUH6+JTLMWpAPIPXFMWVqM= github.com/dymensionxyz/dymint v1.2.0-rc01.0.20241210155059-b7f6555f960c/go.mod h1:C3VbfePK85aRCdA1iHzB2AYD+n1gKR9Pw+wm3wQUXvE= -github.com/dymensionxyz/evmos/v12 v12.1.7-0.20241212094620-9bc1b171a7f9 h1:ul6uH++328ZvudaX5zTFdp30k34AHkeBYcD7vv79T6I= -github.com/dymensionxyz/evmos/v12 v12.1.7-0.20241212094620-9bc1b171a7f9/go.mod h1:CI6D89pkoiIm4BjoMFNnEaCLdKBEobLuwvhS0c1zh7Y= +github.com/dymensionxyz/evmos/v12 v12.1.7-0.20241216121604-1d72cc626449 h1:SnLy7nb3fOzkY5yZZtLv6J4yw8x4qzj/S6h2LljTLYg= +github.com/dymensionxyz/evmos/v12 v12.1.7-0.20241216121604-1d72cc626449/go.mod h1:CI6D89pkoiIm4BjoMFNnEaCLdKBEobLuwvhS0c1zh7Y= github.com/dymensionxyz/gerr-cosmos v1.0.0 h1:oi91rgOkpJWr41oX9JOyjvvBnhGY54tj513x8VlDAEc= github.com/dymensionxyz/gerr-cosmos v1.0.0/go.mod h1:n+0olxPogzWqFKba45mCpvrHLGmeS8W9UZjggHnWk6c= github.com/dymensionxyz/rpc v1.3.1 h1:7EXWIobaBes5zldRvTIg7TmNsEKjicrWA/OjCc0NaGs= From 254cc7fa8b3d2c15f85d612cd5b434bfbf82c9d4 Mon Sep 17 00:00:00 2001 From: Omri Date: Mon, 16 Dec 2024 15:03:48 +0100 Subject: [PATCH 09/10] feat(deps): bumped rdk to support tokenless feature (#411) --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d4f2f7c..d3d64af 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/bcdevtools/evm-block-explorer-rpc-cosmos v1.1.4 github.com/cosmos/cosmos-sdk v0.46.16 github.com/cosmos/ibc-go/v6 v6.2.1 - github.com/dymensionxyz/dymension-rdk v1.6.1-0.20241212094010-b3df828e7611 + github.com/dymensionxyz/dymension-rdk v1.6.1-0.20241216135050-77cdd63f1653 github.com/dymensionxyz/dymint v1.2.0-rc01.0.20241210155059-b7f6555f960c github.com/ethereum/go-ethereum v1.12.0 github.com/evmos/evmos/v12 v12.1.6 diff --git a/go.sum b/go.sum index 3a19801..1c2be11 100644 --- a/go.sum +++ b/go.sum @@ -577,8 +577,8 @@ github.com/dymensionxyz/cosmos-sdk v0.46.17-0.20241128210616-e9dfe47b8c73 h1:A0O github.com/dymensionxyz/cosmos-sdk v0.46.17-0.20241128210616-e9dfe47b8c73/go.mod h1:VPUuzF+l+ekSGPV7VVB8m0OMQfwp3QdKWNZjvkU3A1U= github.com/dymensionxyz/cosmosclient v0.4.2-beta.0.20241121093220-e0d7ad456fbd h1:V89QyOFM84o9w0iFdctMU6So8SS/Xt32JWAXGqJduT0= github.com/dymensionxyz/cosmosclient v0.4.2-beta.0.20241121093220-e0d7ad456fbd/go.mod h1:3weqpVj/TqTFpC0LjEB3H+HZSpm7BrQ1QkEg1Ahy6KY= -github.com/dymensionxyz/dymension-rdk v1.6.1-0.20241212094010-b3df828e7611 h1:uQuoHQ/q74Sk5hEHviry/34/VRzkbdCBKo9A5gXlMsQ= -github.com/dymensionxyz/dymension-rdk v1.6.1-0.20241212094010-b3df828e7611/go.mod h1:L6vBXdlUPxHFUz3kjWwXdOun0uX3SrsD9KkpxWQkUy4= +github.com/dymensionxyz/dymension-rdk v1.6.1-0.20241216135050-77cdd63f1653 h1:gnbRDzgoUljqH0aVb+Y8Oja1pkVcDEmxONgtSKKPdfI= +github.com/dymensionxyz/dymension-rdk v1.6.1-0.20241216135050-77cdd63f1653/go.mod h1:L6vBXdlUPxHFUz3kjWwXdOun0uX3SrsD9KkpxWQkUy4= github.com/dymensionxyz/dymint v1.2.0-rc01.0.20241210155059-b7f6555f960c h1:y6RSUu2GnWZaV6TRZIZaKRUH6+JTLMWpAPIPXFMWVqM= github.com/dymensionxyz/dymint v1.2.0-rc01.0.20241210155059-b7f6555f960c/go.mod h1:C3VbfePK85aRCdA1iHzB2AYD+n1gKR9Pw+wm3wQUXvE= github.com/dymensionxyz/evmos/v12 v12.1.7-0.20241216121604-1d72cc626449 h1:SnLy7nb3fOzkY5yZZtLv6J4yw8x4qzj/S6h2LljTLYg= From 21acc354cd310b31ba4827883d9e26b39c143fa8 Mon Sep 17 00:00:00 2001 From: Omri Date: Mon, 16 Dec 2024 15:20:59 +0100 Subject: [PATCH 10/10] feat(genesis-templates): add genesis templates for drs 3 (#412) --- genesis-templates/DRS/3/genesis-mainnet.json | 303 +++++++++++++++++++ genesis-templates/DRS/3/genesis-testnet.json | 303 +++++++++++++++++++ 2 files changed, 606 insertions(+) create mode 100644 genesis-templates/DRS/3/genesis-mainnet.json create mode 100644 genesis-templates/DRS/3/genesis-testnet.json diff --git a/genesis-templates/DRS/3/genesis-mainnet.json b/genesis-templates/DRS/3/genesis-mainnet.json new file mode 100644 index 0000000..851f789 --- /dev/null +++ b/genesis-templates/DRS/3/genesis-mainnet.json @@ -0,0 +1,303 @@ +{ + "genesis_time": "2024-12-16T14:08:08.129181Z", + "chain_id": "rollappevm_1234-1", + "initial_height": "1", + "consensus_params": { + "block": { + "max_bytes": "500000", + "max_gas": "400000000", + "time_iota_ms": "1000" + }, + "evidence": { + "max_age_num_blocks": "100000", + "max_age_duration": "172800000000000", + "max_bytes": "500000" + }, + "validator": { + "pub_key_types": [ + "ed25519" + ] + }, + "version": {} + }, + "app_hash": "", + "app_state": { + "auth": { + "params": { + "max_memo_characters": "256", + "tx_sig_limit": "7", + "tx_size_cost_per_byte": "10", + "sig_verify_cost_ed25519": "590", + "sig_verify_cost_secp256k1": "1000" + }, + "accounts": [] + }, + "authz": { + "authorization": [] + }, + "bank": { + "params": { + "send_enabled": [], + "default_send_enabled": true + }, + "balances": [], + "supply": [], + "denom_metadata": [] + }, + "capability": { + "index": "1", + "owners": [] + }, + "distribution": { + "params": { + "community_tax": "0.00002", + "base_proposer_reward": "0.8", + "bonus_proposer_reward": "0.000000000000000000", + "withdraw_addr_enabled": true + }, + "fee_pool": { + "community_pool": [] + }, + "delegator_withdraw_infos": [], + "previous_proposer": "", + "outstanding_rewards": [], + "validator_accumulated_commissions": [], + "validator_historical_rewards": [], + "validator_current_rewards": [], + "delegator_starting_infos": [], + "validator_slash_events": [] + }, + "epochs": { + "epochs": [ + { + "identifier": "minute", + "start_time": "0001-01-01T00:00:00Z", + "duration": "60s", + "current_epoch": "0", + "current_epoch_start_time": "0001-01-01T00:00:00Z", + "epoch_counting_started": false, + "current_epoch_start_height": "0" + }, + { + "identifier": "hour", + "start_time": "0001-01-01T00:00:00Z", + "duration": "3600s", + "current_epoch": "0", + "current_epoch_start_time": "0001-01-01T00:00:00Z", + "epoch_counting_started": false, + "current_epoch_start_height": "0" + }, + { + "identifier": "day", + "start_time": "0001-01-01T00:00:00Z", + "duration": "86400s", + "current_epoch": "0", + "current_epoch_start_time": "0001-01-01T00:00:00Z", + "epoch_counting_started": false, + "current_epoch_start_height": "0" + }, + { + "identifier": "week", + "start_time": "0001-01-01T00:00:00Z", + "duration": "604800s", + "current_epoch": "0", + "current_epoch_start_time": "0001-01-01T00:00:00Z", + "epoch_counting_started": false, + "current_epoch_start_height": "0" + }, + { + "identifier": "year", + "start_time": "0001-01-01T00:00:00Z", + "duration": "31536000s", + "current_epoch": "0", + "current_epoch_start_time": "0001-01-01T00:00:00Z", + "epoch_counting_started": false, + "current_epoch_start_height": "0" + } + ] + }, + "erc20": { + "params": { + "enable_erc20": true, + "enable_evm_hook": true, + "registration_fee": "10000000000000000000" + }, + "token_pairs": [] + }, + "evm": { + "accounts": [], + "params": { + "evm_denom": "aevmos", + "enable_create": true, + "enable_call": true, + "extra_eips": [ + "3855" + ], + "chain_config": { + "homestead_block": "0", + "dao_fork_block": "0", + "dao_fork_support": true, + "eip150_block": "0", + "eip150_hash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "eip155_block": "0", + "eip158_block": "0", + "byzantium_block": "0", + "constantinople_block": "0", + "petersburg_block": "0", + "istanbul_block": "0", + "muir_glacier_block": "0", + "berlin_block": "0", + "london_block": "0", + "arrow_glacier_block": "0", + "gray_glacier_block": "0", + "merge_netsplit_block": "0", + "shanghai_block": "0", + "cancun_block": "0" + }, + "allow_unprotected_txs": false, + "gas_denom": "aevmos" + } + }, + "feegrant": { + "allowances": [] + }, + "feemarket": { + "params": { + "no_base_fee": false, + "base_fee_change_denominator": 8, + "elasticity_multiplier": 2, + "enable_height": "0", + "base_fee": "1000000000", + "min_gas_price": "20000000000.000000000000000000", + "min_gas_multiplier": "0.500000000000000000" + }, + "block_gas": "0" + }, + "genutil": { + "gen_txs": [] + }, + "gov": { + "starting_proposal_id": "1", + "deposits": [], + "votes": [], + "proposals": [], + "deposit_params": { + "min_deposit": [ + { + "denom": "stake", + "amount": "1000000000000000000000" + } + ], + "max_deposit_period": "172800s" + }, + "voting_params": { + "voting_period": "432000s" + }, + "tally_params": { + "quorum": "0.334000000000000000", + "threshold": "0.500000000000000000", + "veto_threshold": "0.334000000000000000" + } + }, + "hubgenesis": { + "params": {}, + "genesis_accounts": [] + }, + "hubs": { + "state": { + "hub": { + "registered_denoms": [] + } + } + }, + "ibc": { + "client_genesis": { + "clients": [], + "clients_consensus": [], + "clients_metadata": [], + "params": { + "allowed_clients": [ + "06-solomachine", + "07-tendermint" + ] + }, + "create_localhost": false, + "next_client_sequence": "0" + }, + "connection_genesis": { + "connections": [], + "client_connection_paths": [], + "next_connection_sequence": "0", + "params": { + "max_expected_time_per_block": "30000000000" + } + }, + "channel_genesis": { + "channels": [], + "acknowledgements": [], + "commitments": [], + "receipts": [], + "send_sequences": [], + "recv_sequences": [], + "ack_sequences": [], + "next_channel_sequence": "0" + } + }, + "mint": { + "minter": { + "current_inflation_rate": "0.080000000000000000" + }, + "params": { + "mint_denom": "stake", + "mint_epoch_identifier": "hour", + "mint_start_epoch": "1", + "inflation_change_epoch_identifier": "year", + "inflation_rate_change": "0.010000000000000000", + "target_inflation_rate": "0.020000000000000000" + } + }, + "params": null, + "rollappparams": { + "params": { + "da": "celestia", + "drs_version": 3, + "min_gas_prices": [] + } + }, + "sequencers": { + "params": { + "unbonding_time": "1814400s", + "historical_entries": 10000 + }, + "sequencers": [] + }, + "staking": { + "params": { + "unbonding_time": "1814400s", + "max_validators": 100, + "max_entries": 7, + "historical_entries": 10000, + "bond_denom": "stake", + "min_commission_rate": "0.050000000000000000" + }, + "last_total_power": "0", + "last_validator_powers": [], + "validators": [], + "delegations": [], + "unbonding_delegations": [], + "redelegations": [], + "exported": false + }, + "timeupgrade": null, + "transfer": { + "port_id": "transfer", + "denom_traces": [], + "params": { + "send_enabled": true, + "receive_enabled": true + } + }, + "upgrade": {}, + "vesting": {} + } +} diff --git a/genesis-templates/DRS/3/genesis-testnet.json b/genesis-templates/DRS/3/genesis-testnet.json new file mode 100644 index 0000000..a4e48c5 --- /dev/null +++ b/genesis-templates/DRS/3/genesis-testnet.json @@ -0,0 +1,303 @@ +{ + "genesis_time": "2024-12-16T14:07:20.919264Z", + "chain_id": "rollappevm_1234-1", + "initial_height": "1", + "consensus_params": { + "block": { + "max_bytes": "500000", + "max_gas": "400000000", + "time_iota_ms": "1000" + }, + "evidence": { + "max_age_num_blocks": "100000", + "max_age_duration": "172800000000000", + "max_bytes": "500000" + }, + "validator": { + "pub_key_types": [ + "ed25519" + ] + }, + "version": {} + }, + "app_hash": "", + "app_state": { + "auth": { + "params": { + "max_memo_characters": "256", + "tx_sig_limit": "7", + "tx_size_cost_per_byte": "10", + "sig_verify_cost_ed25519": "590", + "sig_verify_cost_secp256k1": "1000" + }, + "accounts": [] + }, + "authz": { + "authorization": [] + }, + "bank": { + "params": { + "send_enabled": [], + "default_send_enabled": true + }, + "balances": [], + "supply": [], + "denom_metadata": [] + }, + "capability": { + "index": "1", + "owners": [] + }, + "distribution": { + "params": { + "community_tax": "0.00002", + "base_proposer_reward": "0.8", + "bonus_proposer_reward": "0.000000000000000000", + "withdraw_addr_enabled": true + }, + "fee_pool": { + "community_pool": [] + }, + "delegator_withdraw_infos": [], + "previous_proposer": "", + "outstanding_rewards": [], + "validator_accumulated_commissions": [], + "validator_historical_rewards": [], + "validator_current_rewards": [], + "delegator_starting_infos": [], + "validator_slash_events": [] + }, + "epochs": { + "epochs": [ + { + "identifier": "minute", + "start_time": "0001-01-01T00:00:00Z", + "duration": "60s", + "current_epoch": "0", + "current_epoch_start_time": "0001-01-01T00:00:00Z", + "epoch_counting_started": false, + "current_epoch_start_height": "0" + }, + { + "identifier": "hour", + "start_time": "0001-01-01T00:00:00Z", + "duration": "3600s", + "current_epoch": "0", + "current_epoch_start_time": "0001-01-01T00:00:00Z", + "epoch_counting_started": false, + "current_epoch_start_height": "0" + }, + { + "identifier": "day", + "start_time": "0001-01-01T00:00:00Z", + "duration": "86400s", + "current_epoch": "0", + "current_epoch_start_time": "0001-01-01T00:00:00Z", + "epoch_counting_started": false, + "current_epoch_start_height": "0" + }, + { + "identifier": "week", + "start_time": "0001-01-01T00:00:00Z", + "duration": "604800s", + "current_epoch": "0", + "current_epoch_start_time": "0001-01-01T00:00:00Z", + "epoch_counting_started": false, + "current_epoch_start_height": "0" + }, + { + "identifier": "year", + "start_time": "0001-01-01T00:00:00Z", + "duration": "31536000s", + "current_epoch": "0", + "current_epoch_start_time": "0001-01-01T00:00:00Z", + "epoch_counting_started": false, + "current_epoch_start_height": "0" + } + ] + }, + "erc20": { + "params": { + "enable_erc20": true, + "enable_evm_hook": true, + "registration_fee": "10000000000000000000" + }, + "token_pairs": [] + }, + "evm": { + "accounts": [], + "params": { + "evm_denom": "aevmos", + "enable_create": true, + "enable_call": true, + "extra_eips": [ + "3855" + ], + "chain_config": { + "homestead_block": "0", + "dao_fork_block": "0", + "dao_fork_support": true, + "eip150_block": "0", + "eip150_hash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "eip155_block": "0", + "eip158_block": "0", + "byzantium_block": "0", + "constantinople_block": "0", + "petersburg_block": "0", + "istanbul_block": "0", + "muir_glacier_block": "0", + "berlin_block": "0", + "london_block": "0", + "arrow_glacier_block": "0", + "gray_glacier_block": "0", + "merge_netsplit_block": "0", + "shanghai_block": "0", + "cancun_block": "0" + }, + "allow_unprotected_txs": false, + "gas_denom": "aevmos" + } + }, + "feegrant": { + "allowances": [] + }, + "feemarket": { + "params": { + "no_base_fee": false, + "base_fee_change_denominator": 8, + "elasticity_multiplier": 2, + "enable_height": "0", + "base_fee": "1000000000", + "min_gas_price": "20000000000.000000000000000000", + "min_gas_multiplier": "0.500000000000000000" + }, + "block_gas": "0" + }, + "genutil": { + "gen_txs": [] + }, + "gov": { + "starting_proposal_id": "1", + "deposits": [], + "votes": [], + "proposals": [], + "deposit_params": { + "min_deposit": [ + { + "denom": "stake", + "amount": "1000000000000000000000" + } + ], + "max_deposit_period": "172800s" + }, + "voting_params": { + "voting_period": "300s" + }, + "tally_params": { + "quorum": "0.334000000000000000", + "threshold": "0.500000000000000000", + "veto_threshold": "0.334000000000000000" + } + }, + "hubgenesis": { + "params": {}, + "genesis_accounts": [] + }, + "hubs": { + "state": { + "hub": { + "registered_denoms": [] + } + } + }, + "ibc": { + "client_genesis": { + "clients": [], + "clients_consensus": [], + "clients_metadata": [], + "params": { + "allowed_clients": [ + "06-solomachine", + "07-tendermint" + ] + }, + "create_localhost": false, + "next_client_sequence": "0" + }, + "connection_genesis": { + "connections": [], + "client_connection_paths": [], + "next_connection_sequence": "0", + "params": { + "max_expected_time_per_block": "30000000000" + } + }, + "channel_genesis": { + "channels": [], + "acknowledgements": [], + "commitments": [], + "receipts": [], + "send_sequences": [], + "recv_sequences": [], + "ack_sequences": [], + "next_channel_sequence": "0" + } + }, + "mint": { + "minter": { + "current_inflation_rate": "0.080000000000000000" + }, + "params": { + "mint_denom": "stake", + "mint_epoch_identifier": "hour", + "mint_start_epoch": "1", + "inflation_change_epoch_identifier": "year", + "inflation_rate_change": "0.010000000000000000", + "target_inflation_rate": "0.020000000000000000" + } + }, + "params": null, + "rollappparams": { + "params": { + "da": "celestia", + "drs_version": 3, + "min_gas_prices": [] + } + }, + "sequencers": { + "params": { + "unbonding_time": "1309600s", + "historical_entries": 10000 + }, + "sequencers": [] + }, + "staking": { + "params": { + "unbonding_time": "1309600s", + "max_validators": 100, + "max_entries": 7, + "historical_entries": 10000, + "bond_denom": "stake", + "min_commission_rate": "0.050000000000000000" + }, + "last_total_power": "0", + "last_validator_powers": [], + "validators": [], + "delegations": [], + "unbonding_delegations": [], + "redelegations": [], + "exported": false + }, + "timeupgrade": null, + "transfer": { + "port_id": "transfer", + "denom_traces": [], + "params": { + "send_enabled": true, + "receive_enabled": true + } + }, + "upgrade": {}, + "vesting": {} + } +}