Skip to content

Commit 67266d5

Browse files
authored
verkle: parent state root field renaming (#934)
* target temp branch for filling Signed-off-by: Ignacio Hagopian <[email protected]> * parent state root field renaming Signed-off-by: Ignacio Hagopian <[email protected]> * extra fix Signed-off-by: Ignacio Hagopian <[email protected]> --------- Signed-off-by: Ignacio Hagopian <[email protected]>
1 parent 50ecc74 commit 67266d5

File tree

5 files changed

+10
-18
lines changed

5 files changed

+10
-18
lines changed

.github/configs/evm.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ pectra-devnet-3:
2222
verkle:
2323
impl: geth
2424
repo: gballet/go-ethereum
25-
ref: kaustinen-with-shapella
25+
ref: jsign-ew-parent-state-root
2626
evm-bin: evm

src/ethereum_test_specs/blockchain.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,11 +587,11 @@ def generate_block_data(
587587
transition_tool_output.alloc = previous_alloc
588588
# TODO: hack for now, replace with actual witness output once available from t8n
589589
if transition_tool_output.result.verkle_conversion_ended:
590-
witness_parent_root = transition_tool_output.result.parent_root
590+
witness_parent_root = transition_tool_output.result.parent_state_root
591591
transition_tool_output.witness = Witness(
592592
verkle_proof=transition_tool_output.result.verkle_proof,
593593
state_diff=transition_tool_output.result.state_diff,
594-
parent_root=witness_parent_root,
594+
parent_state_root=witness_parent_root,
595595
)
596596
else:
597597
transition_tool_output.witness = None

src/ethereum_test_types/verkle/tests/test_verkle_witness.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,6 @@ def test_witness_validation(witness_data):
171171
== 0x647ED3C87A4F764421EA2F5BFC73195812F6B7DD15AC2B8D295730C1DEDE1EDF
172172
)
173173
assert witness.state_diff.root[0].suffix_diffs[0].new_value is None
174-
assert witness.parent_root == (
174+
assert witness.parent_state_root == (
175175
0x5B5FDFEDD6A0E932DA408AC7D772A36513D1EEE9B9926E52620C43A433AAD7
176176
)

src/ethereum_test_types/verkle/types.py

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class Witness(CamelModel):
143143

144144
state_diff: StateDiff
145145
verkle_proof: VerkleProof
146-
parent_root: Hash
146+
parent_state_root: Hash
147147

148148

149149
class VerkleTree(RootModel[Dict[Hash, Hash]]):
@@ -181,9 +181,7 @@ def __init__(self, fork: Fork) -> None:
181181
"""
182182
Initializes a WitnessCheck instance.
183183
"""
184-
assert (
185-
fork >= Verkle
186-
), "WitnessCheck is only supported for Verkle fork and later"
184+
assert fork >= Verkle, "WitnessCheck is only supported for Verkle fork and later"
187185
self.account_entries: List[
188186
Tuple[Address, WitnessCheck.AccountHeaderEntry, Optional[Hash]]
189187
] = []
@@ -259,21 +257,15 @@ def add_account_codehash(self, address: Address, codehash: Optional[Hash]) -> No
259257
"""
260258
Adds the code hash witness for the given address.
261259
"""
262-
self.account_entries.append(
263-
(address, WitnessCheck.AccountHeaderEntry.CODEHASH, codehash)
264-
)
260+
self.account_entries.append((address, WitnessCheck.AccountHeaderEntry.CODEHASH, codehash))
265261

266-
def add_storage_slot(
267-
self, address: Address, storage_slot: int, value: Optional[Hash]
268-
) -> None:
262+
def add_storage_slot(self, address: Address, storage_slot: int, value: Optional[Hash]) -> None:
269263
"""
270264
Adds the storage slot witness for the given address and storage slot.
271265
"""
272266
self.storage_slots.append((address, storage_slot, value))
273267

274-
def add_code_chunk(
275-
self, address: Address, chunk_number: int, value: Optional[Hash]
276-
) -> None:
268+
def add_code_chunk(self, address: Address, chunk_number: int, value: Optional[Hash]) -> None:
277269
"""
278270
Adds the code chunk witness for the given address and chunk number.
279271
"""

src/evm_transition_tool/types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class Result(CamelModel):
112112

113113
verkle_proof: VerkleProof | None = None
114114
state_diff: StateDiff | None = None
115-
parent_root: Hash | None = None
115+
parent_state_root: Hash | None = None
116116

117117

118118
class TransitionToolInput(CamelModel):

0 commit comments

Comments
 (0)