Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

Commit 73cc2fb

Browse files
authored
Merge pull request #1935 from carver/upgrade-py-trie
Upgrade py-trie to v2 alpha 1
2 parents 0267c73 + 6bea213 commit 73cc2fb

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

eth/db/storage.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ def __getitem__(self, key: bytes) -> bytes:
129129
exc.missing_node_hash,
130130
self._starting_root_hash,
131131
exc.requested_key,
132+
exc.prefix,
132133
self._address,
133134
) from exc
134135

@@ -153,6 +154,7 @@ def __delitem__(self, key: bytes) -> None:
153154
exc.missing_node_hash,
154155
self._starting_root_hash,
155156
exc.requested_key,
157+
exc.prefix,
156158
self._address,
157159
) from exc
158160

eth/vm/interrupt.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
from typing import (
2+
Optional,
3+
)
4+
15
from eth_typing import (
26
Address,
37
Hash32,
@@ -8,6 +12,9 @@
812
from trie.exceptions import (
913
MissingTrieNode,
1014
)
15+
from trie.typing import (
16+
Nibbles,
17+
)
1118

1219
from eth.exceptions import (
1320
PyEVMError,
@@ -53,6 +60,7 @@ def __init__(
5360
missing_node_hash: Hash32,
5461
storage_root_hash: Hash32,
5562
requested_key: Hash32,
63+
prefix: Optional[Nibbles],
5664
account_address: Address,
5765
*args: bytes) -> None:
5866
if not isinstance(account_address, bytes):
@@ -62,6 +70,7 @@ def __init__(
6270
missing_node_hash,
6371
storage_root_hash,
6472
requested_key,
73+
prefix,
6574
account_address,
6675
*args,
6776
)
@@ -72,7 +81,7 @@ def storage_root_hash(self) -> Hash32:
7281

7382
@property
7483
def account_address(self) -> Address:
75-
return self.args[3]
84+
return self.args[4]
7685

7786
def __repr__(self) -> str:
7887
return f"MissingStorageTrieNode: {self}"

newsfragments/1935.internal.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Upgrade py-trie to the new v2.0.0-alpha.1, and pin it for stability.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"py-ecc>=1.4.7,<5.0.0",
1717
"pyethash>=0.1.27,<1.0.0",
1818
"rlp>=1.1.0,<2.0.0",
19-
"trie>=1.4.0,<2.0.0",
19+
"trie==2.0.0-alpha.1",
2020
],
2121
# The eth-extra sections is for libraries that the evm does not
2222
# explicitly need to function and hence should not depend on.

0 commit comments

Comments
 (0)