From 4d5a83708d098da33ef7dccd8237f6e29294341b Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Fri, 6 Dec 2024 16:19:07 -0500 Subject: [PATCH] testing --- app/app.go | 1 + cmd/celestia-appd/cmd/app_server.go | 4 +--- cmd/celestia-appd/cmd/start.go | 8 ++++---- scripts/arabica.sh | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/app/app.go b/app/app.go index eadd034ea1..a193db9b5c 100644 --- a/app/app.go +++ b/app/app.go @@ -456,6 +456,7 @@ func (app *App) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.R // EndBlocker executes application updates at the end of every block. func (app *App) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock { + fmt.Printf("app.upgradeHeightV2 %v", app.upgradeHeightV2) res := app.manager.EndBlock(ctx, req) currentVersion := app.AppVersion() // For v1 only we upgrade using an agreed upon height known ahead of time diff --git a/cmd/celestia-appd/cmd/app_server.go b/cmd/celestia-appd/cmd/app_server.go index 1e373cf7c3..b2bfecf844 100644 --- a/cmd/celestia-appd/cmd/app_server.go +++ b/cmd/celestia-appd/cmd/app_server.go @@ -44,9 +44,7 @@ func NewAppServer(logger log.Logger, db dbm.DB, traceStore io.Writer, appOptions } return app.New( - logger, - db, - traceStore, + logger, db, traceStore, cast.ToUint(appOptions.Get(server.FlagInvCheckPeriod)), encoding.MakeConfig(app.ModuleEncodingRegisters...), cast.ToInt64(appOptions.Get(UpgradeHeightFlag)), diff --git a/cmd/celestia-appd/cmd/start.go b/cmd/celestia-appd/cmd/start.go index 90e316c4f6..d467995037 100644 --- a/cmd/celestia-appd/cmd/start.go +++ b/cmd/celestia-appd/cmd/start.go @@ -120,16 +120,16 @@ is performed. Note, when enabled, gRPC will also be automatically enabled. switch clientCtx.ChainID { case appconsts.ArabicaChainID: - serverCtx.Logger.Info(fmt.Sprintf("Setting the default value for the --v2-upgrade-height flag to %v because chainID %v\n", appconsts.ArabicaUpgradeHeightV2, appconsts.ArabicaChainID)) + serverCtx.Logger.Info(fmt.Sprintf("Since the chainID is %v, configuring the default v2 upgrade height to %v", appconsts.ArabicaUpgradeHeightV2, appconsts.ArabicaChainID)) serverCtx.Viper.SetDefault(UpgradeHeightFlag, appconsts.ArabicaUpgradeHeightV2) case appconsts.MochaChainID: - serverCtx.Logger.Info(fmt.Sprintf("Setting the default value for the --v2-upgrade-height flag to %v because chainID %v\n", appconsts.MochaUpgradeHeightV2, appconsts.MochaChainID)) + serverCtx.Logger.Info(fmt.Sprintf("Since the chainID is %v, configuring the default v2 upgrade height to %v", appconsts.MochaUpgradeHeightV2, appconsts.MochaChainID)) serverCtx.Viper.SetDefault(UpgradeHeightFlag, appconsts.MochaUpgradeHeightV2) case appconsts.MainnetChainID: - serverCtx.Logger.Info(fmt.Sprintf("Setting the default value for the --v2-upgrade-height flag to %v because chainID %v\n", appconsts.MainnetChainID, appconsts.MainnetChainID)) + serverCtx.Logger.Info(fmt.Sprintf("Since the chainID is %v, configuring the default v2 upgrade height to %v", appconsts.MainnetChainID, appconsts.MainnetChainID)) serverCtx.Viper.SetDefault(UpgradeHeightFlag, appconsts.MainnetUpgradeHeightV2) default: - serverCtx.Logger.Info(fmt.Sprintf("No default value exists for the --v2-upgrade-height flag when chainID is %v", clientCtx.ChainID)) + serverCtx.Logger.Info(fmt.Sprintf("No default value exists for the v2 upgrade height when the chainID is %v", clientCtx.ChainID)) } withTM, _ := cmd.Flags().GetBool(flagWithTendermint) diff --git a/scripts/arabica.sh b/scripts/arabica.sh index e8cd91a8df..3bb5739138 100755 --- a/scripts/arabica.sh +++ b/scripts/arabica.sh @@ -57,4 +57,4 @@ echo "Downloading genesis file..." celestia-appd download-genesis ${CHAIN_ID} echo "Starting celestia-appd..." -celestia-appd start --force-no-bbr +celestia-appd start --force-no-bbr --v2-upgrade-height 2