Documentation ¶
Index ¶
- func BeaconScheduleFromDrandSchedule(dcs dtypes.DrandSchedule, genesisTime uint64, ps *pubsub.PubSub) (beacon.Schedule, error)
- type DrandBeacon
- func (db *DrandBeacon) Entry(ctx context.Context, round uint64) <-chan beacon.Response
- func (db *DrandBeacon) IsChained() bool
- func (db *DrandBeacon) MaxBeaconRoundForEpoch(nv network.Version, filEpoch abi.ChainEpoch) uint64
- func (db *DrandBeacon) VerifyEntry(entry types.BeaconEntry, prevEntrySig []byte) error
- type DrandHTTPClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BeaconScheduleFromDrandSchedule ¶ added in v1.25.0
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 buildconstants.DrandConfigs
func NewDrandBeacon ¶
func NewDrandBeacon(genesisTs, interval uint64, ps *pubsub.PubSub, config dtypes.DrandConfig) (*DrandBeacon, error)
func (*DrandBeacon) IsChained ¶ added in v1.26.0
func (db *DrandBeacon) IsChained() bool
IsChained tells us whether this particular beacon operates in "chained mode". Prior to Drand quicknet, beacons form a chain. After the introduction of quicknet, they do not, so we need to change how we interact with beacon entries. (See FIP-0063)
func (*DrandBeacon) MaxBeaconRoundForEpoch ¶
func (db *DrandBeacon) MaxBeaconRoundForEpoch(nv network.Version, filEpoch abi.ChainEpoch) uint64
func (*DrandBeacon) VerifyEntry ¶
func (db *DrandBeacon) VerifyEntry(entry types.BeaconEntry, prevEntrySig []byte) error
type DrandHTTPClient ¶ added in v1.1.1
type DrandHTTPClient interface {
SetUserAgent(string)
}
DrandHTTPClient interface overrides the user agent used by drand