|
5 | 5 | "os"
|
6 | 6 |
|
7 | 7 | "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" |
9 | 9 | "github.com/ipfs/go-cid"
|
10 | 10 | )
|
11 | 11 |
|
@@ -108,3 +108,92 @@ func AggregateSealProofs(aggregateInfo proof.AggregateSealVerifyProofAndInfos, p
|
108 | 108 | func VerifyAggregateSeals(aggregate proof.AggregateSealVerifyProofAndInfos) (bool, error) {
|
109 | 109 | return true, nil
|
110 | 110 | }
|
| 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