Skip to content

Don't block hosts for potentially temporary issues #773

@n8mgr

Description

@n8mgr

This is something we added to indexd that in hindsight is probably too aggressive. These hosts shouldn't be considered for new contracts or renewals and goodForUpload: false, but they should be able to be used again provided they eventually "fix" the issue. A large portion of the sector migrations came from hosts that were blocked due to a usability issue, but can now be unblocked.

This does complicate migrations. We will need to decide on when to migrate existing data, especially if we decide to immediately treat the hosts as unusable for external apps.

Basically anything in here should no longer be considered a permanent offense:

// FailedChecks returns a string representing all failed Usability checks.
func (u Usability) FailedChecks() []string {
	var reasons []string
	if !u.Uptime {
		reasons = append(reasons, "Uptime")
	}
	if !u.MaxContractDuration {
		reasons = append(reasons, "MaxContractDuration")
	}
	if !u.MaxCollateral {
		reasons = append(reasons, "MaxCollateral")
	}
	if !u.ProtocolVersion {
		reasons = append(reasons, "ProtocolVersion")
	}
	if !u.PriceValidity {
		reasons = append(reasons, "PriceValidity")
	}
	if !u.AcceptingContracts {
		reasons = append(reasons, "AcceptingContracts")
	}
	if !u.ContractPrice {
		reasons = append(reasons, "ContractPrice")
	}
	if !u.Collateral {
		reasons = append(reasons, "Collateral")
	}
	if !u.StoragePrice {
		reasons = append(reasons, "StoragePrice")
	}
	if !u.IngressPrice {
		reasons = append(reasons, "IngressPrice")
	}
	if !u.EgressPrice {
		reasons = append(reasons, "EgressPrice")
	}
	if !u.FreeSectorPrice {
		reasons = append(reasons, "FreeSectorPrice")
	}
	return reasons
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionIssues that warrant more discussion before implementation

    Type

    No type

    Projects

    Status

    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions