Skip to content

Commit 467c6ff

Browse files
committed
chore(deps): adapt to QAP API changes
Ref: filecoin-project/go-state-types#308
1 parent 4f92348 commit 467c6ff

File tree

24 files changed

+65
-61
lines changed

24 files changed

+65
-61
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
# UNRELEASED
44
- Improve eth filter performance for nodes serving many clients. ([filecoin-project/lotus#12603](https://github.com/filecoin-project/lotus/pull/12603))
55

6+
## Improvements
7+
8+
- The miner actor builtin `QAPowerForWeight` no longer accepts the unused "dealWeight" parameter, the function signature now only takes 3 arguments: sectorSize, sectorDuration, verifiedWeight. ([filecoin-project/lotus#12445](https://github.com/filecoin-project/lotus/pull/12445))
9+
610
## Bug Fixes
711

812
- Make `EthTraceFilter` / `trace_filter` skip null rounds instead of erroring. ([filecoin-project/lotus#12702](https://github.com/filecoin-project/lotus/pull/12702))

chain/actors/builtin/builtin.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import (
88
"github.com/filecoin-project/go-address"
99
"github.com/filecoin-project/go-state-types/abi"
1010
"github.com/filecoin-project/go-state-types/builtin"
11+
minertypes "github.com/filecoin-project/go-state-types/builtin/v15/miner"
1112
smoothingtypes "github.com/filecoin-project/go-state-types/builtin/v8/util/smoothing"
12-
minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner"
1313
"github.com/filecoin-project/go-state-types/manifest"
1414
"github.com/filecoin-project/go-state-types/proof"
1515
builtin0 "github.com/filecoin-project/specs-actors/actors/builtin"
@@ -56,8 +56,8 @@ type ExtendedSectorInfo = proof.ExtendedSectorInfo
5656
type PoStProof = proof.PoStProof
5757
type FilterEstimate = smoothingtypes.FilterEstimate
5858

59-
func QAPowerForWeight(size abi.SectorSize, duration abi.ChainEpoch, dealWeight, verifiedWeight abi.DealWeight) abi.StoragePower {
60-
return minertypes.QAPowerForWeight(size, duration, dealWeight, verifiedWeight)
59+
func QAPowerForWeight(size abi.SectorSize, duration abi.ChainEpoch, verifiedWeight abi.DealWeight) abi.StoragePower {
60+
return minertypes.QAPowerForWeight(size, duration, verifiedWeight)
6161
}
6262

6363
func ActorNameByCode(c cid.Cid) string {

chain/actors/builtin/builtin.go.template

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919

2020
"github.com/filecoin-project/lotus/chain/actors"
2121

22-
minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner"
22+
minertypes "github.com/filecoin-project/go-state-types/builtin/v15/miner"
2323
smoothingtypes "github.com/filecoin-project/go-state-types/builtin/v8/util/smoothing"
2424
)
2525

@@ -56,8 +56,8 @@ type ExtendedSectorInfo = proof.ExtendedSectorInfo
5656
type PoStProof = proof.PoStProof
5757
type FilterEstimate = smoothingtypes.FilterEstimate
5858

59-
func QAPowerForWeight(size abi.SectorSize, duration abi.ChainEpoch, dealWeight, verifiedWeight abi.DealWeight) abi.StoragePower {
60-
return minertypes.QAPowerForWeight(size, duration, dealWeight, verifiedWeight)
59+
func QAPowerForWeight(size abi.SectorSize, duration abi.ChainEpoch, verifiedWeight abi.DealWeight) abi.StoragePower {
60+
return minertypes.QAPowerForWeight(size, duration, verifiedWeight)
6161
}
6262

6363
func ActorNameByCode(c cid.Cid) string {

chain/actors/builtin/market/actor.go.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ type State interface {
9090
Proposals() (DealProposals, error)
9191
VerifyDealsForActivation(
9292
minerAddr address.Address, deals []abi.DealID, currEpoch, sectorExpiry abi.ChainEpoch,
93-
) (weight, verifiedWeight abi.DealWeight, err error)
93+
) (verifiedWeight abi.DealWeight, err error)
9494
NextID() (abi.DealID, error)
9595
GetState() interface{}
9696
GetAllocationIdForPendingDeal(dealId abi.DealID) (verifregtypes.AllocationId, error)

chain/actors/builtin/market/market.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ type State interface {
167167
Proposals() (DealProposals, error)
168168
VerifyDealsForActivation(
169169
minerAddr address.Address, deals []abi.DealID, currEpoch, sectorExpiry abi.ChainEpoch,
170-
) (weight, verifiedWeight abi.DealWeight, err error)
170+
) (verifiedWeight abi.DealWeight, err error)
171171
NextID() (abi.DealID, error)
172172
GetState() interface{}
173173
GetAllocationIdForPendingDeal(dealId abi.DealID) (verifregtypes.AllocationId, error)

chain/actors/builtin/market/state.go.template

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@ func (s *state{{.v}}) LockedTable() (BalanceTable, error) {
146146

147147
func (s *state{{.v}}) VerifyDealsForActivation(
148148
minerAddr address.Address, deals []abi.DealID, currEpoch, sectorExpiry abi.ChainEpoch,
149-
) (weight, verifiedWeight abi.DealWeight, err error) {
150-
w, vw{{if (ge .v 2)}}, _{{end}}, err := market{{.v}}.ValidateDealsForActivation(&s.State, s.store, deals, minerAddr, sectorExpiry, currEpoch)
151-
return w, vw, err
149+
) (verifiedWeight abi.DealWeight, err error) {
150+
_, vw{{if (ge .v 2)}}, _{{end}}, err := market{{.v}}.ValidateDealsForActivation(&s.State, s.store, deals, minerAddr, sectorExpiry, currEpoch)
151+
return vw, err
152152
}
153153

154154
func (s *state{{.v}}) NextID() (abi.DealID, error) {

chain/actors/builtin/market/v0.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

chain/actors/builtin/market/v10.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

chain/actors/builtin/market/v11.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

chain/actors/builtin/market/v12.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)