Skip to content

Commit 29b8abf

Browse files
committed
force forks to deal with old headers
1 parent 697de95 commit 29b8abf

File tree

32 files changed

+67
-41
lines changed

32 files changed

+67
-41
lines changed

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ install_requires =
116116
typing_extensions>=4
117117
py_ecc @ git+https://github.com/petertdavies/py_ecc.git@127184f4c57b1812da959586d0fe8f43bb1a2389
118118
ethereum-types>=0.2.1,<0.3
119-
ethereum-rlp>=0.1.1,<0.2
119+
ethereum-rlp>=0.1.2,<0.2
120120

121121
[options.package_data]
122122
ethereum =

src/ethereum/arrow_glacier/blocks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class Block:
6464

6565
header: Header
6666
transactions: Tuple[Union[Bytes, LegacyTransaction], ...]
67-
ommers: Tuple[Header, ...]
67+
ommers: Tuple[AnyHeader, ...]
6868

6969

7070
AnyBlock: TypeAlias = Union[previous_blocks.AnyBlock, Block]

src/ethereum/arrow_glacier/fork.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ def apply_body(
537537
block_time: U256,
538538
block_difficulty: Uint,
539539
transactions: Tuple[Union[LegacyTransaction, Bytes], ...],
540-
ommers: Tuple[Header, ...],
540+
ommers: Tuple[AnyHeader, ...],
541541
chain_id: U64,
542542
) -> ApplyBodyOutput:
543543
"""
@@ -728,7 +728,7 @@ def pay_rewards(
728728
state: State,
729729
block_number: Uint,
730730
coinbase: Address,
731-
ommers: Tuple[Header, ...],
731+
ommers: Tuple[AnyHeader, ...],
732732
) -> None:
733733
"""
734734
Pay rewards to the block miner as well as the ommers miners.

src/ethereum/berlin/blocks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class Block:
6363

6464
header: Header
6565
transactions: Tuple[Union[Bytes, LegacyTransaction], ...]
66-
ommers: Tuple[Header, ...]
66+
ommers: Tuple[AnyHeader, ...]
6767

6868

6969
AnyBlock: TypeAlias = Union[previous_blocks.AnyBlock, Block]

src/ethereum/berlin/fork.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ def apply_body(
421421
block_time: U256,
422422
block_difficulty: Uint,
423423
transactions: Tuple[Union[LegacyTransaction, Bytes], ...],
424-
ommers: Tuple[Header, ...],
424+
ommers: Tuple[AnyHeader, ...],
425425
chain_id: U64,
426426
) -> ApplyBodyOutput:
427427
"""
@@ -607,7 +607,7 @@ def pay_rewards(
607607
state: State,
608608
block_number: Uint,
609609
coinbase: Address,
610-
ommers: Tuple[Header, ...],
610+
ommers: Tuple[AnyHeader, ...],
611611
) -> None:
612612
"""
613613
Pay rewards to the block miner as well as the ommers miners.

src/ethereum/byzantium/blocks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class Block:
6363

6464
header: Header
6565
transactions: Tuple[Transaction, ...]
66-
ommers: Tuple[Header, ...]
66+
ommers: Tuple[AnyHeader, ...]
6767

6868

6969
AnyBlock: TypeAlias = Union[previous_blocks.AnyBlock, Block]

src/ethereum/byzantium/fork.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ def apply_body(
414414
block_time: U256,
415415
block_difficulty: Uint,
416416
transactions: Tuple[Transaction, ...],
417-
ommers: Tuple[Header, ...],
417+
ommers: Tuple[AnyHeader, ...],
418418
chain_id: U64,
419419
) -> ApplyBodyOutput:
420420
"""
@@ -597,7 +597,7 @@ def pay_rewards(
597597
state: State,
598598
block_number: Uint,
599599
coinbase: Address,
600-
ommers: Tuple[Header, ...],
600+
ommers: Tuple[AnyHeader, ...],
601601
) -> None:
602602
"""
603603
Pay rewards to the block miner as well as the ommers miners.

src/ethereum/cancun/blocks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class Block:
8181

8282
header: Header
8383
transactions: Tuple[Union[Bytes, LegacyTransaction], ...]
84-
ommers: Tuple[Header, ...]
84+
ommers: Tuple[AnyHeader, ...]
8585
withdrawals: Tuple[Withdrawal, ...]
8686

8787

src/ethereum/constantinople/blocks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class Block:
6363

6464
header: Header
6565
transactions: Tuple[Transaction, ...]
66-
ommers: Tuple[Header, ...]
66+
ommers: Tuple[AnyHeader, ...]
6767

6868

6969
AnyBlock: TypeAlias = Union[previous_blocks.AnyBlock, Block]

src/ethereum/constantinople/fork.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ def apply_body(
414414
block_time: U256,
415415
block_difficulty: Uint,
416416
transactions: Tuple[Transaction, ...],
417-
ommers: Tuple[Header, ...],
417+
ommers: Tuple[AnyHeader, ...],
418418
chain_id: U64,
419419
) -> ApplyBodyOutput:
420420
"""
@@ -597,7 +597,7 @@ def pay_rewards(
597597
state: State,
598598
block_number: Uint,
599599
coinbase: Address,
600-
ommers: Tuple[Header, ...],
600+
ommers: Tuple[AnyHeader, ...],
601601
) -> None:
602602
"""
603603
Pay rewards to the block miner as well as the ommers miners.

0 commit comments

Comments
 (0)