Skip to main content

Typed mutable SSZ views over cached and immutable binary merkle trees

Project description

https://raw.githubusercontent.com/protolambda/remerkleable/master/docs/_static/logo.png

remerkleable

https://img.shields.io/pypi/l/remerkleable.svg https://img.shields.io/pypi/pyversions/remerkleable.svg https://img.shields.io/pypi/status/remerkleable.svg https://img.shields.io/pypi/implementation/remerkleable.svg https://github.com/protolambda/remerkleable/workflows/Remerkleable%20Python%20CI/badge.svg

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

    • 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.

Also see

Contact

Author: @protolambda

License

MIT, see LICENSE file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

remerkleable-0.1.13.tar.gz (29.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

remerkleable-0.1.13-py3-none-any.whl (33.4 kB view details)

Uploaded Python 3

File details

Details for the file remerkleable-0.1.13.tar.gz.

File metadata

  • Download URL: remerkleable-0.1.13.tar.gz
  • Upload date:
  • Size: 29.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.2

File hashes

Hashes for remerkleable-0.1.13.tar.gz
Algorithm Hash digest
SHA256 2633931d612909759234eaf1a4bc7fabc73a28e7810f20ee12f4376548a649ec
MD5 21ec6477e3e557e6a036559a2c2ddba1
BLAKE2b-256 81f6e53ed548142a8adab3457d01d7ef131a81d41faacc58ddb9767b62bf15db

See more details on using hashes here.

File details

Details for the file remerkleable-0.1.13-py3-none-any.whl.

File metadata

  • Download URL: remerkleable-0.1.13-py3-none-any.whl
  • Upload date:
  • Size: 33.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.2

File hashes

Hashes for remerkleable-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 6b40f844bdc13525ee4fb4f712a885eca0296e4d3abde252e214f914c4a80036
MD5 ac1ea1eefc7e5402cdee5c026e1dcbab
BLAKE2b-256 4dc4fc2d64ebb39c85bfebad7592388f32a1c442918ca597b4218fc9919fcf77

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page