From 3b946dfd2a091131efadb83c07293867384bfae9 Mon Sep 17 00:00:00 2001 From: Adam Tucker Date: Sat, 27 Jan 2024 22:10:24 -0700 Subject: [PATCH 1/6] plug in testnetify --- app/app.go | 217 +++++++++++++++++++++++++++++++++++++++ cmd/osmosisd/cmd/root.go | 17 +++ go.mod | 3 +- go.sum | 4 +- osmomath/go.mod | 2 +- osmoutils/go.mod | 2 +- x/epochs/go.mod | 2 +- x/ibc-hooks/go.mod | 2 +- 8 files changed, 242 insertions(+), 7 deletions(-) diff --git a/app/app.go b/app/app.go index 49b63400307..7c3828b15c4 100644 --- a/app/app.go +++ b/app/app.go @@ -7,6 +7,7 @@ import ( "os" "path/filepath" "reflect" + "time" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" @@ -40,6 +41,7 @@ import ( upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + "cosmossdk.io/api/cosmos/crypto/ed25519" reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1" runtimeservices "github.com/cosmos/cosmos-sdk/runtime/services" @@ -47,6 +49,8 @@ import ( "github.com/CosmWasm/wasmd/x/wasm" dbm "github.com/cometbft/cometbft-db" abci "github.com/cometbft/cometbft/abci/types" + "github.com/cometbft/cometbft/crypto" + "github.com/cometbft/cometbft/libs/bytes" tmjson "github.com/cometbft/cometbft/libs/json" "github.com/cometbft/cometbft/libs/log" tmos "github.com/cometbft/cometbft/libs/os" @@ -66,12 +70,14 @@ import ( "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/bech32" "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/version" "github.com/cosmos/cosmos-sdk/x/auth/ante" authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" "github.com/cosmos/cosmos-sdk/x/crisis" + minttypes "github.com/osmosis-labs/osmosis/v22/x/mint/types" protorevtypes "github.com/osmosis-labs/osmosis/v22/x/protorev/types" "github.com/osmosis-labs/osmosis/v22/app/keepers" @@ -403,6 +409,217 @@ func NewOsmosisApp( return app } +// InitOsmosisAppForTestnet 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) +func InitOsmosisAppForTestnet(app *OsmosisApp, newValAddr bytes.HexBytes, newValPubKey crypto.PubKey, newOperatorAddress string) *OsmosisApp { + // + // Required Changes: + // + + ctx := app.BaseApp.NewUncachedContext(true, tmproto.Header{}) + pubkey := &ed25519.PubKey{Key: newValPubKey.Bytes()} + pubkeyAny, err := types.NewAnyWithValue(pubkey) + if err != nil { + tmos.Exit(err.Error()) + } + + // STAKING + // + + // Create Validator struct for our new validator. + _, bz, err := bech32.DecodeAndConvert(newOperatorAddress) + if err != nil { + tmos.Exit(err.Error()) + } + bech32Addr, err := bech32.ConvertAndEncode("osmovaloper", bz) + if err != nil { + tmos.Exit(err.Error()) + } + newVal := stakingtypes.Validator{ + OperatorAddress: bech32Addr, + ConsensusPubkey: pubkeyAny, + Jailed: false, + Status: stakingtypes.Bonded, + Tokens: sdk.NewInt(900000000000000), + DelegatorShares: sdk.MustNewDecFromStr("10000000"), + Description: stakingtypes.Description{ + Moniker: "Testnet Validator", + }, + Commission: stakingtypes.Commission{ + CommissionRates: stakingtypes.CommissionRates{ + Rate: sdk.MustNewDecFromStr("0.05"), + MaxRate: sdk.MustNewDecFromStr("0.1"), + MaxChangeRate: sdk.MustNewDecFromStr("0.05"), + }, + }, + MinSelfDelegation: sdk.OneInt(), + } + + // Remove all validators from power store + stakingKey := app.GetKey(stakingtypes.ModuleName) + stakingStore := ctx.KVStore(stakingKey) + iterator := app.StakingKeeper.ValidatorsPowerStoreIterator(ctx) + for ; iterator.Valid(); iterator.Next() { + stakingStore.Delete(iterator.Key()) + } + iterator.Close() + + // Remove all valdiators from last validators store + iterator = app.StakingKeeper.LastValidatorsIterator(ctx) + for ; iterator.Valid(); iterator.Next() { + stakingStore.Delete(iterator.Key()) + } + iterator.Close() + + // Add our validator to power and last validators store + app.StakingKeeper.SetValidator(ctx, newVal) + err = app.StakingKeeper.SetValidatorByConsAddr(ctx, newVal) + if err != nil { + tmos.Exit(err.Error()) + } + app.StakingKeeper.SetValidatorByPowerIndex(ctx, newVal) + app.StakingKeeper.SetLastValidatorPower(ctx, newVal.GetOperator(), 0) + if err := app.StakingKeeper.Hooks().AfterValidatorCreated(ctx, newVal.GetOperator()); err != nil { + panic(err) + } + + // DISTRIBUTION + // + + // Initialize records for this validator across all distribution stores + app.DistrKeeper.SetValidatorHistoricalRewards(ctx, newVal.GetOperator(), 0, distrtypes.NewValidatorHistoricalRewards(sdk.DecCoins{}, 1)) + app.DistrKeeper.SetValidatorCurrentRewards(ctx, newVal.GetOperator(), distrtypes.NewValidatorCurrentRewards(sdk.DecCoins{}, 1)) + app.DistrKeeper.SetValidatorAccumulatedCommission(ctx, newVal.GetOperator(), distrtypes.InitialValidatorAccumulatedCommission()) + app.DistrKeeper.SetValidatorOutstandingRewards(ctx, newVal.GetOperator(), distrtypes.ValidatorOutstandingRewards{Rewards: sdk.DecCoins{}}) + + // SLASHING + // + + // Set validator signing info for our new validator. + newConsAddr := sdk.ConsAddress(newValAddr.Bytes()) + newValidatorSigningInfo := slashingtypes.ValidatorSigningInfo{ + Address: newConsAddr.String(), + StartHeight: app.LastBlockHeight() - 1, + Tombstoned: false, + } + app.SlashingKeeper.SetValidatorSigningInfo(ctx, newConsAddr, newValidatorSigningInfo) + + // + // Optional Changes: + // + + // GOV + // + + newExpeditedVotingPeriod := time.Minute + newVotingPeriod := time.Minute * 2 + + govParams := app.GovKeeper.GetParams(ctx) + govParams.ExpeditedVotingPeriod = &newExpeditedVotingPeriod + govParams.VotingPeriod = &newVotingPeriod + govParams.MinDeposit = sdk.NewCoins(sdk.NewInt64Coin("uosmo", 100000000)) + govParams.ExpeditedMinDeposit = sdk.NewCoins(sdk.NewInt64Coin("uosmo", 150000000)) + + err = app.GovKeeper.SetParams(ctx, govParams) + if err != nil { + tmos.Exit(err.Error()) + } + + // EPOCHS + // + + dayEpochInfo := app.EpochsKeeper.GetEpochInfo(ctx, "day") + dayEpochInfo.Duration = time.Hour * 6 + // Prevents epochs from running back to back + dayEpochInfo.CurrentEpochStartTime = time.Now().UTC() + dayEpochInfo.CurrentEpochStartHeight = app.LastBlockHeight() + app.EpochsKeeper.DeleteEpochInfo(ctx, "day") + err = app.EpochsKeeper.AddEpochInfo(ctx, dayEpochInfo) + if err != nil { + tmos.Exit(err.Error()) + } + + weekEpochInfo := app.EpochsKeeper.GetEpochInfo(ctx, "week") + weekEpochInfo.Duration = time.Hour * 12 + // Prevents epochs from running back to back + weekEpochInfo.CurrentEpochStartTime = time.Now().UTC() + weekEpochInfo.CurrentEpochStartHeight = app.LastBlockHeight() + app.EpochsKeeper.DeleteEpochInfo(ctx, "week") + err = app.EpochsKeeper.AddEpochInfo(ctx, weekEpochInfo) + if err != nil { + tmos.Exit(err.Error()) + } + + // BANK + // + + defaultCoins := sdk.NewCoins( + sdk.NewInt64Coin("ibc/0CD3A0285E1341859B5E86B6AB7682F023D03E97607CCC1DC95706411D866DF7", 1000000000000), // DAI + sdk.NewInt64Coin("uosmo", 1000000000000), + sdk.NewInt64Coin("uion", 1000000000)) + + localOsmosisAccounts := []sdk.AccAddress{ + sdk.MustAccAddressFromBech32("osmo12smx2wdlyttvyzvzg54y2vnqwq2qjateuf7thj"), + sdk.MustAccAddressFromBech32("osmo1cyyzpxplxdzkeea7kwsydadg87357qnahakaks"), + sdk.MustAccAddressFromBech32("osmo18s5lynnmx37hq4wlrw9gdn68sg2uxp5rgk26vv"), + sdk.MustAccAddressFromBech32("osmo1qwexv7c6sm95lwhzn9027vyu2ccneaqad4w8ka"), + sdk.MustAccAddressFromBech32("osmo14hcxlnwlqtq75ttaxf674vk6mafspg8xwgnn53"), + sdk.MustAccAddressFromBech32("osmo12rr534cer5c0vj53eq4y32lcwguyy7nndt0u2t"), + sdk.MustAccAddressFromBech32("osmo1nt33cjd5auzh36syym6azgc8tve0jlvklnq7jq"), + sdk.MustAccAddressFromBech32("osmo10qfrpash5g2vk3hppvu45x0g860czur8ff5yx0"), + sdk.MustAccAddressFromBech32("osmo1f4tvsdukfwh6s9swrc24gkuz23tp8pd3e9r5fa"), + sdk.MustAccAddressFromBech32("osmo1myv43sqgnj5sm4zl98ftl45af9cfzk7nhjxjqh"), + sdk.MustAccAddressFromBech32("osmo14gs9zqh8m49yy9kscjqu9h72exyf295afg6kgk"), + sdk.MustAccAddressFromBech32("osmo1jllfytsz4dryxhz5tl7u73v29exsf80vz52ucc")} + + // Fund localosmosis accounts + for _, account := range localOsmosisAccounts { + err := app.BankKeeper.MintCoins(ctx, minttypes.ModuleName, defaultCoins) + if err != nil { + tmos.Exit(err.Error()) + } + err = app.BankKeeper.SendCoinsFromModuleToAccount(ctx, minttypes.ModuleName, account, defaultCoins) + if err != nil { + tmos.Exit(err.Error()) + } + } + + // Fund edgenet faucet + faucetCoins := sdk.NewCoins( + sdk.NewInt64Coin("ibc/0CD3A0285E1341859B5E86B6AB7682F023D03E97607CCC1DC95706411D866DF7", 1000000000000000), // DAI + sdk.NewInt64Coin("uosmo", 1000000000000000), + sdk.NewInt64Coin("uion", 1000000000000)) + err = app.BankKeeper.MintCoins(ctx, minttypes.ModuleName, faucetCoins) + if err != nil { + tmos.Exit(err.Error()) + } + err = app.BankKeeper.SendCoinsFromModuleToAccount(ctx, minttypes.ModuleName, sdk.MustAccAddressFromBech32("osmo1rqgf207csps822qwmd3k2n6k6k4e99w502e79t"), faucetCoins) + if err != nil { + tmos.Exit(err.Error()) + } + + // Mars bank account + marsCoins := sdk.NewCoins( + sdk.NewInt64Coin("uosmo", 10000000000000), + sdk.NewInt64Coin("ibc/903A61A498756EA560B85A85132D3AEE21B5DEDD41213725D22ABF276EA6945E", 400000000000), + sdk.NewInt64Coin("ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858", 3000000000000), + sdk.NewInt64Coin("ibc/C140AFD542AE77BD7DCC83F13FDD8C5E5BB8C4929785E6EC2F4C636F98F17901", 200000000000), + sdk.NewInt64Coin("ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2", 700000000000), + sdk.NewInt64Coin("ibc/D1542AA8762DB13087D8364F3EA6509FD6F009A34F00426AF9E4F9FA85CBBF1F", 2000000000), + sdk.NewInt64Coin("ibc/EA1D43981D5C9A1C4AAEA9C23BB1D4FA126BA9BC7020A25E0AE4AA841EA25DC5", 3000000000000000000)) + err = app.BankKeeper.MintCoins(ctx, minttypes.ModuleName, marsCoins) + if err != nil { + tmos.Exit(err.Error()) + } + err = app.BankKeeper.SendCoinsFromModuleToAccount(ctx, minttypes.ModuleName, sdk.MustAccAddressFromBech32("osmo1ev02crc36675xd8s029qh7wg3wjtfk37jr004z"), marsCoins) + if err != nil { + tmos.Exit(err.Error()) + } + + return app +} + // MakeCodecs returns the application codec and a legacy Amino codec. func MakeCodecs() (codec.Codec, *codec.LegacyAmino) { config := MakeEncodingConfig() diff --git a/cmd/osmosisd/cmd/root.go b/cmd/osmosisd/cmd/root.go index 54b0716c45a..b6583e1250d 100644 --- a/cmd/osmosisd/cmd/root.go +++ b/cmd/osmosisd/cmd/root.go @@ -25,6 +25,8 @@ import ( "github.com/osmosis-labs/osmosis/v22/ingest/sqs" tmcfg "github.com/cometbft/cometbft/config" + "github.com/cometbft/cometbft/crypto" + "github.com/cometbft/cometbft/libs/bytes" tmcli "github.com/cometbft/cometbft/libs/cli" "github.com/cometbft/cometbft/libs/log" tmtypes "github.com/cometbft/cometbft/types" @@ -604,6 +606,7 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) { ) server.AddCommands(rootCmd, osmosis.DefaultNodeHome, newApp, createOsmosisAppAndExport, addModuleInitFlags) + server.AddTestnetCreatorCommand(rootCmd, osmosis.DefaultNodeHome, newTestnetApp, addModuleInitFlags) for i, cmd := range rootCmd.Commands() { if cmd.Name() == "start" { @@ -766,6 +769,20 @@ func newApp(logger log.Logger, db cometbftdb.DB, traceStore io.Writer, appOpts s ) } +// 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, newValAddr bytes.HexBytes, newValPubKey crypto.PubKey, newOperatorAddress string, appOpts servertypes.AppOptions) servertypes.Application { + // Create an app and type cast to an OsmosisApp + app := newApp(logger, db, traceStore, appOpts) + osmosisApp, ok := app.(*osmosis.OsmosisApp) + if !ok { + panic("app created from newApp is not of type osmosisApp") + } + + // Make modifications to the normal OsmosisApp required to run the network locally + return osmosis.InitOsmosisAppForTestnet(osmosisApp, newValAddr, newValPubKey, newOperatorAddress) +} + // createOsmosisAppAndExport creates and exports the new Osmosis app, returns the state of the new Osmosis app for a genesis file. func createOsmosisAppAndExport( logger log.Logger, db cometbftdb.DB, traceStore io.Writer, height int64, forZeroHeight bool, jailWhiteList []string, diff --git a/go.mod b/go.mod index 9e935090387..48088243fae 100644 --- a/go.mod +++ b/go.mod @@ -386,7 +386,8 @@ replace ( // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo-v22/v0.47.5, current branch: osmo-v22/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/cf358f6fc20cabfb5cb8ce75fc10b2623150869e // https://github.com/osmosis-labs/cosmos-sdk/releases/tag/v0.47.5-v22-osmo-2 - github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.5-v22-osmo-2 + // TODO: update comments and tag + github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20240128044917-f7601f76ba26 github.com/cosmos/gogoproto => github.com/cosmos/gogoproto v1.4.10 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 diff --git a/go.sum b/go.sum index 2badb728502..d3374ed2634 100644 --- a/go.sum +++ b/go.sum @@ -1499,8 +1499,8 @@ github.com/ory/dockertest/v3 v3.10.0 h1:4K3z2VMe8Woe++invjaTB7VRyQXQy5UY+loujO4a github.com/ory/dockertest/v3 v3.10.0/go.mod h1:nr57ZbRWMqfsdGdFNLHz5jjNdDb7VVFnzAeW1n5N1Lg= github.com/osmosis-labs/cometbft v0.37.2-v21-osmo-1 h1:dAPp/n4+qqbJgPkMXcU+M0xUWWywHiOrW9RF3zLBbsI= github.com/osmosis-labs/cometbft v0.37.2-v21-osmo-1/go.mod h1:Y2MMMN//O5K4YKd8ze4r9jmk4Y7h0ajqILXbH5JQFVs= -github.com/osmosis-labs/cosmos-sdk v0.47.5-v22-osmo-2 h1:Kn94XEG9pMiiFwttyt/oLayZfY9/3pIKyrK9TBIB+fU= -github.com/osmosis-labs/cosmos-sdk v0.47.5-v22-osmo-2/go.mod h1:4BNXIoS9XecywMSdPr/DIwCgH2/Qjyr2+qhrHu8YSEo= +github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20240128044917-f7601f76ba26 h1:74wurUNr/BooHCct3eGs2eJ7uMjHWHv3qNOS6J1E22o= +github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20240128044917-f7601f76ba26/go.mod h1:4BNXIoS9XecywMSdPr/DIwCgH2/Qjyr2+qhrHu8YSEo= github.com/osmosis-labs/go-mutesting v0.0.0-20221208041716-b43bcd97b3b3 h1:YlmchqTmlwdWSmrRmXKR+PcU96ntOd8u10vTaTZdcNY= github.com/osmosis-labs/go-mutesting v0.0.0-20221208041716-b43bcd97b3b3/go.mod h1:lV6KnqXYD/ayTe7310MHtM3I2q8Z6bBfMAi+bhwPYtI= github.com/osmosis-labs/osmosis/osmomath v0.0.8 h1:jm6D5UgzQ0GQGtyFezs7tQRgwakf3cTBsE8oJIQdPZE= diff --git a/osmomath/go.mod b/osmomath/go.mod index 6e4e5e9b6df..d1d162dc50c 100644 --- a/osmomath/go.mod +++ b/osmomath/go.mod @@ -93,7 +93,7 @@ replace ( // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo-v22/v0.47.5, current branch: osmo-v22/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/cf358f6fc20cabfb5cb8ce75fc10b2623150869e // https://github.com/osmosis-labs/cosmos-sdk/releases/tag/v0.47.5-v22-osmo-2 - github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.5-v22-osmo-2 + github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20240128044917-f7601f76ba26 github.com/cosmos/gogoproto => github.com/cosmos/gogoproto v1.4.10 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 diff --git a/osmoutils/go.mod b/osmoutils/go.mod index b84eab362e5..e5eb93c4735 100644 --- a/osmoutils/go.mod +++ b/osmoutils/go.mod @@ -177,7 +177,7 @@ replace ( // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo-v22/v0.47.5, current branch: osmo-v22/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/cf358f6fc20cabfb5cb8ce75fc10b2623150869e // https://github.com/osmosis-labs/cosmos-sdk/releases/tag/v0.47.5-v22-osmo-2 - github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.5-v22-osmo-2 + github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20240128044917-f7601f76ba26 github.com/cosmos/gogoproto => github.com/cosmos/gogoproto v1.4.10 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 diff --git a/x/epochs/go.mod b/x/epochs/go.mod index e7162539822..75e4fb6a4b4 100644 --- a/x/epochs/go.mod +++ b/x/epochs/go.mod @@ -211,7 +211,7 @@ replace ( // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo-v22/v0.47.5, current branch: osmo-v22/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/cf358f6fc20cabfb5cb8ce75fc10b2623150869e // https://github.com/osmosis-labs/cosmos-sdk/releases/tag/v0.47.5-v22-osmo-2 - github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.5-v22-osmo-2 + github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20240128044917-f7601f76ba26 github.com/cosmos/gogoproto => github.com/cosmos/gogoproto v1.4.10 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 diff --git a/x/ibc-hooks/go.mod b/x/ibc-hooks/go.mod index 6a1407a07b2..a2a93e315ea 100644 --- a/x/ibc-hooks/go.mod +++ b/x/ibc-hooks/go.mod @@ -204,7 +204,7 @@ replace ( github.com/cosmos/cosmos-proto => github.com/cosmos/cosmos-proto v1.0.0-beta.2 // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo-v22/v0.47.5, current branch: osmo-v22/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/cf358f6fc20cabfb5cb8ce75fc10b2623150869e // https://github.com/osmosis-labs/cosmos-sdk/releases/tag/v0.47.5-v22-osmo-2 - github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.5-v22-osmo-2 + github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20240128044917-f7601f76ba26 github.com/cosmos/gogoproto => github.com/cosmos/gogoproto v1.4.10 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 From 17ff314247513de7b141d6d9800c6431454b8c0a Mon Sep 17 00:00:00 2001 From: Adam Tucker Date: Sun, 28 Jan 2024 17:35:57 -0700 Subject: [PATCH 2/6] fix import --- app/app.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/app.go b/app/app.go index 7c3828b15c4..b767fe43579 100644 --- a/app/app.go +++ b/app/app.go @@ -41,8 +41,8 @@ import ( upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" - "cosmossdk.io/api/cosmos/crypto/ed25519" reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1" + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" runtimeservices "github.com/cosmos/cosmos-sdk/runtime/services" From 980a292d88f35ca8ae7d4225a51aa36cbc1603da Mon Sep 17 00:00:00 2001 From: Adam Tucker Date: Sun, 28 Jan 2024 22:59:37 -0700 Subject: [PATCH 3/6] utilize appOpts --- cmd/osmosisd/cmd/root.go | 15 ++++++++++++++- go.mod | 2 +- osmomath/go.mod | 2 +- osmoutils/go.mod | 2 +- x/epochs/go.mod | 2 +- x/ibc-hooks/go.mod | 2 +- 6 files changed, 19 insertions(+), 6 deletions(-) diff --git a/cmd/osmosisd/cmd/root.go b/cmd/osmosisd/cmd/root.go index b6583e1250d..985dbb1b7e7 100644 --- a/cmd/osmosisd/cmd/root.go +++ b/cmd/osmosisd/cmd/root.go @@ -771,7 +771,7 @@ func newApp(logger log.Logger, db cometbftdb.DB, traceStore io.Writer, appOpts s // 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, newValAddr bytes.HexBytes, newValPubKey crypto.PubKey, newOperatorAddress string, appOpts servertypes.AppOptions) servertypes.Application { +func newTestnetApp(logger log.Logger, db cometbftdb.DB, traceStore io.Writer, appOpts servertypes.AppOptions) servertypes.Application { // Create an app and type cast to an OsmosisApp app := newApp(logger, db, traceStore, appOpts) osmosisApp, ok := app.(*osmosis.OsmosisApp) @@ -779,6 +779,19 @@ func newTestnetApp(logger log.Logger, db cometbftdb.DB, traceStore io.Writer, ne panic("app created from newApp is not of type osmosisApp") } + newValAddr, ok := appOpts.Get(server.KeyNewValAddr).(bytes.HexBytes) + if !ok { + panic("newValAddr is not of type bytes.HexBytes") + } + newValPubKey, ok := appOpts.Get(server.KeyUserPubKey).(crypto.PubKey) + if !ok { + panic("newValPubKey is not of type crypto.PubKey") + } + newOperatorAddress, ok := appOpts.Get(server.KeyNewOpAddr).(string) + if !ok { + panic("newOperatorAddress is not of type string") + } + // Make modifications to the normal OsmosisApp required to run the network locally return osmosis.InitOsmosisAppForTestnet(osmosisApp, newValAddr, newValPubKey, newOperatorAddress) } diff --git a/go.mod b/go.mod index 48088243fae..ee17b0854f2 100644 --- a/go.mod +++ b/go.mod @@ -387,7 +387,7 @@ replace ( // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo-v22/v0.47.5, current branch: osmo-v22/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/cf358f6fc20cabfb5cb8ce75fc10b2623150869e // https://github.com/osmosis-labs/cosmos-sdk/releases/tag/v0.47.5-v22-osmo-2 // TODO: update comments and tag - github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20240128044917-f7601f76ba26 + github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20240129055254-7e9bc41b4266 github.com/cosmos/gogoproto => github.com/cosmos/gogoproto v1.4.10 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 diff --git a/osmomath/go.mod b/osmomath/go.mod index d1d162dc50c..fd061362f50 100644 --- a/osmomath/go.mod +++ b/osmomath/go.mod @@ -93,7 +93,7 @@ replace ( // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo-v22/v0.47.5, current branch: osmo-v22/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/cf358f6fc20cabfb5cb8ce75fc10b2623150869e // https://github.com/osmosis-labs/cosmos-sdk/releases/tag/v0.47.5-v22-osmo-2 - github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20240128044917-f7601f76ba26 + github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20240129055254-7e9bc41b4266 github.com/cosmos/gogoproto => github.com/cosmos/gogoproto v1.4.10 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 diff --git a/osmoutils/go.mod b/osmoutils/go.mod index e5eb93c4735..19a4968086e 100644 --- a/osmoutils/go.mod +++ b/osmoutils/go.mod @@ -177,7 +177,7 @@ replace ( // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo-v22/v0.47.5, current branch: osmo-v22/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/cf358f6fc20cabfb5cb8ce75fc10b2623150869e // https://github.com/osmosis-labs/cosmos-sdk/releases/tag/v0.47.5-v22-osmo-2 - github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20240128044917-f7601f76ba26 + github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20240129055254-7e9bc41b4266 github.com/cosmos/gogoproto => github.com/cosmos/gogoproto v1.4.10 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 diff --git a/x/epochs/go.mod b/x/epochs/go.mod index 75e4fb6a4b4..8f39ad62d29 100644 --- a/x/epochs/go.mod +++ b/x/epochs/go.mod @@ -211,7 +211,7 @@ replace ( // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo-v22/v0.47.5, current branch: osmo-v22/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/cf358f6fc20cabfb5cb8ce75fc10b2623150869e // https://github.com/osmosis-labs/cosmos-sdk/releases/tag/v0.47.5-v22-osmo-2 - github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20240128044917-f7601f76ba26 + github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20240129055254-7e9bc41b4266 github.com/cosmos/gogoproto => github.com/cosmos/gogoproto v1.4.10 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 diff --git a/x/ibc-hooks/go.mod b/x/ibc-hooks/go.mod index a2a93e315ea..8ef887d37e2 100644 --- a/x/ibc-hooks/go.mod +++ b/x/ibc-hooks/go.mod @@ -204,7 +204,7 @@ replace ( github.com/cosmos/cosmos-proto => github.com/cosmos/cosmos-proto v1.0.0-beta.2 // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo-v22/v0.47.5, current branch: osmo-v22/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/cf358f6fc20cabfb5cb8ce75fc10b2623150869e // https://github.com/osmosis-labs/cosmos-sdk/releases/tag/v0.47.5-v22-osmo-2 - github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20240128044917-f7601f76ba26 + github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20240129055254-7e9bc41b4266 github.com/cosmos/gogoproto => github.com/cosmos/gogoproto v1.4.10 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 From da3a22fc89fdf2a2edcd53034c8d9b84c8265bb4 Mon Sep 17 00:00:00 2001 From: Adam Tucker Date: Thu, 1 Feb 2024 17:08:50 -0700 Subject: [PATCH 4/6] add upgrade trigger --- app/app.go | 16 +++++++++++++++- cmd/osmosisd/cmd/root.go | 31 ++++++++++++++++++++++++------- go.mod | 2 +- go.sum | 4 ++-- osmomath/go.mod | 2 +- osmoutils/go.mod | 2 +- x/epochs/go.mod | 2 +- x/ibc-hooks/go.mod | 2 +- 8 files changed, 46 insertions(+), 15 deletions(-) diff --git a/app/app.go b/app/app.go index ed4e34396e0..4117abe38f6 100644 --- a/app/app.go +++ b/app/app.go @@ -413,7 +413,7 @@ func NewOsmosisApp( // InitOsmosisAppForTestnet 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) -func InitOsmosisAppForTestnet(app *OsmosisApp, newValAddr bytes.HexBytes, newValPubKey crypto.PubKey, newOperatorAddress string) *OsmosisApp { +func InitOsmosisAppForTestnet(app *OsmosisApp, newValAddr bytes.HexBytes, newValPubKey crypto.PubKey, newOperatorAddress, upgradeToTrigger string) *OsmosisApp { // // Required Changes: // @@ -618,6 +618,20 @@ func InitOsmosisAppForTestnet(app *OsmosisApp, newValAddr bytes.HexBytes, newVal tmos.Exit(err.Error()) } + // UPGRADE + // + + if upgradeToTrigger != "" { + upgradePlan := upgradetypes.Plan{ + Name: upgradeToTrigger, + Height: app.LastBlockHeight(), + } + err = app.UpgradeKeeper.ScheduleUpgrade(ctx, upgradePlan) + if err != nil { + panic(err) + } + } + return app } diff --git a/cmd/osmosisd/cmd/root.go b/cmd/osmosisd/cmd/root.go index 8f681ad6f19..093432720b7 100644 --- a/cmd/osmosisd/cmd/root.go +++ b/cmd/osmosisd/cmd/root.go @@ -22,6 +22,7 @@ import ( "github.com/osmosis-labs/osmosis/osmomath" "github.com/osmosis-labs/osmosis/v22/app/params" + v23 "github.com/osmosis-labs/osmosis/v22/app/upgrades/v23" // should be automated to be updated to current version every upgrade "github.com/osmosis-labs/osmosis/v22/ingest/sqs" tmcfg "github.com/cometbft/cometbft/config" @@ -57,6 +58,7 @@ import ( genutil "github.com/cosmos/cosmos-sdk/x/genutil" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" "github.com/CosmWasm/wasmd/x/wasm" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" @@ -831,12 +833,7 @@ func newApp(logger log.Logger, db cometbftdb.DB, traceStore io.Writer, appOpts s wasmOpts = append(wasmOpts, wasmkeeper.WithVMCacheMetrics(prometheus.DefaultRegisterer)) } - return osmosis.NewOsmosisApp( - logger, db, traceStore, true, skipUpgradeHeights, - cast.ToString(appOpts.Get(flags.FlagHome)), - cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)), - appOpts, - wasmOpts, + baseAppOptions := []func(*baseapp.BaseApp){ baseapp.SetPruning(pruningOpts), baseapp.SetMinGasPrices(cast.ToString(appOpts.Get(server.FlagMinGasPrices))), baseapp.SetMinRetainBlocks(cast.ToUint64(appOpts.Get(server.FlagMinRetainBlocks))), @@ -850,6 +847,22 @@ func newApp(logger log.Logger, db cometbftdb.DB, traceStore io.Writer, appOpts s baseapp.SetIAVLCacheSize(cast.ToInt(appOpts.Get(server.FlagIAVLCacheSize))), baseapp.SetIAVLDisableFastNode(cast.ToBool(appOpts.Get(server.FlagDisableIAVLFastNode))), baseapp.SetChainID(chainID), + } + + // If this is an in place testnet, set any new stores that may exist + if cast.ToBool(appOpts.Get(server.KeyIsTestnet)) { + version := store.NewCommitMultiStore(db).LatestVersion() + 1 + fmt.Println("version", version) + baseAppOptions = append(baseAppOptions, baseapp.SetStoreLoader(upgradetypes.UpgradeStoreLoader(version, &v23.Upgrade.StoreUpgrades))) + } + + return osmosis.NewOsmosisApp( + logger, db, traceStore, true, skipUpgradeHeights, + cast.ToString(appOpts.Get(flags.FlagHome)), + cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)), + appOpts, + wasmOpts, + baseAppOptions..., ) } @@ -875,9 +888,13 @@ func newTestnetApp(logger log.Logger, db cometbftdb.DB, traceStore io.Writer, ap if !ok { panic("newOperatorAddress is not of type string") } + upgradeToTrigger, ok := appOpts.Get(server.KeyTriggerTestnetUpgrade).(string) + if !ok { + panic("upgradeToTrigger is not of type string") + } // Make modifications to the normal OsmosisApp required to run the network locally - return osmosis.InitOsmosisAppForTestnet(osmosisApp, newValAddr, newValPubKey, newOperatorAddress) + return osmosis.InitOsmosisAppForTestnet(osmosisApp, newValAddr, newValPubKey, newOperatorAddress, upgradeToTrigger) } // createOsmosisAppAndExport creates and exports the new Osmosis app, returns the state of the new Osmosis app for a genesis file. diff --git a/go.mod b/go.mod index 7e50527ae13..c3a01eb4745 100644 --- a/go.mod +++ b/go.mod @@ -389,7 +389,7 @@ replace ( // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo-v22/v0.47.5, current branch: osmo-v22/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/cf358f6fc20cabfb5cb8ce75fc10b2623150869e // https://github.com/osmosis-labs/cosmos-sdk/releases/tag/v0.47.5-v22-osmo-2 // TODO: update comments and tag - github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20240129055254-7e9bc41b4266 + github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20240201231247-8ffea11429d2 github.com/cosmos/gogoproto => github.com/cosmos/gogoproto v1.4.10 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 diff --git a/go.sum b/go.sum index 7ae2bd88cbd..415d018f9fc 100644 --- a/go.sum +++ b/go.sum @@ -1505,8 +1505,8 @@ github.com/ory/dockertest/v3 v3.10.0 h1:4K3z2VMe8Woe++invjaTB7VRyQXQy5UY+loujO4a github.com/ory/dockertest/v3 v3.10.0/go.mod h1:nr57ZbRWMqfsdGdFNLHz5jjNdDb7VVFnzAeW1n5N1Lg= github.com/osmosis-labs/cometbft v0.37.2-v21-osmo-1 h1:dAPp/n4+qqbJgPkMXcU+M0xUWWywHiOrW9RF3zLBbsI= github.com/osmosis-labs/cometbft v0.37.2-v21-osmo-1/go.mod h1:Y2MMMN//O5K4YKd8ze4r9jmk4Y7h0ajqILXbH5JQFVs= -github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20240128044917-f7601f76ba26 h1:74wurUNr/BooHCct3eGs2eJ7uMjHWHv3qNOS6J1E22o= -github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20240128044917-f7601f76ba26/go.mod h1:4BNXIoS9XecywMSdPr/DIwCgH2/Qjyr2+qhrHu8YSEo= +github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20240201231247-8ffea11429d2 h1:93sXKDVzNEwsCXa6idMpv2K2ygVKgEBWnnPLegAQ2dI= +github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20240201231247-8ffea11429d2/go.mod h1:4BNXIoS9XecywMSdPr/DIwCgH2/Qjyr2+qhrHu8YSEo= github.com/osmosis-labs/go-mutesting v0.0.0-20221208041716-b43bcd97b3b3 h1:YlmchqTmlwdWSmrRmXKR+PcU96ntOd8u10vTaTZdcNY= github.com/osmosis-labs/go-mutesting v0.0.0-20221208041716-b43bcd97b3b3/go.mod h1:lV6KnqXYD/ayTe7310MHtM3I2q8Z6bBfMAi+bhwPYtI= github.com/osmosis-labs/osmosis/osmomath v0.0.8 h1:jm6D5UgzQ0GQGtyFezs7tQRgwakf3cTBsE8oJIQdPZE= diff --git a/osmomath/go.mod b/osmomath/go.mod index 579db029491..6cc04eede0e 100644 --- a/osmomath/go.mod +++ b/osmomath/go.mod @@ -93,7 +93,7 @@ replace ( // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo-v22/v0.47.5, current branch: osmo-v22/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/cf358f6fc20cabfb5cb8ce75fc10b2623150869e // https://github.com/osmosis-labs/cosmos-sdk/releases/tag/v0.47.5-v22-osmo-2 - github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20240129055254-7e9bc41b4266 + github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20240201231247-8ffea11429d2 github.com/cosmos/gogoproto => github.com/cosmos/gogoproto v1.4.10 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 diff --git a/osmoutils/go.mod b/osmoutils/go.mod index 1ad052b61f4..892074830a6 100644 --- a/osmoutils/go.mod +++ b/osmoutils/go.mod @@ -174,7 +174,7 @@ replace ( // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo-v22/v0.47.5, current branch: osmo-v22/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/cf358f6fc20cabfb5cb8ce75fc10b2623150869e // https://github.com/osmosis-labs/cosmos-sdk/releases/tag/v0.47.5-v22-osmo-2 - github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20240129055254-7e9bc41b4266 + github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20240201231247-8ffea11429d2 github.com/cosmos/gogoproto => github.com/cosmos/gogoproto v1.4.10 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 diff --git a/x/epochs/go.mod b/x/epochs/go.mod index 08dc332f534..fb5d1e836cb 100644 --- a/x/epochs/go.mod +++ b/x/epochs/go.mod @@ -210,7 +210,7 @@ replace ( // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo-v22/v0.47.5, current branch: osmo-v22/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/cf358f6fc20cabfb5cb8ce75fc10b2623150869e // https://github.com/osmosis-labs/cosmos-sdk/releases/tag/v0.47.5-v22-osmo-2 - github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20240129055254-7e9bc41b4266 + github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20240201231247-8ffea11429d2 github.com/cosmos/gogoproto => github.com/cosmos/gogoproto v1.4.10 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 diff --git a/x/ibc-hooks/go.mod b/x/ibc-hooks/go.mod index 8fd21b73857..1163c43819a 100644 --- a/x/ibc-hooks/go.mod +++ b/x/ibc-hooks/go.mod @@ -204,7 +204,7 @@ replace ( github.com/cosmos/cosmos-proto => github.com/cosmos/cosmos-proto v1.0.0-beta.2 // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo-v22/v0.47.5, current branch: osmo-v22/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/cf358f6fc20cabfb5cb8ce75fc10b2623150869e // https://github.com/osmosis-labs/cosmos-sdk/releases/tag/v0.47.5-v22-osmo-2 - github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20240129055254-7e9bc41b4266 + github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20240201231247-8ffea11429d2 github.com/cosmos/gogoproto => github.com/cosmos/gogoproto v1.4.10 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 From 560f6e569389c1fabe98ac7817e480fb14e5f9da Mon Sep 17 00:00:00 2001 From: Adam Tucker Date: Tue, 6 Feb 2024 10:40:53 -0700 Subject: [PATCH 5/6] update sdk fork tag --- go.mod | 5 ++--- go.sum | 4 ++-- osmomath/go.mod | 4 ++-- osmoutils/go.mod | 4 ++-- x/epochs/go.mod | 4 ++-- x/ibc-hooks/go.mod | 4 ++-- 6 files changed, 12 insertions(+), 13 deletions(-) diff --git a/go.mod b/go.mod index 0c8b86a7dcb..c9ad738d5f0 100644 --- a/go.mod +++ b/go.mod @@ -390,10 +390,9 @@ replace ( // v1.0.0-beta.3 is incompatible, so we use v1.0.0-beta.2 github.com/cosmos/cosmos-proto => github.com/cosmos/cosmos-proto v1.0.0-beta.2 - // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo-v22/v0.47.5, current branch: osmo-v22/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/cf358f6fc20cabfb5cb8ce75fc10b2623150869e + // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo-v22/v0.47.5, current branch: osmo-v22/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/97b06aa49e4c814f9ec4e64be2d5eaf7be42a259 // https://github.com/osmosis-labs/cosmos-sdk/releases/tag/v0.47.5-v22-osmo-2 - // TODO: update comments and tag - github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20240201231247-8ffea11429d2 + github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.5-v22-osmo-3 github.com/cosmos/gogoproto => github.com/cosmos/gogoproto v1.4.10 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 diff --git a/go.sum b/go.sum index fecc1eb29ee..a9f7caac27d 100644 --- a/go.sum +++ b/go.sum @@ -1507,8 +1507,8 @@ github.com/ory/dockertest/v3 v3.10.0 h1:4K3z2VMe8Woe++invjaTB7VRyQXQy5UY+loujO4a github.com/ory/dockertest/v3 v3.10.0/go.mod h1:nr57ZbRWMqfsdGdFNLHz5jjNdDb7VVFnzAeW1n5N1Lg= github.com/osmosis-labs/cometbft v0.0.0-20240201155058-95b5f9262e1d h1:1XEh8vYZ2+oWJGOEU+61Dgeg7MnEGQdlQkkprfZeXxI= github.com/osmosis-labs/cometbft v0.0.0-20240201155058-95b5f9262e1d/go.mod h1:Cmg5Hp4sNpapm7j+x0xRyt2g0juQfmB752ous+pA0G8= -github.com/osmosis-labs/cosmos-sdk v0.47.5-v22-osmo-2 h1:Kn94XEG9pMiiFwttyt/oLayZfY9/3pIKyrK9TBIB+fU= -github.com/osmosis-labs/cosmos-sdk v0.47.5-v22-osmo-2/go.mod h1:4BNXIoS9XecywMSdPr/DIwCgH2/Qjyr2+qhrHu8YSEo= +github.com/osmosis-labs/cosmos-sdk v0.47.5-v22-osmo-3 h1:faoys5s42OyTTppQgub2kaxViTi3+zS+pcVar9bupXg= +github.com/osmosis-labs/cosmos-sdk v0.47.5-v22-osmo-3/go.mod h1:4BNXIoS9XecywMSdPr/DIwCgH2/Qjyr2+qhrHu8YSEo= github.com/osmosis-labs/go-mutesting v0.0.0-20221208041716-b43bcd97b3b3 h1:YlmchqTmlwdWSmrRmXKR+PcU96ntOd8u10vTaTZdcNY= github.com/osmosis-labs/go-mutesting v0.0.0-20221208041716-b43bcd97b3b3/go.mod h1:lV6KnqXYD/ayTe7310MHtM3I2q8Z6bBfMAi+bhwPYtI= github.com/osmosis-labs/osmosis/osmomath v0.0.8 h1:jm6D5UgzQ0GQGtyFezs7tQRgwakf3cTBsE8oJIQdPZE= diff --git a/osmomath/go.mod b/osmomath/go.mod index 6cc04eede0e..e8af7c2408c 100644 --- a/osmomath/go.mod +++ b/osmomath/go.mod @@ -91,9 +91,9 @@ replace ( // v1.0.0-beta.3 is incompatible, so we use v1.0.0-beta.2 github.com/cosmos/cosmos-proto => github.com/cosmos/cosmos-proto v1.0.0-beta.2 - // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo-v22/v0.47.5, current branch: osmo-v22/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/cf358f6fc20cabfb5cb8ce75fc10b2623150869e + // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo-v22/v0.47.5, current branch: osmo-v22/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/97b06aa49e4c814f9ec4e64be2d5eaf7be42a259 // https://github.com/osmosis-labs/cosmos-sdk/releases/tag/v0.47.5-v22-osmo-2 - github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20240201231247-8ffea11429d2 + github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.5-v22-osmo-3 github.com/cosmos/gogoproto => github.com/cosmos/gogoproto v1.4.10 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 diff --git a/osmoutils/go.mod b/osmoutils/go.mod index 38d40c02388..36ff6f2a79f 100644 --- a/osmoutils/go.mod +++ b/osmoutils/go.mod @@ -173,9 +173,9 @@ replace ( // v1.0.0-beta.3 is incompatible, so we use v1.0.0-beta.2 github.com/cosmos/cosmos-proto => github.com/cosmos/cosmos-proto v1.0.0-beta.2 - // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo-v22/v0.47.5, current branch: osmo-v22/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/cf358f6fc20cabfb5cb8ce75fc10b2623150869e + // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo-v22/v0.47.5, current branch: osmo-v22/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/97b06aa49e4c814f9ec4e64be2d5eaf7be42a259 // https://github.com/osmosis-labs/cosmos-sdk/releases/tag/v0.47.5-v22-osmo-2 - github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20240201231247-8ffea11429d2 + github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.5-v22-osmo-3 github.com/cosmos/gogoproto => github.com/cosmos/gogoproto v1.4.10 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 diff --git a/x/epochs/go.mod b/x/epochs/go.mod index c04d4ed03ce..df4768e1079 100644 --- a/x/epochs/go.mod +++ b/x/epochs/go.mod @@ -208,9 +208,9 @@ replace ( // v1.0.0-beta.3 is incompatible, so we use v1.0.0-beta.2 github.com/cosmos/cosmos-proto => github.com/cosmos/cosmos-proto v1.0.0-beta.2 - // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo-v22/v0.47.5, current branch: osmo-v22/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/cf358f6fc20cabfb5cb8ce75fc10b2623150869e + // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo-v22/v0.47.5, current branch: osmo-v22/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/97b06aa49e4c814f9ec4e64be2d5eaf7be42a259 // https://github.com/osmosis-labs/cosmos-sdk/releases/tag/v0.47.5-v22-osmo-2 - github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20240201231247-8ffea11429d2 + github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.5-v22-osmo-3 github.com/cosmos/gogoproto => github.com/cosmos/gogoproto v1.4.10 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 diff --git a/x/ibc-hooks/go.mod b/x/ibc-hooks/go.mod index 6e498768cb3..1c58427de31 100644 --- a/x/ibc-hooks/go.mod +++ b/x/ibc-hooks/go.mod @@ -202,9 +202,9 @@ replace ( // v1.0.0-beta.3 is incompatible, so we use v1.0.0-beta.2 github.com/cosmos/cosmos-proto => github.com/cosmos/cosmos-proto v1.0.0-beta.2 - // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo-v22/v0.47.5, current branch: osmo-v22/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/cf358f6fc20cabfb5cb8ce75fc10b2623150869e + // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo-v22/v0.47.5, current branch: osmo-v22/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/97b06aa49e4c814f9ec4e64be2d5eaf7be42a259 // https://github.com/osmosis-labs/cosmos-sdk/releases/tag/v0.47.5-v22-osmo-2 - github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20240201231247-8ffea11429d2 + github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.5-v22-osmo-3 github.com/cosmos/gogoproto => github.com/cosmos/gogoproto v1.4.10 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 From 08d2fec3fab726b40890287be55f2aa1813c522c Mon Sep 17 00:00:00 2001 From: Adam Tucker Date: Tue, 6 Feb 2024 10:42:32 -0700 Subject: [PATCH 6/6] add changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 307c4950008..3ee582ee6ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -59,6 +59,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Misc Improvements * [#7360](https://github.com/osmosis-labs/osmosis/pull/7360) Bump cometbft-db from 0.8.0 to 0.10.0 +* [#7374](https://github.com/osmosis-labs/osmosis/pull/7374) In place testnet creation CLI * [#7385](https://github.com/osmosis-labs/osmosis/pull/7385) Add missing protobuf interface ### Config