Documentation ¶
Index ¶
- type ECBackend
- type F3
- func (m *F3) Broadcast(ctx context.Context, signatureBuilder *gpbft.SignatureBuilder, msgSig []byte, ...)
- func (m *F3) GetCert(ctx context.Context, instance uint64) (*certs.FinalityCertificate, error)
- func (m *F3) GetLatestCert(ctx context.Context) (*certs.FinalityCertificate, error)
- func (m *F3) Run(ctx context.Context) error
- func (m *F3) SubscribeForMessagesToSign(ch chan<- *gpbft.MessageBuilder) (closer func())
- type Logger
- type Manifest
- type TipSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ECBackend ¶
type ECBackend interface { // GetTipsetByEpoch should return a tipset before the one requested if the requested // tipset does not exist due to null epochs GetTipsetByEpoch(ctx context.Context, epoch int64) (TipSet, error) GetTipset(context.Context, gpbft.TipSetKey) (TipSet, error) GetHead(context.Context) (TipSet, error) GetParent(context.Context, TipSet) (TipSet, error) GetPowerTable(context.Context, gpbft.TipSetKey) (gpbft.PowerEntries, error) }
type F3 ¶
type F3 struct { Manifest Manifest // contains filtered or unexported fields }
func New ¶
func New(ctx context.Context, manifest Manifest, ds datastore.Datastore, h host.Host, ps *pubsub.PubSub, verif gpbft.Verifier, ec ECBackend, log Logger, signingMarshaller gpbft.SigningMarshaler) (*F3, error)
New creates and setups f3 with libp2p The context is used for initialization not runtime. signingMarshaller can be nil for default SigningMarshaler
func (*F3) GetLatestCert ¶
func (*F3) SubscribeForMessagesToSign ¶
func (m *F3) SubscribeForMessagesToSign(ch chan<- *gpbft.MessageBuilder) (closer func())
SubscribeForMessagesToSign is used to subscribe to the message broadcast channel. After perparing inputs and signing over them, Broadcast should be called.
If the passed channel is full at any point, it will be dropped from subscription and closed. To stop subscribing, either the closer function can be used, or the channel can be abandoned. Passing a channel multiple times to the Subscribe function will result in a panic.
type Logger ¶
type Logger interface { Debug(args ...interface{}) Debugf(format string, args ...interface{}) Error(args ...interface{}) Errorf(format string, args ...interface{}) Info(args ...interface{}) Infof(format string, args ...interface{}) Warn(args ...interface{}) Warnf(format string, args ...interface{}) }
type Manifest ¶
type Manifest struct { NetworkName gpbft.NetworkName InitialInstance uint64 InitialPowerTable gpbft.PowerEntries BootstrapEpoch int64 ECFinality int64 // The delay after a tipset is produced before we attempt to finalize it. ECDelay time.Duration // The delay between tipsets. ECPeriod time.Duration CommiteeLookback uint64 //Temporary ECBoostrapTimestamp time.Time }
func LocalnetManifest ¶
func LocalnetManifest() Manifest
Click to show internal directories.
Click to hide internal directories.