Documentation ¶
Index ¶
- type MiningBase
- type ProverWinningPoSt
- type WinPostAPI
- type WinPostTask
- func (t *WinPostTask) Adder(taskFunc harmonytask.AddTaskFunc)
- func (t *WinPostTask) CanAccept(ids []harmonytask.TaskID, engine *harmonytask.TaskEngine) (*harmonytask.TaskID, error)
- func (t *WinPostTask) Do(taskID harmonytask.TaskID, stillOwned func() bool) (done bool, err error)
- func (t *WinPostTask) TypeDetails() harmonytask.TaskTypeDetails
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MiningBase ¶
MiningBase is the tipset on top of which we plan to construct our next block. Refer to godocs on GetBestMiningCandidate.
type ProverWinningPoSt ¶
type ProverWinningPoSt interface {
GenerateWinningPoSt(ctx context.Context, ppt abi.RegisteredPoStProof, minerID abi.ActorID, sectorInfo []storiface.PostSectorChallenge, randomness abi.PoStRandomness) ([]prooftypes.PoStProof, error)
}
type WinPostAPI ¶
type WinPostAPI interface { ChainHead(context.Context) (*types.TipSet, error) ChainTipSetWeight(context.Context, types.TipSetKey) (types.BigInt, error) ChainGetTipSet(context.Context, types.TipSetKey) (*types.TipSet, error) StateGetBeaconEntry(context.Context, abi.ChainEpoch) (*types.BeaconEntry, error) SyncSubmitBlock(context.Context, *types.BlockMsg) error StateGetRandomnessFromBeacon(ctx context.Context, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte, tsk types.TipSetKey) (abi.Randomness, error) StateGetRandomnessFromTickets(ctx context.Context, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte, tsk types.TipSetKey) (abi.Randomness, error) StateNetworkVersion(context.Context, types.TipSetKey) (network.Version, error) StateMinerInfo(context.Context, address.Address, types.TipSetKey) (api.MinerInfo, error) MinerGetBaseInfo(context.Context, address.Address, abi.ChainEpoch, types.TipSetKey) (*api.MiningBaseInfo, error) MinerCreateBlock(context.Context, *api.BlockTemplate) (*types.BlockMsg, error) MpoolSelect(context.Context, types.TipSetKey, float64) ([]*types.SignedMessage, error) WalletSign(context.Context, address.Address, []byte) (*crypto.Signature, error) }
type WinPostTask ¶
type WinPostTask struct {
// contains filtered or unexported fields
}
func NewWinPostTask ¶
func NewWinPostTask(max int, db *harmonydb.DB, prover ProverWinningPoSt, verifier storiface.Verifier, api WinPostAPI, actors []dtypes.MinerAddress) *WinPostTask
func (*WinPostTask) Adder ¶
func (t *WinPostTask) Adder(taskFunc harmonytask.AddTaskFunc)
func (*WinPostTask) CanAccept ¶
func (t *WinPostTask) CanAccept(ids []harmonytask.TaskID, engine *harmonytask.TaskEngine) (*harmonytask.TaskID, error)
func (*WinPostTask) Do ¶
func (t *WinPostTask) Do(taskID harmonytask.TaskID, stillOwned func() bool) (done bool, err error)
func (*WinPostTask) TypeDetails ¶
func (t *WinPostTask) TypeDetails() harmonytask.TaskTypeDetails
Click to show internal directories.
Click to hide internal directories.