Help us shape the future of Go! Take the 2026 Go Developer Survey

host

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MiB = 1024 * 1024

	DefaultMaxMessageSize = 2 * MiB

	MaxContainersLen = int(4 * DefaultMaxMessageSize / 5)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Bitmask

type Bitmask big.Int

func BitmaskFromBytes

func BitmaskFromBytes(bytes []byte) Bitmask

func (*Bitmask) Add

func (bm *Bitmask) Add(i int)

func (*Bitmask) Bytes

func (bm *Bitmask) Bytes() []byte

func (*Bitmask) Clone

func (bm *Bitmask) Clone() Bitmask

func (*Bitmask) Contains

func (bm *Bitmask) Contains(i int) bool

func (*Bitmask) Difference

func (bm *Bitmask) Difference(bm2 *Bitmask)

func (*Bitmask) Len

func (bm *Bitmask) Len() int

type NodeID

type NodeID [20]byte

type VMBlock

type VMBlock interface {
	// Digest returns a succinct representation of this block.
	Digest() [32]byte

	// Height returns the height of this block in the chain.
	Height() uint64

	// Time this block was proposed at. This value should be consistent across
	// all nodes. If this block hasn't been successfully verified, any value can
	// be returned. If this block is the last accepted block, the timestamp must
	// be returned correctly. Otherwise, accepted blocks can return any value.
	Timestamp() time.Time

	// Verify that the state transition this block would make if accepted is
	// valid. If the state transition is invalid, a non-nil error should be
	// returned.
	//
	// It is guaranteed that the Parent has been successfully verified.
	//
	// If nil is returned, it is guaranteed that either Accept or Reject will be
	// called on this block, unless the VM is shut down.
	Verify(ctx context.Context, pChainHeight uint64) error

	// Bytes returns the byte representation of this block.
	Bytes() []byte
}

Jump to

Keyboard shortcuts

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