Skip to content

Commit 5569b3e

Browse files
committed
vlayer utils
1 parent a2df451 commit 5569b3e

28 files changed

+103
-97
lines changed

ethereum/circuits/lib/src/account_with_storage.nr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ struct StateAndStorageProofInput {
4444
}
4545

4646
pub struct StorageWithinBlock<let N: u32> {
47-
pub(crate) block_hash: Bytes32,
48-
pub(crate) account: Account,
49-
pub(crate) values: [Bytes32; N],
47+
pub block_hash: Bytes32,
48+
pub account: Account,
49+
pub values: [Bytes32; N],
5050
}
5151

5252
type ProofInputSerialized<let LEN: u32> = [Field; LEN];

ethereum/circuits/lib/src/account_with_storage_recursive.nr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ use crate::serde::STORAGE_BLOCK_LEN;
55
use dep::std::verify_proof_with_type;
66

77
pub struct RecursiveProof {
8-
key_hash: Field,
9-
verification_key: [Field; 114],
10-
proof: [Field; 93],
8+
pub key_hash: Field,
9+
pub verification_key: [Field; 114],
10+
pub proof: [Field; 93],
1111
}
1212

1313
global NUM_PUBLIC_INPUTS: u32 = 1 + 1 + ADDRESS_LENGTH + BYTES32_LENGTH + STORAGE_BLOCK_LEN; // chain_id + block_number + address + storage_key + public_return_inputs
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
pub(crate) mod mainnet;
2-
pub(crate) mod merkle_proofs;
1+
pub mod mainnet;
2+
pub mod merkle_proofs;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
pub(crate) mod frontier;
22
pub(crate) mod homestead;
33
pub(crate) mod london;
4-
pub(crate) mod paris;
4+
pub mod paris;
55
pub(crate) mod cancun;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
pub(crate) mod usdc_circle;
1+
pub mod usdc_circle;
22
pub(crate) mod usdc_uniswap;
33
pub(crate) mod bored_ape_yacht_club;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
pub(crate) mod header;
2-
pub(crate) mod state_proof;
1+
pub mod header;
2+
pub mod state_proof;
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
pub(crate) mod header;
2-
pub(crate) mod account;
3-
pub(crate) mod state_proof;
4-
pub(crate) mod storage;
5-
pub(crate) mod storage_proof;
1+
pub mod header;
2+
pub mod account;
3+
pub mod state_proof;
4+
pub mod storage;
5+
pub mod storage_proof;

ethereum/circuits/lib/src/fixtures/mainnet/paris/usdc_circle/account.nr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ global code_hash: Bytes32 = [
1616
0x6b, 0x25, 0x33, 0x5c, 0xb1, 0x37, 0x16, 0xe0, 0xd1, 0xd3, 0x13, 0x83, 0xe6, 0xb4, 0x15, 0x05,
1717
];
1818

19-
pub(crate) global account: Account = Account { nonce, balance, storage_root, code_hash };
19+
pub global account: Account = Account { nonce, balance, storage_root, code_hash };

ethereum/circuits/lib/src/fixtures/mainnet/paris/usdc_circle/header.nr

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
use crate::{header::BlockHeaderPartial, misc::types::Bytes32};
22

3-
pub(crate) global number: u64 = 19000000;
4-
pub(crate) global hash: Bytes32 = [
3+
pub global number: u64 = 19000000;
4+
pub global hash: Bytes32 = [
55
0xcf, 0x38, 0x40, 0x12, 0xb9, 0x1b, 0x08, 0x12, 0x30, 0xcd, 0xf1, 0x7a, 0x3f, 0x7d, 0xd3, 0x70,
66
0xd8, 0xe6, 0x70, 0x56, 0x05, 0x8a, 0xf6, 0xb2, 0x72, 0xb3, 0xd5, 0x4a, 0xa2, 0x71, 0x4f, 0xac,
77
];
8-
pub(crate) global state_root: Bytes32 = [
8+
pub global state_root: Bytes32 = [
99
0x1a, 0xd7, 0xb8, 0x0a, 0xf0, 0xc2, 0x8b, 0xc1, 0x48, 0x95, 0x13, 0x34, 0x6d, 0x27, 0x06, 0x88,
1010
0x5b, 0xe9, 0x0a, 0xbb, 0x07, 0xf2, 0x3c, 0xa2, 0x8e, 0x50, 0x48, 0x2a, 0xdb, 0x39, 0x2d, 0x61,
1111
];
12-
pub(crate) global transactions_root: Bytes32 = [
12+
pub global transactions_root: Bytes32 = [
1313
0x41, 0x0d, 0x8e, 0xfe, 0x97, 0x36, 0x13, 0xf9, 0x46, 0x3b, 0xb2, 0x5a, 0x0c, 0x71, 0xcc, 0xb5,
1414
0x2b, 0x26, 0x48, 0x42, 0xf4, 0x87, 0x45, 0x10, 0xd7, 0x0d, 0xd7, 0x48, 0xfb, 0xbe, 0xb0, 0xb6,
1515
];
16-
pub(crate) global receipts_root: Bytes32 = [
16+
pub global receipts_root: Bytes32 = [
1717
0x44, 0xdb, 0xbb, 0xb9, 0x2e, 0x05, 0x3e, 0xc5, 0x03, 0x06, 0x57, 0xcf, 0x7e, 0x85, 0x40, 0x62,
1818
0x60, 0x2a, 0x7d, 0xba, 0xd7, 0x89, 0x0f, 0xb4, 0x3c, 0x01, 0x00, 0x9d, 0x1d, 0x39, 0xfa, 0xf5,
1919
];
@@ -67,7 +67,7 @@ global encoded_data: [u8; 708] = [
6767
0x00, 0x00, 0x00, 0x00,
6868
];
6969

70-
pub(crate) global block_header_partial: BlockHeaderPartial =
70+
pub global block_header_partial: BlockHeaderPartial =
7171
BlockHeaderPartial { number, hash, state_root, transactions_root, receipts_root };
72-
pub(crate) global block_header_rlp: BoundedVec<u8, 708> =
72+
pub global block_header_rlp: BoundedVec<u8, 708> =
7373
BoundedVec::from_parts(encoded_data, encoded_length);

ethereum/circuits/lib/src/fixtures/mainnet/paris/usdc_circle/state_proof.nr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,4 +438,4 @@ pub(crate) global proof_input: ProofInput<66, 110, 10, 148> = ProofInput {
438438
},
439439
};
440440

441-
pub(crate) global proof_input_serialized: [Field; 5645] = proof_input.serialize();
441+
pub global proof_input_serialized: [Field; 5645] = proof_input.serialize();

0 commit comments

Comments
 (0)