From feacd95f9fbce74eda6f300d71c86a8758dc646a Mon Sep 17 00:00:00 2001 From: Kirejczyk Marek Date: Wed, 29 May 2024 12:18:56 -0500 Subject: [PATCH 1/4] Add more info about content on different levels of docs --- README.md | 5 +++-- ethereum/README.md | 7 +++++++ ethereum/circuits/README.md | 24 +++++++++++++++++++++++- 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 828f8c3dd..1435c1908 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,9 @@ This monorepo contains two sub-projects: -- **ethereum** - [Noir](https://noir-lang.org) library for proving and verifying historical data on the Ethereum blockchain and other EVM compatible blockchains. It supports proving accounts, storage, logs, receipts & transactions. Checkout it's **[docs](./ethereum/README.md)** for more details. -- **vlayer** - Contains real life examples of what can be built using **ethereum**. It's a work in progress and lacks documentation. +- **ethereum** - [Noir](https://noir-lang.org) library for proving and verifying historical data on the Ethereum blockchain and other EVM compatible blockchains. It supports proving accounts, storage, logs, receipts & transactions. **[Read more](./ethereum/README.md)**. + +- **vlayer** - Contains vlayer SDK along with real life examples. It's a work in progress and lacks documentation. Stay tuned for updates. ## Prerequisites diff --git a/ethereum/README.md b/ethereum/README.md index fb540fdc7..81f296122 100644 --- a/ethereum/README.md +++ b/ethereum/README.md @@ -14,6 +14,13 @@ This project contains a library that allows you to prove: - Log inclusion - Example: _Log number `0` within transaction number `115` in block `N` has `topic0 === 0x...`_ +Codebase also includes support for base Ethereum structures in Noir: + +- Decoding RLP format +- Ethereum Merkle Patricia Tries proofs +- Mappings of Basic Ethereum data types: uint256, address, bytes32, hash +- Fragments data structure, similar to Rust's slice, used for parsing data + Additionally, we provide [smart contracts](./ethereum/contracts/src/EthereumHistoryVerifier.sol) that allow to verify inclusion of block in the chain for last 256 blocks. ## Repository structure diff --git a/ethereum/circuits/README.md b/ethereum/circuits/README.md index 1ec25c00f..0cd704d19 100644 --- a/ethereum/circuits/README.md +++ b/ethereum/circuits/README.md @@ -2,7 +2,29 @@ Noir circuits for proving and verifying historical data on the Ethereum blockchain and other EVMs. -## Monorepo structure +## Main library content + +The main library is available in [lib/](./lib) directory and consist of: + +- Generation of proofs for: + - [block headers](./get_header/README.md) + - [ethereum accounts](./get_account/README.md) + - [smart contract storage variables](./get_storage/README.md) + - [transaction](./get_transaction/README.md) + - [receipts](./get_receipt/README.md) + - logs +- [rlp decoding](./lib/src/rlp/README.md) used by Ethereum to store data +- [merkle patricia proofs](./lib/src/merkle_patricia_proofs/README.md) - implementation for Ethereum Merkle Patricia tries +- [fragments](./lib/src/misc/fragment.nr) structure similar to Rust's slice, used for parsing data +- Basic Ethereum data types: + [U256](./lib/src/misc/uint256.nr), + [Address](./lib/src/misc/types.nr), + [Bytes32](./lib/src/misc/types.nr), + [Hash](./lib/src/misc/types.nr), along with util functions. + +Additionally, there are binary creates used for recursive proving. See detailed structure in the following section. + +## Circuit folder structure | Package | Description | Docs | | --------------------------------------------------- | ---------------------------------------------------- | ----------------------------------------- | From 45386c99dc885b41d014819002fa053ac0f696d9 Mon Sep 17 00:00:00 2001 From: Marek Kirejczyk Date: Fri, 31 May 2024 14:40:01 +0200 Subject: [PATCH 2/4] Fix typo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Anna Jabłonowska <62891747+aajj999@users.noreply.github.com> --- ethereum/circuits/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethereum/circuits/README.md b/ethereum/circuits/README.md index 0cd704d19..7f1123b11 100644 --- a/ethereum/circuits/README.md +++ b/ethereum/circuits/README.md @@ -22,7 +22,7 @@ The main library is available in [lib/](./lib) directory and consist of: [Bytes32](./lib/src/misc/types.nr), [Hash](./lib/src/misc/types.nr), along with util functions. -Additionally, there are binary creates used for recursive proving. See detailed structure in the following section. +Additionally, there are binary crates used for recursive proving. See detailed structure in the following section. ## Circuit folder structure From 581a031e8e37cdbc8a6484893f3cff467ceb8f31 Mon Sep 17 00:00:00 2001 From: Marek Kirejczyk Date: Fri, 31 May 2024 14:40:18 +0200 Subject: [PATCH 3/4] Fix typo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Anna Jabłonowska <62891747+aajj999@users.noreply.github.com> --- ethereum/circuits/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethereum/circuits/README.md b/ethereum/circuits/README.md index 7f1123b11..a5f5307a1 100644 --- a/ethereum/circuits/README.md +++ b/ethereum/circuits/README.md @@ -4,7 +4,7 @@ Noir circuits for proving and verifying historical data on the Ethereum blockcha ## Main library content -The main library is available in [lib/](./lib) directory and consist of: +The main library is available in [lib/](./lib) directory and consists of: - Generation of proofs for: - [block headers](./get_header/README.md) From 7e584bad3f30534ef43da7377156a9d0f8d3a63a Mon Sep 17 00:00:00 2001 From: Marek Kirejczyk Date: Fri, 31 May 2024 14:40:56 +0200 Subject: [PATCH 4/4] Fix typo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Anna Jabłonowska <62891747+aajj999@users.noreply.github.com> --- ethereum/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethereum/README.md b/ethereum/README.md index 81f296122..31f56a004 100644 --- a/ethereum/README.md +++ b/ethereum/README.md @@ -19,7 +19,7 @@ Codebase also includes support for base Ethereum structures in Noir: - Decoding RLP format - Ethereum Merkle Patricia Tries proofs - Mappings of Basic Ethereum data types: uint256, address, bytes32, hash -- Fragments data structure, similar to Rust's slice, used for parsing data +- Fragment data structure, similar to Rust's slice, used for parsing data Additionally, we provide [smart contracts](./ethereum/contracts/src/EthereumHistoryVerifier.sol) that allow to verify inclusion of block in the chain for last 256 blocks.