Skip to content

Commit

Permalink
Cleanup old comments, Fix make TM_VERSION build flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Reecepbcups committed May 2, 2023
1 parent f428ee4 commit 0c0c7f0
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 23 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ endif
PACKAGES_SIMTEST=$(shell go list ./... | grep '/simulation')
LEDGER_ENABLED ?= true
SDK_PACK := $(shell go list -m github.com/cosmos/cosmos-sdk | sed 's/ /\@/g')
TM_VERSION := $(shell go list -m github.com/tendermint/tendermint | sed 's:.* ::') # grab everything after the space in "github.com/tendermint/tendermint v0.34.7"
BFT_VERSION := $(shell go list -m github.com/cometbft/cometbft | sed 's:.* ::') # grab everything after the space in "github.com/tendermint/tendermint v0.34.7"
DOCKER := $(shell which docker)
DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf:1.0.0-rc8
BUILDDIR ?= $(CURDIR)/build
Expand Down Expand Up @@ -68,7 +68,7 @@ ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=juno \
-X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \
-X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) \
-X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep)" \
-X github.com/tendermint/tendermint/version.TMCoreSemVer=$(TM_VERSION)
-X github.com/cometbft/cometbft/version.TMCoreSemVer=$(BFT_VERSION)

ifeq (cleveldb,$(findstring cleveldb,$(JUNO_BUILD_OPTIONS)))
ldflags += -X github.com/cosmos/cosmos-sdk/types.DBBackend=cleveldb
Expand Down
8 changes: 2 additions & 6 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,17 +168,13 @@ func GetWasmOpts(appOpts servertypes.AppOptions) []wasm.Option {
}

func getGovProposalHandlers() []govclient.ProposalHandler {
var govProposalHandlers []govclient.ProposalHandler

govProposalHandlers = append(govProposalHandlers,
return []govclient.ProposalHandler{
paramsclient.ProposalHandler,
upgradeclient.LegacyProposalHandler,
upgradeclient.LegacyCancelProposalHandler,
ibcclientclient.UpdateClientProposalHandler,
ibcclientclient.UpgradeProposalHandler,
)

return govProposalHandlers
}
}

var (
Expand Down
5 changes: 0 additions & 5 deletions app/keepers/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ import (

func (appKeepers *AppKeepers) GenerateKeys() {
appKeepers.keys = sdk.NewKVStoreKeys(
// authtypes.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey,
// minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey,
// govtypes.StoreKey, paramstypes.StoreKey, ibcexported.StoreKey, upgradetypes.StoreKey,
// evidencetypes.StoreKey, capabilitytypes.StoreKey,
// authzkeeper.StoreKey, feegrant.StoreKey,
authtypes.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey, crisistypes.StoreKey,
minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey,
govtypes.StoreKey, paramstypes.StoreKey, consensusparamtypes.StoreKey, upgradetypes.StoreKey, feegrant.StoreKey,
Expand Down
10 changes: 6 additions & 4 deletions app/upgrades/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,19 @@ import (
"strings"

"github.com/CosmosContracts/juno/v15/app/keepers"
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
store "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
)

// BaseAppParamManager defines an interrace that BaseApp is expected to fullfil
// that allows upgrade handlers to modify BaseApp parameters.
// type BaseAppParamManager interface {
// GetConsensusParams(ctx sdk.Context) *abci.ConsensusParams
// StoreConsensusParams(ctx sdk.Context, cp *abci.ConsensusParams)
// }
type BaseAppParamManager interface {
GetConsensusParams(ctx sdk.Context) *tmproto.ConsensusParams
StoreConsensusParams(ctx sdk.Context, cp *tmproto.ConsensusParams)
}

// Upgrade defines a struct containing necessary fields that a SoftwareUpgradeProposal
// must have written, in order for the state migration to go smoothly.
Expand Down
5 changes: 3 additions & 2 deletions app/upgrades/v10/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/cosmos/cosmos-sdk/x/authz"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types"
Expand Down Expand Up @@ -38,8 +39,8 @@ func CreateV10UpgradeHandler(
sdk.MsgTypeURL(&distrtypes.MsgSetWithdrawAddress{}),
sdk.MsgTypeURL(&distrtypes.MsgWithdrawValidatorCommission{}),
sdk.MsgTypeURL(&distrtypes.MsgFundCommunityPool{}),
// sdk.MsgTypeURL(&govtypes.MsgVote{}),
// sdk.MsgTypeURL(&govtypes.MsgVoteWeighted{}), // required by quick
sdk.MsgTypeURL(&govv1beta1.MsgVote{}),
sdk.MsgTypeURL(&govv1beta1.MsgVoteWeighted{}), // required by quick
sdk.MsgTypeURL(&authz.MsgExec{}),
sdk.MsgTypeURL(&authz.MsgGrant{}),
sdk.MsgTypeURL(&authz.MsgRevoke{}),
Expand Down
5 changes: 3 additions & 2 deletions app/upgrades/v11/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/cosmos/cosmos-sdk/x/authz"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types"
Expand Down Expand Up @@ -39,8 +40,8 @@ func CreateV11UpgradeHandler(
sdk.MsgTypeURL(&distrtypes.MsgSetWithdrawAddress{}),
sdk.MsgTypeURL(&distrtypes.MsgWithdrawValidatorCommission{}),
sdk.MsgTypeURL(&distrtypes.MsgFundCommunityPool{}),
// sdk.MsgTypeURL(&govtypes.MsgVote{}),
// sdk.MsgTypeURL(&govtypes.MsgVoteWeighted{}), // added in v10
sdk.MsgTypeURL(&govv1beta1.MsgVote{}),
sdk.MsgTypeURL(&govv1beta1.MsgVoteWeighted{}), // added in v10
sdk.MsgTypeURL(&authz.MsgExec{}),
sdk.MsgTypeURL(&authz.MsgGrant{}),
sdk.MsgTypeURL(&authz.MsgRevoke{}),
Expand Down
5 changes: 3 additions & 2 deletions cmd/junod/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ func initTendermintConfig() *tmcfg.Config {
// cfg.P2P.MaxNumInboundPeers = 100
// cfg.P2P.MaxNumOutboundPeers = 40

cfg.Consensus.TimeoutCommit = 3 * time.Second
// 2 seconds + 1 second tendermint = 3 second blocks (v15 upgrade)
cfg.Consensus.TimeoutCommit = 2 * time.Second

return cfg
}
Expand All @@ -126,7 +127,7 @@ func initAppConfig() (string, interface{}) {
// Optionally allow the chain developer to overwrite the SDK's default
// server config.
srvCfg := serverconfig.DefaultConfig()
// srvCfg.MinGasPrices = "0.0025ujuno,0.0025ujunox"
// srvCfg.MinGasPrices = "0ujuno,0ujunox" // GlobalFee handles

customAppConfig := CustomAppConfig{
Config: *srvCfg,
Expand Down

0 comments on commit 0c0c7f0

Please sign in to comment.