Skip to content

Commit 5ec3d48

Browse files
committed
Use new go-state-types accessors
1 parent 791b682 commit 5ec3d48

File tree

7 files changed

+54
-244
lines changed

7 files changed

+54
-244
lines changed

distributed.go

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
//+build cgo
1+
//go:build cgo
2+
// +build cgo
23

34
package ffi
45

56
import (
67
"github.com/filecoin-project/filecoin-ffi/generated"
78
"github.com/filecoin-project/go-state-types/abi"
8-
"github.com/filecoin-project/specs-actors/v5/actors/runtime/proof"
9+
"github.com/filecoin-project/go-state-types/builtin/v8/miner"
910
"github.com/pkg/errors"
1011
)
1112

@@ -96,7 +97,7 @@ func GenerateWinningPoStWithVanilla(
9697
minerID abi.ActorID,
9798
randomness abi.PoStRandomness,
9899
proofs [][]byte,
99-
) ([]proof.PoStProof, error) {
100+
) ([]miner.PoStProof, error) {
100101
pp, err := toFilRegisteredPoStProof(proofType)
101102
if err != nil {
102103
return nil, err
@@ -138,7 +139,7 @@ func GenerateWindowPoStWithVanilla(
138139
minerID abi.ActorID,
139140
randomness abi.PoStRandomness,
140141
proofs [][]byte,
141-
) ([]proof.PoStProof, error) {
142+
) ([]miner.PoStProof, error) {
142143
pp, err := toFilRegisteredPoStProof(proofType)
143144
if err != nil {
144145
return nil, err
@@ -175,7 +176,7 @@ func GenerateWindowPoStWithVanilla(
175176
return out, nil
176177
}
177178

178-
type PartitionProof proof.PoStProof
179+
type PartitionProof miner.PoStProof
179180

180181
func GenerateSinglePartitionWindowPoStWithVanilla(
181182
proofType abi.RegisteredPoStProof,
@@ -228,7 +229,7 @@ func GenerateSinglePartitionWindowPoStWithVanilla(
228229
func MergeWindowPoStPartitionProofs(
229230
proofType abi.RegisteredPoStProof,
230231
partitionProofs []PartitionProof,
231-
) (*proof.PoStProof, error) {
232+
) (*miner.PoStProof, error) {
232233
pp, err := toFilRegisteredPoStProof(proofType)
233234
if err != nil {
234235
return nil, err
@@ -258,7 +259,7 @@ func MergeWindowPoStPartitionProofs(
258259
return nil, err
259260
}
260261

261-
out := proof.PoStProof{
262+
out := miner.PoStProof{
262263
PoStProof: dpp,
263264
ProofBytes: copyBytes(resp.Proof.ProofPtr, resp.Proof.ProofLen),
264265
}

go.mod

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@ go 1.17
55
require (
66
github.com/filecoin-project/go-address v0.0.6
77
github.com/filecoin-project/go-fil-commcid v0.1.0
8-
github.com/filecoin-project/go-state-types v0.1.3
9-
github.com/filecoin-project/specs-actors v0.9.14
10-
github.com/filecoin-project/specs-actors/v5 v5.0.4
11-
github.com/filecoin-project/specs-actors/v7 v7.0.0-rc1.0.20220118005651-2470cb39827e
8+
github.com/filecoin-project/go-state-types v0.1.4-0.20220422215029-be7db11a85d1
129
github.com/ipfs/go-block-format v0.0.3
1310
github.com/ipfs/go-cid v0.1.0
1411
github.com/ipfs/go-ipfs-blockstore v1.1.2
@@ -20,15 +17,18 @@ require (
2017

2118
require (
2219
github.com/davecgh/go-spew v1.1.1 // indirect
20+
github.com/filecoin-project/go-amt-ipld/v4 v4.0.0 // indirect
21+
github.com/filecoin-project/go-bitfield v0.2.4 // indirect
2322
github.com/filecoin-project/go-crypto v0.0.1 // indirect
23+
github.com/filecoin-project/go-hamt-ipld/v3 v3.1.0 // indirect
2424
github.com/gogo/protobuf v1.3.1 // indirect
2525
github.com/google/uuid v1.1.1 // indirect
2626
github.com/hashicorp/golang-lru v0.5.4 // indirect
2727
github.com/ipfs/bbloom v0.0.4 // indirect
2828
github.com/ipfs/go-datastore v0.5.0 // indirect
2929
github.com/ipfs/go-ipfs-ds-help v1.1.0 // indirect
3030
github.com/ipfs/go-ipfs-util v0.0.2 // indirect
31-
github.com/ipfs/go-ipld-cbor v0.0.5 // indirect
31+
github.com/ipfs/go-ipld-cbor v0.0.6-0.20211211231443-5d9b9e1f6fa8 // indirect
3232
github.com/ipfs/go-ipld-format v0.2.0 // indirect
3333
github.com/ipfs/go-log v1.0.4 // indirect
3434
github.com/ipfs/go-log/v2 v2.0.5 // indirect
@@ -52,7 +52,7 @@ require (
5252
github.com/spaolacci/murmur3 v1.1.0 // indirect
5353
github.com/tj/go-spin v1.1.0 // indirect
5454
github.com/warpfork/go-wish v0.0.0-20200122115046-b9ea61034e4a // indirect
55-
github.com/whyrusleeping/cbor-gen v0.0.0-20210713220151-be142a5ae1a8 // indirect
55+
github.com/whyrusleeping/cbor-gen v0.0.0-20220323183124-98fa8256a799 // indirect
5656
github.com/xlab/pkgconfig v0.0.0-20170226114623-cea12a0fd245 // indirect
5757
go.uber.org/atomic v1.6.0 // indirect
5858
go.uber.org/multierr v1.5.0 // indirect

0 commit comments

Comments
 (0)