Documentation
¶
Index ¶
Constants ¶
View Source
const ( ModeValidator Mode = "validator" ModeFull Mode = "full" ModeLight Mode = "light" ModeSeed Mode = "seed" ProtocolBuiltin Protocol = "builtin" ProtocolFile Protocol = "file" ProtocolGRPC Protocol = "grpc" ProtocolTCP Protocol = "tcp" ProtocolUNIX Protocol = "unix" PerturbationDisconnect Perturbation = "disconnect" PerturbationKill Perturbation = "kill" PerturbationPause Perturbation = "pause" PerturbationRestart Perturbation = "restart" PerturbationUpgrade Perturbation = "upgrade" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InfrastructureData ¶
type InfrastructureData struct { Provider string `json:"provider"` Instances map[string]InstanceData `json:"instances"` Network string `json:"network"` }
func InfrastructureDataFromFile ¶
func InfrastructureDataFromFile(path string) (InfrastructureData, error)
func NewDockerInfrastructureData ¶
func NewDockerInfrastructureData(m Manifest) (InfrastructureData, error)
type InstanceData ¶
type Manifest ¶
type Manifest struct { IPv6 bool `toml:"ipv6"` InitialHeight int64 `toml:"initial_height"` InitialState map[string]string `toml:"initial_state"` Validators *map[string]int64 `toml:"validators"` ValidatorUpdates map[string]map[string]int64 `toml:"validator_update"` Nodes map[string]*ManifestNode `toml:"node"` KeyType string `toml:"key_type"` Evidence int `toml:"evidence"` ABCIProtocol string `toml:"abci_protocol"` PrepareProposalDelay time.Duration `toml:"prepare_proposal_delay"` ProcessProposalDelay time.Duration `toml:"process_proposal_delay"` CheckTxDelay time.Duration `toml:"check_tx_delay"` UpgradeVersion string `toml:"upgrade_version"` LoadTxSizeBytes int `toml:"load_tx_size_bytes"` LoadTxBatchSize int `toml:"load_tx_batch_size"` LoadTxConnections int `toml:"load_tx_connections"` Prometheus bool `toml:"prometheus"` }
func LoadManifest ¶
type ManifestNode ¶
type ManifestNode struct { Mode string `toml:"mode"` Version string `toml:"version"` Seeds []string `toml:"seeds"` PersistentPeers []string `toml:"persistent_peers"` Database string `toml:"database"` PrivvalProtocol string `toml:"privval_protocol"` StartAt int64 `toml:"start_at"` BlockSync string `toml:"block_sync"` Mempool string `toml:"mempool_version"` StateSync bool `toml:"state_sync"` PersistInterval *uint64 `toml:"persist_interval"` SnapshotInterval uint64 `toml:"snapshot_interval"` RetainBlocks uint64 `toml:"retain_blocks"` Perturb []string `toml:"perturb"` SendNoLoad bool `toml:"send_no_load"` }
type Node ¶
type Node struct { Name string Version string Testnet *Testnet Mode Mode PrivvalKey crypto.PrivKey NodeKey crypto.PrivKey IP net.IP ProxyPort uint32 StartAt int64 BlockSync string StateSync bool Mempool string Database string ABCIProtocol Protocol PrivvalProtocol Protocol PersistInterval uint64 SnapshotInterval uint64 RetainBlocks uint64 Seeds []*Node PersistentPeers []*Node Perturbations []Perturbation SendNoLoad bool Prometheus bool PrometheusProxyPort uint32 }
func (Node) AddressP2P ¶
Address returns a P2P endpoint address for the node.
func (Node) AddressRPC ¶
Address returns an RPC endpoint address for the node.
type Perturbation ¶
type Perturbation string
type Testnet ¶
type Testnet struct { Name string File string Dir string IP *net.IPNet InitialHeight int64 InitialState map[string]string Validators map[*Node]int64 ValidatorUpdates map[int64]map[*Node]int64 Nodes []*Node KeyType string Evidence int LoadTxSizeBytes int LoadTxBatchSize int LoadTxConnections int ABCIProtocol string PrepareProposalDelay time.Duration ProcessProposalDelay time.Duration CheckTxDelay time.Duration UpgradeVersion string Prometheus bool }
func LoadTestnet ¶
func LoadTestnet(manifest Manifest, fname string, ifd InfrastructureData) (*Testnet, error)
func (Testnet) ArchiveNodes ¶
ArchiveNodes returns a list of archive nodes that start at the initial height and contain the entire blockchain history. They are used e.g. as light client RPC servers.
func (Testnet) HasPerturbations ¶
HasPerturbations returns whether the network has any perturbations.
func (Testnet) LookupNode ¶
LookupNode looks up a node by name. For now, simply do a linear search.
func (Testnet) RandomNode ¶
RandomNode returns a random non-seed node.
Click to show internal directories.
Click to hide internal directories.