Re-merkle-able: Typed mutable SSZ views over cached and immutable binary Merkle trees.
- 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.
- Serialize all types. Into output stream (returning the written count) and as
- Docs: https://remerkleable.readthedocs.io/
- Changelog: https://remerkleable.readthedocs.io/en/latest/changelog.html
- PyPI: https://pypi.python.org/pypi/remerkleable
- Issues: https://github.com/protolambda/remerkleable/issues
- SSZ: "SimpleSerialize", part of Ethereum Proof of Stake spec
- SSZ draft spec
- Ethereum Merkle trees information aggregate
Author: @protolambda
MIT, see LICENSE file.