diff --git a/api/api_full.go b/api/api_full.go index 378920374..72bacad32 100644 --- a/api/api_full.go +++ b/api/api_full.go @@ -2,9 +2,10 @@ package api import ( "context" - "github.com/filecoin-project/specs-actors/actors/runtime/proof" "time" + "github.com/filecoin-project/specs-actors/actors/runtime/proof" + "github.com/ipfs/go-cid" "github.com/libp2p/go-libp2p-core/peer" diff --git a/chain/gen/gen.go b/chain/gen/gen.go index abee75dd3..e6127508e 100644 --- a/chain/gen/gen.go +++ b/chain/gen/gen.go @@ -4,11 +4,12 @@ import ( "bytes" "context" "fmt" - "github.com/filecoin-project/specs-actors/actors/runtime/proof" "io/ioutil" "sync/atomic" "time" + "github.com/filecoin-project/specs-actors/actors/runtime/proof" + "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" diff --git a/chain/stmgr/utils.go b/chain/stmgr/utils.go index 8b95f800a..0cb491337 100644 --- a/chain/stmgr/utils.go +++ b/chain/stmgr/utils.go @@ -4,13 +4,14 @@ import ( "bytes" "context" "fmt" - saruntime "github.com/filecoin-project/specs-actors/actors/runtime" - "github.com/filecoin-project/specs-actors/actors/runtime/proof" "os" "reflect" "runtime" "strings" + saruntime "github.com/filecoin-project/specs-actors/actors/runtime" + "github.com/filecoin-project/specs-actors/actors/runtime/proof" + cid "github.com/ipfs/go-cid" cbor "github.com/ipfs/go-ipld-cbor" cbg "github.com/whyrusleeping/cbor-gen" diff --git a/chain/sync.go b/chain/sync.go index b99e27be0..91d212e37 100644 --- a/chain/sync.go +++ b/chain/sync.go @@ -5,13 +5,14 @@ import ( "context" "errors" "fmt" - "github.com/filecoin-project/specs-actors/actors/runtime/proof" "os" "sort" "strconv" "strings" "time" + "github.com/filecoin-project/specs-actors/actors/runtime/proof" + "github.com/Gurpartap/async" "github.com/hashicorp/go-multierror" "github.com/ipfs/go-cid" diff --git a/chain/sync_test.go b/chain/sync_test.go index 63188d74c..16e0d2ffb 100644 --- a/chain/sync_test.go +++ b/chain/sync_test.go @@ -3,11 +3,12 @@ package chain_test import ( "context" "fmt" - "github.com/filecoin-project/specs-actors/actors/runtime/proof" "os" "testing" "time" + "github.com/filecoin-project/specs-actors/actors/runtime/proof" + "github.com/ipfs/go-cid" ds "github.com/ipfs/go-datastore" diff --git a/chain/types/blockheader.go b/chain/types/blockheader.go index 8095616a5..0ec33fe42 100644 --- a/chain/types/blockheader.go +++ b/chain/types/blockheader.go @@ -2,9 +2,10 @@ package types import ( "bytes" - "github.com/filecoin-project/specs-actors/actors/runtime/proof" "math/big" + "github.com/filecoin-project/specs-actors/actors/runtime/proof" + "github.com/minio/blake2b-simd" "github.com/filecoin-project/go-state-types/abi" diff --git a/chain/types/blockheader_test.go b/chain/types/blockheader_test.go index 4607e5b3e..f5faac3b3 100644 --- a/chain/types/blockheader_test.go +++ b/chain/types/blockheader_test.go @@ -7,6 +7,8 @@ import ( "reflect" "testing" + "github.com/filecoin-project/specs-actors/actors/runtime/proof" + cid "github.com/ipfs/go-cid" "github.com/stretchr/testify/require" diff --git a/chain/vectors/gen/main.go b/chain/vectors/gen/main.go index 814bcebff..ecc2498b9 100644 --- a/chain/vectors/gen/main.go +++ b/chain/vectors/gen/main.go @@ -6,6 +6,8 @@ import ( "math/rand" "os" + "github.com/filecoin-project/specs-actors/actors/builtin/power" + "github.com/filecoin-project/go-address" "golang.org/x/xerrors" diff --git a/chain/vm/gas.go b/chain/vm/gas.go index 23750491c..12acf6a21 100644 --- a/chain/vm/gas.go +++ b/chain/vm/gas.go @@ -2,6 +2,7 @@ package vm import ( "fmt" + "github.com/filecoin-project/specs-actors/actors/runtime/proof" "github.com/filecoin-project/go-address" diff --git a/chain/vm/gas_v0.go b/chain/vm/gas_v0.go index 3d2faa60d..e5ded440e 100644 --- a/chain/vm/gas_v0.go +++ b/chain/vm/gas_v0.go @@ -2,6 +2,7 @@ package vm import ( "fmt" + "github.com/filecoin-project/specs-actors/actors/runtime/proof" "github.com/filecoin-project/go-state-types/abi" diff --git a/chain/vm/syscalls.go b/chain/vm/syscalls.go index 9dba55131..3e221f61f 100644 --- a/chain/vm/syscalls.go +++ b/chain/vm/syscalls.go @@ -4,10 +4,11 @@ import ( "bytes" "context" "fmt" - "github.com/filecoin-project/specs-actors/actors/runtime/proof" goruntime "runtime" "sync" + "github.com/filecoin-project/specs-actors/actors/runtime/proof" + "github.com/filecoin-project/go-address" "github.com/ipfs/go-cid" cbor "github.com/ipfs/go-ipld-cbor" diff --git a/cli/state.go b/cli/state.go index 8ae8bf540..f84375782 100644 --- a/cli/state.go +++ b/cli/state.go @@ -5,7 +5,6 @@ import ( "context" "encoding/json" "fmt" - "github.com/filecoin-project/specs-actors/actors/runtime" "html/template" "io" "os" @@ -15,6 +14,8 @@ import ( "strings" "time" + "github.com/filecoin-project/specs-actors/actors/runtime" + "github.com/multiformats/go-multiaddr" "github.com/ipfs/go-cid" diff --git a/cmd/lotus-bench/main.go b/cmd/lotus-bench/main.go index 8545bfbd3..431bfdd44 100644 --- a/cmd/lotus-bench/main.go +++ b/cmd/lotus-bench/main.go @@ -4,7 +4,6 @@ import ( "context" "encoding/json" "fmt" - "github.com/filecoin-project/specs-actors/actors/runtime/proof" "io/ioutil" "math/big" "math/rand" @@ -12,6 +11,8 @@ import ( "path/filepath" "time" + saproof "github.com/filecoin-project/specs-actors/actors/runtime/proof" + "github.com/docker/go-units" logging "github.com/ipfs/go-log/v2" "github.com/minio/blake2b-simd" @@ -236,7 +237,7 @@ var sealBenchCmd = &cli.Command{ } var sealTimings []SealingResult - var sealedSectors []proof.SectorInfo + var sealedSectors []saproof.SectorInfo if robench == "" { var err error @@ -279,7 +280,7 @@ var sealBenchCmd = &cli.Command{ } for _, s := range genm.Sectors { - sealedSectors = append(sealedSectors, proof.SectorInfo{ + sealedSectors = append(sealedSectors, saproof.SectorInfo{ SealedCID: s.CommR, SectorNumber: s.SectorID, SealProof: s.ProofType, @@ -304,7 +305,7 @@ var sealBenchCmd = &cli.Command{ return err } - candidates := make([]proof.SectorInfo, len(fcandidates)) + candidates := make([]saproof.SectorInfo, len(fcandidates)) for i, fcandidate := range fcandidates { candidates[i] = sealedSectors[fcandidate] } @@ -327,7 +328,7 @@ var sealBenchCmd = &cli.Command{ winnningpost2 := time.Now() - pvi1 := abi.WinningPoStVerifyInfo{ + pvi1 := saproof.WinningPoStVerifyInfo{ Randomness: abi.PoStRandomness(challenge[:]), Proofs: proof1, ChallengedSectors: candidates, @@ -343,7 +344,7 @@ var sealBenchCmd = &cli.Command{ verifyWinningPost1 := time.Now() - pvi2 := abi.WinningPoStVerifyInfo{ + pvi2 := saproof.WinningPoStVerifyInfo{ Randomness: abi.PoStRandomness(challenge[:]), Proofs: proof2, ChallengedSectors: candidates, @@ -375,7 +376,7 @@ var sealBenchCmd = &cli.Command{ windowpost2 := time.Now() - wpvi1 := proof.WindowPoStVerifyInfo{ + wpvi1 := saproof.WindowPoStVerifyInfo{ Randomness: challenge[:], Proofs: wproof1, ChallengedSectors: sealedSectors, @@ -391,7 +392,7 @@ var sealBenchCmd = &cli.Command{ verifyWindowpost1 := time.Now() - wpvi2 := proof.WindowPoStVerifyInfo{ + wpvi2 := saproof.WindowPoStVerifyInfo{ Randomness: challenge[:], Proofs: wproof2, ChallengedSectors: sealedSectors, @@ -463,10 +464,10 @@ type ParCfg struct { Commit int } -func runSeals(sb *ffiwrapper.Sealer, sbfs *basicfs.Provider, numSectors int, par ParCfg, mid abi.ActorID, sectorSize abi.SectorSize, ticketPreimage []byte, saveC2inp string, skipc2, skipunseal bool) ([]SealingResult, []proof.SectorInfo, error) { +func runSeals(sb *ffiwrapper.Sealer, sbfs *basicfs.Provider, numSectors int, par ParCfg, mid abi.ActorID, sectorSize abi.SectorSize, ticketPreimage []byte, saveC2inp string, skipc2, skipunseal bool) ([]SealingResult, []saproof.SectorInfo, error) { var pieces []abi.PieceInfo sealTimings := make([]SealingResult, numSectors) - sealedSectors := make([]proof.SectorInfo, numSectors) + sealedSectors := make([]saproof.SectorInfo, numSectors) preCommit2Sema := make(chan struct{}, par.PreCommit2) commitSema := make(chan struct{}, par.Commit) @@ -536,7 +537,7 @@ func runSeals(sb *ffiwrapper.Sealer, sbfs *basicfs.Provider, numSectors int, par precommit2 := time.Now() <-preCommit2Sema - sealedSectors[ix] = proof.SectorInfo{ + sealedSectors[ix] = saproof.SectorInfo{ SealProof: sb.SealProofType(), SectorNumber: i, SealedCID: cids.Sealed, @@ -588,7 +589,7 @@ func runSeals(sb *ffiwrapper.Sealer, sbfs *basicfs.Provider, numSectors int, par <-commitSema if !skipc2 { - svi := proof.SealVerifyInfo{ + svi := saproof.SealVerifyInfo{ SectorID: abi.SectorID{Miner: mid, Number: i}, SealedCID: cids.Sealed, SealProof: sb.SealProofType(), diff --git a/cmd/lotus-shed/proofs.go b/cmd/lotus-shed/proofs.go index 1b877d4ea..2379d8599 100644 --- a/cmd/lotus-shed/proofs.go +++ b/cmd/lotus-shed/proofs.go @@ -4,6 +4,8 @@ import ( "encoding/hex" "fmt" + saproof "github.com/filecoin-project/specs-actors/actors/runtime/proof" + "github.com/urfave/cli/v2" ffi "github.com/filecoin-project/filecoin-ffi" @@ -82,7 +84,7 @@ var verifySealProofCmd = &cli.Command{ snum := abi.SectorNumber(cctx.Uint64("sector-id")) - ok, err := ffi.VerifySeal(proof.SealVerifyInfo{ + ok, err := ffi.VerifySeal(saproof.SealVerifyInfo{ SectorID: abi.SectorID{ Miner: abi.ActorID(mid), Number: snum, diff --git a/conformance/stubs.go b/conformance/stubs.go index 5383a51f0..a7100892f 100644 --- a/conformance/stubs.go +++ b/conformance/stubs.go @@ -2,6 +2,7 @@ package conformance import ( "context" + "github.com/filecoin-project/specs-actors/actors/runtime/proof" "github.com/filecoin-project/go-address" diff --git a/extern/sector-storage/ffiwrapper/sealer_test.go b/extern/sector-storage/ffiwrapper/sealer_test.go index d089a92b6..ae1ede7eb 100644 --- a/extern/sector-storage/ffiwrapper/sealer_test.go +++ b/extern/sector-storage/ffiwrapper/sealer_test.go @@ -15,6 +15,8 @@ import ( "testing" "time" + saproof "github.com/filecoin-project/specs-actors/actors/runtime/proof" + "github.com/ipfs/go-cid" logging "github.com/ipfs/go-log" @@ -91,7 +93,7 @@ func (s *seal) commit(t *testing.T, sb *Sealer, done func()) { t.Fatalf("%+v", err) } - ok, err := ProofVerifier.VerifySeal(proof.SealVerifyInfo{ + ok, err := ProofVerifier.VerifySeal(saproof.SealVerifyInfo{ SectorID: s.id, SealedCID: s.cids.Sealed, SealProof: sealProofType, diff --git a/extern/sector-storage/ffiwrapper/types.go b/extern/sector-storage/ffiwrapper/types.go index daf5cdbff..318dbd2b0 100644 --- a/extern/sector-storage/ffiwrapper/types.go +++ b/extern/sector-storage/ffiwrapper/types.go @@ -2,9 +2,10 @@ package ffiwrapper import ( "context" - "github.com/filecoin-project/specs-actors/actors/runtime/proof" "io" + "github.com/filecoin-project/specs-actors/actors/runtime/proof" + "github.com/ipfs/go-cid" "github.com/filecoin-project/go-state-types/abi" diff --git a/extern/sector-storage/ffiwrapper/verifier_cgo.go b/extern/sector-storage/ffiwrapper/verifier_cgo.go index bd4e7e021..0af12da0b 100644 --- a/extern/sector-storage/ffiwrapper/verifier_cgo.go +++ b/extern/sector-storage/ffiwrapper/verifier_cgo.go @@ -4,6 +4,7 @@ package ffiwrapper import ( "context" + "github.com/filecoin-project/specs-actors/actors/runtime/proof" "golang.org/x/xerrors" diff --git a/extern/sector-storage/mock/mock.go b/extern/sector-storage/mock/mock.go index d4588c3fa..b70350ef8 100644 --- a/extern/sector-storage/mock/mock.go +++ b/extern/sector-storage/mock/mock.go @@ -5,11 +5,12 @@ import ( "context" "crypto/sha256" "fmt" - "github.com/filecoin-project/specs-actors/actors/runtime/proof" "io" "math/rand" "sync" + "github.com/filecoin-project/specs-actors/actors/runtime/proof" + commcid "github.com/filecoin-project/go-fil-commcid" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/specs-storage/storage" diff --git a/extern/storage-sealing/checks.go b/extern/storage-sealing/checks.go index 28802fe9f..906c9c106 100644 --- a/extern/storage-sealing/checks.go +++ b/extern/storage-sealing/checks.go @@ -3,6 +3,7 @@ package sealing import ( "bytes" "context" + saproof "github.com/filecoin-project/specs-actors/actors/runtime/proof" "golang.org/x/xerrors" diff --git a/miner/miner.go b/miner/miner.go index cba9e7b66..6d3595d58 100644 --- a/miner/miner.go +++ b/miner/miner.go @@ -6,10 +6,11 @@ import ( "crypto/rand" "encoding/binary" "fmt" - "github.com/filecoin-project/specs-actors/actors/runtime/proof" "sync" "time" + "github.com/filecoin-project/specs-actors/actors/runtime/proof" + "github.com/filecoin-project/lotus/chain/gen/slashfilter" "github.com/filecoin-project/go-address" diff --git a/storage/adapter_storage_miner.go b/storage/adapter_storage_miner.go index f780097a6..2869e48e5 100644 --- a/storage/adapter_storage_miner.go +++ b/storage/adapter_storage_miner.go @@ -3,6 +3,7 @@ package storage import ( "bytes" "context" + "github.com/filecoin-project/go-bitfield" "github.com/ipfs/go-cid" diff --git a/storage/miner.go b/storage/miner.go index c68be87b3..a9728433b 100644 --- a/storage/miner.go +++ b/storage/miner.go @@ -3,9 +3,10 @@ package storage import ( "context" "errors" + "time" + "github.com/filecoin-project/go-bitfield" "github.com/filecoin-project/specs-actors/actors/runtime/proof" - "time" "github.com/ipfs/go-cid" "github.com/ipfs/go-datastore" diff --git a/storage/wdpost_run.go b/storage/wdpost_run.go index 1fc7eeacc..51d71e331 100644 --- a/storage/wdpost_run.go +++ b/storage/wdpost_run.go @@ -4,9 +4,10 @@ import ( "bytes" "context" "errors" - "github.com/filecoin-project/specs-actors/actors/runtime/proof" "time" + "github.com/filecoin-project/specs-actors/actors/runtime/proof" + "github.com/filecoin-project/go-bitfield" "github.com/filecoin-project/go-address"