Documentation ¶
Index ¶
- Variables
- func CheckTotalFIL(ctx context.Context, sm *StateManager, ts *types.TipSet) (abi.TokenAmount, error)
- func ComputeState(ctx context.Context, sm *StateManager, height abi.ChainEpoch, ...) (cid.Cid, []*api.InvocResult, error)
- func GetFilBurnt(ctx context.Context, st *state.StateTree) (abi.TokenAmount, error)
- func GetFilMined(ctx context.Context, st *state.StateTree) (abi.TokenAmount, error)
- func GetLookbackTipSetForRound(ctx context.Context, sm *StateManager, ts *types.TipSet, round abi.ChainEpoch) (*types.TipSet, error)
- func GetMinerSectorSet(ctx context.Context, sm *StateManager, ts *types.TipSet, maddr address.Address, ...) ([]*miner.SectorOnChainInfo, error)
- func GetMinerSlashed(ctx context.Context, sm *StateManager, ts *types.TipSet, maddr address.Address) (bool, error)
- func GetMinerWorkerRaw(ctx context.Context, sm *StateManager, st cid.Cid, maddr address.Address) (address.Address, error)
- func GetNetworkName(ctx context.Context, sm *StateManager, st cid.Cid) (dtypes.NetworkName, error)
- func GetPower(ctx context.Context, sm *StateManager, ts *types.TipSet, maddr address.Address) (power.Claim, power.Claim, bool, error)
- func GetPowerRaw(ctx context.Context, sm *StateManager, st cid.Cid, maddr address.Address) (power.Claim, power.Claim, bool, error)
- func GetReturnType(ctx context.Context, sm *StateManager, to address.Address, ...) (cbg.CBORUnmarshaler, error)
- func GetSectorsForWinningPoSt(ctx context.Context, pv ffiwrapper.Verifier, sm *StateManager, st cid.Cid, ...) ([]proof0.SectorInfo, error)
- func GetStorageDeal(ctx context.Context, sm *StateManager, dealID abi.DealID, ts *types.TipSet) (*api.MarketDeal, error)
- func ListMinerActors(ctx context.Context, sm *StateManager, ts *types.TipSet) ([]address.Address, error)
- func MinerGetBaseInfo(ctx context.Context, sm *StateManager, bcs beacon.Schedule, ...) (*api.MiningBaseInfo, error)
- func MinerHasMinPower(ctx context.Context, sm *StateManager, addr address.Address, ts *types.TipSet) (bool, error)
- func MinerSectorInfo(ctx context.Context, sm *StateManager, maddr address.Address, ...) (*miner.SectorOnChainInfo, error)
- func PreCommitInfo(ctx context.Context, sm *StateManager, maddr address.Address, ...) (*miner.SectorPreCommitOnChainInfo, error)
- func StateMinerInfo(ctx context.Context, sm *StateManager, ts *types.TipSet, maddr address.Address) (*miner.MinerInfo, error)
- func UpgradeFaucetBurnRecovery(ctx context.Context, sm *StateManager, cb ExecCallback, root cid.Cid, ...) (cid.Cid, error)
- func UpgradeIgnition(ctx context.Context, sm *StateManager, cb ExecCallback, root cid.Cid, ...) (cid.Cid, error)
- func UpgradeLiftoff(ctx context.Context, sm *StateManager, cb ExecCallback, root cid.Cid, ...) (cid.Cid, error)
- type ExecCallback
- type MethodMeta
- type StateManager
- func (sm *StateManager) ApplyBlocks(ctx context.Context, parentEpoch abi.ChainEpoch, pstate cid.Cid, ...) (cid.Cid, cid.Cid, error)
- func (sm *StateManager) Call(ctx context.Context, msg *types.Message, ts *types.TipSet) (*api.InvocResult, error)
- func (sm *StateManager) CallRaw(ctx context.Context, msg *types.Message, bstate cid.Cid, r vm.Rand, ...) (*api.InvocResult, error)
- func (sm *StateManager) CallWithGas(ctx context.Context, msg *types.Message, priorMsgs []types.ChainMsg, ...) (*api.InvocResult, error)
- func (sm *StateManager) ChainStore() *store.ChainStore
- func (sm *StateManager) ExecutionTrace(ctx context.Context, ts *types.TipSet) (cid.Cid, []*api.InvocResult, error)
- func (sm *StateManager) GetBlsPublicKey(ctx context.Context, addr address.Address, ts *types.TipSet) (pubk []byte, err error)
- func (sm *StateManager) GetCirculatingSupply(ctx context.Context, height abi.ChainEpoch, st *state.StateTree) (abi.TokenAmount, error)
- func (sm *StateManager) GetCirculatingSupplyDetailed(ctx context.Context, height abi.ChainEpoch, st *state.StateTree) (api.CirculatingSupply, error)
- func (sm *StateManager) GetFilLocked(ctx context.Context, st *state.StateTree) (abi.TokenAmount, error)
- func (sm *StateManager) GetFilVested(ctx context.Context, height abi.ChainEpoch, st *state.StateTree) (abi.TokenAmount, error)
- func (sm *StateManager) GetMarketState(ctx context.Context, ts *types.TipSet) (market.State, error)
- func (sm *StateManager) GetNtwkVersion(ctx context.Context, height abi.ChainEpoch) network.Version
- func (sm *StateManager) GetPaychState(ctx context.Context, addr address.Address, ts *types.TipSet) (*types.Actor, paych.State, error)
- func (sm *StateManager) GetReceipt(ctx context.Context, msg cid.Cid, ts *types.TipSet) (*types.MessageReceipt, error)
- func (sm *StateManager) ListAllActors(ctx context.Context, ts *types.TipSet) ([]address.Address, error)
- func (sm *StateManager) LoadActor(_ context.Context, addr address.Address, ts *types.TipSet) (*types.Actor, error)
- func (sm *StateManager) LoadActorRaw(_ context.Context, addr address.Address, st cid.Cid) (*types.Actor, error)
- func (sm *StateManager) LoadActorTsk(_ context.Context, addr address.Address, tsk types.TipSetKey) (*types.Actor, error)
- func (sm *StateManager) LookupID(ctx context.Context, addr address.Address, ts *types.TipSet) (address.Address, error)
- func (sm *StateManager) MarketBalance(ctx context.Context, addr address.Address, ts *types.TipSet) (api.MarketBalance, error)
- func (sm *StateManager) ParentState(ts *types.TipSet) (*state.StateTree, error)
- func (sm *StateManager) ParentStateTsk(tsk types.TipSetKey) (*state.StateTree, error)
- func (sm *StateManager) Replay(ctx context.Context, ts *types.TipSet, mcid cid.Cid) (*types.Message, *vm.ApplyRet, error)
- func (sm *StateManager) ResolveToKeyAddress(ctx context.Context, addr address.Address, ts *types.TipSet) (address.Address, error)
- func (sm *StateManager) SearchForMessage(ctx context.Context, mcid cid.Cid) (*types.TipSet, *types.MessageReceipt, cid.Cid, error)
- func (sm *StateManager) SetVMConstructor(nvm func(context.Context, *vm.VMOpts) (*vm.VM, error))
- func (sm *StateManager) StateTree(st cid.Cid) (*state.StateTree, error)
- func (sm *StateManager) TipSetState(ctx context.Context, ts *types.TipSet) (st cid.Cid, rec cid.Cid, err error)
- func (sm *StateManager) ValidateChain(ctx context.Context, ts *types.TipSet) error
- func (sm *StateManager) WaitForMessage(ctx context.Context, mcid cid.Cid, confidence uint64) (*types.TipSet, *types.MessageReceipt, cid.Cid, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ForksAtHeight = map[abi.ChainEpoch]func(context.Context, *StateManager, ExecCallback, cid.Cid, *types.TipSet) (cid.Cid, error){ build.UpgradeBreezeHeight: UpgradeFaucetBurnRecovery, build.UpgradeIgnitionHeight: UpgradeIgnition, build.UpgradeLiftoffHeight: UpgradeLiftoff, }
View Source
var MethodsMap = map[cid.Cid]map[abi.MethodNum]MethodMeta{}
Functions ¶
func CheckTotalFIL ¶ added in v0.5.0
func CheckTotalFIL(ctx context.Context, sm *StateManager, ts *types.TipSet) (abi.TokenAmount, error)
func ComputeState ¶ added in v0.2.5
func ComputeState(ctx context.Context, sm *StateManager, height abi.ChainEpoch, msgs []*types.Message, ts *types.TipSet) (cid.Cid, []*api.InvocResult, error)
func GetFilBurnt ¶ added in v0.5.0
func GetFilMined ¶ added in v0.5.0
func GetLookbackTipSetForRound ¶ added in v0.3.0
func GetLookbackTipSetForRound(ctx context.Context, sm *StateManager, ts *types.TipSet, round abi.ChainEpoch) (*types.TipSet, error)
func GetMinerSectorSet ¶
func GetMinerSectorSet(ctx context.Context, sm *StateManager, ts *types.TipSet, maddr address.Address, snos *bitfield.BitField) ([]*miner.SectorOnChainInfo, error)
func GetMinerSlashed ¶
func GetMinerWorkerRaw ¶
func GetNetworkName ¶ added in v0.3.0
func GetNetworkName(ctx context.Context, sm *StateManager, st cid.Cid) (dtypes.NetworkName, error)
func GetPowerRaw ¶ added in v0.3.0
func GetReturnType ¶ added in v0.5.0
func GetReturnType(ctx context.Context, sm *StateManager, to address.Address, method abi.MethodNum, ts *types.TipSet) (cbg.CBORUnmarshaler, error)
func GetSectorsForWinningPoSt ¶ added in v0.3.0
func GetSectorsForWinningPoSt(ctx context.Context, pv ffiwrapper.Verifier, sm *StateManager, st cid.Cid, maddr address.Address, rand abi.PoStRandomness) ([]proof0.SectorInfo, error)
func GetStorageDeal ¶
func GetStorageDeal(ctx context.Context, sm *StateManager, dealID abi.DealID, ts *types.TipSet) (*api.MarketDeal, error)
func ListMinerActors ¶ added in v0.1.5
func MinerGetBaseInfo ¶ added in v0.3.0
func MinerGetBaseInfo(ctx context.Context, sm *StateManager, bcs beacon.Schedule, tsk types.TipSetKey, round abi.ChainEpoch, maddr address.Address, pv ffiwrapper.Verifier) (*api.MiningBaseInfo, error)
func MinerHasMinPower ¶ added in v0.5.0
func MinerSectorInfo ¶ added in v0.3.1
func MinerSectorInfo(ctx context.Context, sm *StateManager, maddr address.Address, sid abi.SectorNumber, ts *types.TipSet) (*miner.SectorOnChainInfo, error)
func PreCommitInfo ¶ added in v0.3.0
func PreCommitInfo(ctx context.Context, sm *StateManager, maddr address.Address, sid abi.SectorNumber, ts *types.TipSet) (*miner.SectorPreCommitOnChainInfo, error)
func StateMinerInfo ¶ added in v0.3.0
func UpgradeFaucetBurnRecovery ¶ added in v0.6.0
func UpgradeFaucetBurnRecovery(ctx context.Context, sm *StateManager, cb ExecCallback, root cid.Cid, ts *types.TipSet) (cid.Cid, error)
func UpgradeIgnition ¶ added in v0.8.0
func UpgradeIgnition(ctx context.Context, sm *StateManager, cb ExecCallback, root cid.Cid, ts *types.TipSet) (cid.Cid, error)
func UpgradeLiftoff ¶ added in v0.8.0
func UpgradeLiftoff(ctx context.Context, sm *StateManager, cb ExecCallback, root cid.Cid, ts *types.TipSet) (cid.Cid, error)
Types ¶
type ExecCallback ¶ added in v0.3.0
type MethodMeta ¶ added in v0.6.0
type StateManager ¶
type StateManager struct {
// contains filtered or unexported fields
}
func NewStateManager ¶
func NewStateManager(cs *store.ChainStore) *StateManager
func (*StateManager) ApplyBlocks ¶ added in v0.3.0
func (sm *StateManager) ApplyBlocks(ctx context.Context, parentEpoch abi.ChainEpoch, pstate cid.Cid, bms []store.BlockMessages, epoch abi.ChainEpoch, r vm.Rand, cb ExecCallback, baseFee abi.TokenAmount, ts *types.TipSet) (cid.Cid, cid.Cid, error)
func (*StateManager) Call ¶
func (sm *StateManager) Call(ctx context.Context, msg *types.Message, ts *types.TipSet) (*api.InvocResult, error)
func (*StateManager) CallRaw ¶
func (sm *StateManager) CallRaw(ctx context.Context, msg *types.Message, bstate cid.Cid, r vm.Rand, bheight abi.ChainEpoch) (*api.InvocResult, error)
func (*StateManager) CallWithGas ¶ added in v0.5.0
func (*StateManager) ChainStore ¶
func (sm *StateManager) ChainStore() *store.ChainStore
func (*StateManager) ExecutionTrace ¶ added in v0.3.0
func (sm *StateManager) ExecutionTrace(ctx context.Context, ts *types.TipSet) (cid.Cid, []*api.InvocResult, error)
func (*StateManager) GetBlsPublicKey ¶
func (*StateManager) GetCirculatingSupply ¶ added in v0.5.0
func (sm *StateManager) GetCirculatingSupply(ctx context.Context, height abi.ChainEpoch, st *state.StateTree) (abi.TokenAmount, error)
func (*StateManager) GetCirculatingSupplyDetailed ¶ added in v0.5.0
func (sm *StateManager) GetCirculatingSupplyDetailed(ctx context.Context, height abi.ChainEpoch, st *state.StateTree) (api.CirculatingSupply, error)
func (*StateManager) GetFilLocked ¶ added in v0.5.0
func (sm *StateManager) GetFilLocked(ctx context.Context, st *state.StateTree) (abi.TokenAmount, error)
func (*StateManager) GetFilVested ¶ added in v0.5.0
func (sm *StateManager) GetFilVested(ctx context.Context, height abi.ChainEpoch, st *state.StateTree) (abi.TokenAmount, error)
GetVestedFunds returns all funds that have "left" actors that are in the genesis state: - For Multisigs, it counts the actual amounts that have vested at the given epoch - For Accounts, it counts max(currentBalance - genesisBalance, 0).
func (*StateManager) GetMarketState ¶ added in v0.7.2
func (*StateManager) GetNtwkVersion ¶ added in v0.6.0
func (sm *StateManager) GetNtwkVersion(ctx context.Context, height abi.ChainEpoch) network.Version
func (*StateManager) GetPaychState ¶ added in v0.7.2
func (*StateManager) GetReceipt ¶
func (sm *StateManager) GetReceipt(ctx context.Context, msg cid.Cid, ts *types.TipSet) (*types.MessageReceipt, error)
func (*StateManager) ListAllActors ¶
func (*StateManager) LoadActorRaw ¶ added in v0.7.2
func (*StateManager) LoadActorTsk ¶ added in v0.7.2
func (*StateManager) MarketBalance ¶
func (sm *StateManager) MarketBalance(ctx context.Context, addr address.Address, ts *types.TipSet) (api.MarketBalance, error)
func (*StateManager) ParentState ¶ added in v0.7.2
func (*StateManager) ParentStateTsk ¶ added in v0.7.2
func (*StateManager) ResolveToKeyAddress ¶
func (sm *StateManager) ResolveToKeyAddress(ctx context.Context, addr address.Address, ts *types.TipSet) (address.Address, error)
ResolveToKeyAddress is similar to `vm.ResolveToKeyAddr` but does not allow `Actor` type of addresses. Uses the `TipSet` `ts` to generate the VM state.
func (*StateManager) SearchForMessage ¶ added in v0.3.0
func (sm *StateManager) SearchForMessage(ctx context.Context, mcid cid.Cid) (*types.TipSet, *types.MessageReceipt, cid.Cid, error)
func (*StateManager) SetVMConstructor ¶ added in v0.2.8
func (*StateManager) StateTree ¶ added in v0.7.2
func (sm *StateManager) StateTree(st cid.Cid) (*state.StateTree, error)
func (*StateManager) TipSetState ¶
func (*StateManager) ValidateChain ¶ added in v0.2.6
func (*StateManager) WaitForMessage ¶
func (sm *StateManager) WaitForMessage(ctx context.Context, mcid cid.Cid, confidence uint64) (*types.TipSet, *types.MessageReceipt, cid.Cid, error)
WaitForMessage blocks until a message appears on chain. It looks backwards in the chain to see if this has already happened. It guarantees that the message has been on chain for at least confidence epochs without being reverted before returning.
Click to show internal directories.
Click to hide internal directories.