gen, fix build with new state-types

This commit is contained in:
Łukasz Magiera 2023-07-12 15:56:51 +02:00
parent 518c2cdf6e
commit 2f19a5f66d
6 changed files with 13 additions and 7 deletions

View File

@ -174,7 +174,7 @@ func PreferredSealProofTypeFromWindowPoStType(nver network.Version, proof abi.Re
} }
} }
if nver < network.SyntheticVersion || !configWantSynthetic { if nver < MinSyntheticPoRepVersion || !configWantSynthetic {
switch proof { switch proof {
case abi.RegisteredPoStProof_StackedDrgWindow2KiBV1, abi.RegisteredPoStProof_StackedDrgWindow2KiBV1_1: case abi.RegisteredPoStProof_StackedDrgWindow2KiBV1, abi.RegisteredPoStProof_StackedDrgWindow2KiBV1_1:
return abi.RegisteredSealProof_StackedDrg2KiBV1_1, nil return abi.RegisteredSealProof_StackedDrg2KiBV1_1, nil

View File

@ -234,7 +234,7 @@ func PreferredSealProofTypeFromWindowPoStType(nver network.Version, proof abi.Re
} }
} }
if nver < network.SyntheticVersion || !configWantSynthetic { if nver < MinSyntheticPoRepVersion || !configWantSynthetic {
switch proof { switch proof {
case abi.RegisteredPoStProof_StackedDrgWindow2KiBV1, abi.RegisteredPoStProof_StackedDrgWindow2KiBV1_1: case abi.RegisteredPoStProof_StackedDrgWindow2KiBV1, abi.RegisteredPoStProof_StackedDrgWindow2KiBV1_1:
return abi.RegisteredSealProof_StackedDrg2KiBV1_1, nil return abi.RegisteredSealProof_StackedDrg2KiBV1_1, nil

View File

@ -8,6 +8,8 @@ import (
"github.com/filecoin-project/go-state-types/network" "github.com/filecoin-project/go-state-types/network"
) )
var MinSyntheticPoRepVersion = network.Version21
func AllPartSectors(mas State, sget func(Partition) (bitfield.BitField, error)) (bitfield.BitField, error) { func AllPartSectors(mas State, sget func(Partition) (bitfield.BitField, error)) (bitfield.BitField, error) {
var parts []bitfield.BitField var parts []bitfield.BitField
@ -65,7 +67,7 @@ func SealProofTypeFromSectorSize(ssize abi.SectorSize, nv network.Version, synth
return 0, xerrors.Errorf("unsupported sector size for miner: %v", ssize) return 0, xerrors.Errorf("unsupported sector size for miner: %v", ssize)
} }
if nv >= network.SyntheticVersion && synthetic { if nv >= MinSyntheticPoRepVersion && synthetic {
return toSynthetic(v) return toSynthetic(v)
} else { } else {
return v, nil return v, nil

2
go.mod
View File

@ -45,7 +45,7 @@ require (
github.com/filecoin-project/go-jsonrpc v0.3.1 github.com/filecoin-project/go-jsonrpc v0.3.1
github.com/filecoin-project/go-padreader v0.0.1 github.com/filecoin-project/go-padreader v0.0.1
github.com/filecoin-project/go-paramfetch v0.0.4 github.com/filecoin-project/go-paramfetch v0.0.4
github.com/filecoin-project/go-state-types v0.11.2-0.20230712101859-8f37624fa540 github.com/filecoin-project/go-state-types v0.11.2-0.20230712134812-92a113cbd4b3
github.com/filecoin-project/go-statemachine v1.0.3 github.com/filecoin-project/go-statemachine v1.0.3
github.com/filecoin-project/go-statestore v0.2.0 github.com/filecoin-project/go-statestore v0.2.0
github.com/filecoin-project/go-storedcounter v0.1.0 github.com/filecoin-project/go-storedcounter v0.1.0

4
go.sum
View File

@ -340,6 +340,10 @@ github.com/filecoin-project/go-state-types v0.1.6/go.mod h1:UwGVoMsULoCK+bWjEdd/
github.com/filecoin-project/go-state-types v0.1.10/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-state-types v0.1.10/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q=
github.com/filecoin-project/go-state-types v0.11.2-0.20230712101859-8f37624fa540 h1:v0fbEnBrMIjlxLve1sJTJE0YNGg58SNiP5sxQtr3trc= github.com/filecoin-project/go-state-types v0.11.2-0.20230712101859-8f37624fa540 h1:v0fbEnBrMIjlxLve1sJTJE0YNGg58SNiP5sxQtr3trc=
github.com/filecoin-project/go-state-types v0.11.2-0.20230712101859-8f37624fa540/go.mod h1:SyNPwTsU7I22gL2r0OAPcImvLoTVfgRwdK/Y5rR1zz8= github.com/filecoin-project/go-state-types v0.11.2-0.20230712101859-8f37624fa540/go.mod h1:SyNPwTsU7I22gL2r0OAPcImvLoTVfgRwdK/Y5rR1zz8=
github.com/filecoin-project/go-state-types v0.11.2-0.20230712132815-96d83fbd7b5c h1:U+PM+Is+/Iw2HmNRHIhad6LJLqHqXsVUrMC02reQhEI=
github.com/filecoin-project/go-state-types v0.11.2-0.20230712132815-96d83fbd7b5c/go.mod h1:SyNPwTsU7I22gL2r0OAPcImvLoTVfgRwdK/Y5rR1zz8=
github.com/filecoin-project/go-state-types v0.11.2-0.20230712134812-92a113cbd4b3 h1:jqx/y26wsjFuvAKqPVVdjJrOYSOuRCXxrvTzii6znYc=
github.com/filecoin-project/go-state-types v0.11.2-0.20230712134812-92a113cbd4b3/go.mod h1:SyNPwTsU7I22gL2r0OAPcImvLoTVfgRwdK/Y5rR1zz8=
github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig=
github.com/filecoin-project/go-statemachine v1.0.3 h1:N07o6alys+V1tNoSTi4WuuoeNC4erS/6jE74+NsgQuk= github.com/filecoin-project/go-statemachine v1.0.3 h1:N07o6alys+V1tNoSTi4WuuoeNC4erS/6jE74+NsgQuk=
github.com/filecoin-project/go-statemachine v1.0.3/go.mod h1:jZdXXiHa61n4NmgWFG4w8tnqgvZVHYbJ3yW7+y8bF54= github.com/filecoin-project/go-statemachine v1.0.3/go.mod h1:jZdXXiHa61n4NmgWFG4w8tnqgvZVHYbJ3yW7+y8bF54=

View File

@ -1269,9 +1269,9 @@ Submitting a smaller number of prove commits per epoch would reduce the possibil
Name: "UseSyntheticPoRep", Name: "UseSyntheticPoRep",
Type: "bool", Type: "bool",
Comment: `UseSyntheticPoRep will reduce data holdings after PC1 by storing the precomputed responses Comment: `UseSyntheticPoRep will reduce the amout of data held on disk in the WaitSeed phase to 32GiB
to any challenge. This proof's PC1 step uses a cheaper-to-compute algorithm for the responses, at the cost of having to precompute the synthetic challenges.
but still must do more computation during PC1 in order to create this oracle.`, TODO: put estimated costs here`,
}, },
}, },
"Splitstore": []DocField{ "Splitstore": []DocField{