drand

package
v0.0.0-...-484cccf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2023 License: Apache-2.0, MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DrandBeacon

type DrandBeacon struct {
	// contains filtered or unexported fields
}

DrandBeacon connects Lotus with a drand network in order to provide randomness to the system in a way that's aligned with Filecoin rounds/epochs.

We connect to drand peers via their public HTTP endpoints. The peers are enumerated in the drandServers variable.

The root trust for the Drand chain is configured from build.DrandChain.

func NewDrandBeacon

func NewDrandBeacon(genesisTs, interval uint64, ps *pubsub.PubSub, config dtypes.DrandConfig) (*DrandBeacon, error)

func (*DrandBeacon) Entry

func (db *DrandBeacon) Entry(ctx context.Context, round uint64) <-chan beacon.Response

func (*DrandBeacon) MaxBeaconRoundForEpoch

func (db *DrandBeacon) MaxBeaconRoundForEpoch(nv network.Version, filEpoch abi.ChainEpoch) uint64

func (*DrandBeacon) VerifyEntry

func (db *DrandBeacon) VerifyEntry(curr types.BeaconEntry, prev types.BeaconEntry) error

type DrandHTTPClient

type DrandHTTPClient interface {
	SetUserAgent(string)
}

DrandHTTPClient interface overrides the user agent used by drand

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL