Documentation ¶
Index ¶
- func MakeMsgGasCost(msg *types.Message, ret *vm.Ret) types.MsgGasCost
- type IStateManager
- type Stmgr
- func (s *Stmgr) Call(ctx context.Context, msg *types.Message, ts *types.TipSet) (*types.InvocResult, error)
- func (s *Stmgr) CallAtStateAndVersion(ctx context.Context, msg *types.Message, stateCid cid.Cid, v network.Version) (*types.InvocResult, error)
- func (s *Stmgr) CallWithGas(ctx context.Context, msg *types.Message, priorMsgs []types.ChainMsg, ...) (*types.InvocResult, error)
- func (s *Stmgr) Close(ctx context.Context)
- func (s *Stmgr) FlushChainHead() (*types.TipSet, error)
- func (s *Stmgr) GetActorAt(ctx context.Context, addr address.Address, ts *types.TipSet) (*types.Actor, error)
- func (s *Stmgr) GetActorAtTsk(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*types.Actor, error)
- func (s *Stmgr) GetMarketState(ctx context.Context, ts *types.TipSet) (market.State, error)
- func (s *Stmgr) GetNetworkVersion(ctx context.Context, h abi.ChainEpoch) network.Version
- func (s *Stmgr) GetPaychState(ctx context.Context, addr address.Address, ts *types.TipSet) (*types.Actor, paych.State, error)
- func (s *Stmgr) ParentState(ctx context.Context, ts *types.TipSet) (*types.TipSet, *tree.State, error)
- func (s *Stmgr) ParentStateTsk(ctx context.Context, tsk types.TipSetKey) (*types.TipSet, *tree.State, error)
- func (s *Stmgr) ParentStateView(ctx context.Context, ts *types.TipSet) (*types.TipSet, *appstate.View, error)
- func (s *Stmgr) ParentStateViewTsk(ctx context.Context, tsk types.TipSetKey) (*types.TipSet, *appstate.View, error)
- func (s *Stmgr) Replay(ctx context.Context, ts *types.TipSet, msgCID cid.Cid) (*types.Message, *vm.Ret, error)
- func (s *Stmgr) ResolveToDeterministicAddress(ctx context.Context, addr address.Address, ts *types.TipSet) (address.Address, error)
- func (s *Stmgr) Rollback(ctx context.Context, pts, cts *types.TipSet) error
- func (s *Stmgr) RunStateTransition(ctx context.Context, ts *types.TipSet, cb vm.ExecCallBack) (root cid.Cid, receipts cid.Cid, err error)
- func (s *Stmgr) RunStateTransitionV2(ctx context.Context, ts *types.TipSet) (cid.Cid, cid.Cid, error)
- func (s *Stmgr) StateView(ctx context.Context, ts *types.TipSet) (cid.Cid, *appstate.View, error)
- func (s *Stmgr) StateViewTsk(ctx context.Context, tsk types.TipSetKey) (*types.TipSet, cid.Cid, *appstate.View, error)
- func (s *Stmgr) TipsetState(ctx context.Context, ts *types.TipSet) (*tree.State, error)
- func (s *Stmgr) TipsetStateTsk(ctx context.Context, tsk types.TipSetKey) (*types.TipSet, *tree.State, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeMsgGasCost ¶ added in v1.10.0
Types ¶
type IStateManager ¶
type IStateManager interface { ResolveToDeterministicAddress(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) (*types.InvocResult, 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, ms *chain.MessageStore, cp consensus.StateTransformer, rnd consensus.ChainRandomness, fork fork.IFork, gasSchedule *gas.PricesSchedule, syscallsImpl vm.SyscallsImpl, actorDebugging bool, ) *Stmgr
func (*Stmgr) Call ¶ added in v1.2.0
func (s *Stmgr) Call(ctx context.Context, msg *types.Message, ts *types.TipSet) (*types.InvocResult, error)
Call applies the given message to the given tipset's parent state, at the epoch following the tipset's parent. In the presence of null blocks, the height at which the message is invoked may be less than the specified tipset.
func (*Stmgr) CallAtStateAndVersion ¶ added in v1.10.0
func (s *Stmgr) CallAtStateAndVersion(ctx context.Context, msg *types.Message, stateCid cid.Cid, v network.Version) (*types.InvocResult, error)
CallAtStateAndVersion allows you to specify a message to execute on the given stateCid and network version. This should mostly be used for gas modelling on a migrated state. Tipset here is not needed because stateCid and network version fully describe execution we want. The internal function will get the heaviest tipset for use for things like basefee, which we don't really care about here.
func (*Stmgr) CallWithGas ¶ added in v1.2.0
func (s *Stmgr) CallWithGas(ctx context.Context, msg *types.Message, priorMsgs []types.ChainMsg, ts *types.TipSet) (*types.InvocResult, error)
CallWithGas calculates the state for a given tipset, and then applies the given message on top of that state.
func (*Stmgr) FlushChainHead ¶ added in v1.2.0
func (*Stmgr) GetActorAt ¶ added in v1.2.0
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 (*Stmgr) GetNetworkVersion ¶ added in v1.6.0
func (*Stmgr) GetPaychState ¶ added in v1.2.0
func (*Stmgr) ParentState ¶ added in v1.2.0
func (*Stmgr) ParentStateTsk ¶ added in v1.2.0
func (*Stmgr) ParentStateView ¶ added in v1.2.0
func (*Stmgr) ParentStateViewTsk ¶ added in v1.2.0
func (*Stmgr) ResolveToDeterministicAddress ¶ added in v1.10.0
func (*Stmgr) RunStateTransition ¶ added in v1.2.0
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.