common

package
v0.12.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: Apache-2.0, MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Actor

type Actor struct {
	// Epoch when this actor was created or updated.
	Height int64 `pg:",pk,notnull,use_zero"`
	// ID Actor address.
	ID string `pg:",pk,notnull"`
	// CID of the state root when this actor was created or changed.
	StateRoot string `pg:",pk,notnull"`
	// Human-readable identifier for the type of the actor.
	Code string `pg:",notnull"`
	// CID of the root of the state tree for the actor.
	Head string `pg:",notnull"`
	// Balance of Actor in attoFIL.
	Balance string `pg:",notnull"`
	// The next Actor nonce that is expected to appear on chain.
	Nonce uint64 `pg:",use_zero"`
}

Actor on chain that were added or updated at an epoch. Associates the actor's state root CID (head) with the chain state root CID from which it decends. Includes account ID nonce and balance at each state.

func (*Actor) Persist

func (a *Actor) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error

type ActorList

type ActorList []*Actor

ActorList is a slice of Actors persistable in a single batch.

func (ActorList) Persist

func (actors ActorList) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error

type ActorState

type ActorState struct {
	// Epoch when this actor was created or updated.
	Height int64 `pg:",pk,notnull,use_zero"`
	// CID of the root of the state tree for the actor.
	Head string `pg:",pk,notnull"`
	// CID identifier for the type of the actor.
	Code string `pg:",pk,notnull"`
	// Top level of state data as json.
	State string `pg:",type:jsonb,notnull"`
}

ActorState that were changed at an epoch. Associates actors states as single-level trees with CIDs pointing to complete state tree with the root CID (head) for that actor’s state.

func (*ActorState) Persist

func (as *ActorState) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error

type ActorStateList

type ActorStateList []*ActorState

ActorStateList is a list of ActorStates persistable in a single batch.

func (ActorStateList) Persist

func (states ActorStateList) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error

Jump to

Keyboard shortcuts

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