lorenzb / proveth

Generate & verify Merkle-Patricia-proofs for Ethereum
Other
106 stars 7 forks source link
ethereum python smartcontracts solidity

Proveth

Build Status Python >= 3.6 Solidity >= 0.5.0

Ethereum's design makes heavy use of Merkle trees enabling light clients to interact with the blockchain without having to download full blocks or its complete state.

Ethereum uses its own variant of Merkle trees, called Merkle Patricia Tries, which provide a dictionary-like interface and enable the generation and verification of small proofs (logarithmic in the number of items in the dictionary) that a given key-value-pair is present/absent from the dictionary. Ethereum uses Merkle Patricia Tries to store transactions, transactions receipts, and the state (all accounts with their balances, code, and storage).

(If you want to learn more about Merkle Patricia Tries, check out the links above and have a look at this cool visualisation Casey built.)

Project goals

Proveth aims to provide

Project state

Proveth is under active development. We currently support generating and verifying proofs of transaction inclusion/exclusion, i.e. proofs of statements of the form "the transaction tx was present/absent at index i in the block with blockhash h".

We aim to extend this to:

Contributing

We welcome contributions. Have a look at any open issues, add more tests/documentation or come up with your own improvements. Before starting work on a large PR, we suggest opening an issue to discuss your approach with the maintainers.

We ❤️ tests & docs, so please write lots of them!

We follow PEP-8 for Python and the official style for Solidity.

Authors

Proveth's development was started by the Submarines group at the 2018 IC3 Ethereum bootcamp:

Acknowledgements

Our design is inspired by PeaceRelay. Thanks to Nate Rush for answering our questions.