Skip to content

Commit e5f5e7c

Browse files
committed
we can get different errors now
1 parent 76a9549 commit e5f5e7c

File tree

1 file changed

+34
-25
lines changed

1 file changed

+34
-25
lines changed

src/ethereum_test_types/transaction_types.py

Lines changed: 34 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -696,42 +696,51 @@ def proofs(self) -> Sequence[Bytes] | None:
696696
return proofs
697697

698698
# original cell proofs with length 4098
699+
# @computed_field # type: ignore[prop-decorator]
700+
# @property
701+
# def cell_proofs(self) -> Sequence[Sequence[Bytes]] | Sequence[Bytes] | None:
702+
# """Return a list of cells (returns None < Osaka)."""
703+
# if self.wrapper_version is None:
704+
# return None
705+
706+
# cells: list[list[Bytes]] = []
707+
# for blob in self.blob_objects:
708+
# assert isinstance(blob.cells, list)
709+
# cells.append(blob.cells)
710+
711+
# # maybe remove below
712+
# # if len(cells) == 1:
713+
# # return cells[0]
714+
715+
# return cells
716+
717+
# shortened cell proofs of length 98 ( 48*2 + len(0x00) + len(0x03) )
718+
# unlocks new error: proofs dont match cells
699719
@computed_field # type: ignore[prop-decorator]
700720
@property
701-
def cell_proofs(self) -> Sequence[Sequence[Bytes]] | Sequence[Bytes] | None:
721+
def cell_proofs(self) -> Sequence[Bytes] | None:
702722
"""Return a list of cells (returns None < Osaka)."""
703723
if self.wrapper_version is None:
704724
return None
705725

706-
cells: list[list[Bytes]] = []
726+
cells: list[Bytes] = []
707727
for blob in self.blob_objects:
708728
assert isinstance(blob.cells, list)
709-
cells.append(blob.cells)
729+
# code below gives: InvalidBlobDataSize: Blob data fields are of incorrect size:
730+
# cells.extend(
731+
# Bytes(cell)
732+
# for cell in blob.cells # Bytes(cell[:48])
733+
# ) # extend unpacks the elements instead of adding it as list
710734

711-
# maybe remove below
712-
if len(cells) == 1:
713-
return cells[0]
735+
# code below gives: InvalidBlobProof: Proofs do not match the blobs.
736+
cells.extend(
737+
Bytes(cell[:48]) for cell in blob.cells
738+
) # extend unpacks the elements instead of adding it as list
714739

715740
return cells
716741

717-
# shortened cell proofs of length 98 ( 48*2 + len(0x00) + len(0x03) )
718-
# @computed_field # type: ignore[prop-decorator]
719-
# @property
720-
# def cell_proofs(self) -> Sequence[Bytes] | None:
721-
# """Return a list of cells (returns None < Osaka)."""
722-
# if self.wrapper_version is None:
723-
# return None
724-
725-
# cells: list[Bytes] = []
726-
# for blob in self.blob_objects:
727-
# assert isinstance(blob.cells, list)
728-
# cells.extend(
729-
# Bytes(cell[:48]) for cell in blob.cells
730-
# ) # extend unpacks the elements instead of adding it as list
731-
732-
# return cells
733-
734742
# just trying to match the 'before.txt' even more closely
743+
# # unlocks new error: proofs dont match cells
735744
# @computed_field # type: ignore[prop-decorator]
736745
# @property
737746
# def cell_proofs(self) -> Sequence[Bytes] | None:
@@ -814,8 +823,8 @@ def get_rlp_prefix(self) -> bytes:
814823
Return the transaction type as bytes to be appended at the beginning of the
815824
serialized transaction if type is not 0.
816825
"""
817-
if self.tx.ty == 3: # don't add 0x03 to the rlp
818-
return b""
826+
# if self.tx.ty == 3: # don't add 0x03 to the rlp
827+
# return b""
819828
if self.tx.ty > 0:
820829
return bytes([self.tx.ty])
821830
return b""

0 commit comments

Comments
 (0)