Documentation ¶
Index ¶
- Constants
- Variables
- func DockerImageName(version string) string
- func GetLatestVersion() (string, error)
- func MakeAppConfig(_ *Node) (*serverconfig.Config, error)
- func MakeConfig(node *Node, opts ...Option) (*config.Config, error)
- func NoError(message string, err error)
- func WriteAddressBook(peers []string, file string) error
- type GrafanaInfo
- type JSONRPCError
- type Node
- func (n Node) AddressGRPC() string
- func (n Node) AddressP2P(withID bool) string
- func (n Node) AddressRPC() string
- func (n Node) Client() (*http.HTTP, error)
- func (n *Node) ForwardBitTwisterPort() error
- func (n *Node) GenesisValidator() genesis.Validator
- func (n *Node) GetHeight(executor *knuu.Executor) (int64, error)
- func (n *Node) Init(genesis *types.GenesisDoc, peers []string, configOptions ...Option) error
- func (n Node) IsValidator() bool
- func (n Node) RemoteAddressGRPC() (string, error)
- func (n Node) RemoteAddressRPC() (string, error)
- func (n *Node) Start() error
- func (n *Node) Upgrade(version string) error
- type Option
- type Resources
- type Testnet
- func (t *Testnet) Cleanup()
- func (t *Testnet) CreateAccount(name string, tokens int64, txsimKeyringDir string) (keyring.Keyring, error)
- func (t *Testnet) CreateGenesisNode(version string, selfDelegation, upgradeHeight int64, resources Resources) error
- func (t *Testnet) CreateGenesisNodes(num int, version string, selfDelegation, upgradeHeight int64, ...) error
- func (t *Testnet) CreateNode(version string, startHeight, upgradeHeight int64, resources Resources) error
- func (t *Testnet) CreateTxClient(name, version string, sequences int, blobRange string, resources Resources, ...) error
- func (t *Testnet) CreateTxClients(version string, sequences int, blobRange string, resources Resources, ...) error
- func (t *Testnet) GRPCEndpoints() []string
- func (t *Testnet) GetExecutor() (*knuu.Executor, error)
- func (t *Testnet) GetGenesisValidators() []genesis.Validator
- func (t *Testnet) Node(i int) *Node
- func (t *Testnet) Nodes() []*Node
- func (t *Testnet) RPCEndpoints() []string
- func (t *Testnet) RemoteGRPCEndpoints() ([]string, error)
- func (t *Testnet) RemoteRPCEndpoints() ([]string, error)
- func (t *Testnet) SetConsensusMaxBlockSize(size int64)
- func (t *Testnet) SetConsensusParams(params *tmproto.ConsensusParams)
- func (t *Testnet) Setup(configOpts ...Option) error
- func (t *Testnet) Start() error
- func (t *Testnet) StartTxClients() error
- type TxSim
- type Version
- type VersionSet
Constants ¶
const TxsimVersion = "a92de72"
Variables ¶
var DefaultResources = Resources{
MemoryRequest: "200Mi",
MemoryLimit: "200Mi",
CPU: "300m",
Volume: "1Gi",
}
Functions ¶
func DockerImageName ¶
func GetLatestVersion ¶
GetLatestVersion retrieves the latest git commit hash or semantic version of the main branch.
func MakeAppConfig ¶
func MakeAppConfig(_ *Node) (*serverconfig.Config, error)
func WriteAddressBook ¶
Types ¶
type GrafanaInfo ¶
func GetGrafanaInfoFromEnvVar ¶
func GetGrafanaInfoFromEnvVar() *GrafanaInfo
type JSONRPCError ¶
func (*JSONRPCError) Error ¶
func (e *JSONRPCError) Error() string
type Node ¶
type Node struct { Name string Version string StartHeight int64 InitialPeers []string SignerKey crypto.PrivKey NetworkKey crypto.PrivKey SelfDelegation int64 Instance *knuu.Instance // contains filtered or unexported fields }
func (Node) AddressGRPC ¶
AddressGRPC returns a GRPC endpoint address for the node. This returns the local proxy port that can be used to communicate with the node
func (Node) AddressP2P ¶
AddressP2P returns a P2P endpoint address for the node. This is used for populating the address book. This will look something like: 3314051954fc072a0678ec0cbac690ad8676ab98@61.108.66.220:26656
func (Node) AddressRPC ¶
AddressRPC returns an RPC endpoint address for the node. This returns the local proxy port that can be used to communicate with the node
func (*Node) ForwardBitTwisterPort ¶
func (*Node) GenesisValidator ¶
func (Node) IsValidator ¶
func (Node) RemoteAddressGRPC ¶
RemoteAddressGRPC retrieves the gRPC endpoint address of a node within the cluster.
func (Node) RemoteAddressRPC ¶
RemoteAddressRPC retrieves the RPC endpoint address of a node within the cluster.
type Option ¶
func WithBroadcastTxs ¶
func WithMempool ¶
func WithPerPeerBandwidth ¶
func WithPrometheus ¶
func WithTimeoutCommit ¶
func WithTimeoutPropose ¶
type Resources ¶
type Resources struct { // MemoryRequest specifies the initial memory allocation for the Node. MemoryRequest string // MemoryLimit specifies the maximum memory allocation for the Node. MemoryLimit string // CPU specifies the CPU allocation for the Node. CPU string // Volume specifies the storage volume allocation for the Node. Volume string }
Resources defines the resource requirements for a Node.
type Testnet ¶
type Testnet struct {
// contains filtered or unexported fields
}
func (*Testnet) CreateAccount ¶
func (t *Testnet) CreateAccount(name string, tokens int64, txsimKeyringDir string) (keyring.Keyring, error)
CreateAccount creates an account and adds it to the testnet genesis. The account is created with the given name and tokens and is persisted in the given txsimKeyringDir. If txsimKeyringDir is an empty string, an in-memory keyring is created.
func (*Testnet) CreateGenesisNode ¶
func (*Testnet) CreateGenesisNodes ¶
func (*Testnet) CreateNode ¶
func (*Testnet) CreateTxClient ¶
func (t *Testnet) CreateTxClient(name, version string, sequences int, blobRange string, resources Resources, grpcEndpoint string, ) error
CreateTxClient creates a txsim node and sets it up name: name of the txsim knuu instance version: version of the txsim docker image to be pulled from the registry specified by txsimDockerSrcURL seed: seed for the txsim sequences: number of sequences to be run by the txsim blobRange: range of blob sizes to be used by the txsim in bytes pollTime: time in seconds between each sequence resources: resources to be allocated to the txsim grpcEndpoint: grpc endpoint of the node to which the txsim will connect and send transactions
func (*Testnet) CreateTxClients ¶
func (*Testnet) GRPCEndpoints ¶
func (*Testnet) GetGenesisValidators ¶
func (*Testnet) RPCEndpoints ¶
func (*Testnet) RemoteGRPCEndpoints ¶
RemoteGRPCEndpoints retrieves the gRPC endpoint addresses of the testnet's validator nodes.
func (*Testnet) RemoteRPCEndpoints ¶
RemoteRPCEndpoints retrieves the RPC endpoint addresses of the testnet's validator nodes.
func (*Testnet) SetConsensusMaxBlockSize ¶
func (*Testnet) SetConsensusParams ¶
func (t *Testnet) SetConsensusParams(params *tmproto.ConsensusParams)
func (*Testnet) StartTxClients ¶
type Version ¶
func ParseVersion ¶
ParseVersion takes a string and returns a Version. If the string is not a valid version, the second return value is false. Must be of the format v1.0.0 or v1.0.0-rc1 (i.e. following SemVer)
type VersionSet ¶
type VersionSet []Version
func ParseVersions ¶
func ParseVersions(versionStr string) VersionSet
ParseVersions takes a string of space-separated versions and returns a VersionSet. Invalid versions are ignored.
func (VersionSet) FilterMajor ¶
func (v VersionSet) FilterMajor(majorVersion uint64) VersionSet
func (VersionSet) FilterOutReleaseCandidates ¶
func (v VersionSet) FilterOutReleaseCandidates() VersionSet
func (VersionSet) GetLatest ¶
func (v VersionSet) GetLatest() Version
func (VersionSet) Order ¶
func (v VersionSet) Order()
func (VersionSet) String ¶
func (v VersionSet) String() string