@@ -32,6 +32,7 @@ use rand::rngs::OsRng;
32
32
use rand:: { RngCore , SeedableRng } ;
33
33
use rand_chacha:: ChaChaRng ;
34
34
use simplelog:: { self , CombinedLogger , LevelFilter , TermLogger , TerminalMode , WriteLogger } ;
35
+ use storage_proofs:: api_version:: ApiVersion ;
35
36
use storage_proofs:: compound_proof:: { self , CompoundProof } ;
36
37
use storage_proofs:: merkle:: MerkleTreeTrait ;
37
38
use storage_proofs:: parameter_cache:: {
@@ -44,6 +45,8 @@ use storage_proofs::post::fallback::{
44
45
FallbackPoSt , FallbackPoStCircuit , FallbackPoStCompound , PublicParams as PoStPublicParams ,
45
46
} ;
46
47
48
+ const FIXED_API_VERSION : ApiVersion = ApiVersion :: V1_0_0 ;
49
+
47
50
const CHUNK_SIZE : usize = 10_000 ;
48
51
49
52
// Non-raw sizes.
@@ -301,13 +304,15 @@ fn blank_sdr_poseidon_params<Tree: MerkleTreeTrait>(sector_size: u64) -> PoRepPu
301
304
sector_size : SectorSize ( sector_size) ,
302
305
partitions : PoRepProofPartitions ( n_partitions) ,
303
306
porep_id : [ 0 ; 32 ] ,
307
+ api_version : FIXED_API_VERSION ,
304
308
} ;
305
309
306
310
let setup_params = compound_proof:: SetupParams {
307
311
vanilla_params : setup_params (
308
312
PaddedBytesAmount :: from ( porep_config) ,
309
313
usize:: from ( PoRepProofPartitions :: from ( porep_config) ) ,
310
314
porep_config. porep_id ,
315
+ porep_config. api_version ,
311
316
)
312
317
. expect ( "failed to setup params" ) ,
313
318
partitions : Some ( usize:: from ( PoRepProofPartitions :: from ( porep_config) ) ) ,
@@ -331,6 +336,7 @@ fn blank_winning_post_poseidon_params<Tree: 'static + MerkleTreeTrait>(
331
336
sector_count : WINNING_POST_SECTOR_COUNT ,
332
337
typ : PoStType :: Winning ,
333
338
priority : false ,
339
+ api_version : FIXED_API_VERSION ,
334
340
} ;
335
341
336
342
winning_post_public_params :: < Tree > ( & post_config) . expect ( "winning post public params failed" )
@@ -349,6 +355,7 @@ fn blank_window_post_poseidon_params<Tree: 'static + MerkleTreeTrait>(
349
355
. expect ( "post config sector count get failure" ) ,
350
356
typ : PoStType :: Window ,
351
357
priority : false ,
358
+ api_version : FIXED_API_VERSION ,
352
359
} ;
353
360
354
361
window_post_public_params :: < Tree > ( & post_config) . expect ( "window post public params failed" )
0 commit comments