builtin

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: Apache-2.0, MIT Imports: 14 Imported by: 0

README

Actors

This package contains shims for abstracting over different actor versions.

Design

Shims in this package follow a few common design principles.

Generation

Shims are generated using make actors-gen

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
)

Variables

This section is empty.

Functions

func ActorFamily

func ActorFamily(name string) string

func ActorNameByCode

func ActorNameByCode(c cid.Cid) string

Types

type ExtendedSectorInfo added in v0.8.6

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
Code generated by: `make actors-gen`.
Code generated by: `make actors-gen`.
Code generated by: `make actors-gen`.
Code generated by: `make actors-gen`.
Code generated by: `make actors-gen`.
Code generated by: `make actors-gen`.
Code generated by: `make actors-gen`.
Code generated by: `make actors-gen`.
Code generated by: `make actors-gen`.
Code generated by: `make actors-gen`.
Code generated by: `make actors-gen`.
Code generated by: `make actors-gen`.

Jump to

Keyboard shortcuts

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