Documentation ¶
Overview ¶
Copyright © 2021 NAME HERE <EMAIL ADDRESS>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- func Execute()
- func ExpectedRewardForPower(rewardEstimate, networkQAPowerEstimate smoothing.FilterEstimate, ...) abi.TokenAmount
- func PledgePenaltyForTermination(dayReward abi.TokenAmount, sectorAge abi.ChainEpoch, ...) abi.TokenAmount
- func PledgePenaltyForTerminationLowerBound(rewardEstimate, networkQAPowerEstimate smoothing.FilterEstimate, ...) abi.TokenAmount
- func QAPowerForSector(size abi.SectorSize, sector *miner.SectorOnChainInfo) abi.StoragePower
- func QAPowerForWeight(size abi.SectorSize, duration abi.ChainEpoch, ...) abi.StoragePower
- func QualityForWeight(size abi.SectorSize, duration abi.ChainEpoch, ...) abi.SectorQuality
Constants ¶
const TerminationLifetimeCap = 140 // PARAM_SPEC
Variables ¶
var LotusNodeAddr = "http://api.node.glif.io/rpc/v0"
var TerminationPenaltyLowerBoundProjectionPeriod = abi.ChainEpoch((builtin.EpochsInDay * 35) / 10) // PARAM_SPEC
Functions ¶
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func ExpectedRewardForPower ¶
func ExpectedRewardForPower(rewardEstimate, networkQAPowerEstimate smoothing.FilterEstimate, qaSectorPower abi.StoragePower, projectionDuration abi.ChainEpoch) abi.TokenAmount
The projected block reward a sector would earn over some period. Also known as "BR(t)". BR(t) = ProjectedRewardFraction(t) * SectorQualityAdjustedPower ProjectedRewardFraction(t) is the sum of estimated reward over estimated total power over all epochs in the projection period [t t+projectionDuration]
func PledgePenaltyForTermination ¶
func PledgePenaltyForTermination(dayReward abi.TokenAmount, sectorAge abi.ChainEpoch, twentyDayRewardAtActivation abi.TokenAmount, networkQAPowerEstimate smoothing.FilterEstimate, qaSectorPower abi.StoragePower, rewardEstimate smoothing.FilterEstimate, replacedDayReward abi.TokenAmount, replacedSectorAge abi.ChainEpoch) abi.TokenAmount
Penalty to locked pledge collateral for the termination of a sector before scheduled expiry. SectorAge is the time between the sector's activation and termination. replacedDayReward and replacedSectorAge are the day reward and age of the replaced sector in a capacity upgrade. They must be zero if no upgrade occurred.
func PledgePenaltyForTerminationLowerBound ¶
func PledgePenaltyForTerminationLowerBound(rewardEstimate, networkQAPowerEstimate smoothing.FilterEstimate, qaSectorPower abi.StoragePower) abi.TokenAmount
Lower bound on the penalty for a terminating sector. It is a projection of the expected reward earned by the sector. Also known as "SP(t)"
func QAPowerForSector ¶
func QAPowerForSector(size abi.SectorSize, sector *miner.SectorOnChainInfo) abi.StoragePower
The quality-adjusted power for a sector.
func QAPowerForWeight ¶
func QAPowerForWeight(size abi.SectorSize, duration abi.ChainEpoch, dealWeight, verifiedWeight abi.DealWeight) abi.StoragePower
The power for a sector size, committed duration, and weight.
func QualityForWeight ¶
func QualityForWeight(size abi.SectorSize, duration abi.ChainEpoch, dealWeight, verifiedWeight abi.DealWeight) abi.SectorQuality
DealWeight and VerifiedDealWeight are spacetime occupied by regular deals and verified deals in a sector. Sum of DealWeight and VerifiedDealWeight should be less than or equal to total SpaceTime of a sector. Sectors full of VerifiedDeals will have a SectorQuality of VerifiedDealWeightMultiplier/QualityBaseMultiplier. Sectors full of Deals will have a SectorQuality of DealWeightMultiplier/QualityBaseMultiplier. Sectors with neither will have a SectorQuality of QualityBaseMultiplier/QualityBaseMultiplier. SectorQuality of a sector is a weighted average of multipliers based on their proportions.
Types ¶
This section is empty.