Documentation ¶
Overview ¶
Package beacon implements the combined beacon and epochtime application.
Index ¶
Constants ¶
View Source
const ( // AppID is the unique application identifier. AppID uint8 = 0x40 // AppName is the ABCI application name. // Run before all other applications. AppName string = "000_beacon" )
Variables ¶
View Source
var ( // EventType is the ABCI event type for beacon/epoch events. EventType = api.EventTypeForApp(AppName) // QueryApp is the query for filtering events procecessed by the // beacon application. QueryApp = api.QueryForApp(AppName) // KeyEpoch is the ABCI event attribute for specifying the set epoch. KeyEpoch = []byte("epoch") // KeyBeacon is the ABCI event attribute key for the new beacons. KeyBeacon = []byte("beacon") // MethodSetEpoch is the method name for setting epochs. MethodSetEpoch = transaction.NewMethodName(AppName, "SetEpoch", beacon.EpochTime(0)) // Methods is a list of all methods supported by the beacon application. Methods = []transaction.MethodName{ MethodSetEpoch, beacon.MethodPVSSCommit, beacon.MethodPVSSReveal, } )
View Source
var ( DebugEntropyCtx = []byte("Ekb-Dumm") DebugEntropy = []byte("If you change this, you will fuck up the byzantine tests!!") )
View Source
var ( // KeyDisableRuntimes is the ABCI event attribute for signaling // that runtimes should be disabled due to beacon failure. KeyDisableRuntimes = []byte("disable_runtimes") )
Functions ¶
Types ¶
type Query ¶
type Query interface { Beacon(context.Context) ([]byte, error) Epoch(context.Context) (beacon.EpochTime, int64, error) FutureEpoch(context.Context) (*beacon.EpochTimeState, error) Genesis(context.Context) (*beacon.Genesis, error) ConsensusParameters(context.Context) (*beacon.ConsensusParameters, error) PVSSState(context.Context) (*beacon.PVSSState, error) }
Query is the beacon query interface.
type QueryFactory ¶
type QueryFactory struct {
// contains filtered or unexported fields
}
QueryFactory is the beacon query factory.
func NewQueryFactory ¶
func NewQueryFactory(state abciAPI.ApplicationQueryState) *QueryFactory
NewQueryFactory returns a new QueryFactory backed by the given state instance.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.