Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

Miner: Don't request deal weight for empty deal array #904

Closed
wadealexc opened this issue Aug 5, 2020 · 1 comment
Closed

Miner: Don't request deal weight for empty deal array #904

wadealexc opened this issue Aug 5, 2020 · 1 comment
Assignees
Labels
cleanup Technical debt recovery and other cleanup work P2 Medium priority, beneficial for network functionality and growth scale Related to chain state or throughput scalability

Comments

@wadealexc
Copy link

Miner.PreCommitSector makes an unnecessary call to the Market actor when precommitting a CC Sector:

func requestDealWeight(rt Runtime, dealIDs []abi.DealID, sectorStart, sectorExpiry abi.ChainEpoch) market.VerifyDealsForActivationReturn {
var dealWeights market.VerifyDealsForActivationReturn
ret, code := rt.Send(
builtin.StorageMarketActorAddr,
builtin.MethodsMarket.VerifyDealsForActivation,
&market.VerifyDealsForActivationParams{
DealIDs: dealIDs,
SectorStart: sectorStart,
SectorExpiry: sectorExpiry,
},
abi.NewTokenAmount(0),
)

Recommendation

requestDealWeight should not invoke the market actor if len(dealIDs) == 0

@Stebalien Stebalien self-assigned this Aug 5, 2020
@anorth anorth added cleanup Technical debt recovery and other cleanup work P2 Medium priority, beneficial for network functionality and growth scale Related to chain state or throughput scalability labels Aug 6, 2020
@anorth
Copy link
Member

anorth commented Aug 13, 2020

Closing as duplicate of #474, even though it's only part of it.

@anorth anorth closed this as completed Aug 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cleanup Technical debt recovery and other cleanup work P2 Medium priority, beneficial for network functionality and growth scale Related to chain state or throughput scalability
Projects
None yet
Development

No branches or pull requests

3 participants