subnetactor

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: Apache-2.0, MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const ManifestID = "ipc_subnet_actor"

ManifestID is the id used to index the gateway actor in the builtin-actors bundle.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsensusType

type ConsensusType uint64

ConsensusType defines the types of consensus supported by subnets.

const (
	Delegated ConsensusType = iota
	PoW
	Tendermint
	Mir
	FilecoinEC
	Dummy
)

type ConstructParams

type ConstructParams struct {
	Parent            sdk.SubnetID
	Name              string
	IPCGatewayAddr    uint64
	Consensus         ConsensusType
	MinValidatorStake abi.TokenAmount
	MinValidators     uint64
	FinalityThreshold abi.ChainEpoch
	CheckPeriod       abi.ChainEpoch
	Genesis           []byte
}

func (*ConstructParams) MarshalCBOR

func (t *ConstructParams) MarshalCBOR(w io.Writer) error

func (*ConstructParams) UnmarshalCBOR

func (t *ConstructParams) UnmarshalCBOR(r io.Reader) (err error)

type JoinParams

type JoinParams struct {
	ValidatorNetAddr string
}

func (*JoinParams) MarshalCBOR

func (t *JoinParams) MarshalCBOR(w io.Writer) error

func (*JoinParams) UnmarshalCBOR

func (t *JoinParams) UnmarshalCBOR(r io.Reader) (err error)

type State

type State struct {
	Name              string
	ParentID          sdk.SubnetID
	IPCGatewayAddr    address.Address
	Consensus         ConsensusType
	MinValidatorStake abi.TokenAmount
	TotalStake        abi.TokenAmount
	Stake             cid.Cid // TCid<THamt<Cid,TokenAmount>>
	Status            sdk.Status
	Genesis           []byte
	FinalityThreshold abi.ChainEpoch
	CheckPeriod       abi.ChainEpoch
	Checkpoints       cid.Cid // TCid<THamt<Cid, Checkpoint>>
	WindowChecks      cid.Cid // TCid<THamt<Cid, Votes>>,
	ValidatorSet      []Validator
	MinValidators     uint64
}

func (*State) GetCheckpoint

func (st *State) GetCheckpoint(s adt.Store, id address.Address) (*gateway.Checkpoint, bool, error)

func (*State) GetStake

func (st *State) GetStake(s adt.Store, id address.Address) (abi.TokenAmount, error)

func (*State) HasMajorityVote

func (st *State) HasMajorityVote(s adt.Store, v Votes) (bool, error)

func (*State) MarshalCBOR

func (t *State) MarshalCBOR(w io.Writer) error

func (*State) UnmarshalCBOR

func (t *State) UnmarshalCBOR(r io.Reader) (err error)

type Validator

type Validator struct {
	Addr    address.Address
	NetAddr string
}

func (*Validator) MarshalCBOR

func (t *Validator) MarshalCBOR(w io.Writer) error

func (*Validator) UnmarshalCBOR

func (t *Validator) UnmarshalCBOR(r io.Reader) (err error)

type Votes

type Votes struct {
	Validators []address.Address
}

func (*Votes) MarshalCBOR

func (t *Votes) MarshalCBOR(w io.Writer) error

func (*Votes) UnmarshalCBOR

func (t *Votes) UnmarshalCBOR(r io.Reader) (err error)

Jump to

Keyboard shortcuts

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