Documentation ¶
Index ¶
- func ConfigExists(dataPath string) (bool, error)
- type Chain
- func (ch *Chain) AllAPIHosts() []string
- func (ch *Chain) AllPeeringHosts() []string
- func (ch *Chain) BlockIndex(nodeIndex ...int) (uint32, error)
- func (ch *Chain) ChainAddress() ledgerstate.Address
- func (ch *Chain) Client(sigScheme *ed25519.KeyPair, nodeIndex ...int) *chainclient.Client
- func (ch *Chain) CommitteeAPIHosts() []string
- func (ch *Chain) CommitteeMultiClient() *multiclient.MultiClient
- func (ch *Chain) CommitteePeeringHosts() []string
- func (ch *Chain) ContractRegistry(nodeIndex ...int) (map[iscp.Hname]*root.ContractRecord, error)
- func (ch *Chain) DeployContract(name, progHashStr, description string, initParams map[string]interface{}) (*ledgerstate.Transaction, error)
- func (ch *Chain) DeployWasmContract(name, description string, progBinary []byte, initParams map[string]interface{}) (hashing.HashValue, error)
- func (ch *Chain) GetAllBlockInfoRecordsReverse(nodeIndex ...int) ([]*blocklog.BlockInfo, error)
- func (ch *Chain) GetBlobFieldValue(blobHash hashing.HashValue, field string) ([]byte, error)
- func (ch *Chain) GetCounterValue(inccounterSCHname iscp.Hname, nodeIndex ...int) (int64, error)
- func (ch *Chain) GetRequestReceipt(reqID iscp.RequestID, nodeIndex ...int) (*blocklog.RequestReceipt, uint32, uint16, error)
- func (ch *Chain) GetRequestReceiptsForBlock(blockIndex uint32, nodeIndex ...int) ([]*blocklog.RequestReceipt, error)
- func (ch *Chain) GetStateVariable(contractHname iscp.Hname, key string, nodeIndex ...int) ([]byte, error)
- func (ch *Chain) OriginatorAddress() ledgerstate.Address
- func (ch *Chain) OriginatorClient() *chainclient.Client
- func (ch *Chain) OriginatorID() *iscp.AgentID
- func (ch *Chain) OriginatorKeyPair() *ed25519.KeyPair
- func (ch *Chain) SCClient(contractHname iscp.Hname, sigScheme *ed25519.KeyPair, nodeIndex ...int) *scclient.SCClient
- func (ch *Chain) StartMessageCounter(expectations map[string]int) (*MessageCounter, error)
- type Cluster
- func (clu *Cluster) ActiveNodes() []int
- func (clu *Cluster) AddAccessNode(accessNodeIndex int, chain *Chain) error
- func (clu *Cluster) DeployChain(description string, allPeers, committeeNodes []int, quorum uint16, ...) (*Chain, error)
- func (clu *Cluster) DeployChainWithDKG(description string, allPeers, committeeNodes []int, quorum uint16) (*Chain, error)
- func (clu *Cluster) DeployDefaultChain() (*Chain, error)
- func (clu *Cluster) FreezeNode(nodeIndex int) error
- func (clu *Cluster) GoshimmerClient() *goshimmer.Client
- func (clu *Cluster) InitDKG(committeeNodeCount int) ([]int, ledgerstate.Address, error)
- func (clu *Cluster) InitDataPath(templatesPath, dataPath string, removeExisting bool, ...) error
- func (clu *Cluster) IsGoshimmerUp() bool
- func (clu *Cluster) IsNodeUp(i int) bool
- func (clu *Cluster) KillNode(nodeIndex int) error
- func (clu *Cluster) MultiClient() *multiclient.MultiClient
- func (clu *Cluster) NewKeyPairWithFunds() (*ed25519.KeyPair, ledgerstate.Address, error)
- func (clu *Cluster) PostTransaction(tx *ledgerstate.Transaction) error
- func (clu *Cluster) RestartNode(nodeIndex int) error
- func (clu *Cluster) RunDKG(committeeNodes []int, threshold uint16, timeout ...time.Duration) (ledgerstate.Address, error)
- func (clu *Cluster) Start(dataPath string) error
- func (clu *Cluster) StartMessageCounter(expectations map[string]int) (*MessageCounter, error)
- func (clu *Cluster) Stop()
- func (clu *Cluster) StopNode(nodeIndex int)
- func (clu *Cluster) TrustAll() error
- func (clu *Cluster) UnfreezeNode(nodeIndex int) error
- func (clu *Cluster) ValidatorAddress() ledgerstate.Address
- func (clu *Cluster) VerifyAddressBalances(addr ledgerstate.Address, totalExpected uint64, expect colored.Balances, ...) bool
- func (clu *Cluster) Wait()
- func (clu *Cluster) WaspClient(nodeIndex int) *client.WaspClient
- type ClusterConfig
- func (c *ClusterConfig) APIHost(nodeIndex int) string
- func (c *ClusterConfig) APIHosts(nodeIndexes ...[]int) []string
- func (c *ClusterConfig) APIPort(nodeIndex int) int
- func (c *ClusterConfig) AllNodes() []int
- func (c *ClusterConfig) DashboardPort(nodeIndex int) int
- func (c *ClusterConfig) NanomsgHost(nodeIndex int) string
- func (c *ClusterConfig) NanomsgHosts(nodeIndexes ...[]int) []string
- func (c *ClusterConfig) NanomsgPort(nodeIndex int) int
- func (c *ClusterConfig) PeeringHost(nodeIndex int) string
- func (c *ClusterConfig) PeeringHosts(nodeIndexes ...[]int) []string
- func (c *ClusterConfig) PeeringPort(nodeIndex int) int
- func (c *ClusterConfig) ProfilingPort(nodeIndex int) int
- func (c *ClusterConfig) PrometheusPort(nodeIndex int) int
- func (c *ClusterConfig) Save(dataPath string) error
- func (c *ClusterConfig) TxStreamHost(nodeIndex int) string
- func (c *ClusterConfig) TxStreamPort(nodeIndex int) int
- func (c *ClusterConfig) WaspConfigTemplateParams(i int, ownerAddress ledgerstate.Address) *templates.WaspConfigParams
- type GoshimmerConfig
- type MessageCounter
- type ModifyNodesConfigFn
- type WaspConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigExists ¶ added in v0.1.0
Types ¶
type Chain ¶ added in v0.1.0
type Chain struct { Description string OriginatorSeed *seed.Seed AllPeers []int CommitteeNodes []int Quorum uint16 StateAddress ledgerstate.Address ChainID *iscp.ChainID Cluster *Cluster }
func (*Chain) AllAPIHosts ¶ added in v0.2.0
func (*Chain) AllPeeringHosts ¶ added in v0.2.0
func (*Chain) BlockIndex ¶ added in v0.2.0
func (*Chain) ChainAddress ¶ added in v0.1.0
func (ch *Chain) ChainAddress() ledgerstate.Address
func (*Chain) CommitteeAPIHosts ¶ added in v0.2.0
func (*Chain) CommitteeMultiClient ¶ added in v0.1.0
func (ch *Chain) CommitteeMultiClient() *multiclient.MultiClient
func (*Chain) CommitteePeeringHosts ¶ added in v0.2.0
func (*Chain) ContractRegistry ¶ added in v0.2.0
func (*Chain) DeployContract ¶ added in v0.1.0
func (ch *Chain) DeployContract(name, progHashStr, description string, initParams map[string]interface{}) (*ledgerstate.Transaction, error)
func (*Chain) DeployWasmContract ¶ added in v0.1.0
func (*Chain) GetAllBlockInfoRecordsReverse ¶ added in v0.2.0
func (*Chain) GetBlobFieldValue ¶ added in v0.1.0
func (*Chain) GetCounterValue ¶ added in v0.2.0
func (*Chain) GetRequestReceipt ¶ added in v0.2.0
func (*Chain) GetRequestReceiptsForBlock ¶ added in v0.2.0
func (*Chain) GetStateVariable ¶ added in v0.2.0
func (*Chain) OriginatorAddress ¶ added in v0.1.0
func (ch *Chain) OriginatorAddress() ledgerstate.Address
func (*Chain) OriginatorClient ¶ added in v0.1.0
func (ch *Chain) OriginatorClient() *chainclient.Client
func (*Chain) OriginatorID ¶ added in v0.1.0
func (*Chain) OriginatorKeyPair ¶ added in v0.2.0
func (*Chain) StartMessageCounter ¶ added in v0.1.0
func (ch *Chain) StartMessageCounter(expectations map[string]int) (*MessageCounter, error)
type Cluster ¶
type Cluster struct { Name string Config *ClusterConfig Started bool DataPath string ValidatorSeed *seed.Seed // Default identity for validators, chain owners, etc. // contains filtered or unexported fields }
func New ¶
func New(name string, config *ClusterConfig) *Cluster
func (*Cluster) ActiveNodes ¶ added in v0.1.0
func (*Cluster) AddAccessNode ¶ added in v0.2.4
AddAccessNode introduces node at accessNodeIndex as an access node to the chain. This is done by activating the chain on the node and asking the governance contract to consider it as an access node.
func (*Cluster) DeployChain ¶ added in v0.1.0
func (*Cluster) DeployChainWithDKG ¶ added in v0.2.0
func (*Cluster) DeployDefaultChain ¶ added in v0.1.0
func (*Cluster) FreezeNode ¶ added in v0.2.0
func (*Cluster) GoshimmerClient ¶ added in v0.2.0
func (*Cluster) InitDataPath ¶ added in v0.1.0
func (clu *Cluster) InitDataPath(templatesPath, dataPath string, removeExisting bool, modifyConfig ModifyNodesConfigFn) error
InitDataPath initializes the cluster data directory (cluster.json + one subdirectory for each node).
func (*Cluster) IsGoshimmerUp ¶
func (*Cluster) MultiClient ¶ added in v0.1.0
func (clu *Cluster) MultiClient() *multiclient.MultiClient
func (*Cluster) NewKeyPairWithFunds ¶ added in v0.2.0
func (*Cluster) PostTransaction ¶
func (clu *Cluster) PostTransaction(tx *ledgerstate.Transaction) error
func (*Cluster) RestartNode ¶ added in v0.2.0
func (*Cluster) Start ¶
Start launches all wasp nodes in the cluster, each running in its own directory
func (*Cluster) StartMessageCounter ¶ added in v0.1.0
func (clu *Cluster) StartMessageCounter(expectations map[string]int) (*MessageCounter, error)
func (*Cluster) Stop ¶
func (clu *Cluster) Stop()
Stop sends an interrupt signal to all nodes and waits for them to exit
func (*Cluster) UnfreezeNode ¶ added in v0.2.0
func (*Cluster) ValidatorAddress ¶ added in v0.2.4
func (clu *Cluster) ValidatorAddress() ledgerstate.Address
func (*Cluster) VerifyAddressBalances ¶
func (*Cluster) WaspClient ¶ added in v0.1.0
func (clu *Cluster) WaspClient(nodeIndex int) *client.WaspClient
type ClusterConfig ¶
type ClusterConfig struct { Wasp WaspConfig Goshimmer GoshimmerConfig BlockedGoshimmerNodes map[int]bool }
func DefaultConfig ¶ added in v0.1.0
func DefaultConfig() *ClusterConfig
func LoadConfig ¶ added in v0.1.0
func LoadConfig(dataPath string) (*ClusterConfig, error)
func (*ClusterConfig) APIHost ¶ added in v0.2.0
func (c *ClusterConfig) APIHost(nodeIndex int) string
func (*ClusterConfig) APIHosts ¶ added in v0.2.0
func (c *ClusterConfig) APIHosts(nodeIndexes ...[]int) []string
func (*ClusterConfig) APIPort ¶ added in v0.2.0
func (c *ClusterConfig) APIPort(nodeIndex int) int
func (*ClusterConfig) AllNodes ¶ added in v0.1.0
func (c *ClusterConfig) AllNodes() []int
func (*ClusterConfig) DashboardPort ¶ added in v0.1.0
func (c *ClusterConfig) DashboardPort(nodeIndex int) int
func (*ClusterConfig) NanomsgHost ¶ added in v0.1.0
func (c *ClusterConfig) NanomsgHost(nodeIndex int) string
func (*ClusterConfig) NanomsgHosts ¶ added in v0.1.0
func (c *ClusterConfig) NanomsgHosts(nodeIndexes ...[]int) []string
func (*ClusterConfig) NanomsgPort ¶ added in v0.1.0
func (c *ClusterConfig) NanomsgPort(nodeIndex int) int
func (*ClusterConfig) PeeringHost ¶ added in v0.1.0
func (c *ClusterConfig) PeeringHost(nodeIndex int) string
func (*ClusterConfig) PeeringHosts ¶ added in v0.1.0
func (c *ClusterConfig) PeeringHosts(nodeIndexes ...[]int) []string
func (*ClusterConfig) PeeringPort ¶ added in v0.1.0
func (c *ClusterConfig) PeeringPort(nodeIndex int) int
func (*ClusterConfig) ProfilingPort ¶ added in v0.2.0
func (c *ClusterConfig) ProfilingPort(nodeIndex int) int
func (*ClusterConfig) PrometheusPort ¶ added in v0.2.0
func (c *ClusterConfig) PrometheusPort(nodeIndex int) int
func (*ClusterConfig) Save ¶ added in v0.1.0
func (c *ClusterConfig) Save(dataPath string) error
func (*ClusterConfig) TxStreamHost ¶ added in v0.2.0
func (c *ClusterConfig) TxStreamHost(nodeIndex int) string
func (*ClusterConfig) TxStreamPort ¶ added in v0.2.0
func (c *ClusterConfig) TxStreamPort(nodeIndex int) int
func (*ClusterConfig) WaspConfigTemplateParams ¶ added in v0.1.0
func (c *ClusterConfig) WaspConfigTemplateParams(i int, ownerAddress ledgerstate.Address) *templates.WaspConfigParams
type GoshimmerConfig ¶ added in v0.1.0
type MessageCounter ¶ added in v0.1.0
type MessageCounter struct {
// contains filtered or unexported fields
}
func NewMessageCounter ¶ added in v0.1.0
func (*MessageCounter) Close ¶ added in v0.1.0
func (m *MessageCounter) Close()
func (*MessageCounter) CollectMessages ¶ added in v0.1.0
func (m *MessageCounter) CollectMessages(duration time.Duration)
func (*MessageCounter) Report ¶ added in v0.1.0
func (m *MessageCounter) Report() bool
func (*MessageCounter) WaitUntilExpectationsMet ¶ added in v0.1.0
func (m *MessageCounter) WaitUntilExpectationsMet() bool
type ModifyNodesConfigFn ¶ added in v0.2.0
type ModifyNodesConfigFn = func(nodeIndex int, configParams *templates.WaspConfigParams) *templates.WaspConfigParams
Click to show internal directories.
Click to hide internal directories.