Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: rollapp param in scripts/init.sh #159

Merged
merged 4 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ You can find out in <https://github.com/CosmWasm/wasmd#compile-time-parameters>
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:
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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.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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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.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=
Expand Down
11 changes: 4 additions & 7 deletions scripts/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -194,7 +191,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

Expand Down Expand Up @@ -272,6 +268,7 @@ set_denom "$BASE_DENOM"
update_configuration
add_genesis_accounts
generate_denom_metadata
add_denom_metadata
update_configuration
set_consensus_params

Expand Down
6 changes: 3 additions & 3 deletions scripts/settlement/register_rollapp_to_hub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading