network

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: MIT Imports: 12 Imported by: 1

Documentation

Overview

package network holds core protocol types and constants

Index

Constants

This section is empty.

Variables

View Source
var CronFormat = cron.NewParser(cron.SecondOptional | cron.Minute | cron.Hour | cron.Dom | cron.Month | cron.Dow | cron.Descriptor)

Functions

This section is empty.

Types

type CronSchedule added in v1.4.0

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

func MustParseCron added in v1.4.0

func MustParseCron(spec string) *CronSchedule

func ParseCron added in v1.4.0

func ParseCron(spec string) (*CronSchedule, error)

func (*CronSchedule) Copy added in v1.4.0

func (s *CronSchedule) Copy() *CronSchedule

func (*CronSchedule) Equal added in v1.4.0

func (s *CronSchedule) Equal(r *CronSchedule) bool

func (*CronSchedule) MarshalJSON added in v1.4.0

func (s *CronSchedule) MarshalJSON() ([]byte, error)

func (*CronSchedule) Next added in v1.4.0

func (s *CronSchedule) Next(t time.Time) time.Time

func (*CronSchedule) UnmarshalJSON added in v1.4.0

func (s *CronSchedule) UnmarshalJSON(data []byte) error

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"`
	// BvnExecutorVersions is the active executor version of each BVN.
	BvnExecutorVersions []*protocol.PartitionExecutorVersion `json:"bvnExecutorVersions,omitempty" form:"bvnExecutorVersions" query:"bvnExecutorVersions" validate:"required"`
	// contains filtered or unexported fields
}

func NewGlobals

func NewGlobals(g *GlobalValues) *GlobalValues

NewGlobals returns GlobalValues with uninitialized values set to the default.

func (*GlobalValues) BvnExecutorVersion added in v1.4.0

func (g *GlobalValues) BvnExecutorVersion() protocol.ExecutorVersion

func (*GlobalValues) BvnNames added in v1.3.0

func (g *GlobalValues) BvnNames() []string

func (*GlobalValues) ChainID added in v1.4.0

func (g *GlobalValues) ChainID() *big.Int

func (*GlobalValues) Copy

func (v *GlobalValues) Copy() *GlobalValues

func (*GlobalValues) CopyAsInterface

func (v *GlobalValues) CopyAsInterface() interface{}

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

func (g *GlobalValues) InitializeDataAccounts(net *url.URL, getState getStateFunc, putState putStateFunc) error

InitializeDataAccounts sets the initial state of the network data accounts for genesis.

func (*GlobalValues) IsValid

func (v *GlobalValues) IsValid() error

func (*GlobalValues) Load

func (g *GlobalValues) Load(net *url.URL, getState getStateFunc) error

func (*GlobalValues) LoadGlobals added in v1.4.0

func (g *GlobalValues) LoadGlobals(net *url.URL, getState getStateFunc) error

func (*GlobalValues) LoadNetwork added in v1.4.0

func (g *GlobalValues) LoadNetwork(net *url.URL, getState getStateFunc) error

func (*GlobalValues) LoadOracle added in v1.4.0

func (g *GlobalValues) LoadOracle(net *url.URL, getState getStateFunc) error

func (*GlobalValues) LoadRouting added in v1.4.0

func (g *GlobalValues) LoadRouting(net *url.URL, getState getStateFunc) error

func (*GlobalValues) MajorBlockSchedule added in v1.4.0

func (g *GlobalValues) MajorBlockSchedule() cron.Schedule

func (*GlobalValues) MarshalBinary

func (v *GlobalValues) MarshalBinary() ([]byte, error)

func (*GlobalValues) MarshalJSON

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

func (v *GlobalValues) UnmarshalBinary(data []byte) error

func (*GlobalValues) UnmarshalBinaryFrom

func (v *GlobalValues) UnmarshalBinaryFrom(rd io.Reader) error

func (*GlobalValues) UnmarshalJSON

func (v *GlobalValues) UnmarshalJSON(b []byte) error

func (*GlobalValues) ValidatorThreshold

func (g *GlobalValues) ValidatorThreshold(partition string) uint64

Jump to

Keyboard shortcuts

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