Skip to content

Commit

Permalink
Resolving some of the todos. (#826)
Browse files Browse the repository at this point in the history
  • Loading branch information
arhamchordia authored Aug 27, 2024
1 parent e568865 commit 6410b57
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 28 deletions.
2 changes: 1 addition & 1 deletion app/apptesting/test_suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ func (s *KeeperTestHelper) BeginNewBlockWithProposer(proposer sdk.ValAddress) {

valAddr := valConsAddr

//TODO: when we add any logic executed over some epochs use below logic
//Note : when we add any logic executed over some epochs use below logic
//epochIdentifier := s.App.EpochsKeeper.GetEpochInfo(s.Ctx,)
//epoch := s.App.EpochsKeeper.GetEpochInfo(s.Ctx, epochIdentifier)
newBlockTime := s.Ctx.BlockTime().Add(5 * time.Second)
Expand Down
3 changes: 0 additions & 3 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -489,9 +489,6 @@ func (appKeepers *AppKeepers) InitNormalKeepers(
// set token factory contract keeper
appKeepers.TfKeeper.SetContractKeeper(appKeepers.ContractKeeper)

// TODO - SDK 50
// callback := owasm.NewCallbackPlugin(appKeepers.WasmKeeper, appKeepers.QTransferKeeper.GetQTransferAcc())

tmpBankBaseKeeper := appKeepers.BankKeeper.(bankkeeper.BaseKeeper)

wasmOpts = append(tfbindings.RegisterCustomPlugins(&tmpBankBaseKeeper, &appKeepers.TfKeeper), wasmOpts...)
Expand Down
1 change: 0 additions & 1 deletion app/params/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ func SetAddressPrefixes() {
return errorsmod.Wrapf(sdkerrors.ErrUnknownAddress, "address max length is %d, got %d, %x", address.MaxAddrLen, len(bytes), bytes)
}

// TODO: Do we want to allow addresses of lengths other than 20 and 32 bytes?
if len(bytes) != 20 && len(bytes) != 32 {
return errorsmod.Wrapf(sdkerrors.ErrUnknownAddress, "address length must be 20 or 32 bytes, got %d, %x", len(bytes), bytes)
}
Expand Down
17 changes: 0 additions & 17 deletions app/upgrades/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@ type BaseAppParamManager interface {
StoreConsensusParams(ctx sdk.Context, cp tmproto.ConsensusParams) error
}

const (
ProdChainID = "quasar-1"
TestChainID = "quasar-test-1"

// upgrade name consts: vMMmmppUpgradeName (M=Major, m=minor, p=patch).
V030000UpgradeName = "v3.0.0"
)

// Upgrade defines a struct containing necessary fields that a SoftwareUpgradeProposal
// must have written, in order for the state migration to go smoothly.
// An upgrade must implement this struct, and then set it in the app.go.
Expand All @@ -42,12 +34,3 @@ type Upgrade struct {
// Store upgrades, should be used for any new modules introduced, new modules deleted, or store names renamed.
StoreUpgrades storetypes.StoreUpgrades
}

// todo before release
// func isMainnet(ctx sdk.Context) bool {
// return ctx.ChainID() == ProdChainID
//}
//
//func isTestnet(ctx sdk.Context) bool {
// return ctx.ChainID() == TestChainID
//}
9 changes: 3 additions & 6 deletions cmd/quasard/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,10 @@ func enrichAutoCliOpts(autoCliOpts autocli.AppOptions, clientCtx client.Context)
func initCometConfig() *tmcfg.Config {
cfg := tmcfg.DefaultConfig()

// TODO - SDK50 - Can get some ref for the default values from quicksilver
// https://github.com/quicksilver-zone/quicksilver/blob/update/sdk47/cmd/quicksilverd/root.go#L137

// these values put a higher strain on node memory
// cfg.P2P.MaxNumInboundPeers = 100
// cfg.P2P.MaxNumOutboundPeers = 40
cfg.P2P.MaxNumInboundPeers = 40
cfg.P2P.MaxNumOutboundPeers = 10

return cfg
}
Expand All @@ -185,7 +183,6 @@ func initRootCmd(
rootCmd.AddCommand(
genutilcli.InitCmd(basicManager, app.DefaultNodeHome),
tmcli.NewCompletionCmd(rootCmd, true),
// todo add testnet commands
confixcmd.ConfigCommand(),
pruning.Cmd(ac.newApp, app.DefaultNodeHome),
snapshot.Cmd(ac.newApp),
Expand All @@ -203,7 +200,7 @@ func initRootCmd(
genutilcli.ValidateGenesisCmd(basicManager),
AddGenesisAccountCmd(app.DefaultNodeHome),
debugCmd,
// config.Cmd(), TODO - SDK 50. Config support to be added. https://github.com/neutron-org/neutron/blob/feat/sdk-50/cmd/neutrond/config.go
// config.Cmd(), TODO Slinky : Config support to be added. https://github.com/neutron-org/neutron/blob/feat/sdk-50/cmd/neutrond/config.go
)

// add server commands
Expand Down

0 comments on commit 6410b57

Please sign in to comment.