- Drop support for python 3.7 (#144)
- Remove typo in README (#139)
- Add upper pin to
hexbytes
dependency to due incoming breaking change (#141) - Update ethereum/tests fixture to
v12.4
. (#143) - Merge python project template updates, including move to pre-commit for linting (#144)
- Import types
Literal
andProtocol
directly fromtyping
since now >py38 (#146) - Change the name of
master
branch tomain
(#147)
- merged updates from the ethereum python project template (#137)
- convert old-style format strings to f-strings, additional cleanup (#138)
- Support Python 3.11
- Merged py-trie with the ethereum python project template
- Remove upper pin on hexbytes dependency
- Make typing_extensions an optional dependency
- Drop python 3.6 support
- Require rlp dependency to be >=3,<4
- Require eth-utils dependency to be >=2,<3
- Added node_type field to HexaryTrieNode so that users can easily inspect the type of a node.
- Add support for python 3.9 and 3.10
- Upgrade typing_extensions dependency
Released 2020-08-31
- Dropped pypy support, upgrade to faster py-rlp v2-alpha.1 ethereum#118
Released 2020-08-24
- Relax the version constraint on typing-extensions, which was causing downstream conflicts. ethereum#117
Released 2020-06-19
- Added NodeIterator.keys(), .items(), .values() (mimicking the dict version of these), as well as NodeIterator.nodes(), which yields all of the annotated trie nodes. ethereum#112
- Improved repr(HexaryTrie) ethereum#112
- Can now use NodeIterator to navigate to the empty key b'', using NodeIterator.next(key=None) or simply NodeIterator.next(). ethereum#110
- TraversedPartialPath has a new simulated_node attribute, which we can treat as a node that would have been at the traversed path if the traversal had succeeded. See the readme for more. ethereum#111
- In certain cases, deleting key b'short' would actually delete the key at b'short-nope-long'! Changed key_starts_with() to fix it ethereum#109
- HexaryTrie.set(key, b'') would sometimes try to create a leaf node with an empty value. Instead, it should act exactly the same as HexaryTrie.delete(key) ethereum#109
- When a MissingTrieNode is raised during pruning (or using squash_changes()), a node body that was pruned before the exception was raised might stay pruned, even though the trie wasn't updated. ethereum#109
- When using squash_changes() on a HexaryTrie with prune=True, doing a no-op change would cause the root node to get pruned (deleted even though it was still needed for the current root hash!). ethereum#113
- Only raise a TraversedPartialPath when traversing into a matching leaf node. Instead, return an empty node when traversing into a divergent path. ethereum#114
Released 2020-05-27
- Removed trie.Trie -- use trie.HexaryTrie instead ethereum#100
- Removed trie.sync (classes: SyncRequest and HexaryTrieSync) New syncing helper tools are imminent. ethereum#100
- MissingTrieNode is no longer a KeyError, paving the way for eventually raising a KeyError instead of returning b'' when a key is not present in the trie ethereum#98
- If a trie body is missing when calling HexaryTrie.root_node, the exception will be MissingTraversalNode instead of MissingTrieNode ethereum#102
- Remove support for setting the trie's raw root node directly, via HexaryTrie.root_node = new_raw_root_node ethereum#106
- Return new annotated HexaryTrieNode from HexaryTrie.root_node property ethereum#106
- MissingTrieNode now includes the prefix of the key leading to the node body that was missing from the database. This is important for other potential database layouts. The prefix may be None, if it cannot be determined. For now, it will not be determined when setting or deleting a key. ethereum#98
- New HexaryTrie.traverse(tuple_of_nibbles) returns an annotated trie node found at the given path of nibbles, starting from the root. ethereum#102
- New HexaryTrie.traverse_from(node, tuple_of_nibbles) returns an annotated trie node found when navigating from the given node_body down through the given path of nibbles. Useful for avoiding database reads when the parent node body is known. Otherwise, navigating down from the root would be required every time. ethereum#102
- New MissingTraversalNode exception, analogous to MissingTrieNode, but when traversing (because key is not available, and root_hash not available during traverse_from()) ethereum#102
- New TraversedPartialPath exception, raised when you try to navigate to a node, but end up part-way inside an extension node, or try to navigate into a leaf node. ethereum#102
- New HexaryTrieFog to help track unexplored prefixes, when walking a trie. Serializeable to bytes. New exceptions PerfectVisibility or FullDirectionalVisibility when no prefixes are unexplored. New TrieFrontierCache to reduce duplicate database accesses on a full trie walk. ethereum#95
- Pruning Bugfix: with duplicate values at multiple keys, pruning would sometimes incorrectly prune out a node that was still required. This is fixed for fresh databases, and unfixable for existing databases. (Prune is not designed for on-disk/existing DBs anyhow) ethereum#93
- Avoid reading root node when unnecessary during squash_changes(). This can be important when building a witness, if the witness is supposed to be empty. (for example, in storage tries) ethereum#101
- Type annotation cleanups & upgrades flake8/eth-utils ethereum#95
Released 2019-04-24
- Python 3.7 support ethereum#73
- Several proof (aka witness) updates - Added HexaryTrie.get_proof for proving a key exists ethereum#80 - Prove a key is missing with get_proof ethereum#91 - Bugfix getting a key from a proof with short nodes ethereum#82
- Raise MissingTrieNode with extra info, when an expected trie node is missing from the database (includes update so that pruning old nodes waits until set/delete succeeds) ethereum#83 ethereum#86 (minor cleanup of 83) ethereum#90 (squash_changes() support for missing nodes)
- New with trie.at_root(hash) as snapshot: API, to read trie at a different root hash ethereum#84
- EXPERIMENTAL Sparse Merkle Trie in trie.smt (unstable API: could change at minor version) ethereum#77
- Dropped support for rlp v0.x ethereum#75
- Doc updates - ethereum#62 - ethereum#64 - ethereum#72 (plus other maintenance)
- Speed optimization for HexaryTrie._prune_node (ethereum#60)
- Add trie syncing
- Witness helper functions for binary trie
- Fix broken deprecated Trie class.
- Rename Trie to HexaryTrie
- Add new BinaryTrie class
- Add Trie.get_from_proof for verification of trie proofs.
- Remove snapshot and revert API
- Initial Release