Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

remerkleable

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remerkleable

Typed mutable SSZ views over cached and immutable binary merkle trees

  • 0.1.28
  • PyPI
  • Socket score

Maintainers
1

.. image:: https://raw.githubusercontent.com/protolambda/remerkleable/master/docs/_static/logo.png :width: 100 px

remerkleable

.. image:: https://img.shields.io/pypi/l/remerkleable.svg :target: https://pypi.python.org/pypi/remerkleable

.. image:: https://img.shields.io/pypi/pyversions/remerkleable.svg :target: https://pypi.python.org/pypi/remerkleable

.. image:: https://img.shields.io/pypi/status/remerkleable.svg :target: https://pypi.python.org/pypi/remerkleable

.. image:: https://img.shields.io/pypi/implementation/remerkleable.svg :target: https://pypi.python.org/pypi/remerkleable

.. image:: https://github.com/protolambda/remerkleable/workflows/Remerkleable%20Python%20CI/badge.svg :target: https://github.com/protolambda/remerkleable/actions

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.

Also see

  • SSZ: "SimpleSerialize", part of Ethereum Proof of Stake spec <https://github.com/ethereum/consensus-specs/blob/dev/ssz/simple-serialize.md>_
  • SSZ draft spec <https://github.com/protolambda/eth2.0-ssz/>_
  • Ethereum Merkle trees information aggregate <https://github.com/protolambda/eth-merkle-trees>_

Contact

Author: @protolambda <https://github.com/protolambda>_

License

MIT, see LICENSE <./LICENSE>_ file.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc