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
File details
Details for the file remerkleable-0.1.28.tar.gz
.
File metadata
- Download URL: remerkleable-0.1.28.tar.gz
- Upload date:
- Size: 45.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e19e9a927961b29c4efa210795bfad5d20a28545a6f78f7552b1e4449c24890 |
|
MD5 | 80ecb7fe6cd7a5ab659bf2e728c0c7b9 |
|
BLAKE2b-256 | c0a35b1206c4281f7337945a8e86ef73f40093c41f3b78291d6f66250fe5aaf8 |
File details
Details for the file remerkleable-0.1.28-py3-none-any.whl
.
File metadata
- Download URL: remerkleable-0.1.28-py3-none-any.whl
- Upload date:
- Size: 51.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 133cb1283f1d6fd2a020f47ee3653e93385acf2aa4ddc30f3d00eb9404751bda |
|
MD5 | 94a00801c369d65cff97dbbb82a22244 |
|
BLAKE2b-256 | 27c2c89771e64163950a0016251080523cfbdf1f1d2cae2ad0b8b9c52bc0c846 |