@@ -28,7 +28,12 @@ def get_version(self) -> PlotVersion: ...
28
28
def __bytes__ (self ) -> bytes : ...
29
29
def get_id (self ) -> bytes32 : ...
30
30
def get_qualities_for_challenge (self , challenge : bytes32 ) -> list [bytes32 ]: ...
31
- def get_partial_proofs_for_challenge (self , challenge : bytes32 ) -> list [bytes ]: ...
31
+
32
+ # this is only supported by v2 plots
33
+ def get_partial_proofs_for_challenge (self , challenge : bytes32 , plot_strength : uint8 ) -> list [bytes ]: ...
34
+
35
+ # this is only supported by v1 plots. v2 plots first get the partial proof
36
+ # and turn it into a full proof by calling solve_proof(), or pass it to the solver service
32
37
def get_full_proof (self , challenge : bytes32 , index : int , parallel_read : bool = True ) -> bytes : ...
33
38
34
39
@classmethod
@@ -56,7 +61,8 @@ def get_memo(self) -> bytes:
56
61
raise NotImplementedError ("V2 plot format is not yet implemented" )
57
62
58
63
def get_compression_level (self ) -> uint8 :
59
- raise AssertionError ("get_compression_level() should never be called on V2 plots" )
64
+ # v2 plots are never compressed
65
+ return uint8 (0 )
60
66
61
67
def get_version (self ) -> PlotVersion :
62
68
return PlotVersion .V2
@@ -70,11 +76,10 @@ def get_id(self) -> bytes32:
70
76
raise NotImplementedError ("V2 plot format is not yet implemented" )
71
77
72
78
def get_qualities_for_challenge (self , challenge : bytes32 ) -> list [bytes32 ]:
73
- # TODO: todo_v2_plots Implement plot quality lookup
74
- raise NotImplementedError ("V2 plot format is not yet implemented" )
79
+ raise NotImplementedError ("V2 plot format does not support qualities directly, use partial proofs" )
75
80
76
- def get_partial_proofs_for_challenge (self , challenge : bytes32 ) -> list [bytes ]:
77
- # TODO: todo_v2_plots Implement quality chain lookup (16 * k bits blobs)
81
+ def get_partial_proofs_for_challenge (self , challenge : bytes , plot_strength : uint8 ) -> list [bytes ]:
82
+ # TODO: todo_v2_plots Implement plot quality lookup
78
83
raise NotImplementedError ("V2 plot format is not yet implemented" )
79
84
80
85
def get_full_proof (self , challenge : bytes32 , index : int , parallel_read : bool = True ) -> bytes :
@@ -119,8 +124,8 @@ def get_id(self) -> bytes32:
119
124
def get_qualities_for_challenge (self , challenge : bytes32 ) -> list [bytes32 ]:
120
125
return [bytes32 (quality ) for quality in self ._disk_prover .get_qualities_for_challenge (challenge )]
121
126
122
- def get_partial_proofs_for_challenge (self , challenge : bytes32 ) -> list [bytes ]:
123
- raise AssertionError ("V1 does not implement quality chains, only qualities " )
127
+ def get_partial_proofs_for_challenge (self , challenge : bytes32 , plot_strength : uint8 ) -> list [bytes ]:
128
+ raise AssertionError ("V1 plot format doesn't use partial proofs " )
124
129
125
130
def get_full_proof (self , challenge : bytes32 , index : int , parallel_read : bool = True ) -> bytes :
126
131
return bytes (self ._disk_prover .get_full_proof (challenge , index , parallel_read ))
0 commit comments