diff --git a/README.md b/README.md index aee8d56..f771406 100644 --- a/README.md +++ b/README.md @@ -175,7 +175,27 @@ sh scripts/add_vesting_accounts_to_genesis_file.sh ### Run rollapp locally ```shell -$EXECUTABLE start --log_level=debug +$EXECUTABLE start --log_level=debug +``` + +## Set Sequencer reward address (optional) + +```shell +# Add a new key for the reward address +$EXECUTABLE keys add reward +REWARD=$($EXECUTABLE keys show reward -a) + +# This assumes mock default sequencer consensus key location. for different location, update the path. +KEY="${ROLLAPP_HOME_DIR}/config/priv_validator_key.json" + +# set the kerying backend to test +$EXECUTABLE config keyring-backend test + +# Import the consensus key into the rollapp keyring +$EXECUTABLE tx sequencer unsafe-import-cons-key sequencerConsensusKey $KEY + +# Update the sequencer reward address +$EXECUTABLE tx sequencer create-sequencer sequencerConsensusKey --from $KEY_NAME_ROLLAPP --fees 20000000000000$BASE_DENOM --reward-addr $REWARD --keyring-backend test -y ``` ## Setup IBC between rollapp and local dymension hub node diff --git a/app/app.go b/app/app.go index 6b6f9a7..fc9e9e0 100644 --- a/app/app.go +++ b/app/app.go @@ -849,7 +849,9 @@ func (app *App) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.Res if len(req.Validators) == 0 { panic("Dymint have no sequencers defined on InitChain") } - app.SequencersKeeper.SetDymintSequencers(ctx, req.Validators) + + // Passing the dymint sequencers to the sequencer module from RequestInitChain + app.SequencersKeeper.MustSetDymintValidatorUpdates(ctx, req.Validators) app.UpgradeKeeper.SetModuleVersionMap(ctx, app.mm.GetVersionMap()) res := app.mm.InitGenesis(ctx, app.appCodec, genesisState) diff --git a/go.mod b/go.mod index bebf08f..9615b8d 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,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.20240729074116-005f2bb6dd18 + github.com/dymensionxyz/dymension-rdk v1.6.1-0.20240825105050-28628bcb329a github.com/dymensionxyz/dymint v1.2.0-rc01.0.20240822065420-88ba1fee3735 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 c7735ab..faea0cd 100644 --- a/go.sum +++ b/go.sum @@ -559,8 +559,8 @@ 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.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/dymension-rdk v1.6.1-0.20240729074116-005f2bb6dd18 h1:LAcB7zrQ4S8A4d/j6Hk3mS/1Rq1IPSSyQPejB4KGeHc= -github.com/dymensionxyz/dymension-rdk v1.6.1-0.20240729074116-005f2bb6dd18/go.mod h1:M7YD1jsbAUYlnpfE0cj0MP0esKI3J6NsrVFAit+Rx+8= +github.com/dymensionxyz/dymension-rdk v1.6.1-0.20240825105050-28628bcb329a h1:/ne4Kco52xXYWSqLke400PGzE/wMJ+9zuGPQ1h35MMU= +github.com/dymensionxyz/dymension-rdk v1.6.1-0.20240825105050-28628bcb329a/go.mod h1:Hj1zPMvJ8blfvOzEwI8pbekTb8bidYbx3EdNjMeK/Aw= 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.2.0-rc01.0.20240822065420-88ba1fee3735 h1:hi2oVpQGpbEW5sgPHa/MAdwckAhlYFK9Tp/g36bc+F4= diff --git a/scripts/init.sh b/scripts/init.sh index bcff790..4071b41 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -290,10 +290,6 @@ update_configuration "$EXECUTABLE" keys add "$KEY_NAME_ROLLAPP" --keyring-backend test "$EXECUTABLE" add-genesis-account "$KEY_NAME_ROLLAPP" "$TOTAL_SUPPLY$BASE_DENOM" --keyring-backend test -# Set sequencer's operator address -operator_address=$("$EXECUTABLE" keys show "$KEY_NAME_ROLLAPP" -a --keyring-backend test --bech val) -dasel put -f "$GENESIS_FILE" '.app_state.sequencers.genesis_operator_address' -v "$operator_address" - # Ask if to include a governor on genesis echo "Do you want to include a governor on genesis? (Y/n) " read -r answer