From 2f19a5f66d88469911f4d4714c2ecc2ec9bb3f7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Wed, 12 Jul 2023 15:56:51 +0200 Subject: [PATCH] gen, fix build with new state-types --- chain/actors/builtin/miner/actor.go.template | 2 +- chain/actors/builtin/miner/miner.go | 2 +- chain/actors/builtin/miner/utils.go | 4 +++- go.mod | 2 +- go.sum | 4 ++++ node/config/doc_gen.go | 6 +++--- 6 files changed, 13 insertions(+), 7 deletions(-) diff --git a/chain/actors/builtin/miner/actor.go.template b/chain/actors/builtin/miner/actor.go.template index fefa240aa..2be589797 100644 --- a/chain/actors/builtin/miner/actor.go.template +++ b/chain/actors/builtin/miner/actor.go.template @@ -174,7 +174,7 @@ func PreferredSealProofTypeFromWindowPoStType(nver network.Version, proof abi.Re } } - if nver < network.SyntheticVersion || !configWantSynthetic { + if nver < MinSyntheticPoRepVersion || !configWantSynthetic { switch proof { case abi.RegisteredPoStProof_StackedDrgWindow2KiBV1, abi.RegisteredPoStProof_StackedDrgWindow2KiBV1_1: return abi.RegisteredSealProof_StackedDrg2KiBV1_1, nil diff --git a/chain/actors/builtin/miner/miner.go b/chain/actors/builtin/miner/miner.go index e13ac6dd0..514857b03 100644 --- a/chain/actors/builtin/miner/miner.go +++ b/chain/actors/builtin/miner/miner.go @@ -234,7 +234,7 @@ func PreferredSealProofTypeFromWindowPoStType(nver network.Version, proof abi.Re } } - if nver < network.SyntheticVersion || !configWantSynthetic { + if nver < MinSyntheticPoRepVersion || !configWantSynthetic { switch proof { case abi.RegisteredPoStProof_StackedDrgWindow2KiBV1, abi.RegisteredPoStProof_StackedDrgWindow2KiBV1_1: return abi.RegisteredSealProof_StackedDrg2KiBV1_1, nil diff --git a/chain/actors/builtin/miner/utils.go b/chain/actors/builtin/miner/utils.go index 80fbb8762..072eab986 100644 --- a/chain/actors/builtin/miner/utils.go +++ b/chain/actors/builtin/miner/utils.go @@ -8,6 +8,8 @@ import ( "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) { 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) } - if nv >= network.SyntheticVersion && synthetic { + if nv >= MinSyntheticPoRepVersion && synthetic { return toSynthetic(v) } else { return v, nil diff --git a/go.mod b/go.mod index ea3a6db5f..419e82187 100644 --- a/go.mod +++ b/go.mod @@ -45,7 +45,7 @@ require ( github.com/filecoin-project/go-jsonrpc v0.3.1 github.com/filecoin-project/go-padreader v0.0.1 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-statestore v0.2.0 github.com/filecoin-project/go-storedcounter v0.1.0 diff --git a/go.sum b/go.sum index 33b28c1a7..cfbc1aecb 100644 --- a/go.sum +++ b/go.sum @@ -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.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.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 v1.0.3 h1:N07o6alys+V1tNoSTi4WuuoeNC4erS/6jE74+NsgQuk= github.com/filecoin-project/go-statemachine v1.0.3/go.mod h1:jZdXXiHa61n4NmgWFG4w8tnqgvZVHYbJ3yW7+y8bF54= diff --git a/node/config/doc_gen.go b/node/config/doc_gen.go index 4330c3409..8dc798458 100644 --- a/node/config/doc_gen.go +++ b/node/config/doc_gen.go @@ -1269,9 +1269,9 @@ Submitting a smaller number of prove commits per epoch would reduce the possibil Name: "UseSyntheticPoRep", Type: "bool", - Comment: `UseSyntheticPoRep will reduce data holdings after PC1 by storing the precomputed responses -to any challenge. This proof's PC1 step uses a cheaper-to-compute algorithm for the responses, -but still must do more computation during PC1 in order to create this oracle.`, + Comment: `UseSyntheticPoRep will reduce the amout of data held on disk in the WaitSeed phase to 32GiB +at the cost of having to precompute the synthetic challenges. +TODO: put estimated costs here`, }, }, "Splitstore": []DocField{