Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,6 @@ cannot be found.
'state_root': '0x9ce568dcaa6f130d733b333304f2c26a19334ed328a7eb9bb31707306381ba65',
'coinbase': '0x0000000000000000000000000000000000000000',
'difficulty': 0,
'total_difficulty': 0,
'mix_hash': '0x0000000000000000000000000000000000000000000000000000000000000000',
'size': 751,
'extra_data': '0x0000000000000000000000000000000000000000000000000000000000000000',
Expand Down Expand Up @@ -414,7 +413,6 @@ cannot be found.
'state_root': '0x9ce568dcaa6f130d733b333304f2c26a19334ed328a7eb9bb31707306381ba65',
'coinbase': '0x0000000000000000000000000000000000000000',
'difficulty': 0,
'total_difficulty': 0,
'mix_hash': '0x0000000000000000000000000000000000000000000000000000000000000000',
'size': 751,
'extra_data': '0x0000000000000000000000000000000000000000000000000000000000000000',
Expand Down
6 changes: 0 additions & 6 deletions eth_tester/backends/mock/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,6 @@ def make_genesis_block(overrides=None):
"coinbase": ZERO_ADDRESS,
"difficulty": POST_MERGE_DIFFICULTY,
"mix_hash": POST_MERGE_MIX_HASH,
"total_difficulty": 131072,
"size": 0,
"extra_data": ZERO_32BYTES,
# gas limit at London fork block 12965000 on mainnet
Expand Down Expand Up @@ -360,11 +359,6 @@ def make_block_from_parent(parent_block, overrides=None):
else:
yield "mix_hash", POST_MERGE_MIX_HASH

if "total_difficulty" in overrides:
yield "total_difficulty", overrides["total_difficulty"]
else:
yield "total_difficulty", parent_block["difficulty"] + difficulty

if "size" in overrides:
yield "size", overrides["size"]
else:
Expand Down
1 change: 0 additions & 1 deletion eth_tester/backends/pyevm/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ def serialize_block(block, full_transaction, is_pending):
"state_root": block.header.state_root,
"coinbase": block.header.coinbase,
"difficulty": block.header.difficulty,
"total_difficulty": block.header.difficulty, # TODO: actual total difficulty
"mix_hash": block.header.mix_hash,
"size": len(rlp.encode(block)),
"extra_data": pad32(block.header.extra_data),
Expand Down
1 change: 0 additions & 1 deletion eth_tester/normalization/outbound.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ def _remove_fork_specific_fields_if_none(block):
"coinbase": to_checksum_address,
"difficulty": identity,
"mix_hash": encode_hex,
"total_difficulty": identity,
"size": identity,
"extra_data": encode_hex,
"gas_limit": identity,
Expand Down
1 change: 0 additions & 1 deletion eth_tester/utils/backend_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@
"coinbase",
"difficulty",
"mix_hash",
"total_difficulty",
"size",
"extra_data",
"gas_limit",
Expand Down
1 change: 0 additions & 1 deletion eth_tester/validation/outbound.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ def validate_status(value):
"coinbase": validate_canonical_address,
"difficulty": validate_positive_integer,
"mix_hash": validate_32_byte_string,
"total_difficulty": validate_positive_integer,
"size": validate_positive_integer,
"extra_data": validate_32_byte_string,
"gas_limit": validate_positive_integer,
Expand Down
1 change: 1 addition & 0 deletions newsfragments/311.removal.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
remove ``totalDifficulty`` field
5 changes: 0 additions & 5 deletions tests/core/validation/test_outbound_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,6 @@ def _make_block(
coinbase=ZERO_ADDRESS,
difficulty=0,
mix_hash=ZERO_32BYTES,
total_difficulty=0,
size=0,
extra_data=ZERO_32BYTES,
gas_limit=30029122, # gas limit at London fork block 12965000 on mainnet
Expand All @@ -412,7 +411,6 @@ def _make_block(
"coinbase": coinbase,
"difficulty": difficulty,
"mix_hash": mix_hash,
"total_difficulty": total_difficulty,
"size": size,
"extra_data": extra_data,
"gas_limit": gas_limit,
Expand Down Expand Up @@ -471,9 +469,6 @@ def _make_withdrawal(
(_make_block(difficulty=True), False),
(_make_block(mix_hash=HASH32_AS_TEXT), False),
(_make_block(mix_hash=HASH31), False),
(_make_block(total_difficulty=-1), False),
(_make_block(total_difficulty=1.0), False),
(_make_block(total_difficulty=True), False),
(_make_block(size=-1), False),
(_make_block(size=1.0), False),
(_make_block(size=True), False),
Expand Down