From 8a0c5f900a109c68337bb8243f6d168b4e0565d3 Mon Sep 17 00:00:00 2001 From: Sergi Rene Date: Mon, 25 Nov 2024 10:59:31 +0100 Subject: [PATCH 1/8] param fix --- go.mod | 4 ++-- go.sum | 8 ++++---- scripts/init.sh | 1 - 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index bd68202..3160823 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,7 @@ require ( github.com/cosmos/ibc-go/v6 v6.3.0 github.com/dvsekhvalnov/jose2go v1.5.0 github.com/dymensionxyz/dymension-rdk v1.6.1-0.20241119103059-def6322e4345 - github.com/dymensionxyz/dymint v1.2.0-rc01.0.20241119130703-a5453ad86b4c + github.com/dymensionxyz/dymint v1.2.0-rc01.0.20241122144016-5c2f6f8932c9 github.com/ethereum/go-ethereum v1.12.0 github.com/evmos/evmos/v12 v12.1.6 github.com/gogo/protobuf v1.3.3 @@ -121,7 +121,7 @@ require ( github.com/docker/go-units v0.5.0 // indirect github.com/dop251/goja v0.0.0-20220405120441-9037c2b61cbf // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/dymensionxyz/cosmosclient v0.4.2-beta.0.20240821081230-b4018b2bac13 // 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/go.sum b/go.sum index fe4b38d..9b32454 100644 --- a/go.sum +++ b/go.sum @@ -571,12 +571,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/cometbft v0.34.29-0.20241104165035-feade34f8f89 h1:rGkCcx4dWX9mxAUrq7zrdOc44XddMY/nM6kqYTWjerY= github.com/dymensionxyz/cometbft v0.34.29-0.20241104165035-feade34f8f89/go.mod h1:L9shMfbkZ8B+7JlwANEr+NZbBcn+hBpwdbeYvA5rLCw= -github.com/dymensionxyz/cosmosclient v0.4.2-beta.0.20240821081230-b4018b2bac13 h1:u5yeve5jZR6TdRjjR+vYT/8PWKbhwCZxUmAu+/Tnxyg= -github.com/dymensionxyz/cosmosclient v0.4.2-beta.0.20240821081230-b4018b2bac13/go.mod h1:jabDQYXrccscSE0fXkh7eQFYPWJCRiuWKonFGObVq6s= +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.20241119103059-def6322e4345 h1:FcHidPgGEHh9ELwodNJkGcHqsG+mdPiGdughzG4W+X8= github.com/dymensionxyz/dymension-rdk v1.6.1-0.20241119103059-def6322e4345/go.mod h1:y89w1OG4C4aF7yyW8bv9PwV3o1KkCx1hyt34ap04Rnk= -github.com/dymensionxyz/dymint v1.2.0-rc01.0.20241119130703-a5453ad86b4c h1:dZpHHZMssXklHO18XhzD/fj1QZjSnw1Wo3DOo24/dwE= -github.com/dymensionxyz/dymint v1.2.0-rc01.0.20241119130703-a5453ad86b4c/go.mod h1:ui7okdD4GRAySphS7XNOlbJKXIA2TAH/Wu6S8KV3o0M= +github.com/dymensionxyz/dymint v1.2.0-rc01.0.20241122144016-5c2f6f8932c9 h1:Of2aWtBHtySMQ7CplEPKI5vGbveW9dGp2krWpNWwWlk= +github.com/dymensionxyz/dymint v1.2.0-rc01.0.20241122144016-5c2f6f8932c9/go.mod h1:wqEC/5bf0bZwW/1+A+YGGLirDL0r8uj46U0999lPO8Q= github.com/dymensionxyz/evmos/v12 v12.1.6-dymension-v0.4.2 h1:aVP3off7u2vsvRH7lHAUPTLdf9/AfnzC/rvvi0wC/co= github.com/dymensionxyz/evmos/v12 v12.1.6-dymension-v0.4.2/go.mod h1:CI6D89pkoiIm4BjoMFNnEaCLdKBEobLuwvhS0c1zh7Y= github.com/dymensionxyz/gerr-cosmos v1.0.0 h1:oi91rgOkpJWr41oX9JOyjvvBnhGY54tj513x8VlDAEc= diff --git a/scripts/init.sh b/scripts/init.sh index 3b5c061..ef1fc9e 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -194,7 +194,6 @@ set_consensus_params() { dasel put -f "$GENESIS_FILE" '.consensus_params.block.max_gas' -v "400000000" || success=false dasel put -f "$GENESIS_FILE" '.consensus_params.block.max_bytes' -v "$BLOCK_SIZE" || success=false dasel put -f "$GENESIS_FILE" '.consensus_params.evidence.max_bytes' -v "$BLOCK_SIZE" || success=false - dasel put -f "$GENESIS_FILE" '.app_state.rollappparams.params.version' -v "$COMMIT" || success=false dasel put -f "$GENESIS_FILE" '.app_state.rollappparams.params.da' -v "$DA" || success=false dasel put -f "$GENESIS_FILE" '.app_state.rollappparams.params.drs_version' -v $DRS_VERSION -t int || success=false From 19f4380f39f7be59e8c285526c92ec66e433d1ed Mon Sep 17 00:00:00 2001 From: Sergi Rene Date: Tue, 26 Nov 2024 15:44:12 +0100 Subject: [PATCH 2/8] script fix --- scripts/settlement/register_rollapp_to_hub.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/settlement/register_rollapp_to_hub.sh b/scripts/settlement/register_rollapp_to_hub.sh index f5466d4..411a607 100644 --- a/scripts/settlement/register_rollapp_to_hub.sh +++ b/scripts/settlement/register_rollapp_to_hub.sh @@ -3,15 +3,15 @@ # this account must be whitelisted on the hub for permissioned deployment setup DEPLOYER=${HUB_PERMISSIONED_KEY-"$HUB_KEY_WITH_FUNDS"} -if [ "$EXECUTABLE" = "" ]; then +if [ "$SETTLEMENT_EXECUTABLE" = "" ]; then DEFAULT_EXECUTABLE=$(which dymd) if [ "$DEFAULT_EXECUTABLE" = "" ]; then echo "dymd not found in PATH. Exiting." exit 1 fi - echo "EXECUTABLE is not set, using '${DEFAULT_EXECUTABLE}'" - EXECUTABLE=$DEFAULT_SEQUENCER_KEY_PATH + echo "SETTLEMENT_EXECUTABLE is not set, using '${DEFAULT_EXECUTABLE}'" + SETTLEMENT_EXECUTABLE=$DEFAULT_EXECUTABLE fi if [ "$SEQUENCER_KEY_PATH" = "" ]; then From c94f25ad63821d4a5ae6b53c8b7efed0ba1f10b5 Mon Sep 17 00:00:00 2001 From: Sergi Rene Date: Tue, 26 Nov 2024 17:00:14 +0100 Subject: [PATCH 3/8] fix denom init script --- go.mod | 2 +- go.sum | 4 ++-- scripts/init.sh | 10 ++++------ 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 3160823..fb073bc 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,7 @@ require ( github.com/cosmos/ibc-go/v6 v6.3.0 github.com/dvsekhvalnov/jose2go v1.5.0 github.com/dymensionxyz/dymension-rdk v1.6.1-0.20241119103059-def6322e4345 - github.com/dymensionxyz/dymint v1.2.0-rc01.0.20241122144016-5c2f6f8932c9 + github.com/dymensionxyz/dymint v1.2.0-rc01.0.20241126070643-7ef37e51de91 github.com/ethereum/go-ethereum v1.12.0 github.com/evmos/evmos/v12 v12.1.6 github.com/gogo/protobuf v1.3.3 diff --git a/go.sum b/go.sum index 9b32454..d108728 100644 --- a/go.sum +++ b/go.sum @@ -575,8 +575,8 @@ github.com/dymensionxyz/cosmosclient v0.4.2-beta.0.20241121093220-e0d7ad456fbd h 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.20241119103059-def6322e4345 h1:FcHidPgGEHh9ELwodNJkGcHqsG+mdPiGdughzG4W+X8= github.com/dymensionxyz/dymension-rdk v1.6.1-0.20241119103059-def6322e4345/go.mod h1:y89w1OG4C4aF7yyW8bv9PwV3o1KkCx1hyt34ap04Rnk= -github.com/dymensionxyz/dymint v1.2.0-rc01.0.20241122144016-5c2f6f8932c9 h1:Of2aWtBHtySMQ7CplEPKI5vGbveW9dGp2krWpNWwWlk= -github.com/dymensionxyz/dymint v1.2.0-rc01.0.20241122144016-5c2f6f8932c9/go.mod h1:wqEC/5bf0bZwW/1+A+YGGLirDL0r8uj46U0999lPO8Q= +github.com/dymensionxyz/dymint v1.2.0-rc01.0.20241126070643-7ef37e51de91 h1:w1aFCVNQm8EUGxJy7bztCI0wTNZ6FphRCLmjtXgodLc= +github.com/dymensionxyz/dymint v1.2.0-rc01.0.20241126070643-7ef37e51de91/go.mod h1:wqEC/5bf0bZwW/1+A+YGGLirDL0r8uj46U0999lPO8Q= github.com/dymensionxyz/evmos/v12 v12.1.6-dymension-v0.4.2 h1:aVP3off7u2vsvRH7lHAUPTLdf9/AfnzC/rvvi0wC/co= github.com/dymensionxyz/evmos/v12 v12.1.6-dymension-v0.4.2/go.mod h1:CI6D89pkoiIm4BjoMFNnEaCLdKBEobLuwvhS0c1zh7Y= github.com/dymensionxyz/gerr-cosmos v1.0.0 h1:oi91rgOkpJWr41oX9JOyjvvBnhGY54tj513x8VlDAEc= diff --git a/scripts/init.sh b/scripts/init.sh index ef1fc9e..c09cf41 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -152,15 +152,12 @@ EOF EOF } + add_denom_metadata() { local success=true - denom_metadata=$(cat "$ROLLAPP_SETTLEMENT_INIT_DIR_PATH"/denommetadata.json) - elevated_address=$("$EXECUTABLE" keys show "$KEY_NAME_ROLLAPP" --keyring-backend test -a) - - dasel put -f "$GENESIS_FILE" '.app_state.bank.denom_metadata' -v "$denom_metadata" || success=false - dasel put -t json -f "$GENESIS_FILE" '.app_state.denommetadata.params.allowed_addresses.' -v "$elevated_address" || success=false - + jq --argjson metadata "$(cat "$ROLLAPP_SETTLEMENT_INIT_DIR_PATH"/denommetadata.json)" '.app_state.bank.denom_metadata = $metadata' "$GENESIS_FILE" > temp.json && mv temp.json "$GENESIS_FILE" + if [ "$success" = false ]; then echo "An error occurred. Please refer to README.md" return 1 @@ -271,6 +268,7 @@ set_denom "$BASE_DENOM" update_configuration add_genesis_accounts generate_denom_metadata +add_denom_metadata update_configuration set_consensus_params From a7ec050bab3b709c28597e64cd7ec843833153a4 Mon Sep 17 00:00:00 2001 From: Sergi Rene Date: Tue, 26 Nov 2024 17:01:49 +0100 Subject: [PATCH 4/8] readme fix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 771fbca..6b5fc68 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ You can find out in There are a few variables was allow blockchains to customize at compile time. If you build your own chain and import x/wasm, you can adjust a few items via module parameters, but a few others did not fit in that, as they need to be used by stateless ValidateBasic(). Thus, we made them as flags and set them in start.go so that they can be overridden on your custom chain. ```shell -rollapp-wasm start --max-label-size 64 --max-wasm-size 2048000 --max-wasm-proposal-size 2048000 +rollapp-wasm start --max-label-size 64 --max-wasm-size 2048000 --max-proposal-wasm-size 2048000 ``` Those flags are optional, the default value was set as: From 48eb67f0abbbf0b1c12854204e4e80f90be96be3 Mon Sep 17 00:00:00 2001 From: Sergi Rene Date: Wed, 27 Nov 2024 10:41:09 +0100 Subject: [PATCH 5/8] config --- scripts/ibc/rollapp.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/ibc/rollapp.json b/scripts/ibc/rollapp.json index 357b0f5..a05ca7b 100644 --- a/scripts/ibc/rollapp.json +++ b/scripts/ibc/rollapp.json @@ -7,11 +7,14 @@ "account-prefix": "rol", "keyring-backend": "test", "gas-adjustment": 1.2, - "gas-prices": "0.0awsm", + "gas-prices": "1000000000awsm", "debug": true, "timeout": "10s", "output-format": "json", "sign-mode": "direct", - "client-type": "01-dymint" + "client-type": "07-tendermint", + "extra-codecs": [ + "ethermint" + ] } } From f61223335fe10904a94804c4c9560634922a6a2c Mon Sep 17 00:00:00 2001 From: Sergi Rene Date: Wed, 27 Nov 2024 10:41:31 +0100 Subject: [PATCH 6/8] config --- scripts/ibc/hub.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/ibc/hub.json b/scripts/ibc/hub.json index aad2d1b..526d085 100644 --- a/scripts/ibc/hub.json +++ b/scripts/ibc/hub.json @@ -13,5 +13,8 @@ "output-format": "json", "sign-mode": "direct", "client-type": "07-tendermint" + "extra-codecs": [ + "ethermint" + ] } } From 960dce18fe659f58c5703b66415eeb48e2688bb8 Mon Sep 17 00:00:00 2001 From: Sergi Rene Date: Wed, 27 Nov 2024 11:28:41 +0100 Subject: [PATCH 7/8] app fix --- app/app.go | 2 ++ scripts/ibc/hub.json | 3 --- scripts/ibc/rollapp.json | 5 +---- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/app/app.go b/app/app.go index d83e75f..da0bcb3 100644 --- a/app/app.go +++ b/app/app.go @@ -882,6 +882,8 @@ func (app *App) setAnteHandler(txConfig client.TxConfig, wasmConfig wasmtypes.Wa SignModeHandler: txConfig.SignModeHandler(), SigGasConsumer: evmosante.SigVerificationGasConsumer, }, + DistrKeeper: app.DistrKeeper, + SequencersKeeper: app.SequencersKeeper, IBCKeeper: app.IBCKeeper, WasmConfig: &wasmConfig, TxCounterStoreKey: app.keys[wasmtypes.StoreKey], diff --git a/scripts/ibc/hub.json b/scripts/ibc/hub.json index 526d085..aad2d1b 100644 --- a/scripts/ibc/hub.json +++ b/scripts/ibc/hub.json @@ -13,8 +13,5 @@ "output-format": "json", "sign-mode": "direct", "client-type": "07-tendermint" - "extra-codecs": [ - "ethermint" - ] } } diff --git a/scripts/ibc/rollapp.json b/scripts/ibc/rollapp.json index a05ca7b..9544e45 100644 --- a/scripts/ibc/rollapp.json +++ b/scripts/ibc/rollapp.json @@ -12,9 +12,6 @@ "timeout": "10s", "output-format": "json", "sign-mode": "direct", - "client-type": "07-tendermint", - "extra-codecs": [ - "ethermint" - ] + "client-type": "07-tendermint" } } From 2cd1c46fdd267e30fd3d29be289a94220429d6d0 Mon Sep 17 00:00:00 2001 From: Sergi Rene Date: Wed, 27 Nov 2024 12:51:44 +0100 Subject: [PATCH 8/8] create rollapp fix --- scripts/settlement/register_rollapp_to_hub.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/scripts/settlement/register_rollapp_to_hub.sh b/scripts/settlement/register_rollapp_to_hub.sh index 411a607..5d0ac7f 100644 --- a/scripts/settlement/register_rollapp_to_hub.sh +++ b/scripts/settlement/register_rollapp_to_hub.sh @@ -93,8 +93,8 @@ if [ "$NATIVE_DENOM_PATH" = "" ]; then if [ "$answer" != "${answer#[Yy]}" ]; then cat < "$NATIVE_DENOM_PATH" { - "display": "DEN", - "base": "aden", + "display": "$DENOM", + "base": "$BASE_DENOM", "exponent": 18 } EOF @@ -107,18 +107,16 @@ EOF fi GENESIS_HASH=$($EXECUTABLE q genesis-checksum) -SEQUENCER_ADDR=$(dymd keys show "$SEQUENCER_KEY_NAME" --address --keyring-backend test --keyring-dir "$SEQUENCER_KEY_PATH") - -echo "deployer" $DEPLOYER; +INITIAL_SUPPLY=$(jq -r '.app_state.bank.supply[0].amount' "${ROLLAPP_HOME_DIR}/config/genesis.json") set -x "$SETTLEMENT_EXECUTABLE" tx rollapp create-rollapp "$ROLLAPP_CHAIN_ID" "$ROLLAPP_ALIAS" WASM \ --bech32-prefix "$BECH32_PREFIX" \ - --init-sequencer "$SEQUENCER_ADDR" \ + --init-sequencer "*" \ --genesis-checksum "$GENESIS_HASH" \ --metadata "$METADATA_PATH" \ --native-denom "$NATIVE_DENOM_PATH" \ - --initial-supply 1 \ + --initial-supply $INITIAL_SUPPLY \ --from "$DEPLOYER" \ --keyring-backend test \ --gas auto --gas-adjustment 1.2 \