Documentation
¶
Index ¶
- func ToGpbftChain(tss ...TipSet) (*gpbft.ECChain, error)
- type ChainExchange
- type FinalityCertificate
- type Justification
- type Message
- type Observer
- type Option
- func WithBootstrapPeers(threshold int, peers ...peer.AddrInfo) Option
- func WithBootstrapPeersFromString(threshold int, peers ...string) Option
- func WithChainExchangeBufferSize(size int) Option
- func WithChainExchangeMaxMessageAge(d time.Duration) Option
- func WithConnectivityCheckInterval(interval time.Duration) Option
- func WithConnectivityMinPeers(count int) Option
- func WithDHTPeerDiscovery(threshold int) Option
- func WithDataSourceName(dataSourceName string) Option
- func WithECPeriod(d time.Duration) Option
- func WithFinalityCertsClientRequestTimeout(d time.Duration) Option
- func WithFinalityCertsInitialPollInterval(d time.Duration) Option
- func WithFinalityCertsMaxPollInterval(d time.Duration) Option
- func WithFinalityCertsMinPollInterval(d time.Duration) Option
- func WithFinalityCertsStorePath(path string) Option
- func WithFinalityCertsVerifier(v gpbft.Verifier) Option
- func WithHost(h host.Host) Option
- func WithInitialPowerTableCID(c cid.Cid) Option
- func WithLotusPeerDiscovery(threshold int, apiEndpoints ...string) Option
- func WithMaxBatchDelay(d time.Duration) Option
- func WithMaxBatchSize(size int) Option
- func WithMaxConcurrentConnectionAttempts(limit int) Option
- func WithMaxRetentionSize(size uint64) Option
- func WithMessageBufferSize(messageBufferSize int) Option
- func WithNetworkName(name gpbft.NetworkName) Option
- func WithPubSub(ps *pubsub.PubSub) Option
- func WithPubSubValidatorDisabled(disable bool) Option
- func WithQueryServerListenAddress(addr string) Option
- func WithQueryServerMetricsExport(export bool) Option
- func WithQueryServerReadTimeout(d time.Duration) Option
- func WithRetention(retention time.Duration) Option
- func WithRotateInterval(d time.Duration) Option
- func WithRotatePath(path string) Option
- func WithSubscriptionBufferSize(subBufferSize int) Option
- type Payload
- type PowerTableDelta
- type QueryRequest
- type SupplementalData
- type TipSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChainExchange ¶ added in v0.8.7
type FinalityCertificate ¶ added in v0.8.7
type FinalityCertificate struct { Timestamp time.Time `json:"Timestamp"` NetworkName string `json:"NetworkName"` Instance uint64 `json:"Instance"` ECChain []TipSet `json:"ECChain"` SupplementalData SupplementalData `json:"SupplementalData"` Signers []uint64 `json:"Signers"` Signature []byte `json:"Signature"` PowerTableDelta []PowerTableDelta `json:"PowerTableDelta"` }
type Justification ¶ added in v0.8.5
type Justification struct { Vote Payload `json:"Vote"` Signers []uint64 `json:"Signers"` Signature []byte `json:"Signature"` }
func (*Justification) ToGpbftJustification ¶ added in v0.8.5
func (j *Justification) ToGpbftJustification() (*gpbft.Justification, error)
type Message ¶ added in v0.8.5
type Message struct { Timestamp time.Time `json:"Timestamp"` NetworkName string `json:"NetworkName"` Sender gpbft.ActorID `json:"Sender"` Vote Payload `json:"Vote"` Signature []byte `json:"Signature"` Ticket []byte `json:"Ticket"` Justification *Justification `json:"Justification"` VoteValueKey []byte `json:"VoteValueKey"` }
func (Message) ToPartialMessage ¶ added in v0.8.5
func (m Message) ToPartialMessage() (*gpbft.PartialGMessage, error)
type Option ¶
type Option func(*options) error
func WithBootstrapPeers ¶ added in v0.8.5
WithBootstrapPeers sets the bootstrap peers for connectivity. The threshold is the minimum connectivity threshold below which the bootstrap peers are used to improve connectivity. Disabled if the threshold is set to 0 or no peers are provided.
See: WithBootstrapPeersFromString.
func WithBootstrapPeersFromString ¶ added in v0.8.5
WithBootstrapPeersFromString sets the bootstrap peers for connectivity. The threshold is the minimum connectivity threshold below which the bootstrap peers are used to improve connectivity. Disabled if the threshold is set to 0 or no peers are provided.
Any provided string addresses are resolved with a timeout of 10 seconds. An error is returned if any one of given addresses fail to resolve.
See: WithBootstrapPeers.
func WithChainExchangeBufferSize ¶ added in v0.8.7
func WithChainExchangeMaxMessageAge ¶ added in v0.8.7
func WithDHTPeerDiscovery ¶ added in v0.8.5
WithDHTPeerDiscovery sets the threshold for peer discovery via Filecoin DHT. Disabled if set to zero.
func WithDataSourceName ¶
func WithECPeriod ¶ added in v0.8.7
func WithFinalityCertsClientRequestTimeout ¶ added in v0.8.7
func WithFinalityCertsInitialPollInterval ¶ added in v0.8.7
func WithFinalityCertsMaxPollInterval ¶ added in v0.8.7
func WithFinalityCertsMinPollInterval ¶ added in v0.8.7
func WithFinalityCertsStorePath ¶ added in v0.8.7
func WithFinalityCertsVerifier ¶ added in v0.8.7
func WithInitialPowerTableCID ¶ added in v0.8.7
func WithInitialPowerTableCID(c cid.Cid) Option
func WithLotusPeerDiscovery ¶ added in v0.8.5
WithLotusPeerDiscovery configures peer discovery via Filecoin.NetPeers API call through a list of lotus daemons. Disabled if threshold is set to 0 or no lotusDaemon endpoints are provided.
func WithMaxBatchDelay ¶ added in v0.8.5
func WithMaxBatchSize ¶ added in v0.8.5
func WithMaxConcurrentConnectionAttempts ¶ added in v0.8.5
WithMaxConcurrentConnectionAttempts sets the maximum number of concurrent connection attempts to make to peers. This is used to limit the number of concurrent connection attempts to make to peers when the connectivity threshold is below the specified threshold for any one of the configured connectivity repair mechanisms. The default is 50.
func WithMaxRetentionSize ¶ added in v0.8.9
WithMaxRetentionSize sets the maximum size of the retention directory. This is weakly enforced, and the directory may grow larger than this size. If the directory grows larger than this size, the oldest files will be deleted until the directory size is below this size.
func WithMessageBufferSize ¶
func WithNetworkName ¶ added in v0.8.5
func WithNetworkName(name gpbft.NetworkName) Option
func WithPubSub ¶ added in v0.8.5
func WithPubSubValidatorDisabled ¶ added in v0.8.5
func WithQueryServerMetricsExport ¶ added in v0.8.9
func WithRetention ¶
func WithRotateInterval ¶
func WithRotatePath ¶
func WithSubscriptionBufferSize ¶ added in v0.8.5
type Payload ¶ added in v0.8.5
type Payload struct { Instance uint64 `json:"Instance"` Round uint64 `json:"Round"` Phase string `json:"Phase"` SupplementalData SupplementalData `json:"SupplementalData"` Value []TipSet `json:"Value"` }
type PowerTableDelta ¶ added in v0.8.7
type QueryRequest ¶
type QueryRequest struct {
Query string `json:"Query"`
}
type SupplementalData ¶ added in v0.8.5
type SupplementalData struct { Commitments []byte `json:"Commitments"` PowerTable string `json:"PowerTable"` }
func (SupplementalData) ToGpbftSupplementalData ¶ added in v0.8.5
func (s SupplementalData) ToGpbftSupplementalData() (gpbft.SupplementalData, error)