zkAttestor
Scalable on-chain trustless attestations to data from any past Ethereum block or state.
Project overview
This repository provides implementations of account, storage, and transaction proofs for Ethereum. Together, these enable a user to generate validity proofs for data from any current or past Ethereum block or state using a trusted block hash alone.
These implementations are for demonstration purposes only. These circuits are not audited, and this is not intended to be used as a library for production-grade applications.
Install dependencies
- Run
yarnat the top level to install npm dependencies (snarkjsandcircomlib). - You'll also need
circomversion >= 2.0.2 on your system. Installation instructions here. - To work with large circuits, follow the setup instructions at Best Practices for Large Circuits.
- Install Python libraries: eth-mpt, pysha3, rlp
- Building these circuits requires a Powers of Tau file with
2^24constraints in thecircuitssubdirectory with the namepot24_final.ptau. One such file can be downloaded from the Hermez trusted setup here.
Building proving keys and witness generation files
We provide three circuits, which enable attestations to all current or historical Ethereum data available from an archive node with the exception of receipts, which are WIP:
eth_block_hash: Prove state, transaction, and receipt roots corresponding to a block hash.eth_addr_storage: Prove the contents of a storage slot for an account from a block hash.eth_tx_proof: Prove the contents of a transaction from a block hash.