diff --git a/ethereum/circuits/README.md b/ethereum/circuits/README.md index a5f5307a..5d7f085c 100644 --- a/ethereum/circuits/README.md +++ b/ethereum/circuits/README.md @@ -12,7 +12,7 @@ The main library is available in [lib/](./lib) directory and consists of: - [smart contract storage variables](./get_storage/README.md) - [transaction](./get_transaction/README.md) - [receipts](./get_receipt/README.md) - - logs + - [logs](./get_log/README.md) - [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 @@ -35,6 +35,7 @@ Additionally, there are binary crates used for recursive proving. See detailed s | [`get_storage_recursive`](./get_storage_recursive/) | Binary crate for generating recursive storage proofs | [Docs](./get_storage_recursive/README.md) | | [`get_receipt`](./get_receipt/) | Binary crate for generating receipt proofs | [Docs](./get_receipt/README.md) | | [`get_transaction`](./get_transaction/) | Binary crate for generating transaction proofs | [Docs](./get_transaction/README.md) | +| [`get_log`](./get_log/) | Binary crate for generating log proofs | [Docs](./get_log/README.md) | ### Recursive binaries diff --git a/ethereum/circuits/get_log/README.md b/ethereum/circuits/get_log/README.md new file mode 100644 index 00000000..6ed2ee57 --- /dev/null +++ b/ethereum/circuits/get_log/README.md @@ -0,0 +1,9 @@ +# Noir get_log binary circuit + +This is a binary Noir crate used to generate log proofs. + +```rust +fn main(chain_id: pub Field, block_number: pub u64, tx_idx: pub Field, log_idx: pub u64) -> pub LogWithinBlock<...>; +``` + +Prover data is located in [`Prover.toml`](Prover.toml) diff --git a/ethereum/circuits/lib/README.md b/ethereum/circuits/lib/README.md index 6c580d5d..c4174472 100644 --- a/ethereum/circuits/lib/README.md +++ b/ethereum/circuits/lib/README.md @@ -48,6 +48,15 @@ pub fn get_transaction( ) -> TransactionWithinBlock; ``` +```rust +pub fn get_log( + chain_id: Field, + block_number: u64, + tx_idx: Field, + log_idx: u64 +) -> LogWithinBlock; +``` + ### Without oracles If you decide to not use Oracles - you will need to provide all the data manually, but you can still use verifier functions to verify data & proofs. @@ -106,6 +115,7 @@ All the function in this library prove that the objects are contained within som ├── receipt.nr ├── account.nr ├── account_with_storage.nr + ├── log.nr ├── transaction.nr ├── uint256.nr └── verifiers @@ -202,6 +212,21 @@ struct TransactionWithinBlock { } ``` +```rust +struct Log { + address: Address, + topics: BoundedVec, + data: BoundedVec, +} +``` + +```rust +struct LogWithinBlock { + log: Log, + block_hash: Bytes32 +} +``` + ## RLP decoding [rlp folder](./src/rlp/README.md) contains tools to work with RLP encoded data diff --git a/ethereum/contracts/README.md b/ethereum/contracts/README.md index a2e82494..6e4c7f50 100644 --- a/ethereum/contracts/README.md +++ b/ethereum/contracts/README.md @@ -9,6 +9,7 @@ This repo contains the following smart contracts: - [`GetStorageUltraPlonkVerifier`](src/generated-verifier/GetStorageUltraPLONKVerifier.sol) auto-generated from [get_storage](../circuits/get_storage) - [`GetReceiptUltraPlonkVerifier`](src/generated-verifier/GetReceiptUltraPLONKVerifier.sol) auto-generated from [get_receipt](../circuits/get_receipt) - [`GetTransactionUltraPlonkVerifier`](src/generated-verifier/GetTransactionUltraPLONKVerifier.sol) auto-generated from [get_transaction](../circuits/get_transaction) + - [`GetLogUltraPlonkVerifier`](src/generated-verifier/GetLogUltraPLONKVerifier.sol) auto-generated from [get_log](../circuits/get_log) Because forge can not compile files outside of it's `src` directory - we symlink autogenerated contracts. @@ -36,7 +37,9 @@ out │   └── UltraVerifier.json ├── GetStorageUltraPLONKVerifier.sol │  └── UltraVerifier.json -└── GetTransactionUltraPLONKVerifier.sol +├─── GetTransactionUltraPLONKVerifier.sol +│   └── UltraVerifier.json +└── GetLogUltraPLONKVerifier.sol    └── UltraVerifier.json ```