Typed mutable SSZ views over cached and immutable binary merkle trees
Project description
remerkleable
Re-merkle-able: Typed mutable SSZ views over cached and immutable binary Merkle trees.
Features
- Types:
custom byte-vector and byte-list view for Python bytes-like behavior
bitfields: bitlist, bitvector
list, container, vector
union
basic types
- Functionality:
Serialize all types. Into output stream (returning the written count) and as bytes
Deserialize all types. From input stream (and scope) and from bytes
Hash-tree-root all types
- Merkle-based data-sharing:
every view can be initialized/backed by a binary Merkle tree
complex views have backings, and can share data.
complex views provide a nice mutable interface, and replace their backing. And this also works for child-views through view-hooks.
SSZ-Partials: if a partial proof is loaded as backing, a view can be overlaid, and the partial backing works as long as no excluded branches are accessed.
- Calculate byte lengths:
Type min/max byte length
Byte length for fixed-length types
Output byte length for a value, without serializing
Navigation: construct paths from types, and convert to generalized indices.
History: traverse a sequence of nodes, and get the changelog for a given subtree location.
Project Links
Also see
Contact
Author: @protolambda
License
MIT, see LICENSE file.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for remerkleable-0.1.23-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c304ff7e6b9108e784758ed770e24bbcb06269f5642795d02f39646bff182a55 |
|
MD5 | 81b26455583a89d70d6017168c681d87 |
|
BLAKE2b-256 | a04ee298a5cc147adcfc627f2cd3ba561831f23be31b0bd37d30c1f127db995e |