Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor #476

Merged
merged 12 commits into from
Mar 30, 2024
30 changes: 23 additions & 7 deletions app/app.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package app

import (
"cosmossdk.io/x/circuit"
circuittypes "cosmossdk.io/x/circuit/types"
"fmt"
"io"
"os"
"path/filepath"

"cosmossdk.io/x/circuit"
circuittypes "cosmossdk.io/x/circuit/types"

nodeservice "github.com/cosmos/cosmos-sdk/client/grpc/node"
"github.com/cosmos/cosmos-sdk/std"
authante "github.com/cosmos/cosmos-sdk/x/auth/ante"
Expand All @@ -17,6 +18,7 @@ import (
"github.com/cosmos/gogoproto/proto"
wasm08 "github.com/cosmos/ibc-go/modules/light-clients/08-wasm"
wasm08keeper "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/keeper"
ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported"
tendermint "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint"

wasm08types "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types"
Expand Down Expand Up @@ -90,7 +92,6 @@ import (
ibctransferkeeper "github.com/cosmos/ibc-go/v8/modules/apps/transfer/keeper"
ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types"
ibc "github.com/cosmos/ibc-go/v8/modules/core"
ibchost "github.com/cosmos/ibc-go/v8/modules/core/exported"
ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper"
customibctransfer "github.com/notional-labs/composable/v6/custom/ibc-transfer"
customstaking "github.com/notional-labs/composable/v6/custom/staking"
Expand Down Expand Up @@ -357,6 +358,7 @@ func NewComposableApp(
app.AccountKeeper, app.StakingKeeper, app,
encodingConfig.TxConfig,
),

auth.NewAppModule(appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts, app.GetSubspace(authtypes.ModuleName)),
vesting.NewAppModule(app.AccountKeeper, app.BankKeeper),
custombankmodule.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper, app.GetSubspace(banktypes.ModuleName)),
Expand Down Expand Up @@ -395,6 +397,10 @@ func NewComposableApp(
app.basicModuleManger.RegisterLegacyAminoCodec(legacyAmino)
app.basicModuleManger.RegisterInterfaces(interfaceRegistry)

app.mm.SetOrderPreBlockers(
upgradetypes.ModuleName,
)

// During begin block slashing happens after distr.BeginBlocker so that
// there is nothing left over in the validator fee pool, so as to keep the
// CanWithdrawInvariant invariant.
Expand All @@ -408,7 +414,7 @@ func NewComposableApp(
evidencetypes.ModuleName,
stakingtypes.ModuleName,
vestingtypes.ModuleName,
ibchost.ModuleName,
ibcexported.ModuleName,
ibctransfertypes.ModuleName,
routertypes.ModuleName,
transfermiddlewaretypes.ModuleName,
Expand Down Expand Up @@ -446,14 +452,14 @@ func NewComposableApp(
distrtypes.ModuleName,
slashingtypes.ModuleName,
vestingtypes.ModuleName,
ibcexported.ModuleName,
genutiltypes.ModuleName,
evidencetypes.ModuleName,
authz.ModuleName,
feegrant.ModuleName,
group.ModuleName,
paramstypes.ModuleName,
upgradetypes.ModuleName,
ibchost.ModuleName,
routertypes.ModuleName,
transfermiddlewaretypes.ModuleName,
txBoundaryTypes.ModuleName,
Expand Down Expand Up @@ -486,7 +492,7 @@ func NewComposableApp(
govtypes.ModuleName,
minttypes.ModuleName,
crisistypes.ModuleName,
ibchost.ModuleName,
ibcexported.ModuleName,
genutiltypes.ModuleName,
evidencetypes.ModuleName,
authz.ModuleName,
Expand All @@ -513,7 +519,11 @@ func NewComposableApp(

app.mm.RegisterInvariants(app.CrisisKeeper)
app.configurator = module.NewConfigurator(app.appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter())
app.mm.RegisterServices(app.configurator)

err = app.mm.RegisterServices(app.configurator)
if err != nil {
panic(err)
}

app.setupUpgradeHandlers()

Expand Down Expand Up @@ -549,6 +559,7 @@ func NewComposableApp(

// initialize BaseApp
app.SetInitChainer(app.InitChainer)
app.SetPreBlocker(app.PreBlocker)
app.SetBeginBlocker(app.BeginBlocker)

app.SetAnteHandler(ante.NewAnteHandler(
Expand Down Expand Up @@ -629,6 +640,10 @@ func (app *ComposableApp) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error) {
return app.mm.EndBlock(ctx)
}

func (app *ComposableApp) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error) {
return app.mm.PreBlock(ctx)
}

// InitChainer application update at chain initialization
func (app *ComposableApp) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error) {
var genesisState GenesisState
Expand Down Expand Up @@ -752,6 +767,7 @@ func (app *ComposableApp) customPreUpgradeHandler(_ upgradetypes.Plan) {

func (app *ComposableApp) setupUpgradeHandlers() {
for _, upgrade := range Upgrades {

app.UpgradeKeeper.SetUpgradeHandler(
upgrade.UpgradeName,
upgrade.CreateUpgradeHandler(
Expand Down
30 changes: 16 additions & 14 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
package keepers

import (
circuitkeeper "cosmossdk.io/x/circuit/keeper"
circuittypes "cosmossdk.io/x/circuit/types"
"fmt"
ibcconnectiontypes "github.com/cosmos/ibc-go/v8/modules/core/03-connection/types"
"github.com/cosmos/cosmos-sdk/x/params"
"path/filepath"
"strings"

circuitkeeper "cosmossdk.io/x/circuit/keeper"
circuittypes "cosmossdk.io/x/circuit/types"
icacontrollertypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/types"
ibcconnectiontypes "github.com/cosmos/ibc-go/v8/modules/core/03-connection/types"

"cosmossdk.io/log"

"github.com/cosmos/cosmos-sdk/baseapp"
Expand Down Expand Up @@ -45,7 +48,6 @@ import (
"github.com/cosmos/cosmos-sdk/x/group"
groupkeeper "github.com/cosmos/cosmos-sdk/x/group/keeper"

"github.com/cosmos/cosmos-sdk/x/params"
paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper"
paramstypes "github.com/cosmos/cosmos-sdk/x/params/types"
paramproposal "github.com/cosmos/cosmos-sdk/x/params/types/proposal"
Expand All @@ -69,7 +71,6 @@ import (
icqkeeper "github.com/cosmos/ibc-apps/modules/async-icq/v8/keeper"
icqtypes "github.com/cosmos/ibc-apps/modules/async-icq/v8/types"
ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types"
ibcclient "github.com/cosmos/ibc-go/v8/modules/core/02-client"
ibcclienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types"
ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper"
customibctransferkeeper "github.com/notional-labs/composable/v6/custom/ibc-transfer/keeper"
Expand Down Expand Up @@ -149,7 +150,7 @@ type AppKeepers struct {
AuthzKeeper authzkeeper.Keeper
GroupKeeper groupkeeper.Keeper
Wasm08Keeper wasm08Keeper.Keeper // TODO: use this name ?
WasmKeeper wasm.Keeper
WasmKeeper wasmkeeper.Keeper
IBCHooksKeeper *ibchookskeeper.Keeper
Ics20WasmHooks *ibc_hooks.WasmHooks
HooksICS4Wrapper ibc_hooks.ICS4Middleware
Expand Down Expand Up @@ -283,7 +284,6 @@ func (appKeepers *AppKeepers) InitNormalKeepers(
appKeepers.ScopedIBCKeeper,
govModAddress,
)

// ICA Host keeper
appKeepers.ICAHostKeeper = icahostkeeper.NewKeeper(
appCodec, appKeepers.keys[icahosttypes.StoreKey], appKeepers.GetSubspace(icahosttypes.SubModuleName),
Expand Down Expand Up @@ -465,8 +465,7 @@ func (appKeepers *AppKeepers) InitNormalKeepers(
// by granting the governance module the right to execute the message.
// See: https://docs.cosmos.network/main/modules/gov#proposal-messages
govRouter.AddRoute(govtypes.RouterKey, govtypesv1beta1.ProposalHandler).
AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(appKeepers.ParamsKeeper)).
AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(appKeepers.IBCKeeper.ClientKeeper))
AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(appKeepers.ParamsKeeper))

govKeeper := *govkeeper.NewKeeper(
appCodec, runtime.NewKVStoreService(appKeepers.keys[govtypes.StoreKey]), appKeepers.AccountKeeper, appKeepers.BankKeeper,
Expand All @@ -485,7 +484,7 @@ func (appKeepers *AppKeepers) InitNormalKeepers(
ibcRouter := porttypes.NewRouter()
ibcRouter.AddRoute(ibctransfertypes.ModuleName, hooksTransferMiddleware)
ibcRouter.AddRoute(icqtypes.ModuleName, icqIBCModule)
ibcRouter.AddRoute(wasm.ModuleName, wasm.NewIBCHandler(appKeepers.WasmKeeper, appKeepers.IBCKeeper.ChannelKeeper, appKeepers.IBCKeeper.ChannelKeeper))
ibcRouter.AddRoute(wasmtypes.ModuleName, wasm.NewIBCHandler(appKeepers.WasmKeeper, appKeepers.IBCKeeper.ChannelKeeper, appKeepers.IBCKeeper.ChannelKeeper))
ibcRouter.AddRoute(icahosttypes.SubModuleName, icaHostStack)

// this line is used by starport scaffolding # ibc/app/router
Expand Down Expand Up @@ -527,9 +526,14 @@ func (appKeepers *AppKeepers) initParamsKeeper(appCodec codec.BinaryCodec, legac
paramsKeeper := paramskeeper.NewKeeper(appCodec, legacyAmino, key, tkey)

// register the IBC key tables for legacy param subspaces

// register the key tables for legacy param subspaces
keyTable := ibcclienttypes.ParamKeyTable()
keyTable.RegisterParamSet(&ibcconnectiontypes.Params{})
paramsKeeper.Subspace(ibcexported.ModuleName).WithKeyTable(keyTable)
paramsKeeper.Subspace(ibctransfertypes.ModuleName).WithKeyTable(ibctransfertypes.ParamKeyTable())
paramsKeeper.Subspace(icacontrollertypes.SubModuleName).WithKeyTable(icacontrollertypes.ParamKeyTable())
paramsKeeper.Subspace(icahosttypes.SubModuleName).WithKeyTable(icahosttypes.ParamKeyTable())

paramsKeeper.Subspace(authtypes.ModuleName)
paramsKeeper.Subspace(banktypes.ModuleName)
Expand All @@ -540,13 +544,11 @@ func (appKeepers *AppKeepers) initParamsKeeper(appCodec codec.BinaryCodec, legac
paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govtypesv1.ParamKeyTable()) //nolint:staticcheck
paramsKeeper.Subspace(minttypes.ModuleName).WithKeyTable(minttypes.ParamKeyTable())
paramsKeeper.Subspace(crisistypes.ModuleName)
paramsKeeper.Subspace(ibctransfertypes.ModuleName)
paramsKeeper.Subspace(ratelimitmoduletypes.ModuleName)
paramsKeeper.Subspace(icqtypes.ModuleName)
paramsKeeper.Subspace(icahosttypes.SubModuleName)
paramsKeeper.Subspace(icqtypes.ModuleName).WithKeyTable(icqtypes.ParamKeyTable())
paramsKeeper.Subspace(wasm08types.ModuleName)
paramsKeeper.Subspace(wasmtypes.ModuleName)
paramsKeeper.Subspace(transfermiddlewaretypes.ModuleName)
paramsKeeper.Subspace(transfermiddlewaretypes.ModuleName).WithKeyTable(transfermiddlewaretypes.ParamKeyTable())
paramsKeeper.Subspace(stakingmiddlewaretypes.ModuleName)
paramsKeeper.Subspace(ibctransfermiddlewaretypes.ModuleName)

Expand Down
6 changes: 2 additions & 4 deletions app/keepers/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,10 @@ import (
paramstypes "github.com/cosmos/cosmos-sdk/x/params/types"
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
routertypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward/types"
icqtypes "github.com/cosmos/ibc-apps/modules/async-icq/v8/types"
icahosttypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/types"
ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types"
ibchost "github.com/cosmos/ibc-go/v8/modules/core/exported"

routertypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward/types"

ibchookstypes "github.com/notional-labs/composable/v6/x/ibc-hooks/types"
ratelimitmoduletypes "github.com/notional-labs/composable/v6/x/ratelimit/types"
Expand All @@ -55,7 +53,7 @@ func (appKeepers *AppKeepers) GenerateKeys() {
// Cosmos-SDK modules each have a "key" that allows the application to reference what they've stored on the chain.
appKeepers.keys = storetypes.NewKVStoreKeys(
authtypes.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey,
govtypes.StoreKey, paramstypes.StoreKey, ibchost.StoreKey, upgradetypes.StoreKey, feegrant.StoreKey,
govtypes.StoreKey, paramstypes.StoreKey, upgradetypes.StoreKey, feegrant.StoreKey,
evidencetypes.StoreKey,
circuittypes.StoreKey,
ibctransfertypes.StoreKey,
Expand Down
3 changes: 3 additions & 0 deletions app/keepers/wasm.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@ func AllCapabilities() []string {
"stargate",
"cosmwasm_1_1",
"cosmwasm_1_2",
"cosmwasm_1_3",
"cosmwasm_1_4",
"cosmwasm_2_0",
}
}
3 changes: 3 additions & 0 deletions app/upgrades/v7_0_0/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import (
store "cosmossdk.io/store/types"
circuittypes "cosmossdk.io/x/circuit/types"
"github.com/notional-labs/composable/v6/app/upgrades"

icacontrollertypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/types"
)

const (
Expand All @@ -17,6 +19,7 @@ var Upgrade = upgrades.Upgrade{
StoreUpgrades: store.StoreUpgrades{
Added: []string{
circuittypes.ModuleName,
icacontrollertypes.StoreKey,
},
Deleted: []string{"alliance"},
},
Expand Down
2 changes: 0 additions & 2 deletions app/upgrades/v7_0_0/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package v7_0_0

import (
"context"
"fmt"

upgradetypes "cosmossdk.io/x/upgrade/types"
"github.com/cosmos/cosmos-sdk/types/module"
Expand All @@ -20,7 +19,6 @@ func CreateUpgradeHandler(
keepers *keepers.AppKeepers,
) upgradetypes.UpgradeHandler {
return func(ctx context.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
fmt.Println("start v7.0.0 upgrade")
return mm.RunMigrations(ctx, configurator, vm)
}
}
8 changes: 8 additions & 0 deletions custom/ibc-transfer/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,12 @@ func (am AppModule) RegisterServices(cfg module.Configurator) {
if err := cfg.RegisterMigration(types.ModuleName, 2, m.MigrateTotalEscrowForDenom); err != nil {
panic(fmt.Sprintf("failed to migrate transfer app from version 2 to 3: %v", err))
}

if err := cfg.RegisterMigration(types.ModuleName, 3, m.MigrateParams); err != nil {
panic(fmt.Errorf("failed to migrate transfer app version 3 to 4 (self-managed params migration): %v", err))
}

if err := cfg.RegisterMigration(types.ModuleName, 4, m.MigrateDenomMetadata); err != nil {
panic(fmt.Errorf("failed to migrate transfer app from version 4 to 5 (set denom metadata migration): %v", err))
}
}
4 changes: 4 additions & 0 deletions custom/staking/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,8 @@ func (am AppModule) RegisterServices(cfg module.Configurator) {
if err := cfg.RegisterMigration(stakingtypes.ModuleName, 3, m.Migrate3to4); err != nil {
panic(fmt.Sprintf("failed to migrate x/staking from version 3 to 4: %v", err))
}

if err := cfg.RegisterMigration(stakingtypes.ModuleName, 4, m.Migrate4to5); err != nil {
panic(fmt.Sprintf("failed to migrate x/staking from version 4 to 5: %v", err))
}
}
11 changes: 4 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ require (
cosmossdk.io/client/v2 v2.0.0-beta.1 // indirect
cosmossdk.io/collections v0.4.0 // indirect
cosmossdk.io/tools/confix v0.1.1 // indirect
cosmossdk.io/x/circuit v0.1.0 // indirect
cosmossdk.io/x/circuit v0.1.0
github.com/Abirdcfly/dupword v0.0.11 // indirect
github.com/Antonboom/errname v0.1.9 // indirect
github.com/Antonboom/nilnil v0.1.3 // indirect
Expand Down Expand Up @@ -356,18 +356,15 @@ require (

replace (
cosmossdk.io/core => cosmossdk.io/core v0.11.0

// Use the keyring specified by the cosmos-sdk
github.com/99designs/keyring => github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76

// lock wasmvm so we do not break the grandpa contract
// TODO: check wasm vm compatibility with grandpa contract
github.com/CosmWasm/wasmvm => github.com/CosmWasm/wasmvm v1.5.2

github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.50.5

// github.com/cosmos/ibc-go/modules/light-clients/08-wasm => github.com/notional-labs/ibc-go/modules/light-clients/08-wasm v0.0.0-20240328152744-0f9d4a916102
github.com/cosmos/ibc-go/modules/light-clients/08-wasm => /Users/hoank/resource/notional/ibc-go/modules/light-clients/08-wasm

github.com/cosmos/ibc-go/v8 => /Users/hoank/resource/notional/ibc-go
github.com/cosmos/ibc-go/modules/light-clients/08-wasm => github.com/notional-labs/ibc-go/modules/light-clients/08-wasm v0.0.0-20240330020027-fa949b150972

// use cosmos-compatible protobufs
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -836,6 +836,8 @@ github.com/cosmos/ibc-apps/modules/async-icq/v8 v8.0.0 h1:nKP2+Rzlz2iyvTosY5mvP+
github.com/cosmos/ibc-apps/modules/async-icq/v8 v8.0.0/go.mod h1:D3Q380FpWRFtmUQWLosPxachi6w24Og2t5u/Tww5wtY=
github.com/cosmos/ibc-go/modules/capability v1.0.0 h1:r/l++byFtn7jHYa09zlAdSeevo8ci1mVZNO9+V0xsLE=
github.com/cosmos/ibc-go/modules/capability v1.0.0/go.mod h1:D81ZxzjZAe0ZO5ambnvn1qedsFQ8lOwtqicG6liLBco=
github.com/cosmos/ibc-go/v8 v8.0.0 h1:QKipnr/NGwc+9L7NZipURvmSIu+nw9jOIWTJuDBqOhg=
github.com/cosmos/ibc-go/v8 v8.0.0/go.mod h1:C6IiJom0F3cIQCD5fKwVPDrDK9j/xTu563AWuOmXois=
github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM=
github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0=
github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76 h1:DdzS1m6o/pCqeZ8VOAit/gyATedRgjvkVI+UCrLpyuU=
Expand Down Expand Up @@ -1399,6 +1401,8 @@ github.com/nishanths/exhaustive v0.9.5 h1:TzssWan6orBiLYVqewCG8faud9qlFntJE30ACp
github.com/nishanths/exhaustive v0.9.5/go.mod h1:IbwrGdVMizvDcIxPYGVdQn5BqWJaOwpCvg4RGb8r/TA=
github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm/w98Vk=
github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c=
github.com/notional-labs/ibc-go/modules/light-clients/08-wasm v0.0.0-20240330020027-fa949b150972 h1:nrxV6i6FBnMUwmx3Aqun7111xfOCFEIO9oetf5EVxEM=
github.com/notional-labs/ibc-go/modules/light-clients/08-wasm v0.0.0-20240330020027-fa949b150972/go.mod h1:u2FXNcSxzzn5IwjWBA51HKMwiYMRK6/G35VmSJULhP0=
github.com/nunnatsa/ginkgolinter v0.9.0 h1:Sm0zX5QfjJzkeCjEp+t6d3Ha0jwvoDjleP9XCsrEzOA=
github.com/nunnatsa/ginkgolinter v0.9.0/go.mod h1:FHaMLURXP7qImeH6bvxWJUpyH+2tuqe5j4rW1gxJRmI=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
Expand Down
2 changes: 1 addition & 1 deletion scripts/localnode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ $SED_BINARY -i -e 's/enabled-unsafe-cors = false/enabled-unsafe-cors = true/g' $
$SED_BINARY -i 's/minimum-gas-prices = "0.25upica"/minimum-gas-prices = "0.0upica"/' $HOME_DIR/config/app.toml

## Adjust block time
$SED_BINARY -i 's/timeout_commit = "5s"/timeout_commit = "500ms"/' $HOME_DIR/config/config.toml
$SED_BINARY -i 's/timeout_commit = "5s"/timeout_commit = "1000ms"/' $HOME_DIR/config/config.toml



Expand Down
4 changes: 2 additions & 2 deletions scripts/test-upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ sleep 1
# run new node
echo -e "\n\n=> =>continue running nodes after upgrade"
if [[ "$OSTYPE" == "darwin"* ]]; then
CONTINUE="true" screen -L -dmS centaurid bash scripts/localnode.sh _build/new/centaurid $DENOM
CONTINUE="true" bash scripts/localnode.sh _build/new/centaurid $DENOM
else
CONTINUE="true" screen -L -dmS centaurid bash scripts/localnode.sh _build/new/centaurid $DENOM
CONTINUE="true" bash scripts/localnode.sh _build/new/centaurid $DENOM
fi

sleep 5
Expand Down
Loading