-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: remove DEAL_WEIGHT_MULTIPLIER #1573
Comments
Yes please, if we can, but there might be a challenge somewhere about accounting for older sectors that don't use the simple QAP calculation. I think this complex construction existed in the first place to account for allocating QAP only for the deal duration (less than sector lifetime) associated with some non-zero data. There still exists sectors on the network that had their deal weight calculated as such. |
From what I can see, as long as Where
which leads to our result (without precision adjusting):
If I mess with the It makes me wonder if the original intent was to have a https://spec.filecoin.io/#section-systems.filecoin_mining.sector.sector-quality mentions this multiplier as if it's something to be tuned. I find it hard to imagine a world where "deal space" is going to be treated as anything different than CC space; especially now in a DDO world where the delta between CC and "deals" is just an ephemeral piece manifest. I'll have a go at trying to remove it entirely and see where that gets us. |
Yes, that was an original intent, perhaps before the reality of being unable to prevent gaming it had been fully appreciated. |
Currently, QAP is calculated based on 4 inputs: sector size, sector duration deal weight and verified weight. Both of these are on
SectorOnChainInfo
."Deal weight" and "verified weight" come in as QAP inputs as
unverified_space
andverified_space
onDataActivationOutput
. We multiply these byduration
before passing them in toqa_power_for_weight
(which we also pass induration
, along with sectorsize
).For ProveCommitAggregate and ProveReplicaUpdates, we calculate
unverified_space
based on actual deals andverified_space
based on successful verified claims.For ProveCommitSectors3 and ProveReplicaUpdates3, we calculate
unverified_space
based on pieces without averified_allocation_key
andverified_space
based on successful verified claims (the pieces withverified_allocation_key
but are not successfully claimed are not counted in this).But, when we get down in to
quality_for_weight
, the "deal weight" is effectively ignored. We use the sameduration
we used to make these weights to calculate the totalsector_space_time
, but then the 3 parts we divide up to figure out QAP are:weighted_deal_space_time
- deal weight multiplied by10
(DEAL_WEIGHT_MULTIPLIER
)weighted_verified_space_time
- verified weight multiplied by100
(VERIFIED_DEAL_WEIGHT_MULTIPLIER
)weighted_base_space_time
- the remainder space, not accounted for by deal weight or verified weight, is multiplied by10
(QUALITY_BASE_MULTIPLIER
).So, we're doing some complicated dances to get deal weight into this calculation, but it doesn't end up having any special impact on the calculation.
I propose we remove
DEAL_WEIGHT_MULTIPLIER
and simplify QAP calculation and inputs by removing the need to calculate and supply deal weight. All you need is verified size. This simplification applies here, and to go-state-types whereQualityForWeight
is a copy of the same function here, and in some Lotus APIs that are unnecessarily complex due to the need for full accounting (e.g.StateMinerInitialPledgeCollateral
which really just needs 3 inputs, or ways to calculate them: size, duration and verified space. I'm proposing a new simpler one here, and it potentially could be simplified further: filecoin-project/lotus#12384).As an aside: from what I can tell, deal weight doesn't really have any special impact other than being an interesting field on
SectorOnChainInfo
, even through sector update operations. In a post-DDO world, it seems that the only thing this now tells us with any certainty is that this sector had pieces in some form when onboarded. Even for partially full sectors, Lotus Miner fills out the sector with empty pieces before submitting a piece manifest, so it will still look full (perhaps other mining software does something cleverer for empty space?). So it's essentially a boolean: certain-CC vs maybe-not-CC. Is this correct?The text was updated successfully, but these errors were encountered: