statemanger

package
v1.8.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2022 License: Apache-2.0, MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IStateManager

type IStateManager interface {
	ResolveToKeyAddress(ctx context.Context, addr address.Address, ts *types.TipSet) (address.Address, error)
	GetPaychState(ctx context.Context, addr address.Address, ts *types.TipSet) (*types.Actor, paych.State, error)
	Call(ctx context.Context, msg *types.Message, ts *types.TipSet) (*vm.Ret, error)
	GetMarketState(ctx context.Context, ts *types.TipSet) (market.State, error)
}

stateManagerAPI defines the methods needed from StateManager todo remove this code and add private interface in market and paychanel package

type Stmgr added in v1.2.0

type Stmgr struct {
	// contains filtered or unexported fields
}

func NewStateManger added in v1.2.0

func NewStateManger(cs *chain.Store, cp consensus.StateTransformer,
	rnd consensus.ChainRandomness, fork fork.IFork, gasSchedule *gas.PricesSchedule,
	syscallsImpl vm.SyscallsImpl) *Stmgr

func (*Stmgr) Call added in v1.2.0

func (s *Stmgr) Call(ctx context.Context, msg *types.Message, ts *types.TipSet) (*vm.Ret, error)

Call used for api invoke to compute a msg base on specify tipset, if the tipset is null, use latest tipset in db

func (*Stmgr) CallWithGas added in v1.2.0

func (s *Stmgr) CallWithGas(ctx context.Context, msg *types.Message, priorMsgs []types.ChainMsg, ts *types.TipSet) (*vm.Ret, error)

CallWithGas used to estimate message gaslimit, for each incoming message ,should execute after priorMsg in mpool

func (*Stmgr) Close added in v1.2.0

func (s *Stmgr) Close(ctx context.Context)

func (*Stmgr) FlushChainHead added in v1.2.0

func (s *Stmgr) FlushChainHead() (*types.TipSet, error)

func (*Stmgr) GetActorAt added in v1.2.0

func (s *Stmgr) GetActorAt(ctx context.Context, addr address.Address, ts *types.TipSet) (*types.Actor, error)

func (*Stmgr) GetActorAtTsk added in v1.2.0

func (s *Stmgr) GetActorAtTsk(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*types.Actor, error)

ctx context.Context, ts *types.TipSet, addr address.Address

func (*Stmgr) GetMarketState added in v1.2.0

func (s *Stmgr) GetMarketState(ctx context.Context, ts *types.TipSet) (market.State, error)

func (*Stmgr) GetNetworkVersion added in v1.6.0

func (s *Stmgr) GetNetworkVersion(ctx context.Context, h abi.ChainEpoch) network.Version

func (*Stmgr) GetPaychState added in v1.2.0

func (s *Stmgr) GetPaychState(ctx context.Context, addr address.Address, ts *types.TipSet) (*types.Actor, paych.State, error)

func (*Stmgr) ParentState added in v1.2.0

func (s *Stmgr) ParentState(ctx context.Context, ts *types.TipSet) (*types.TipSet, *tree.State, error)

func (*Stmgr) ParentStateTsk added in v1.2.0

func (s *Stmgr) ParentStateTsk(ctx context.Context, tsk types.TipSetKey) (*types.TipSet, *tree.State, error)

func (*Stmgr) ParentStateView added in v1.2.0

func (s *Stmgr) ParentStateView(ctx context.Context, ts *types.TipSet) (*types.TipSet, *appstate.View, error)

func (*Stmgr) ParentStateViewTsk added in v1.2.0

func (s *Stmgr) ParentStateViewTsk(ctx context.Context, tsk types.TipSetKey) (*types.TipSet, *appstate.View, error)

func (*Stmgr) ResolveToKeyAddress added in v1.2.0

func (s *Stmgr) ResolveToKeyAddress(ctx context.Context, addr address.Address, ts *types.TipSet) (address.Address, error)

func (*Stmgr) Rollback added in v1.2.0

func (s *Stmgr) Rollback(ctx context.Context, pts, cts *types.TipSet) error

deprecated: this implementation needs more considerations

func (*Stmgr) RunStateTransition added in v1.2.0

func (s *Stmgr) RunStateTransition(ctx context.Context, ts *types.TipSet) (root cid.Cid, receipts cid.Cid, err error)

func (*Stmgr) RunStateTransitionV2 added in v1.2.0

func (s *Stmgr) RunStateTransitionV2(ctx context.Context, ts *types.TipSet) (cid.Cid, cid.Cid, error)

deprecated: in future use.

func (*Stmgr) StateView added in v1.2.0

func (s *Stmgr) StateView(ctx context.Context, ts *types.TipSet) (cid.Cid, *appstate.View, error)

func (*Stmgr) StateViewTsk added in v1.2.0

func (s *Stmgr) StateViewTsk(ctx context.Context, tsk types.TipSetKey) (*types.TipSet, cid.Cid, *appstate.View, error)

func (*Stmgr) TipsetState added in v1.2.0

func (s *Stmgr) TipsetState(ctx context.Context, ts *types.TipSet) (*tree.State, error)

func (*Stmgr) TipsetStateTsk added in v1.2.0

func (s *Stmgr) TipsetStateTsk(ctx context.Context, tsk types.TipSetKey) (*types.TipSet, *tree.State, error)

Jump to

Keyboard shortcuts

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