Documentation ¶
Overview ¶
Package core holds core protocol types and constants
Index ¶
- Constants
- Variables
- type BigRat
- type GlobalValues
- func (g *GlobalValues) AsSigner(partition string) *globalSigner
- func (v *GlobalValues) Copy() *GlobalValues
- func (v *GlobalValues) CopyAsInterface() interface{}
- func (g *GlobalValues) DiffValidators(h *GlobalValues, partitionID string) (map[[32]byte]ValidatorUpdate, error)
- func (v *GlobalValues) Equal(u *GlobalValues) bool
- func (g *GlobalValues) FormatGlobals() protocol.DataEntry
- func (g *GlobalValues) FormatNetwork() protocol.DataEntry
- func (g *GlobalValues) FormatOracle() protocol.DataEntry
- func (g *GlobalValues) FormatRouting() protocol.DataEntry
- func (g *GlobalValues) InitializeDataAccounts(net config.NetworkUrl, getState getStateFunc, putState putStateFunc) error
- func (v *GlobalValues) IsValid() error
- func (g *GlobalValues) Load(net config.NetworkUrl, getState getStateFunc) error
- func (v *GlobalValues) MarshalBinary() ([]byte, error)
- func (v *GlobalValues) MarshalJSON() ([]byte, error)
- func (g *GlobalValues) ParseGlobals(entry protocol.DataEntry) error
- func (g *GlobalValues) ParseNetwork(entry protocol.DataEntry) error
- func (g *GlobalValues) ParseOracle(entry protocol.DataEntry) error
- func (g *GlobalValues) ParseRouting(entry protocol.DataEntry) error
- func (v *GlobalValues) UnmarshalBinary(data []byte) error
- func (v *GlobalValues) UnmarshalBinaryFrom(rd io.Reader) error
- func (v *GlobalValues) UnmarshalJSON(b []byte) error
- func (g *GlobalValues) ValidatorThreshold(partition string) uint64
- type Hash
- type ValidatorUpdate
Constants ¶
View Source
const SnapshotMajorFormat = "snapshot-major-block-%09d.bpt"
View Source
const ValidatorUpdateAdd = 1
View Source
const ValidatorUpdateRemove = 2
Variables ¶
View Source
var Cron = cron.NewParser(cron.SecondOptional | cron.Minute | cron.Hour | cron.Dom | cron.Month | cron.Dow | cron.Descriptor)
View Source
var SnapshotMajorRegexp = regexp.MustCompile(`snapshot-major-block-\d+.bpt`)
Functions ¶
This section is empty.
Types ¶
type BigRat ¶
type BigRat struct {
// contains filtered or unexported fields
}
type GlobalValues ¶
type GlobalValues struct { Oracle *protocol.AcmeOracle `json:"oracle,omitempty" form:"oracle" query:"oracle" validate:"required"` Globals *protocol.NetworkGlobals `json:"globals,omitempty" form:"globals" query:"globals" validate:"required"` Network *protocol.NetworkDefinition `json:"network,omitempty" form:"network" query:"network" validate:"required"` Routing *protocol.RoutingTable `json:"routing,omitempty" form:"routing" query:"routing" validate:"required"` // ExecutorVersion is the active executor version. ExecutorVersion protocol.ExecutorVersion `json:"executorVersion,omitempty" form:"executorVersion" query:"executorVersion"` // contains filtered or unexported fields }
func NewGlobals ¶
func NewGlobals(g *GlobalValues) *GlobalValues
NewGlobals returns GlobalValues with uninitialized values set to the default.
func (*GlobalValues) AsSigner ¶
func (g *GlobalValues) AsSigner(partition string) *globalSigner
func (*GlobalValues) Copy ¶
func (v *GlobalValues) Copy() *GlobalValues
func (*GlobalValues) CopyAsInterface ¶
func (v *GlobalValues) CopyAsInterface() interface{}
func (*GlobalValues) DiffValidators ¶
func (g *GlobalValues) DiffValidators(h *GlobalValues, partitionID string) (map[[32]byte]ValidatorUpdate, error)
func (*GlobalValues) Equal ¶
func (v *GlobalValues) Equal(u *GlobalValues) bool
func (*GlobalValues) FormatGlobals ¶
func (g *GlobalValues) FormatGlobals() protocol.DataEntry
func (*GlobalValues) FormatNetwork ¶
func (g *GlobalValues) FormatNetwork() protocol.DataEntry
func (*GlobalValues) FormatOracle ¶
func (g *GlobalValues) FormatOracle() protocol.DataEntry
func (*GlobalValues) FormatRouting ¶
func (g *GlobalValues) FormatRouting() protocol.DataEntry
func (*GlobalValues) InitializeDataAccounts ¶ added in v1.0.2
func (g *GlobalValues) InitializeDataAccounts(net config.NetworkUrl, getState getStateFunc, putState putStateFunc) error
InitializeDataAccounts sets the initial state of the network data accounts for genesis.
func (*GlobalValues) IsValid ¶ added in v1.1.0
func (v *GlobalValues) IsValid() error
func (*GlobalValues) Load ¶
func (g *GlobalValues) Load(net config.NetworkUrl, getState getStateFunc) error
func (*GlobalValues) MarshalBinary ¶ added in v1.1.0
func (v *GlobalValues) MarshalBinary() ([]byte, error)
func (*GlobalValues) MarshalJSON ¶ added in v1.1.0
func (v *GlobalValues) MarshalJSON() ([]byte, error)
func (*GlobalValues) ParseGlobals ¶
func (g *GlobalValues) ParseGlobals(entry protocol.DataEntry) error
func (*GlobalValues) ParseNetwork ¶
func (g *GlobalValues) ParseNetwork(entry protocol.DataEntry) error
func (*GlobalValues) ParseOracle ¶
func (g *GlobalValues) ParseOracle(entry protocol.DataEntry) error
func (*GlobalValues) ParseRouting ¶
func (g *GlobalValues) ParseRouting(entry protocol.DataEntry) error
func (*GlobalValues) UnmarshalBinary ¶ added in v1.1.0
func (v *GlobalValues) UnmarshalBinary(data []byte) error
func (*GlobalValues) UnmarshalBinaryFrom ¶ added in v1.1.0
func (v *GlobalValues) UnmarshalBinaryFrom(rd io.Reader) error
func (*GlobalValues) UnmarshalJSON ¶ added in v1.1.0
func (v *GlobalValues) UnmarshalJSON(b []byte) error
func (*GlobalValues) ValidatorThreshold ¶
func (g *GlobalValues) ValidatorThreshold(partition string) uint64
type ValidatorUpdate ¶
type ValidatorUpdate int
Source Files ¶
Click to show internal directories.
Click to hide internal directories.