Skip to content

Commit f5e0132

Browse files
authored
Merge pull request #3 from filecoin-project/v7
v7 API extensions
2 parents a5fb716 + c398379 commit f5e0132

File tree

3 files changed

+101
-7
lines changed

3 files changed

+101
-7
lines changed

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/filecoin-project/ffi-stub
33
go 1.14
44

55
require (
6-
github.com/filecoin-project/go-state-types v0.1.1-0.20210722133031-ad9bfe54c124
7-
github.com/filecoin-project/specs-actors/v5 v5.0.3
6+
github.com/filecoin-project/go-state-types v0.1.3
7+
github.com/filecoin-project/specs-actors/v7 v7.0.0-rc1
88
github.com/ipfs/go-cid v0.0.7
99
)

go.sum

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ github.com/filecoin-project/go-address v0.0.5/go.mod h1:jr8JxKsYx+lQlQZmF5i2U0Z+
2929
github.com/filecoin-project/go-amt-ipld/v2 v2.1.0/go.mod h1:nfFPoGyX0CU9SkXX8EoCcSuHN1XcbN0c6KBh7yvP5fs=
3030
github.com/filecoin-project/go-amt-ipld/v3 v3.0.0/go.mod h1:Qa95YNAbtoVCTSVtX38aAC1ptBnJfPma1R/zZsKmx4o=
3131
github.com/filecoin-project/go-amt-ipld/v3 v3.1.0/go.mod h1:UjM2QhDFrrjD5s1CdnkJkat4ga+LqZBZgTMniypABRo=
32+
github.com/filecoin-project/go-amt-ipld/v4 v4.0.0/go.mod h1:gF053YQ4BIpzTNDoEwHZas7U3oAwncDVGvOHyY8oDpE=
3233
github.com/filecoin-project/go-bitfield v0.2.0/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM=
3334
github.com/filecoin-project/go-bitfield v0.2.3/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM=
3435
github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03 h1:2pMXdBnCiXjfCYx/hLqFxccPoqsSveQFxVLvNxy9bus=
@@ -40,15 +41,19 @@ github.com/filecoin-project/go-hamt-ipld/v3 v3.1.0/go.mod h1:bxmzgT8tmeVQA1/gvBw
4041
github.com/filecoin-project/go-state-types v0.0.0-20200928172055-2df22083d8ab/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g=
4142
github.com/filecoin-project/go-state-types v0.0.0-20201102161440-c8033295a1fc/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g=
4243
github.com/filecoin-project/go-state-types v0.1.0/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g=
43-
github.com/filecoin-project/go-state-types v0.1.1-0.20210722133031-ad9bfe54c124 h1:veGrNABg/9I7prngrowkhwbvW5d5JN55MNKmbsr5FqA=
44-
github.com/filecoin-project/go-state-types v0.1.1-0.20210722133031-ad9bfe54c124/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g=
44+
github.com/filecoin-project/go-state-types v0.1.1-0.20210810190654-139e0e79e69e/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g=
45+
github.com/filecoin-project/go-state-types v0.1.3 h1:rzIJyQo5HO2ptc8Jcu8P0qTutnI7NWwTle54eAHoNO0=
46+
github.com/filecoin-project/go-state-types v0.1.3/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g=
4547
github.com/filecoin-project/specs-actors v0.9.13 h1:rUEOQouefi9fuVY/2HOroROJlZbOzWYXXeIh41KF2M4=
4648
github.com/filecoin-project/specs-actors v0.9.13/go.mod h1:TS1AW/7LbG+615j4NsjMK1qlpAwaFsG9w0V2tg2gSao=
4749
github.com/filecoin-project/specs-actors/v2 v2.3.5-0.20210114162132-5b58b773f4fb/go.mod h1:LljnY2Mn2homxZsmokJZCpRuhOPxfXhvcek5gWkmqAc=
4850
github.com/filecoin-project/specs-actors/v3 v3.1.0/go.mod h1:mpynccOLlIRy0QnR008BwYBwT9fen+sPR13MA1VmMww=
4951
github.com/filecoin-project/specs-actors/v4 v4.0.0/go.mod h1:TkHXf/l7Wyw4ZejyXIPS2rK8bBO0rdwhTZyQQgaglng=
50-
github.com/filecoin-project/specs-actors/v5 v5.0.3 h1:hMQIGfkZ1kN+oVGaDXbpsu9YEUEyL/zWJSeoaZpruu4=
51-
github.com/filecoin-project/specs-actors/v5 v5.0.3/go.mod h1:E0yeEl6Scl6eWeeWmxwQsAufvOAC72H6ELyh2Y62H90=
52+
github.com/filecoin-project/specs-actors/v5 v5.0.4 h1:OY7BdxJWlUfUFXWV/kpNBYGXNPasDIedf42T3sGx08s=
53+
github.com/filecoin-project/specs-actors/v5 v5.0.4/go.mod h1:5BAKRAMsOOlD8+qCw4UvT/lTLInCJ3JwOWZbX8Ipwq4=
54+
github.com/filecoin-project/specs-actors/v6 v6.0.0/go.mod h1:V1AYfi5GkHXipx1mnVivoICZh3wtwPxDVuds+fbfQtk=
55+
github.com/filecoin-project/specs-actors/v7 v7.0.0-rc1 h1:FuDaXIbcw2hRsFI8SDTmsGGCE+NumpF6aiBoU/2X5W4=
56+
github.com/filecoin-project/specs-actors/v7 v7.0.0-rc1/go.mod h1:TA5FwCna+Yi36POaT7SLKXsgEDvJwc0V/L6ZsO19B9M=
5257
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
5358
github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98=
5459
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=

iface.go

Lines changed: 90 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"os"
66

77
"github.com/filecoin-project/go-state-types/abi"
8-
"github.com/filecoin-project/specs-actors/v5/actors/runtime/proof"
8+
"github.com/filecoin-project/specs-actors/v7/actors/runtime/proof"
99
"github.com/ipfs/go-cid"
1010
)
1111

@@ -108,3 +108,92 @@ func AggregateSealProofs(aggregateInfo proof.AggregateSealVerifyProofAndInfos, p
108108
func VerifyAggregateSeals(aggregate proof.AggregateSealVerifyProofAndInfos) (bool, error) {
109109
return true, nil
110110
}
111+
112+
type FunctionsSectorUpdate struct{}
113+
114+
var SectorUpdate = FunctionsSectorUpdate{}
115+
116+
func (FunctionsSectorUpdate) EncodeInto(
117+
proofType abi.RegisteredUpdateProof,
118+
newReplicaPath string,
119+
newReplicaCachePath string,
120+
sectorKeyPath string,
121+
sectorKeyCachePath string,
122+
stagedDataPath string,
123+
pieces []abi.PieceInfo,
124+
) (sealedCID cid.Cid, unsealedCID cid.Cid, err error) {
125+
return cid.Undef, cid.Undef, nil
126+
}
127+
128+
func (FunctionsSectorUpdate) DecodeFrom(
129+
proofType abi.RegisteredUpdateProof,
130+
outDataPath string,
131+
replicaPath string,
132+
sectorKeyPath string,
133+
sectorKeyCachePath string,
134+
unsealedCID cid.Cid,
135+
) error {
136+
return nil
137+
}
138+
139+
func (FunctionsSectorUpdate) RemoveData(
140+
proofType abi.RegisteredUpdateProof,
141+
sectorKeyPath string,
142+
sectorKeyCachePath string,
143+
replicaPath string,
144+
replicaCachePath string,
145+
dataPath string,
146+
unsealedCID cid.Cid,
147+
) error {
148+
return nil
149+
}
150+
151+
func (FunctionsSectorUpdate) GenerateUpdateVanillaProofs(
152+
proofType abi.RegisteredUpdateProof,
153+
oldSealedCID cid.Cid,
154+
newSealedCID cid.Cid,
155+
unsealedCID cid.Cid,
156+
newReplicaPath string,
157+
newReplicaCachePath string,
158+
sectorKeyPath string,
159+
sectorKeyCachePath string,
160+
) ([][]byte, error) {
161+
return nil, nil
162+
}
163+
164+
func (FunctionsSectorUpdate) VerifyVanillaProofs(
165+
proofType abi.RegisteredUpdateProof,
166+
oldSealedCID cid.Cid,
167+
newSealedCID cid.Cid,
168+
unsealedCID cid.Cid,
169+
vanillaProofs [][]byte,
170+
) (bool, error) {
171+
return true, nil
172+
}
173+
174+
func (FunctionsSectorUpdate) GenerateUpdateProofWithVanilla(
175+
proofType abi.RegisteredUpdateProof,
176+
oldSealedCID cid.Cid,
177+
newSealedCID cid.Cid,
178+
unsealedCID cid.Cid,
179+
vanillaProofs [][]byte,
180+
) ([]byte, error) {
181+
return nil, nil
182+
}
183+
184+
func (FunctionsSectorUpdate) GenerateUpdateProof(
185+
proofType abi.RegisteredUpdateProof,
186+
oldSealedCID cid.Cid,
187+
newSealedCID cid.Cid,
188+
unsealedCID cid.Cid,
189+
newReplicaPath string,
190+
newReplicaCachePath string,
191+
sectorKeyPath string,
192+
sectorKeyCachePath string,
193+
) ([]byte, error) {
194+
return nil, nil
195+
}
196+
197+
func (FunctionsSectorUpdate) VerifyUpdateProof(info proof.ReplicaUpdateInfo) (bool, error) {
198+
return true, nil
199+
}

0 commit comments

Comments
 (0)