builtin

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2020 License: Apache-2.0, MIT Imports: 6 Imported by: 54

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 (
	Version0 = iota
)

Variables

This section is empty.

Functions

func QAPowerForWeight

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

Doesn't change between actors v0 and v1

Types

type FilterEstimate

type FilterEstimate = smoothing0.FilterEstimate

func FromV0FilterEstimate

func FromV0FilterEstimate(v0 smoothing0.FilterEstimate) FilterEstimate

type PoStProof

type PoStProof = proof0.PoStProof

type SectorInfo

type SectorInfo = proof0.SectorInfo

TODO: Why does actors have 2 different versions of this?

type Version

type Version int

func VersionForNetwork

func VersionForNetwork(version network.Version) Version

Converts a network version into a specs-actors version.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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