genutil

package
v0.0.0-...-46576e1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2023 License: MIT Imports: 47 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectGenFiles

func CollectGenFiles(validators []Validator, home string, xplac *client.XplaClient, genDoc tendermint.GenesisDoc) error

Collect gentxs. Input gentxs which is create validator message to already created genesis file.

func ConfigFile

func ConfigFile() *configManager

Read and get config.yaml

func InitGenFile

func InitGenFile(xplac *client.XplaClient) (tendermint.GenesisDoc, error)

Initialize genesis file. Record params to optimize xpla network.

func KeysAdd

func KeysAdd(validator Validator, home string, valNodeName string) (keyring.Keyring, error)

func Node

func Node(validator Validator, valPath string, valNumber int, keyring keyring.Keyring, xplac *client.XplaClient) error

Set validator or sentry node info. Create not only node key but also priv validator key that is only in the validator's config directory.

func ReadConfig

func ReadConfig(configFilePath string) error

Read config.yaml file.

func Set

func Set(configFilePath string) error

Xpla node setting can be used after creating xpla binary through make install. This function is the entry point to create node by implementing sub-functions, such as creating gentx of each validator, initalizing genesis file, collecting gentx and etc.

func SetInit

func SetInit(rootDir string) error

Create config files of the validator. These are included in the config directory of the validator.

func Validators

func Validators(validators []Validator, home string, xplac *client.XplaClient) error

Setting validator node. Handle all processes in order to create validator node such as creating key, initializing config file and etc.

Types

type CommissionOption

type CommissionOption struct {
	Rate          string `yaml:"rate"`
	MaxRate       string `yaml:"max_rate"`
	MaxChangeRate string `yaml:"max_change_rate"`
}

type ConfigType

type ConfigType struct {
	XplaGen XplaGen `yaml:"xpla_gen"`
}

type Key

type Key struct {
	Name           string `yaml:"name"`
	KeyringBackend string `yaml:"keyring_backend"`
	Balance        string `yaml:"balance"`
}

type KeysOption

type KeysOption struct {
	NotSaveMnemonic bool `yaml:"not_save_mnemonic"`
	PrintMnemonic   bool `yaml:"print_mnemonic"`
}

type SaveMnemonic

type SaveMnemonic struct {
	Mnemonic string `json:"mnemonic"`
}

type Sentries

type Sentries struct {
	IpAddress []string `yaml:"ip_address"`
}

type Validator

type Validator struct {
	Moniker           string           `yaml:"moniker"`
	IpAddress         string           `yaml:"ip_address"`
	DelAmount         string           `yaml:"del_amount"`
	MinSelfDelegation string           `yaml:"min_self_delegation"`
	CommissionOption  CommissionOption `yaml:"commission_option"`
	ValidatorOption   ValidatorOption  `yaml:"validator_option"`
	Keys              []Key            `yaml:"local_keys"`
	KeysOption        KeysOption       `yaml:"keys_option"`
	Sentries          Sentries         `yaml:"sentries"`
}

type ValidatorOption

type ValidatorOption struct {
	Website         string `yaml:"website"`
	Identity        string `yaml:"identity"`
	SecurityContact string `yaml:"security_contact"`
	Details         string `yaml:"details"`
}

type XplaGen

type XplaGen struct {
	ChainId    string      `yaml:"chain_id"`
	Home       string      `yaml:"home"`
	Validators []Validator `yaml:"validators"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL