Documentation ¶
Index ¶
- Variables
- func LocateDefault(root string) (path string, err error)
- type Account
- type BaseConfig
- type Config
- type ConsensusConfig
- type Description
- type Genesis
- type Host
- type Init
- type NodeConfig
- type RPCConfig
- type TxIndexConfig
- type ValNodeConfig
- type ValidationError
- type Validator
- type ValidatorInfo
- type ValidatorKey
Constants ¶
This section is empty.
Variables ¶
var ( // ErrCouldntLocateConfig returned when config.yml cannot be found in the source code. ErrCouldntLocateConfig = errors.New("could not locate a config.yml in your chain. please follow the link for how-to: https://github.com/tendermint/starport/blob/develop/docs/configure/index.md") // FileNames holds a list of appropriate names for the config file. FileNames = []string{"config.yml", "config.yaml"} // DefaultConf holds default configuration. DefaultConf = Config{} )
Functions ¶
func LocateDefault ¶
LocateDefault locates the default path for the config file, if no file found returns ErrCouldntLocateConfig.
Types ¶
type Account ¶
type Account struct { Name string `yaml:"name"` Coins []string `yaml:"coins,omitempty"` Mnemonic string `yaml:"mnemonic,omitempty"` Address string `json:"address"` // The RPCAddress off the chain that account is issued at. RPCAddress string `yaml:"rpc_address,omitempty"` }
Account holds the options related to setting up Cosmos wallets.
type BaseConfig ¶
type BaseConfig struct { }
BaseConfig defines the base configuration for a Tendermint node
type Config ¶
type Config struct { Type string `json:"type" yaml:"type"` GlobalConfig *NodeConfig `json:"config" yaml:"config"` Genesis Genesis `json:"genesis" yaml:"genesis"` Accounts []Account `json:"accounts" yaml:"accounts"` Validators []ValidatorInfo `json:"validators" yaml:"validators"` }
Config is the user given configuration to do additional setup during serve.
type ConsensusConfig ¶
type ConsensusConfig struct { TimeoutCommit time.Duration `json:"timeout_commit" mapstructure:"timeout_commit" json:"timeout_commit"` // EmptyBlocks mode and possible interval between empty blocks CreateEmptyBlocks bool `yaml:"create_empty_blocks" json:"create_empty_blocks" mapstructure:"create_empty_blocks"` CreateEmptyBlocksInterval time.Duration `yaml:"create_empty_blocks_interval" json:"create_empty_blocks_interval" mapstructure:"create_empty_blocks_interval"` }
ConsensusConfig defines the configuration for the Tendermint consensus service, including timeouts and details about the WAL and the block structure.
type Description ¶
type Host ¶
type Host struct { RPC string `yaml:"rpc"` P2P string `yaml:"p2p"` Prof string `yaml:"prof"` GRPC string `yaml:"grpc"` GRPCWeb string `yaml:"grpc-web"` API string `yaml:"api"` }
Host keeps configuration related to started servers.
type Init ¶
type Init struct { // App overwrites appd's config/app.toml configs. App map[string]interface{} `yaml:"app"` // Client overwrites appd's config/client.toml configs. Client map[string]interface{} `yaml:"client"` // Config overwrites appd's config/config.toml configs. Config map[string]interface{} `yaml:"config"` // Home overwrites default home directory used for the app Home string `yaml:"home"` // KeyringBackend is the default keyring backend to use for blockchain initialization KeyringBackend string `yaml:"keyring-backend"` }
Init overwrites sdk configurations with given values.
type NodeConfig ¶
type NodeConfig struct { // Top level options use an anonymous struct BaseConfig `mapstructure:",squash"` // Options for services RPC *RPCConfig `mapstructure:"rpc" json:"rpc" yaml:"rpc"` Consensus *ConsensusConfig `mapstructure:"consensus" json:"consensus" yaml:"consensus"` TxIndex *TxIndexConfig `mapstructure:"tx_index" json:"tx_index" yaml:"tx_index"` }
type RPCConfig ¶
type RPCConfig struct { // TCP or UNIX socket address for the RPC server to listen on ListenAddress string `yaml:"laddr" mapstructure:"laddr" json:"listen_address"` // A list of origins a cross-domain request can be executed from. // If the special '*' value is present in the list, all origins will be allowed. // An origin may contain a wildcard (*) to replace 0 or more characters (i.e.: http://*.domain.com). // Only one wildcard can be used per origin. CORSAllowedOrigins []string `yaml:"cors_allowed_origins" mapstructure:"cors_allowed_origins" json:"cors_allowed_origins"` }
RPCConfig defines the configuration options for the Tendermint RPC server
type TxIndexConfig ¶
type TxIndexConfig struct { // Comma-separated list of tags to index (by default the only tag is "tx.hash") // // You can also index transactions by height by adding "tx.height" tag here. // // It's recommended to index only a subset of tags due to possible memory // bloat. This is, of course, depends on the indexer's DB and the volume of // transactions. IndexTags string `yaml:"index_tags" json:"index_tags" mapstructure:"index_tags"` // When set to true, tells indexer to index all tags (predefined tags: // "tx.hash", "tx.height" and all tags from DeliverTx responses). // // Note this may be not desirable (see the comment above). IndexTags has a // precedence over IndexAllTags (i.e. when given both, IndexTags will be // indexed). IndexAllTags bool `yaml:"index_all_tags" json:"index_all_tags" mapstructure:"index_all_tags"` }
TxIndexConfig defines the configuration for the transaction indexer, including tags to index.
type ValNodeConfig ¶
type ValidationError ¶
type ValidationError struct {
Message string
}
ValidationError is returned when a configuration is invalid.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
type Validator ¶
type Validator struct { ValNodeConfig ValNodeConfig Index int Name string ChainID string Moniker string ID string GenFile string GenAccount *authTypes.GenesisAccount Memo string Cors string ValPubKey cryptotypes.PubKey IP string Key *ValidatorKey Description *Description }
type ValidatorInfo ¶
type ValidatorInfo struct { Name string `json:"name"` IP string `json:"ip"` Index int `json:"index"` Cors string `json:"cors"` Faucet bool `json:"faucet"` Key *ValidatorKey `json:"key"` Description *Description `json:"description"` Config *NodeConfig `json:"config"` }
type ValidatorKey ¶
type ValidatorKey struct { Address string `json:"address"` AccAddr types.AccAddress `json:"-"` PublicKey []byte `json:"-"` CoinDelegate int64 `json:"coin_delegate"` }