@@ -54,13 +54,13 @@ class Blob(CamelModel):
54
54
data : Bytes
55
55
commitment : Bytes
56
56
proof : List [Bytes ] | Bytes # Bytes < Osaka, List[Bytes] >= Osaka
57
- cells : List [Bytes ] | None # None (in json: null) < Osaka, List[Bytes] >= Osaka
57
+ cells : List [Bytes ] | None # None (in json: null) < Osaka, List[Bytes] >= Osaka
58
58
59
59
versioned_hash : Hash
60
- name : str # blob_<fork>_<seed>
60
+ name : str
61
61
fork : Fork
62
62
seed : int
63
- timestamp : int
63
+ timestamp : int # fork transitions require timestamp >= 15000 to occur
64
64
65
65
_trusted_setup : ClassVar [Any | None ] = None
66
66
@@ -149,7 +149,7 @@ def get_commitment(data: Bytes) -> Bytes:
149
149
"""
150
150
Take a blob and returns a cryptographic commitment to it.
151
151
152
- Note: Each cell seems to hold a copy of this commitment.
152
+ Note: Each cell holds the exact same copy of this commitment.
153
153
"""
154
154
# sanity check
155
155
field_elements : int = cast (int , fork .get_blob_constant ("FIELD_ELEMENTS_PER_BLOB" ))
@@ -181,7 +181,7 @@ def get_proof(fork: Fork, data: Bytes) -> List[Bytes] | Bytes:
181
181
proof , _ = ckzg .compute_kzg_proof (data , z_valid_size , Blob ._trusted_setup )
182
182
return proof
183
183
184
- # osaka
184
+ # >= osaka
185
185
if amount_cell_proofs == 128 :
186
186
_ , proofs = ckzg .compute_cells_and_kzg_proofs (
187
187
data , Blob ._trusted_setup
@@ -201,7 +201,7 @@ def get_cells(fork: Fork, data: Bytes) -> List[Bytes] | None:
201
201
if amount_cell_proofs == 0 :
202
202
return None
203
203
204
- # osaka
204
+ # >= osaka
205
205
if amount_cell_proofs == 128 :
206
206
cells , _ = ckzg .compute_cells_and_kzg_proofs (
207
207
data , Blob ._trusted_setup
@@ -406,12 +406,10 @@ def corrupt_byte(b: bytes) -> Bytes:
406
406
raise ValueError ("Input must be a single byte" )
407
407
return Bytes (bytes ([b [0 ] ^ 0xFF ]))
408
408
409
- # osaka and later
409
+ # >= osaka
410
410
amount_cell_proofs : int = cast (int , self .fork .get_blob_constant ("AMOUNT_CELL_PROOFS" ))
411
411
if amount_cell_proofs > 0 :
412
- assert isinstance (self .proof , list ), (
413
- "proof was expected to be a list but it isn't"
414
- ) # make mypy happy
412
+ assert isinstance (self .proof , list ), "proof was expected to be a list but it isn't"
415
413
416
414
if mode == self .ProofCorruptionMode .CORRUPT_FIRST_BYTE :
417
415
for i in range (len (self .proof )):
0 commit comments