Documentation
¶
Index ¶
Constants ¶
View Source
const ( // maxCheckProgressAttempts defines the maximum number of failed attempts // before we abandon the current lease and restart the participation process. // // The default backoff takes 12 attempts to reach a maximum delay of 1 minute. // Allowing for 13 failures results in approximately 2 minutes of backoff since // the lease was granted. Given a lease validity of up to 5 instances, this means // we would give up on checking the lease during its mid-validity period; // typically when we would try to renew the participation ticket. Hence, the value // to 13. ParticipationCheckProgressMaxAttempts = 13 // ParticipationLeaseTerm is the number of instances the miner will attempt to lease from nodes. ParticipationLeaseTerm = 5 )
View Source
const (
// F3LeaseTerm The number of instances the miner will attempt to lease from nodes.
F3LeaseTerm = 5
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type F3ParticipationAPI ¶
type F3ParticipationAPI interface { F3GetOrRenewParticipationTicket(ctx context.Context, minerID address.Address, previous types.F3ParticipationTicket, instances uint64) (types.F3ParticipationTicket, error) //perm:sign F3Participate(ctx context.Context, ticket types.F3ParticipationTicket) (types.F3ParticipationLease, error) F3GetProgress(ctx context.Context) (gpbft.Instant, error) F3GetManifest(ctx context.Context) (*manifest.Manifest, error) }
type MultiParticipant ¶
type MultiParticipant struct {
// contains filtered or unexported fields
}
func NewMultiParticipant ¶
func NewMultiParticipant(ctx helpers.MetricsCtx, node v1api.FullNode, minerManager miner_manager.MinerManageAPI, ) (*MultiParticipant, error)
func (*MultiParticipant) MonitorMiner ¶
func (mp *MultiParticipant) MonitorMiner(ctx context.Context)
type Participant ¶
type Participant struct {
// contains filtered or unexported fields
}
func NewParticipant ¶
func NewParticipant(ctx context.Context, node F3ParticipationAPI, participant address.Address, backoff *backoff.Backoff, maxCheckProgress int, leaseTerm uint64, ) *Participant
Click to show internal directories.
Click to hide internal directories.