builtin

package
v1.16.1 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2022 License: Apache-2.0, MIT Imports: 18 Imported by: 57

README

Actors

This package contains shims for abstracting over different actor versions.

Design

Shims in this package follow a few common design principles.

Structure Agnostic

Shims interfaces defined in this package should (ideally) not change even if the structure of the underlying data changes. For example:

  • All shims store an internal "store" object. That way, state can be moved into a separate object without needing to add a store to the function signature.
  • All functions must return an error, even if unused for now.
Minimal

These interfaces should be expanded only as necessary to reduce maintenance burden.

Queries, not field assessors.

When possible, functions should query the state instead of simply acting as field assessors. These queries are more likely to remain stable across specs-actor upgrades than specific state fields.

Note: there is a trade-off here. Avoid implementing complicated query logic inside these shims, as it will need to be replicated in every shim.

Documentation

Index

Constants

View Source
const (
	EpochDurationSeconds = builtin.EpochDurationSeconds
	EpochsInDay          = builtin.EpochsInDay
	SecondsInDay         = builtin.SecondsInDay
)
View Source
const (
	MethodSend        = builtin.MethodSend
	MethodConstructor = builtin.MethodConstructor
)

Variables

View Source
var BurntFundsActorAddr = builtin.BurntFundsActorAddr
View Source
var CronActorAddr = builtin.CronActorAddr
View Source
var (
	ExpectedLeadersPerEpoch = builtin.ExpectedLeadersPerEpoch
)
View Source
var ReserveAddress = makeAddress("t090")
View Source
var RootVerifierAddress = makeAddress("t080")
View Source
var SaftAddress = makeAddress("t0122")
View Source
var SystemActorAddr = builtin.SystemActorAddr

Functions

func ActorNameByCode added in v0.9.0

func ActorNameByCode(c cid.Cid) string

func GetAccountActorCodeID added in v1.16.0

func GetAccountActorCodeID(av actors.Version) (cid.Cid, error)

func GetCronActorCodeID added in v1.16.0

func GetCronActorCodeID(av actors.Version) (cid.Cid, error)

func GetInitActorCodeID added in v1.16.0

func GetInitActorCodeID(av actors.Version) (cid.Cid, error)

func GetMarketActorCodeID added in v1.16.0

func GetMarketActorCodeID(av actors.Version) (cid.Cid, error)

func GetMinerActorCodeID added in v1.16.0

func GetMinerActorCodeID(av actors.Version) (cid.Cid, error)

func GetMultisigActorCodeID added in v1.16.0

func GetMultisigActorCodeID(av actors.Version) (cid.Cid, error)

func GetPaymentChannelActorCodeID added in v1.16.0

func GetPaymentChannelActorCodeID(av actors.Version) (cid.Cid, error)

func GetPowerActorCodeID added in v1.16.0

func GetPowerActorCodeID(av actors.Version) (cid.Cid, error)

func GetRewardActorCodeID added in v1.16.0

func GetRewardActorCodeID(av actors.Version) (cid.Cid, error)

func GetSystemActorCodeID added in v1.16.0

func GetSystemActorCodeID(av actors.Version) (cid.Cid, error)

func GetVerifregActorCodeID added in v1.16.0

func GetVerifregActorCodeID(av actors.Version) (cid.Cid, error)

func IsAccountActor added in v0.9.0

func IsAccountActor(c cid.Cid) bool

func IsBuiltinActor added in v0.9.0

func IsBuiltinActor(c cid.Cid) bool

func IsMultisigActor added in v0.9.0

func IsMultisigActor(c cid.Cid) bool

func IsPaymentChannelActor added in v0.9.0

func IsPaymentChannelActor(c cid.Cid) bool

func IsStorageMinerActor added in v0.9.0

func IsStorageMinerActor(c cid.Cid) bool

func QAPowerForWeight

func QAPowerForWeight(size abi.SectorSize, duration abi.ChainEpoch, dealWeight, verifiedWeight abi.DealWeight) abi.StoragePower

Types

type ExtendedSectorInfo added in v1.14.0

type ExtendedSectorInfo = proof.ExtendedSectorInfo

type FilterEstimate

type FilterEstimate = smoothingtypes.FilterEstimate

type PoStProof

type PoStProof = proof.PoStProof

type SectorInfo

type SectorInfo = proof.SectorInfo

These are all just type aliases across actor versions. In the future, that might change and we might need to do something fancier.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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