subnetactor

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: Apache-2.0, MIT Imports: 17 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 (
	Mir ConsensusType = iota
)

type ConstructParams

type ConstructParams struct {
	Parent              sdk.SubnetID
	Name                string
	IPCGatewayAddr      address.Address
	Consensus           ConsensusType
	MinValidatorStake   abi.TokenAmount
	MinValidators       uint64
	BottomUpCheckPeriod abi.ChainEpoch
	TopDownCheckPeriod  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
	BottomUpCheckPeriod        abi.ChainEpoch
	TopDownCheckPeriod         abi.ChainEpoch
	CommittedCheckpoints       cid.Cid // TCid<THamt<ChainEpoch, BottomUpCheckpoint>>
	ValidatorSet               *validator.Set
	MinValidators              uint64
	PreviousExecutedCheckpoint cid.Cid
	BottomUpCheckpointVoting   voting.Voting
}

func (*State) GetCheckpoint

func (st *State) GetCheckpoint(s adt.Store, epoch abi.ChainEpoch) (*gateway.BottomUpCheckpoint, 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 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