From e79cf55138e6c76512f0abbbdedb38333091638f Mon Sep 17 00:00:00 2001 From: Marko Date: Tue, 24 Sep 2024 17:54:46 +0200 Subject: [PATCH 1/2] chore(docs): rename merlin to simapp (#21884) (cherry picked from commit f195a8660be91af13d34041623e2828b006d99af) # Conflicts: # docs/docs/build/building-apps/05-app-testnet.md --- .../build/building-apps/05-app-testnet.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/docs/build/building-apps/05-app-testnet.md b/docs/docs/build/building-apps/05-app-testnet.md index 607599cc1952..8c5113b08f85 100644 --- a/docs/docs/build/building-apps/05-app-testnet.md +++ b/docs/docs/build/building-apps/05-app-testnet.md @@ -16,7 +16,11 @@ We will be breaking down the steps to create a testnet from mainnet state. // InitSimAppForTestnet is broken down into two sections: // Required Changes: Changes that, if not made, will cause the testnet to halt or panic // Optional Changes: Changes to customize the testnet to one's liking (lower vote times, fund accounts, etc) +<<<<<<< HEAD:docs/docs/build/building-apps/05-app-testnet.md func InitSimAppForTestnet(app *simApp, newValAddr bytes.HexBytes, newValPubKey crypto.PubKey, newOperatorAddress, upgradeToTrigger string) *simApp { +======= + func InitSimAppForTestnet(app *SimApp, newValAddr bytes.HexBytes, newValPubKey crypto.PubKey, newOperatorAddress, upgradeToTrigger string) *SimApp { +>>>>>>> f195a8660 (chore(docs): rename merlin to simapp (#21884)):docs/build/building-apps/05-app-testnet.md ... } ``` @@ -152,7 +156,11 @@ It is useful to create new accounts for your testing purposes. This avoids the n sdk.MustAccAddressFromBech32("cosmos1jllfytsz4dryxhz5tl7u73v29exsf80vz52ucc")} // Fund localSimApp accounts +<<<<<<< HEAD:docs/docs/build/building-apps/05-app-testnet.md for _, account := range localsimAccounts { +======= + for _, account := range localSimAppAccounts { +>>>>>>> f195a8660 (chore(docs): rename merlin to simapp (#21884)):docs/build/building-apps/05-app-testnet.md err := app.BankKeeper.MintCoins(ctx, minttypes.ModuleName, defaultCoins) if err != nil { tmos.Exit(err.Error()) @@ -195,8 +203,13 @@ Before we can run the testnet we must plug everything together. in `root.go`, in the `initRootCmd` function we add: ```diff +<<<<<<< HEAD:docs/docs/build/building-apps/05-app-testnet.md server.AddCommands(rootCmd, simapp.DefaultNodeHome, newApp, createsimAppAndExport, addModuleInitFlags) ++ server.AddTestnetCreatorCommand(rootCmd, simapp.DefaultNodeHome, newTestnetApp, addModuleInitFlags) +======= +server.AddCommands(rootCmd, simapp.DefaultNodeHome, newApp, createSimAppAndExport) ++server.AddTestnetCreatorCommand(rootCmd, simapp.DefaultNodeHome, newTestnetApp) +>>>>>>> f195a8660 (chore(docs): rename merlin to simapp (#21884)):docs/build/building-apps/05-app-testnet.md ``` Next we will add a newTestnetApp helper function: @@ -205,7 +218,11 @@ Next we will add a newTestnetApp helper function: // newTestnetApp starts by running the normal newApp method. From there, the app interface returned is modified in order // for a testnet to be created from the provided app. func newTestnetApp(logger log.Logger, db cometbftdb.DB, traceStore io.Writer, appOpts servertypes.AppOptions) servertypes.Application { +<<<<<<< HEAD:docs/docs/build/building-apps/05-app-testnet.md // Create an app and type cast to an simApp +======= + // Create an app and type cast to an SimApp +>>>>>>> f195a8660 (chore(docs): rename merlin to simapp (#21884)):docs/build/building-apps/05-app-testnet.md app := newApp(logger, db, traceStore, appOpts) simApp, ok := app.(*simapp.SimApp) if !ok { @@ -230,6 +247,10 @@ func newTestnetApp(logger log.Logger, db cometbftdb.DB, traceStore io.Writer, ap } // Make modifications to the normal SimApp required to run the network locally +<<<<<<< HEAD:docs/docs/build/building-apps/05-app-testnet.md return meriln.InitMerlinAppForTestnet(simApp, newValAddr, newValPubKey, newOperatorAddress, upgradeToTrigger) +======= + return simapp.InitSimAppForTestnet(simApp, newValAddr, newValPubKey, newOperatorAddress, upgradeToTrigger) +>>>>>>> f195a8660 (chore(docs): rename merlin to simapp (#21884)):docs/build/building-apps/05-app-testnet.md } ``` From ec0da9aae1cef5829fe60b5184d57a3a6de8a56c Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Wed, 25 Sep 2024 11:35:37 +0200 Subject: [PATCH 2/2] conflicts --- .../build/building-apps/05-app-testnet.md | 23 +------------------ 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/docs/docs/build/building-apps/05-app-testnet.md b/docs/docs/build/building-apps/05-app-testnet.md index 8c5113b08f85..c30ca0a6454e 100644 --- a/docs/docs/build/building-apps/05-app-testnet.md +++ b/docs/docs/build/building-apps/05-app-testnet.md @@ -16,11 +16,7 @@ We will be breaking down the steps to create a testnet from mainnet state. // InitSimAppForTestnet is broken down into two sections: // Required Changes: Changes that, if not made, will cause the testnet to halt or panic // Optional Changes: Changes to customize the testnet to one's liking (lower vote times, fund accounts, etc) -<<<<<<< HEAD:docs/docs/build/building-apps/05-app-testnet.md - func InitSimAppForTestnet(app *simApp, newValAddr bytes.HexBytes, newValPubKey crypto.PubKey, newOperatorAddress, upgradeToTrigger string) *simApp { -======= func InitSimAppForTestnet(app *SimApp, newValAddr bytes.HexBytes, newValPubKey crypto.PubKey, newOperatorAddress, upgradeToTrigger string) *SimApp { ->>>>>>> f195a8660 (chore(docs): rename merlin to simapp (#21884)):docs/build/building-apps/05-app-testnet.md ... } ``` @@ -156,11 +152,7 @@ It is useful to create new accounts for your testing purposes. This avoids the n sdk.MustAccAddressFromBech32("cosmos1jllfytsz4dryxhz5tl7u73v29exsf80vz52ucc")} // Fund localSimApp accounts -<<<<<<< HEAD:docs/docs/build/building-apps/05-app-testnet.md - for _, account := range localsimAccounts { -======= for _, account := range localSimAppAccounts { ->>>>>>> f195a8660 (chore(docs): rename merlin to simapp (#21884)):docs/build/building-apps/05-app-testnet.md err := app.BankKeeper.MintCoins(ctx, minttypes.ModuleName, defaultCoins) if err != nil { tmos.Exit(err.Error()) @@ -203,13 +195,8 @@ Before we can run the testnet we must plug everything together. in `root.go`, in the `initRootCmd` function we add: ```diff -<<<<<<< HEAD:docs/docs/build/building-apps/05-app-testnet.md - server.AddCommands(rootCmd, simapp.DefaultNodeHome, newApp, createsimAppAndExport, addModuleInitFlags) + server.AddCommands(rootCmd, simapp.DefaultNodeHome, newApp, createSimAppAndExport, addModuleInitFlags) ++ server.AddTestnetCreatorCommand(rootCmd, simapp.DefaultNodeHome, newTestnetApp, addModuleInitFlags) -======= -server.AddCommands(rootCmd, simapp.DefaultNodeHome, newApp, createSimAppAndExport) -+server.AddTestnetCreatorCommand(rootCmd, simapp.DefaultNodeHome, newTestnetApp) ->>>>>>> f195a8660 (chore(docs): rename merlin to simapp (#21884)):docs/build/building-apps/05-app-testnet.md ``` Next we will add a newTestnetApp helper function: @@ -218,11 +205,7 @@ Next we will add a newTestnetApp helper function: // newTestnetApp starts by running the normal newApp method. From there, the app interface returned is modified in order // for a testnet to be created from the provided app. func newTestnetApp(logger log.Logger, db cometbftdb.DB, traceStore io.Writer, appOpts servertypes.AppOptions) servertypes.Application { -<<<<<<< HEAD:docs/docs/build/building-apps/05-app-testnet.md - // Create an app and type cast to an simApp -======= // Create an app and type cast to an SimApp ->>>>>>> f195a8660 (chore(docs): rename merlin to simapp (#21884)):docs/build/building-apps/05-app-testnet.md app := newApp(logger, db, traceStore, appOpts) simApp, ok := app.(*simapp.SimApp) if !ok { @@ -247,10 +230,6 @@ func newTestnetApp(logger log.Logger, db cometbftdb.DB, traceStore io.Writer, ap } // Make modifications to the normal SimApp required to run the network locally -<<<<<<< HEAD:docs/docs/build/building-apps/05-app-testnet.md - return meriln.InitMerlinAppForTestnet(simApp, newValAddr, newValPubKey, newOperatorAddress, upgradeToTrigger) -======= return simapp.InitSimAppForTestnet(simApp, newValAddr, newValPubKey, newOperatorAddress, upgradeToTrigger) ->>>>>>> f195a8660 (chore(docs): rename merlin to simapp (#21884)):docs/build/building-apps/05-app-testnet.md } ```