common

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 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"`
	// Top level of state data as json.
	State string `pg:",type:jsonb"`
	// CID identifier for the type of the actor.
	CodeCID string `pg:",notnull"`
}

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, _ model.Version) error

type ActorCode added in v0.15.0

type ActorCode struct {
	// CID of the actor from builtin actors.
	CID string `pg:",pk,notnull"`
	// Human-readable identifier for the actor.
	Code string `pg:",pk,notnull"`
}

func (*ActorCode) Persist added in v0.15.0

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

type ActorCodeList added in v0.15.0

type ActorCodeList []*ActorCode

func (ActorCodeList) Persist added in v0.15.0

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, _ model.Version) error

type ActorMethod added in v0.15.0

type ActorMethod struct {
	Family     string `pg:",pk,notnull"`
	MethodName string `pg:",notnull"`
	Method     uint64 `pg:",pk,notnull"`
}

func (*ActorMethod) Persist added in v0.15.0

type ActorMethodList added in v0.15.0

type ActorMethodList []*ActorMethod

func (ActorMethodList) Persist added in v0.15.0

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"`
	// Address of actor.
	Address string `pg:",pk,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, _ 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, _ model.Version) error

Jump to

Keyboard shortcuts

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