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

failed to read from keybase: The specified item could not be found in the keyring #6559

Closed
4 tasks
jjhesk opened this issue Jul 1, 2020 · 12 comments
Closed
4 tasks

Comments

@jjhesk
Copy link

jjhesk commented Jul 1, 2020

Summary of Bug

cli using add-genesis-account dont response normally.
error message
ERROR: failed to get address from Keybase: The specified item could not be found in the keyring

Version

Cosmos SDK 0.35-rc1

Steps to Reproduce

echo "====================================="
echo "gentx for validator"
echo "====================================="

yes $PASSWORD | ixod add-genesis-account horizon 10000000000$TOKEN_SYM,10000000dollar,100000000stake
yes $PASSWORD | ixod gentx --name horizon --amount 10000$TOKEN_SYM


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@jjhesk
Copy link
Author

jjhesk commented Jul 1, 2020

it is said that the keybase does not read from the directory. what is the proper configuration?

@jjhesk jjhesk changed the title genefailed to read from keybase: The specified item could not be found in the keyring failed to read from keybase: The specified item could not be found in the keyring Jul 1, 2020
@jjhesk
Copy link
Author

jjhesk commented Jul 1, 2020

how to config daemon with keyring-backend = "file"

@jgimeno
Copy link
Contributor

jgimeno commented Jul 1, 2020

Isnt Cosmos SDK 0.35-rc1 an old version? Is there a reason to use it? Keybase has changed lately.

@jjhesk
Copy link
Author

jjhesk commented Jul 1, 2020

@jgimeno which version do we use for the update

@jjhesk
Copy link
Author

jjhesk commented Jul 1, 2020

got another error from using this sdk implementation.

panic: parameter depositparams not registered

goroutine 1 [running]:
github.com/cosmos/cosmos-sdk/x/params/subspace.Subspace.checkType(0xc0001fe3f0, 0x5429860, 0xc000521b00, 0x54298a0, 0xc000521bc0, 0xc000f483c8, 0x3, 0x8, 0xc0002360f0, 0x5dd2548, ...)
/Users/hesk/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.38.5-rc1/x/params/subspace/subspace.go:148 +0x21a
github.com/cosmos/cosmos-sdk/x/params/subspace.Subspace.Set(0xc0001fe3f0, 0x5429860, 0xc000521b00, 0x54298a0, 0xc000521bc0, 0xc000f483c8, 0x3, 0x8, 0xc0002360f0, 0x543ba60, ...)
/Users/hesk/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.38.5-rc1/x/params/subspace/subspace.go:167 +0xb8
github.com/cosmos/cosmos-sdk/x/gov/keeper.Keeper.SetDepositParams(...)
/Users/hesk/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.38.5-rc1/x/gov/keeper/params.go:31
github.com/cosmos/cosmos-sdk/x/gov.InitGenesis(0x543ba60, 0xc0001b2008, 0x5452d20, 0xc00003c240, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/Users/hesk/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.38.5-rc1/x/gov/genesis.go:14 +0x1ce
github.com/cosmos/cosmos-sdk/x/gov.AppModule.InitGenesis(0x0, 0x0, 0x0, 0x542bd20, 0xc000ff3270, 0x5447280, 0xc000013600, 0x54313a0, 0xc0001c3290, 0x5429860, ...)
/Users/hesk/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.38.5-rc1/x/gov/module.go:153 +0x166
github.com/cosmos/cosmos-sdk/types/module.(*Manager).InitGenesis(0xc0001ff960, 0x543ba60, 0xc0001b2008, 0x5452d20, 0xc00003c240, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/Users/hesk/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.38.5-rc1/types/module/module.go:265 +0x278
github.com/tokenchain/ixo-blockchain/app.(*DpApp).InitChainer(0xc000128d00, 0x543ba60, 0xc0001b2008, 0x5452d20, 0xc00003c240, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/Users/hesk/Documents/ixo/ixo-blockchain/app/app.go:349 +0x11d
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).InitChain(0xc0002e2500, 0x16d37d98, 0xed68e79d3, 0x0, 0xc000322ef0, 0xb, 0xc00003c100, 0x5e86e68, 0x0, 0x0, ...)
/Users/hesk/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.38.5-rc1/baseapp/abci.go:39 +0x2cd
github.com/tendermint/tendermint/abci/client.(*localClient).InitChainSync(0xc00118ad80, 0x16d37d98, 0xed68e79d3, 0x0, 0xc000322ef0, 0xb, 0xc00003c100, 0x5e86e68, 0x0, 0x0, ...)
/Users/hesk/go/pkg/mod/github.com/tendermint/tendermint@v0.33.5/abci/client/local_client.go:223 +0xf8
github.com/tendermint/tendermint/proxy.(*appConnConsensus).InitChainSync(0xc0005210f0, 0x16d37d98, 0xed68e79d3, 0x0, 0xc000322ef0, 0xb, 0xc00003c100, 0x5e86e68, 0x0, 0x0, ...)
/Users/hesk/go/pkg/mod/github.com/tendermint/tendermint@v0.33.5/proxy/app_conn.go:65 +0x6b
github.com/tendermint/tendermint/consensus.(*Handshaker).ReplayBlocks(0xc00054b0a0, 0xa, 0x0, 0xc000323a00, 0x6, 0xc000323a40, 0xb, 0x0, 0x0, 0x0, ...)
/Users/hesk/go/pkg/mod/github.com/tendermint/tendermint@v0.33.5/consensus/replay.go:319 +0x69b
github.com/tendermint/tendermint/consensus.(*Handshaker).Handshake(0xc00054b0a0, 0x54564a0, 0xc000210d00, 0x80, 0x4e701e0)
/Users/hesk/go/pkg/mod/github.com/tendermint/tendermint@v0.33.5/consensus/replay.go:269 +0x485
github.com/tendermint/tendermint/node.doHandshake(0x5455820, 0xc00065e278, 0xa, 0x0, 0xc000323a00, 0x6, 0xc000323a40, 0xb, 0x0, 0x0, ...)
/Users/hesk/go/pkg/mod/github.com/tendermint/tendermint@v0.33.5/node/node.go:264 +0x19a
github.com/tendermint/tendermint/node.NewNode(0xc001070280, 0x5434ce0, 0xc00010e000, 0xc000fc21a0, 0x5417720, 0xc000fffb40, 0xc000fc2430, 0x51c5e08, 0xc000fc2450, 0x543c4a0, ...)
/Users/hesk/go/pkg/mod/github.com/tendermint/tendermint@v0.33.5/node/node.go:587 +0x343
github.com/cosmos/cosmos-sdk/server.startInProcess(0xc000ffe780, 0x51c7588, 0x1d, 0x0, 0x0)
/Users/hesk/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.38.5-rc1/server/start.go:177 +0x4b0
github.com/cosmos/cosmos-sdk/server.StartCmd.func2(0xc0010198c0, 0xc000ffec20, 0x0, 0x2, 0x0, 0x0)
/Users/hesk/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.38.5-rc1/server/start.go:81 +0xb4
github.com/spf13/cobra.(*Command).execute(0xc0010198c0, 0xc000ffec00, 0x2, 0x2, 0xc0010198c0, 0xc000ffec00)
/Users/hesk/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:842 +0x453
github.com/spf13/cobra.(*Command).ExecuteC(0xc000251600, 0x2, 0xc000ffeb00, 0x505ca73)
/Users/hesk/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:950 +0x349
github.com/spf13/cobra.(*Command).Execute(...)
/Users/hesk/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:887
github.com/tendermint/tendermint/libs/cli.Executor.Execute(0xc000251600, 0x51c79d8, 0x3, 0xc000fd5140)
/Users/hesk/go/pkg/mod/github.com/tendermint/tendermint@v0.33.5/libs/cli/setup.go:89 +0x3c
main.main()
/Users/hesk/Documents/ixo/ixo-blockchain/cmd/ixod/main.go:70 +0x68c

@jgimeno
Copy link
Contributor

jgimeno commented Jul 1, 2020

From the last stacktrace I see you are using v0.38.5-rc1 which is correct. Is the last version for 0.38 right now.

@jgimeno
Copy link
Contributor

jgimeno commented Jul 1, 2020

Shall I see how you are executing your application? Looks like you did not initialize the subspace for the Gov module.

@jjhesk
Copy link
Author

jjhesk commented Jul 1, 2020



var (
	DefaultCLIHome  = os.ExpandEnv("$HOME/.dxocli")
	DefaultNodeHome = os.ExpandEnv("$HOME/.dxod")

	ModuleBasics = module.NewBasicManager(
		genutil.AppModuleBasic{},
		auth.AppModuleBasic{},
		bank.AppModuleBasic{},
		staking.AppModuleBasic{},
		mint.AppModuleBasic{},
		distribution.AppModuleBasic{},
		gov.NewAppModuleBasic(paramsClient.ProposalHandler, distribution.ProposalHandler, upgradeclient.ProposalHandler),
		params.AppModuleBasic{},
		crisis.AppModuleBasic{},
		slashing.AppModuleBasic{},
		supply.AppModuleBasic{},
		upgrade.AppModuleBasic{},
		evidence.AppModuleBasic{},
		did.AppModuleBasic{},
		payments.AppModuleBasic{},
		project.AppModuleBasic{},
		bonddoc.AppModuleBasic{},
		bonds.AppModuleBasic{},
		treasury.AppModuleBasic{},
		oracles.AppModuleBasic{},
		nameservice.AppModule{},
	)

	maccPerms = map[string][]string{
		auth.FeeCollectorName:     nil,
		distribution.ModuleName:   nil,
		mint.ModuleName:           {supply.Minter},
		staking.BondedPoolName:    {supply.Burner, supply.Staking},
		staking.NotBondedPoolName: {supply.Burner, supply.Staking},
		gov.ModuleName:            {supply.Burner},
		//=================================
		bonds.BondsMintBurnAccount:       {supply.Minter, supply.Burner},
		bonds.BatchesIntermediaryAccount: nil,
		treasury.ModuleName:              {supply.Minter, supply.Burner},
		nameservice.ModuleName:           {supply.Minter, supply.Burner},
		payments.PayRemainderPool:        nil,
		payments.ModuleName:              nil,
	}

	// Reserved payments module ID prefixes
	paymentsReservedIdPrefixes = []string{}
)

func MakeCodec() *codec.Codec {
	var cdc = codec.New()
	ModuleBasics.RegisterCodec(cdc)
	vesting.RegisterCodec(cdc)
	sdk.RegisterCodec(cdc)
	codec.RegisterCrypto(cdc)
	return cdc.Seal()
}

type DpApp struct {
	*bam.BaseApp
	cdc                *codec.Codec
	invCheckPeriod     uint
	keys               map[string]*sdk.KVStoreKey
	tKeys              map[string]*sdk.TransientStoreKey
	subspaces          map[string]params.Subspace // subspaces
	accountKeeper      auth.AccountKeeper
	bankKeeper         bank.Keeper
	stakingKeeper      staking.Keeper
	slashingKeeper     slashing.Keeper
	distributionKeeper distribution.Keeper
	supplyKeeper       supply.Keeper
	paramsKeeper       params.Keeper
	govKeeper          gov.Keeper
	upgradeKeeper      upgrade.Keeper
	evidenceKeeper     evidence.Keeper
	mintKeeper         mint.Keeper
	crisisKeeper       crisis.Keeper
	didKeeper          did.Keeper
	paymentsKeeper     payments.Keeper
	projectKeeper      project.Keeper
	bonddocKeeper      bonddoc.Keeper
	bondsKeeper        bonds.Keeper
	oraclesKeeper      oracles.Keeper
	treasuryKeeper     treasury.Keeper
	nsKeeper           nameservice.Keeper

	mm *module.Manager
	sm *module.SimulationManager // simulation manager
}

// verify app interface at compile time
//var _ simapp.App = (*DpApp)(nil)

func NewIxoApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool,
	invCheckPeriod uint, skipUpgradeHeights map[int64]bool, baseAppOptions ...func(*bam.BaseApp)) *DpApp {

	cdc := MakeCodec()
	// BaseApp handles interactions with Tendermint through the ABCI protocol
	bApp := bam.NewBaseApp(appName, logger, db, types.DefaultTxDecoder(cdc), baseAppOptions...)
	bApp.SetCommitMultiStoreTracer(traceStore)
	//bApp.SetAppVersion(version.NewVersion("v0.1.1"))

	keys := sdk.NewKVStoreKeys(bam.MainStoreKey, auth.StoreKey, staking.StoreKey,
		supply.StoreKey, distribution.StoreKey, slashing.StoreKey,
		params.StoreKey, gov.StoreKey, evidence.StoreKey, upgrade.StoreKey,

		did.StoreKey, mint.StoreKey, project.StoreKey, bonds.StoreKey, bonddoc.StoreKey, treasury.StoreKey,
		oracles.StoreKey)

	tKeys := sdk.NewTransientStoreKeys(staking.TStoreKey, params.TStoreKey)

	app := &DpApp{
		BaseApp:        bApp,
		cdc:            cdc,
		invCheckPeriod: invCheckPeriod,
		keys:           keys,
		tKeys:          tKeys,
		subspaces:      make(map[string]params.Subspace),
	}

	app.paramsKeeper = params.NewKeeper(app.cdc, keys[params.StoreKey], tKeys[params.TStoreKey])
	app.subspaces[auth.ModuleName] = app.paramsKeeper.Subspace(auth.DefaultParamspace)
	app.subspaces[bank.ModuleName] = app.paramsKeeper.Subspace(bank.DefaultParamspace)
	app.subspaces[staking.ModuleName] = app.paramsKeeper.Subspace(staking.DefaultParamspace)
	app.subspaces[distribution.ModuleName] = app.paramsKeeper.Subspace(distribution.DefaultParamspace)
	app.subspaces[mint.ModuleName] = app.paramsKeeper.Subspace(mint.DefaultParamspace)
	app.subspaces[slashing.ModuleName] = app.paramsKeeper.Subspace(slashing.DefaultParamspace)
	app.subspaces[gov.ModuleName] = app.paramsKeeper.Subspace(gov.DefaultParamspace)
	app.subspaces[evidence.ModuleName] = app.paramsKeeper.Subspace(evidence.DefaultParamspace)

	app.subspaces[crisis.ModuleName] = app.paramsKeeper.Subspace(crisis.DefaultParamspace)
	app.subspaces[payments.ModuleName] = app.paramsKeeper.Subspace(payments.DefaultParamspace)
	app.subspaces[project.ModuleName] = app.paramsKeeper.Subspace(project.DefaultParamspace)

	app.accountKeeper = auth.NewAccountKeeper(app.cdc, keys[auth.StoreKey], app.subspaces[auth.ModuleName], auth.ProtoBaseAccount)
	// The BankKeeper allows you perform sdk.Coins interactions
	//app.bankKeeper = bank.NewBaseKeeper(app.accountKeeper, app.subspaces[bank.ModuleName], app.ModuleAccountAddrs(), )
	//app.bankKeeper = bank.NewBaseKeeper(app.accountKeeper, app.subspaces[bank.ModuleName], app.ModuleAccountAddrs())
	app.bankKeeper = bank.NewBaseKeeper(app.accountKeeper, app.subspaces[bank.ModuleName], app.ModuleAccountAddrs())
	app.supplyKeeper = supply.NewKeeper(app.cdc, keys[supply.StoreKey], app.accountKeeper, app.bankKeeper, maccPerms)
	//stakingKeeper := staking.NewKeeper(app.cdc, keys[staking.StoreKey], app.supplyKeeper, app.subspaces[staking.ModuleName])
	stakingKeeper := staking.NewKeeper(app.cdc, keys[staking.StoreKey], app.supplyKeeper, app.subspaces[staking.ModuleName])
	app.mintKeeper = mint.NewKeeper(app.cdc, keys[mint.StoreKey], app.subspaces[mint.ModuleName], &stakingKeeper, app.supplyKeeper, auth.FeeCollectorName)
	//app.distributionKeeper = distribution.NewKeeper(app.cdc, keys[distribution.StoreKey], app.subspaces[distribution.ModuleName], &stakingKeeper, app.supplyKeeper, auth.FeeCollectorName, app.ModuleAccountAddrs())
	app.distributionKeeper = distribution.NewKeeper(app.cdc, keys[distribution.StoreKey], app.subspaces[distribution.ModuleName], &stakingKeeper, app.supplyKeeper, auth.FeeCollectorName, app.ModuleAccountAddrs())
	//app.slashingKeeper = slashing.NewKeeper(app.cdc, keys[slashing.StoreKey], &stakingKeeper, app.subspaces[slashing.ModuleName])
	app.slashingKeeper = slashing.NewKeeper(app.cdc, keys[slashing.StoreKey], &stakingKeeper, app.subspaces[slashing.ModuleName])
	app.crisisKeeper = crisis.NewKeeper(app.subspaces[crisis.ModuleName], invCheckPeriod, app.supplyKeeper, auth.FeeCollectorName)
	app.upgradeKeeper = upgrade.NewKeeper(skipUpgradeHeights, keys[upgrade.StoreKey], app.cdc)

	// create evidence keeper with evidence router
	evidenceKeeper := evidence.NewKeeper(
		app.cdc, keys[evidence.StoreKey], app.subspaces[evidence.ModuleName], &stakingKeeper, app.slashingKeeper,
	)
	evidenceRouter := evidence.NewRouter()

	// TODO: register evidence routes
	evidenceKeeper.SetRouter(evidenceRouter)
	app.evidenceKeeper = *evidenceKeeper

	govRouter := gov.NewRouter()
	govRouter.
		AddRoute(gov.RouterKey, gov.ProposalHandler).
		AddRoute(params.RouterKey, params.NewParamChangeProposalHandler(app.paramsKeeper)).
		AddRoute(distribution.RouterKey, distribution.NewCommunityPoolSpendProposalHandler(app.distributionKeeper)).
		AddRoute(upgrade.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.upgradeKeeper))

	//	app.govKeeper = gov.NewKeeper(app.cdc, keys[gov.StoreKey], app.subspaces[gov.ModuleName], app.supplyKeeper, &stakingKeeper, govRouter)
	app.govKeeper = gov.NewKeeper(
		app.cdc,
		keys[gov.StoreKey], app.subspaces[gov.ModuleName],
		app.supplyKeeper, &stakingKeeper, govRouter,
	)

	app.stakingKeeper = *stakingKeeper.SetHooks(
		staking.NewMultiStakingHooks(
			app.distributionKeeper.Hooks(),
			app.slashingKeeper.Hooks(),
		),
	)

	app.didKeeper = did.NewKeeper(app.cdc, keys[did.StoreKey])
	app.paymentsKeeper = payments.NewKeeper(app.cdc, keys[payments.StoreKey], app.subspaces[payments.ModuleName], app.bankKeeper, paymentsReservedIdPrefixes)
	app.projectKeeper = project.NewKeeper(app.cdc, keys[project.StoreKey], app.subspaces[project.ModuleName], app.accountKeeper, app.paymentsKeeper)
	app.bonddocKeeper = bonddoc.NewKeeper(app.cdc, keys[bonddoc.StoreKey])
	app.bondsKeeper = bonds.NewKeeper(app.bankKeeper, app.supplyKeeper, app.accountKeeper, app.stakingKeeper, keys[bonds.StoreKey], app.cdc)
	app.oraclesKeeper = oracles.NewKeeper(app.cdc, keys[oracles.StoreKey])
	app.treasuryKeeper = treasury.NewKeeper(app.cdc, keys[treasury.StoreKey], app.bankKeeper, app.oraclesKeeper, app.supplyKeeper)
	app.nsKeeper = nameservice.NewKeeper(app.cdc, keys[nameservice.StoreKey], app.bankKeeper)

	app.mm = module.NewManager(
		genutil.NewAppModule(app.accountKeeper, app.stakingKeeper, app.BaseApp.DeliverTx),
		auth.NewAppModule(app.accountKeeper),
		bank.NewAppModule(app.bankKeeper, app.accountKeeper),
		crisis.NewAppModule(&app.crisisKeeper),
		supply.NewAppModule(app.supplyKeeper, app.accountKeeper),
		distribution.NewAppModule(app.distributionKeeper, app.accountKeeper, app.supplyKeeper, app.stakingKeeper),
		gov.NewAppModule(app.govKeeper, app.accountKeeper, app.supplyKeeper),
		mint.NewAppModule(app.mintKeeper),
		slashing.NewAppModule(app.slashingKeeper, app.accountKeeper, app.stakingKeeper),
		staking.NewAppModule(app.stakingKeeper, app.accountKeeper, app.supplyKeeper),
		upgrade.NewAppModule(app.upgradeKeeper),
		evidence.NewAppModule(app.evidenceKeeper),


		did.NewAppModule(app.didKeeper),
		payments.NewAppModule(app.paymentsKeeper, app.bankKeeper),
		project.NewAppModule(app.projectKeeper, app.paymentsKeeper, app.bankKeeper),
		bonddoc.NewAppModule(app.bonddocKeeper),
		bonds.NewAppModule(app.bondsKeeper, app.accountKeeper),
		treasury.NewAppModule(app.treasuryKeeper),
		oracles.NewAppModule(app.oraclesKeeper),
	)

	app.mm.SetOrderBeginBlockers(
		upgrade.ModuleName,
		mint.ModuleName,
		distribution.ModuleName,
		slashing.ModuleName,
		bonds.ModuleName)

	app.mm.SetOrderEndBlockers(
		crisis.ModuleName,
		gov.ModuleName,
		staking.ModuleName,
		bonds.ModuleName)

	app.mm.SetOrderInitGenesis(
		distribution.ModuleName,
		staking.ModuleName,
		auth.ModuleName,
		bank.ModuleName,
		slashing.ModuleName,
		gov.ModuleName,
		mint.ModuleName,
		supply.ModuleName,
		crisis.ModuleName,
		genutil.ModuleName,
		evidence.ModuleName,
		// TODO: Add your module(s)
		did.ModuleName,
		project.ModuleName,
		payments.ModuleName,
		bonddoc.ModuleName,
		bonds.ModuleName,
		treasury.ModuleName,
		oracles.ModuleName,
		nameservice.ModuleName)
	app.mm.RegisterRoutes(app.Router(), app.QueryRouter())
	//app.mm.RegisterInvariants(&app.crisisKeeper)

	app.SetInitChainer(app.InitChainer)
	app.SetBeginBlocker(app.BeginBlocker)
	app.SetEndBlocker(app.EndBlocker)
	app.SetAnteHandler(initAnteHandler(app))

	app.sm = module.NewSimulationManager(
		auth.NewAppModule(app.accountKeeper),
		bank.NewAppModule(app.bankKeeper, app.accountKeeper),
		supply.NewAppModule(app.supplyKeeper, app.accountKeeper),
		gov.NewAppModule(app.govKeeper, app.accountKeeper, app.supplyKeeper),
		mint.NewAppModule(app.mintKeeper),
		distribution.NewAppModule(app.distributionKeeper, app.accountKeeper, app.supplyKeeper, app.stakingKeeper),
		staking.NewAppModule(app.stakingKeeper, app.accountKeeper, app.supplyKeeper),
		slashing.NewAppModule(app.slashingKeeper, app.accountKeeper, app.stakingKeeper),
		// TODO: Add your module(s)
	)

	app.sm.RegisterStoreDecoders()

	app.MountKVStores(keys)
	app.MountTransientStores(tKeys)

	if loadLatest {
		err := app.LoadLatestVersion(app.keys[bam.MainStoreKey])
		if err != nil {
			tmos.Exit(err.Error())
		}
	}

	return app
}

// GenesisState represents chain state at the start of the chain. Any initial state (account balances) are stored here.
type GenesisState map[string]json.RawMessage

func NewDefaultGenesisState() GenesisState {
	return ModuleBasics.DefaultGenesis()
}

func (app *DpApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain {
	//var genesisState map[string]json.RawMessage
	var genesisState simapp.GenesisState
	app.cdc.MustUnmarshalJSON(req.AppStateBytes, &genesisState)
	return app.mm.InitGenesis(ctx, genesisState)
}

func (app *DpApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock {
	return app.mm.BeginBlock(ctx, req)
}

func (app *DpApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock {
	return app.mm.EndBlock(ctx, req)
}

func (app *DpApp) LoadHeight(height int64) error {
	return app.LoadVersion(height, app.keys[bam.MainStoreKey])
}

func (app *DpApp) ModuleAccountAddrs() map[string]bool {
	modAccAddrs := make(map[string]bool)
	for acc := range maccPerms {
		modAccAddrs[supply.NewModuleAddress(acc).String()] = true
	}

	return modAccAddrs
}

// Codec returns the application's sealed codec.
func (app *DpApp) Codec() *codec.Codec {
	return app.cdc
}

// SimulationManager implements the SimulationApp interface
func (app *DpApp) SimulationManager() *module.SimulationManager {
	return app.sm
}

// GetMaccPerms returns a mapping of the application's module account permissions.
func GetMaccPerms() map[string][]string {
	modAccPerms := make(map[string][]string)
	for k, v := range maccPerms {
		modAccPerms[k] = v
	}
	return modAccPerms
}

func (app *DpApp) ExportAppStateAndValidators(forZeroHeight bool, jailWhiteList []string) (appState json.RawMessage, validators []tmtypes.GenesisValidator, err error) {
	ctx := app.NewContext(true, abci.Header{Height: app.LastBlockHeight()})
	if forZeroHeight {
		app.prepForZeroHeightGenesis(ctx, jailWhiteList)
	}
	genState := app.mm.ExportGenesis(ctx)
	appState, err = codec.MarshalJSONIndent(app.cdc, genState)
	if err != nil {
		return nil, nil, err
	}

	validators = staking.WriteValidators(ctx, app.stakingKeeper)

	return appState, validators, nil
}

// prepare for fresh start at zero height
// NOTE zero height genesis is a temporary feature which will be deprecated
//      in favour of export at a block height
func (app *DpApp) prepForZeroHeightGenesis(ctx sdk.Context, jailWhiteList []string) {
	applyWhiteList := false

	//Check if there is a whitelist
	if len(jailWhiteList) > 0 {
		applyWhiteList = true
	}

	whiteListMap := make(map[string]bool)

	for _, addr := range jailWhiteList {
		_, err := sdk.ValAddressFromBech32(addr)
		if err != nil {
			panic(err.Error())
		}
		whiteListMap[addr] = true
	}

	/* Handle fee distribution state. */

	// withdraw all validator commission
	app.stakingKeeper.IterateValidators(ctx, func(_ int64, val staking.ValidatorI) (stop bool) {
		_, err := app.distributionKeeper.WithdrawValidatorCommission(ctx, val.GetOperator())
		if err != nil {
			panic(err.Error())
		}
		return false
	})

	// withdraw all delegator rewards
	dels := app.stakingKeeper.GetAllDelegations(ctx)
	for _, delegation := range dels {
		_, err := app.distributionKeeper.WithdrawDelegationRewards(ctx, delegation.DelegatorAddress, delegation.ValidatorAddress)
		if err != nil {
			panic(err.Error())
		}
	}

	// clear validator slash events
	app.distributionKeeper.DeleteAllValidatorSlashEvents(ctx)

	// clear validator historical rewards
	app.distributionKeeper.DeleteAllValidatorHistoricalRewards(ctx)

	// set context height to zero
	height := ctx.BlockHeight()
	ctx = ctx.WithBlockHeight(0)

	// reinitialize all validators
	app.stakingKeeper.IterateValidators(ctx, func(_ int64, val staking.ValidatorI) (stop bool) {

		// donate any unwithdrawn outstanding reward fraction tokens to the community pool
		scraps := app.distributionKeeper.GetValidatorOutstandingRewards(ctx, val.GetOperator())
		feePool := app.distributionKeeper.GetFeePool(ctx)
		feePool.CommunityPool = feePool.CommunityPool.Add(scraps...)
		app.distributionKeeper.SetFeePool(ctx, feePool)

		app.distributionKeeper.Hooks().AfterValidatorCreated(ctx, val.GetOperator())
		return false
	})

	// reinitialize all delegations
	for _, del := range dels {
		app.distributionKeeper.Hooks().BeforeDelegationCreated(ctx, del.DelegatorAddress, del.ValidatorAddress)
		app.distributionKeeper.Hooks().AfterDelegationModified(ctx, del.DelegatorAddress, del.ValidatorAddress)
	}

	// reset context height
	ctx = ctx.WithBlockHeight(height)

	/* Handle staking state. */

	// iterate through redelegations, reset creation height
	app.stakingKeeper.IterateRedelegations(ctx, func(_ int64, red staking.Redelegation) (stop bool) {
		for i := range red.Entries {
			red.Entries[i].CreationHeight = 0
		}
		app.stakingKeeper.SetRedelegation(ctx, red)
		return false
	})

	// iterate through unbonding delegations, reset creation height
	app.stakingKeeper.IterateUnbondingDelegations(ctx, func(_ int64, ubd staking.UnbondingDelegation) (stop bool) {
		for i := range ubd.Entries {
			ubd.Entries[i].CreationHeight = 0
		}
		app.stakingKeeper.SetUnbondingDelegation(ctx, ubd)
		return false
	})

	// Iterate through validators by power descending, reset bond heights, and
	// update bond intra-tx counters.
	store := ctx.KVStore(app.keys[staking.StoreKey])
	iter := sdk.KVStoreReversePrefixIterator(store, staking.ValidatorsKey)
	counter := int16(0)

	for ; iter.Valid(); iter.Next() {
		addr := sdk.ValAddress(iter.Key()[1:])
		validator, found := app.stakingKeeper.GetValidator(ctx, addr)
		if !found {
			panic("expected validator, not found")
		}

		validator.UnbondingHeight = 0
		if applyWhiteList && !whiteListMap[addr.String()] {
			validator.Jailed = true
		}

		app.stakingKeeper.SetValidator(ctx, validator)
		counter++
	}

	iter.Close()

	_ = app.stakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx)

	/* Handle slashing state. */

	// reset start height on signing infos
	app.slashingKeeper.IterateValidatorSigningInfos(
		ctx,
		func(addr sdk.ConsAddress, info slashing.ValidatorSigningInfo) (stop bool) {
			info.StartHeight = 0
			app.slashingKeeper.SetValidatorSigningInfo(ctx, addr, info)
			return false
		},
	)
}

func initAnteHandler(app *DpApp) sdk.AnteHandler {
	didPubKeyGetter := did.GetPubKeyGetter(app.didKeeper)
	projectPubKeyGetter := project.GetPubKeyGetter(app.projectKeeper, app.didKeeper)
	bonddocPubKeyGetter := bonddoc.GetPubKeyGetter(app.bonddocKeeper)
	bondsPubKeyGetter := bonds.GetPubKeyGetter(app.bondsKeeper, app.didKeeper)
	treasuryPubKeyGetter := treasury.GetPubKeyGetter(app.didKeeper)
	paymentsPubKeyGetter := payments.GetPubKeyGetter(app.didKeeper)
	cosmosAnteHandler := auth.NewAnteHandler(app.accountKeeper, app.supplyKeeper, auth.DefaultSigVerificationGasConsumer)
	didAnteHandler := dap.NewAnteHandler(app.accountKeeper, app.supplyKeeper, didPubKeyGetter)
	projectAnteHandler := dap.NewAnteHandler(app.accountKeeper, app.supplyKeeper, projectPubKeyGetter)
	bonddocAnteHandler := dap.NewAnteHandler(app.accountKeeper, app.supplyKeeper, bonddocPubKeyGetter)
	bondsAnteHandler := dap.NewAnteHandler(app.accountKeeper, app.supplyKeeper, bondsPubKeyGetter)
	treasuryAnteHandler := dap.NewAnteHandler(app.accountKeeper, app.supplyKeeper, treasuryPubKeyGetter)
	//feesAnteHandler := dap.NewAnteHandler(app.accountKeeper, app.supplyKeeper, paymentsPubKeyGetter)
	paymentsAnteHandler := dap.NewAnteHandler(app.accountKeeper, app.supplyKeeper, paymentsPubKeyGetter)

	return func(ctx sdk.Context, tx sdk.Tx, simulate bool) (_ sdk.Context, _ error) {
		msg := tx.GetMsgs()[0]
		switch msg.Route() {
		case did.RouterKey:
			return didAnteHandler(ctx, tx, simulate)
		case project.RouterKey:
			return projectAnteHandler(ctx, tx, simulate)
		case bonddoc.RouterKey:
			return bonddocAnteHandler(ctx, tx, simulate)
		case bonds.RouterKey:
			return bondsAnteHandler(ctx, tx, simulate)
		case treasury.RouterKey:
			return treasuryAnteHandler(ctx, tx, simulate)
		case payments.RouterKey:
			return paymentsAnteHandler(ctx, tx, simulate)
		default:
			return cosmosAnteHandler(ctx, tx, simulate)
		}
	}
}


@jjhesk
Copy link
Author

jjhesk commented Jul 1, 2020

right here..

app.subspaces[gov.ModuleName] = app.paramsKeeper.Subspace(gov.DefaultParamspace)

govRouter := gov.NewRouter()
	govRouter.
		AddRoute(gov.RouterKey, gov.ProposalHandler).
		AddRoute(params.RouterKey, params.NewParamChangeProposalHandler(app.paramsKeeper)).
		AddRoute(distribution.RouterKey, distribution.NewCommunityPoolSpendProposalHandler(app.distributionKeeper)).
		AddRoute(upgrade.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.upgradeKeeper))


	app.govKeeper = gov.NewKeeper(
		app.cdc,
		keys[gov.StoreKey], app.subspaces[gov.ModuleName],
		app.supplyKeeper, &stakingKeeper, govRouter,
	)

	app.mm.SetOrderBeginBlockers(
		upgrade.ModuleName,
		mint.ModuleName,
		distribution.ModuleName,
		slashing.ModuleName,
		bonds.ModuleName)

	app.mm.SetOrderEndBlockers(
		crisis.ModuleName,
		gov.ModuleName,
		staking.ModuleName,
		bonds.ModuleName)

	app.mm.SetOrderInitGenesis(
		distribution.ModuleName,
		staking.ModuleName,
		auth.ModuleName,
		bank.ModuleName,
		slashing.ModuleName,
		gov.ModuleName,
		mint.ModuleName,
		supply.ModuleName,
		crisis.ModuleName,
		genutil.ModuleName,
		evidence.ModuleName,
		// TODO: Add your module(s)
		did.ModuleName,
		project.ModuleName,
		payments.ModuleName,
		bonddoc.ModuleName,
		bonds.ModuleName,
		treasury.ModuleName,
		oracles.ModuleName,
		nameservice.ModuleName)

@jgimeno

@jgimeno
Copy link
Contributor

jgimeno commented Jul 1, 2020

app.subspaces[gov.ModuleName] = app.paramsKeeper.Subspace(gov.DefaultParamspace).WithKeyTable(govtypes.ParamKeyTable())

Should be done this way

@jgimeno
Copy link
Contributor

jgimeno commented Jul 1, 2020

you can take a look when you are executing your application and it fails on things like this, to follow how the NewSimApp function in the SDK builds an application.

@jjhesk
Copy link
Author

jjhesk commented Jul 2, 2020

@jgimeno Thanks you for helping. Since upgraded to the new version there are still many holes..
I have looked thru error but I have no clue where to start for looking thru this.

panic: invalid coin denomination: failed to execute message; message index: 0

goroutine 1 [running]:
github.com/cosmos/cosmos-sdk/x/genutil.DeliverGenTxs(0x543fca0, 0xc000132008, 0x5457060, 0xc000726ac0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/Users/hesk/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.38.5-rc1/x/genutil/gentx.go:102 +0x30d
github.com/cosmos/cosmos-sdk/x/genutil.InitGenesis(...)
/Users/hesk/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.38.5-rc1/x/genutil/genesis.go:19
github.com/cosmos/cosmos-sdk/x/genutil.AppModule.InitGenesis(0x543a7e0, 0xc000257260, 0x541d1a0, 0xc0001413b0, 0xc0002a7bd0, 0x543fca0, 0xc000132008, 0x5457060, 0xc000726ac0, 0x0, ...)
/Users/hesk/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.38.5-rc1/x/genutil/module.go:88 +0x16a
github.com/cosmos/cosmos-sdk/types/module.(*Manager).InitGenesis(0xc0002575e0, 0x543fca0, 0xc000132008, 0x5457060, 0xc000726ac0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/Users/hesk/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.38.5-rc1/types/module/module.go:265 +0x278
github.com/tokenchain/ixo-blockchain/app.(*DpApp).InitChainer(0xc000236d00, 0x543fca0, 0xc000132008, 0x5457060, 0xc000726ac0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/Users/hesk/Documents/ixo/dp-hub/app/app.go:387 +0x11d
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).InitChain(0xc000f5bcc0, 0x3699d820, 0xed68f600f, 0x0, 0xc000045960, 0xb, 0xc000726840, 0x5e8ce68, 0x0, 0x0, ...)
/Users/hesk/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.38.5-rc1/baseapp/abci.go:39 +0x2cd
github.com/tendermint/tendermint/abci/client.(*localClient).InitChainSync(0xc0010fe960, 0x3699d820, 0xed68f600f, 0x0, 0xc000045960, 0xb, 0xc000726840, 0x5e8ce68, 0x0, 0x0, ...)
/Users/hesk/go/pkg/mod/github.com/tendermint/tendermint@v0.33.5/abci/client/local_client.go:223 +0xf8
github.com/tendermint/tendermint/proxy.(*appConnConsensus).InitChainSync(0xc0001cf3b0, 0x3699d820, 0xed68f600f, 0x0, 0xc000045960, 0xb, 0xc000726840, 0x5e8ce68, 0x0, 0x0, ...)
/Users/hesk/go/pkg/mod/github.com/tendermint/tendermint@v0.33.5/proxy/app_conn.go:65 +0x6b
github.com/tendermint/tendermint/consensus.(*Handshaker).ReplayBlocks(0xc000fa30a0, 0xa, 0x0, 0xc000045f76, 0x6, 0xc000045fa0, 0xb, 0x0, 0x0, 0x0, ...)
/Users/hesk/go/pkg/mod/github.com/tendermint/tendermint@v0.33.5/consensus/replay.go:319 +0x69b
github.com/tendermint/tendermint/consensus.(*Handshaker).Handshake(0xc000fa30a0, 0x545a7e0, 0xc000181400, 0x80, 0x4e734c0)
/Users/hesk/go/pkg/mod/github.com/tendermint/tendermint@v0.33.5/consensus/replay.go:269 +0x485
github.com/tendermint/tendermint/node.doHandshake(0x5459b60, 0xc000010240, 0xa, 0x0, 0xc000045f76, 0x6, 0xc000045fa0, 0xb, 0x0, 0x0, ...)
/Users/hesk/go/pkg/mod/github.com/tendermint/tendermint@v0.33.5/node/node.go:264 +0x19a
github.com/tendermint/tendermint/node.NewNode(0xc000f5b2c0, 0x5438ee0, 0xc000f3a6e0, 0xc000f32250, 0x541b920, 0xc000fba9e0, 0xc000f324e0, 0x51c9558, 0xc000f324f0, 0x54406e0, ...)
/Users/hesk/go/pkg/mod/github.com/tendermint/tendermint@v0.33.5/node/node.go:587 +0x343
github.com/cosmos/cosmos-sdk/server.startInProcess(0xc000f64220, 0x51cacd8, 0x1d, 0x0, 0x0)
/Users/hesk/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.38.5-rc1/server/start.go:177 +0x4b0
github.com/cosmos/cosmos-sdk/server.StartCmd.func2(0xc000f78840, 0xc000f646c0, 0x0, 0x2, 0x0, 0x0)
/Users/hesk/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.38.5-rc1/server/start.go:81 +0xb4
github.com/spf13/cobra.(*Command).execute(0xc000f78840, 0xc000f646a0, 0x2, 0x2, 0xc000f78840, 0xc000f646a0)
/Users/hesk/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:842 +0x453
github.com/spf13/cobra.(*Command).ExecuteC(0xc00014db80, 0x2, 0xc000f645a0, 0x5060159)
/Users/hesk/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:950 +0x349
github.com/spf13/cobra.(*Command).Execute(...)
/Users/hesk/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:887
github.com/tendermint/tendermint/libs/cli.Executor.Execute(0xc00014db80, 0x51cb128, 0x3, 0xc000f27070)
/Users/hesk/go/pkg/mod/github.com/tendermint/tendermint@v0.33.5/libs/cli/setup.go:89 +0x3c
main.main()
/Users/hesk/Documents/ixo/dp-hub/cmd/dpd/main.go:70 +0x68c

{
  "genesis_time": "2020-07-02T04:56:47.916052Z",
  "chain_id": "ddp-1x",
  "consensus_params": {
    "block": {
      "max_bytes": "22020096",
      "max_gas": "-1",
      "time_iota_ms": "1000"
    },
    "evidence": {
      "max_age_num_blocks": "100000",
      "max_age_duration": "172800000000000"
    },
    "validator": {
      "pub_key_types": [
        "ed25519"
      ]
    }
  },
  "app_hash": "",
  "app_state": {
    "auth": {
      "params": {
        "max_memo_characters": "256",
        "tx_sig_limit": "7",
        "tx_size_cost_per_byte": "10",
        "sig_verify_cost_ed25519": "590",
        "sig_verify_cost_secp256k1": "1000"
      },
      "accounts": [
        {
          "type": "cosmos-sdk/Account",
          "value": {
            "address": "dx01l2ktgqpgj4d4nq0m2fcdgx7kphvgqs2zudf3cp",
            "coins": [
              {
                "denom": "dap",
                "amount": "10000000000"
              },
              {
                "denom": "dollar",
                "amount": "10000000"
              },
              {
                "denom": "stake",
                "amount": "100000000"
              }
            ],
            "public_key": "",
            "account_number": 0,
            "sequence": 0
          }
        },
        {
          "type": "cosmos-sdk/Account",
          "value": {
            "address": "dx019qyhfy6ns3mtzpaxwxmzx0y2xz0pt2l0zvqp8f",
            "coins": [
              {
                "denom": "dap",
                "amount": "100"
              },
              {
                "denom": "dollar",
                "amount": "10000"
              },
              {
                "denom": "stake",
                "amount": "100000000"
              }
            ],
            "public_key": "",
            "account_number": 0,
            "sequence": 0
          }
        },
        {
          "type": "cosmos-sdk/Account",
          "value": {
            "address": "dx01a7c9mdqpnq5p27c4cw94u3g4s5nl5cwffkdxsu",
            "coins": [
              {
                "denom": "dap",
                "amount": "100"
              },
              {
                "denom": "dollar",
                "amount": "10000"
              },
              {
                "denom": "stake",
                "amount": "100000000"
              }
            ],
            "public_key": "",
            "account_number": 0,
            "sequence": 0
          }
        },
        {
          "type": "cosmos-sdk/Account",
          "value": {
            "address": "dx01jppmr9l66hl83x3rret8jntmchavvcljten63z",
            "coins": [
              {
                "denom": "dap",
                "amount": "10000000"
              },
              {
                "denom": "dollar",
                "amount": "10000"
              },
              {
                "denom": "stake",
                "amount": "100000000"
              }
            ],
            "public_key": "",
            "account_number": 0,
            "sequence": 0
          }
        }
      ]
    },
    "gov": {
      "starting_proposal_id": "1",
      "deposits": null,
      "votes": null,
      "proposals": null,
      "deposit_params": {
        "min_deposit": [
          {
            "denom": "stake",
            "amount": "10000000"
          }
        ],
        "max_deposit_period": "172800000000000"
      },
      "voting_params": {
        "voting_period": "172800000000000"
      },
      "tally_params": {
        "quorum": "0.334000000000000000",
        "threshold": "0.500000000000000000",
        "veto": "0.334000000000000000"
      }
    },
    "project": {
      "project_docs": null,
      "account_maps": null,
      "withdrawal_infos": null,
      "params": {
        "dp_did": "did:dxp:PGtRP4o5cCYhe8B5Fu7xj6",
        "project_minimum_initial_funding": "1"
      }
    },
    "did": {
      "did_docs": null
    },
    "oracles": {
      "oracles": [
        {
          "oracle_did": "did:dxp:XX1rB7o9BeEmNuvB5PeAn2",
          "capabilities": [
            {
              "denom": "dap",
              "capabilities": [
                "mint"
              ]
            }
          ]
        },
        {
          "oracle_did": "did:dxp:Xc7PR8S7A6AzreYR5th2h4",
          "capabilities": [
            {
              "denom": "dap",
              "capabilities": [
                "mint",
                "burn",
                "transfer"
              ]
            }
          ]
        },
        {
          "oracle_did": "did:dxp:QmuNtGJCJZuU8wm8e9PSWk",
          "capabilities": [
            {
              "denom": "dollar",
              "capabilities": [
                "transfer"
              ]
            },
            {
              "denom": "dap",
              "capabilities": [
                "transfer"
              ]
            }
          ]
        },
        {
          "oracle_did": "did:dxp:PQQMd4iP8XUpctiETKRhW2",
          "capabilities": [
            {
              "denom": "dollar",
              "capabilities": [
                "transfer",
                "burn",
                "mint"
              ]
            }
          ]
        }
      ]
    },
    "slashing": {
      "params": {
        "signed_blocks_window": "100",
        "min_signed_per_window": "0.500000000000000000",
        "downtime_jail_duration": "600000000000",
        "slash_fraction_double_sign": "0.050000000000000000",
        "slash_fraction_downtime": "0.010000000000000000"
      },
      "signing_infos": {},
      "missed_blocks": {}
    },
    "staking": {
      "params": {
        "unbonding_time": "1814400000000000",
        "max_validators": 100,
        "max_entries": 7,
        "historical_entries": 0,
        "bond_denom": "stake"
      },
      "last_total_power": "0",
      "last_validator_powers": null,
      "validators": null,
      "delegations": null,
      "unbonding_delegations": null,
      "redelegations": null,
      "exported": false
    },
    "params": null,
    "treasury": null,
    "upgrade": {},
    "crisis": {
      "constant_fee": {
        "denom": "stake",
        "amount": "1000"
      }
    },
    "mint": {
      "minter": {
        "inflation": "0.130000000000000000",
        "annual_provisions": "0.000000000000000000"
      },
      "params": {
        "mint_denom": "stake",
        "inflation_rate_change": "0.130000000000000000",
        "inflation_max": "0.200000000000000000",
        "inflation_min": "0.070000000000000000",
        "goal_bonded": "0.670000000000000000",
        "blocks_per_year": "6311520"
      }
    },
    "evidence": {
      "params": {
        "max_evidence_age": "120000000000"
      },
      "evidence": []
    },
    "nameservice": {
      "whois_records": []
    },
    "genutil": {
      "gentxs": [
        {
          "type": "cosmos-sdk/StdTx",
          "value": {
            "msg": [
              {
                "type": "cosmos-sdk/MsgCreateValidator",
                "value": {
                  "description": {
                    "moniker": "dphomeworld",
                    "identity": "",
                    "website": "",
                    "security_contact": "",
                    "details": ""
                  },
                  "commission": {
                    "rate": "0.100000000000000000",
                    "max_rate": "0.100000000000000000",
                    "max_change_rate": "0.100000000000000000"
                  },
                  "min_self_delegation": "1",
                  "delegator_address": "dx01l2ktgqpgj4d4nq0m2fcdgx7kphvgqs2zudf3cp",
                  "validator_address": "dx0valoper1l2ktgqpgj4d4nq0m2fcdgx7kphvgqs2zstn6ap",
                  "pubkey": "dx0valconspub1zcjduepq28yh79fasqs4cuznz28tl9f0wluqd9ke8cchgqnwyztczqghravqwdff8v",
                  "value": {
                    "denom": "dap",
                    "amount": "10000"
                  }
                }
              }
            ],
            "fee": {
              "amount": [],
              "gas": "200000"
            },
            "signatures": [
              {
                "pub_key": {
                  "type": "tendermint/PubKeySecp256k1",
                  "value": "A719u7lf5sPXLfWDIChWhcqIJ5BLaTmwy+FMdcU+ok8o"
                },
                "signature": "A4MdfCOHTcr5BHNSrOFPMYbsRNrlXVubOLWrbZnxkPJewN8/7aGaurVLtliRtkKBWgSCeQNZrO2Tep2pz3Bjow=="
              }
            ],
            "memo": "3155140d5e45a746ab5eea952a3d3c0576b27087@192.168.1.2:26656"
          }
        }
      ]
    },
    "bonds": {
      "bonds": null,
      "batches": null
    },
    "bonddoc": {
      "bond_docs": null
    },
    "distribution": {
      "params": {
        "community_tax": "0.020000000000000000",
        "base_proposer_reward": "0.010000000000000000",
        "bonus_proposer_reward": "0.040000000000000000",
        "withdraw_addr_enabled": true
      },
      "fee_pool": {
        "community_pool": []
      },
      "delegator_withdraw_infos": [],
      "previous_proposer": "",
      "outstanding_rewards": [],
      "validator_accumulated_commissions": [],
      "validator_historical_rewards": [],
      "validator_current_rewards": [],
      "delegator_starting_infos": [],
      "validator_slash_events": []
    },
    "bank": {
      "send_enabled": true
    },
    "payments": {
      "params": {
        "ixo_factor": "1.000000000000000000",
        "initiation_fee_amount": "500000.000000000000000000",
        "initiation_node_fee_percentage": "0.000000000000000000",
        "claim_fee_amount": "600.000000000000000000",
        "evaluation_fee_amount": "400.000000000000000000",
        "service_agent_registration_fee_amount": "0.000000000000000000",
        "evaluation_agent_registration_fee_amount": "0.000000000000000000",
        "node_fee_percentage": "0.500000000000000000",
        "evaluation_pay_fee_percentage": "0.100000000000000000",
        "evaluation_pay_node_fee_percentage": "0.400000000000000000"
      },
      "payment_templates": null,
      "payment_contracts": null,
      "subscriptions": null
    },
    "supply": {
      "supply": []
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants