Skip to content

Commit 395a691

Browse files
committed
fix
1 parent 6563c9b commit 395a691

File tree

11 files changed

+696
-5
lines changed

11 files changed

+696
-5
lines changed

ethereum/circuits/get_storage_recursive/src/main.nr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ use dep::ethereum::{
33
misc::types::{Address, Bytes32},
44
};
55

6-
#[recursive]
76
fn main(
87
chain_id: pub Field,
98
block_number: pub u64,
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
pub mod header;
22
pub mod account;
33
pub mod state_proof;
4+
pub mod storage_proof;

ethereum/circuits/lib/src/fixtures/mainnet/london/crypto_punks/storage_proof.nr

Lines changed: 301 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
pub mod usdc_circle;
2-
pub(crate) mod usdc_uniswap;
3-
pub(crate) mod bored_ape_yacht_club;
2+
pub mod usdc_uniswap;
3+
pub mod bored_ape_yacht_club;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
pub mod header;
22
pub mod state_proof;
3+
pub mod account;
4+
pub mod storage_proof;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
use crate::{account::Account, misc::types::Bytes32};
2+
3+
global nonce: u64 = 1;
4+
global balance: Field = 10201000000000000;
5+
global storage_root: Bytes32 = [
6+
0xf2, 0xb1, 0x58, 0x8b, 0xe2, 0x23, 0xbb, 0xb7, 0x2b, 0x6f, 0x2f, 0x2f, 0x5d, 0x25, 0xf7, 0x42,
7+
0x4f, 0xb0, 0x9e, 0x21, 0x23, 0x97, 0xf4, 0xd7, 0x16, 0xa6, 0xa8, 0x78, 0x5a, 0x6e, 0xda, 0x4d,
8+
];
9+
global code_hash: Bytes32 = [
10+
0x0b, 0xa5, 0xe2, 0x5e, 0x74, 0xd8, 0x1b, 0xab, 0x32, 0x71, 0x10, 0xc8, 0xd8, 0xb4, 0x43, 0x20,
11+
0xf5, 0x0a, 0xd5, 0xc3, 0xe9, 0x1a, 0x54, 0x6a, 0x5c, 0x5a, 0x9b, 0x60, 0x5c, 0xf6, 0x53, 0xb3,
12+
];
13+
14+
pub global account: Account = Account { nonce, balance, storage_root, code_hash };
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,75 @@
1+
use crate::header::BlockHeaderPartial;
12
use crate::misc::types::Bytes32;
23

34
pub(crate) global state_root: Bytes32 = [
45
0x1a, 0xd7, 0xb8, 0x0a, 0xf0, 0xc2, 0x8b, 0xc1, 0x48, 0x95, 0x13, 0x34, 0x6d, 0x27, 0x06, 0x88,
56
0x5b, 0xe9, 0x0a, 0xbb, 0x07, 0xf2, 0x3c, 0xa2, 0x8e, 0x50, 0x48, 0x2a, 0xdb, 0x39, 0x2d, 0x61,
67
];
8+
9+
global number: u64 = 19000000;
10+
global hash: Bytes32 = [
11+
0xcf, 0x38, 0x40, 0x12, 0xb9, 0x1b, 0x08, 0x12, 0x30, 0xcd, 0xf1, 0x7a, 0x3f, 0x7d, 0xd3, 0x70,
12+
0xd8, 0xe6, 0x70, 0x56, 0x05, 0x8a, 0xf6, 0xb2, 0x72, 0xb3, 0xd5, 0x4a, 0xa2, 0x71, 0x4f, 0xac,
13+
];
14+
global transactions_root: Bytes32 = [
15+
0x41, 0x0d, 0x8e, 0xfe, 0x97, 0x36, 0x13, 0xf9, 0x46, 0x3b, 0xb2, 0x5a, 0x0c, 0x71, 0xcc, 0xb5,
16+
0x2b, 0x26, 0x48, 0x42, 0xf4, 0x87, 0x45, 0x10, 0xd7, 0x0d, 0xd7, 0x48, 0xfb, 0xbe, 0xb0, 0xb6,
17+
];
18+
global receipts_root: Bytes32 = [
19+
0x44, 0xdb, 0xbb, 0xb9, 0x2e, 0x05, 0x3e, 0xc5, 0x03, 0x06, 0x57, 0xcf, 0x7e, 0x85, 0x40, 0x62,
20+
0x60, 0x2a, 0x7d, 0xba, 0xd7, 0x89, 0x0f, 0xb4, 0x3c, 0x01, 0x00, 0x9d, 0x1d, 0x39, 0xfa, 0xf5,
21+
];
22+
23+
global encoded_length: u32 = 565;
24+
global encoded_data: [u8; 708] = [
25+
0xf9, 0x02, 0x32, 0xa0, 0x75, 0x9e, 0x27, 0xa5, 0x06, 0x95, 0x35, 0x94, 0x9f, 0x0a, 0x72, 0x47,
26+
0xeb, 0xc9, 0x99, 0x36, 0x7d, 0xbd, 0x77, 0x96, 0x4d, 0x77, 0xed, 0x00, 0x4f, 0xfc, 0x8d, 0xb3,
27+
0xd4, 0x94, 0x02, 0x48, 0xa0, 0x1d, 0xcc, 0x4d, 0xe8, 0xde, 0xc7, 0x5d, 0x7a, 0xab, 0x85, 0xb5,
28+
0x67, 0xb6, 0xcc, 0xd4, 0x1a, 0xd3, 0x12, 0x45, 0x1b, 0x94, 0x8a, 0x74, 0x13, 0xf0, 0xa1, 0x42,
29+
0xfd, 0x40, 0xd4, 0x93, 0x47, 0x94, 0x95, 0x22, 0x22, 0x90, 0xdd, 0x72, 0x78, 0xaa, 0x3d, 0xdd,
30+
0x38, 0x9c, 0xc1, 0xe1, 0xd1, 0x65, 0xcc, 0x4b, 0xaf, 0xe5, 0xa0, 0x1a, 0xd7, 0xb8, 0x0a, 0xf0,
31+
0xc2, 0x8b, 0xc1, 0x48, 0x95, 0x13, 0x34, 0x6d, 0x27, 0x06, 0x88, 0x5b, 0xe9, 0x0a, 0xbb, 0x07,
32+
0xf2, 0x3c, 0xa2, 0x8e, 0x50, 0x48, 0x2a, 0xdb, 0x39, 0x2d, 0x61, 0xa0, 0x41, 0x0d, 0x8e, 0xfe,
33+
0x97, 0x36, 0x13, 0xf9, 0x46, 0x3b, 0xb2, 0x5a, 0x0c, 0x71, 0xcc, 0xb5, 0x2b, 0x26, 0x48, 0x42,
34+
0xf4, 0x87, 0x45, 0x10, 0xd7, 0x0d, 0xd7, 0x48, 0xfb, 0xbe, 0xb0, 0xb6, 0xa0, 0x44, 0xdb, 0xbb,
35+
0xb9, 0x2e, 0x05, 0x3e, 0xc5, 0x03, 0x06, 0x57, 0xcf, 0x7e, 0x85, 0x40, 0x62, 0x60, 0x2a, 0x7d,
36+
0xba, 0xd7, 0x89, 0x0f, 0xb4, 0x3c, 0x01, 0x00, 0x9d, 0x1d, 0x39, 0xfa, 0xf5, 0xb9, 0x01, 0x00,
37+
0x81, 0xa1, 0x01, 0x00, 0x86, 0x00, 0x14, 0x4d, 0x80, 0x40, 0x18, 0x0c, 0x8c, 0x28, 0x40, 0x02,
38+
0x71, 0x04, 0xa0, 0xd8, 0x00, 0x31, 0xc6, 0xf9, 0x02, 0x8b, 0x61, 0x05, 0x50, 0x22, 0x06, 0x3e,
39+
0x45, 0x56, 0xd4, 0x3e, 0x84, 0xa0, 0x08, 0x78, 0x02, 0xa0, 0x06, 0x08, 0x37, 0x85, 0x09, 0x00,
40+
0x3a, 0x83, 0xca, 0x9c, 0xfd, 0x14, 0x20, 0x24, 0x5e, 0xed, 0x68, 0xd2, 0x17, 0x28, 0x0b, 0x01,
41+
0x60, 0x86, 0x10, 0x09, 0x45, 0x10, 0x9e, 0x1b, 0xbc, 0x61, 0x4b, 0x28, 0xa2, 0x48, 0xa1, 0xa2,
42+
0xd8, 0x81, 0xe1, 0x97, 0x00, 0xc4, 0x08, 0xaa, 0x02, 0x80, 0x3d, 0x30, 0xc9, 0x2d, 0x02, 0xc0,
43+
0x7c, 0x81, 0x1d, 0x10, 0x02, 0x00, 0xab, 0x4f, 0x05, 0xe9, 0x50, 0x21, 0x02, 0x24, 0x08, 0x42,
44+
0xa0, 0x89, 0x08, 0x68, 0xa8, 0x00, 0x84, 0xcb, 0xc9, 0x60, 0x09, 0xd3, 0x04, 0x0c, 0x4d, 0x09,
45+
0x22, 0x1d, 0x83, 0xda, 0x89, 0x11, 0x05, 0x4c, 0x30, 0x5c, 0x62, 0x42, 0x2a, 0x0c, 0xd1, 0x28,
46+
0xb7, 0x52, 0x40, 0x83, 0x43, 0x12, 0xc6, 0xde, 0xa0, 0x01, 0x10, 0xc0, 0x4a, 0x18, 0xb0, 0x34,
47+
0x06, 0x20, 0x68, 0x80, 0x1b, 0xc0, 0x28, 0x80, 0x89, 0x90, 0x10, 0xc0, 0x0a, 0x53, 0x5d, 0x98,
48+
0x75, 0x35, 0x80, 0xc8, 0x30, 0xae, 0x81, 0x00, 0x3d, 0x85, 0x29, 0x74, 0x11, 0x08, 0x82, 0x5b,
49+
0x52, 0x50, 0x30, 0xde, 0x0a, 0x08, 0x24, 0x48, 0x09, 0x0a, 0x88, 0x46, 0x48, 0x0f, 0x99, 0x10,
50+
0x13, 0xe1, 0x82, 0x0a, 0x44, 0x80, 0x24, 0x55, 0x15, 0x59, 0x20, 0x5e, 0x44, 0xb5, 0xa0, 0x02,
51+
0x00, 0x50, 0xa9, 0x01, 0x4a, 0x14, 0xd0, 0xa0, 0x00, 0x4c, 0x20, 0x78, 0x0a, 0xa0, 0x8c, 0x31,
52+
0x74, 0x5e, 0xb6, 0x88, 0x42, 0x1c, 0x50, 0x54, 0x04, 0x18, 0xc0, 0x43, 0x61, 0x42, 0x4c, 0x4d,
53+
0x80, 0x84, 0x01, 0x21, 0xea, 0xc0, 0x84, 0x01, 0xc9, 0xc3, 0x80, 0x83, 0x92, 0xaf, 0xc9, 0x84,
54+
0x65, 0xa2, 0xe1, 0xc3, 0x8f, 0x62, 0x65, 0x61, 0x76, 0x65, 0x72, 0x62, 0x75, 0x69, 0x6c, 0x64,
55+
0x2e, 0x6f, 0x72, 0x67, 0xa0, 0xb4, 0x5e, 0x3f, 0xdb, 0xc1, 0xa4, 0x12, 0x16, 0xad, 0x07, 0xac,
56+
0x93, 0x12, 0x15, 0xc5, 0xd6, 0xdf, 0x19, 0x02, 0x17, 0xef, 0xad, 0xe2, 0x80, 0xd1, 0x82, 0x5c,
57+
0x4a, 0x66, 0x7a, 0xd2, 0x03, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x85, 0x04,
58+
0xab, 0xff, 0x88, 0xbc, 0xa0, 0x5e, 0xf7, 0x85, 0xb1, 0xe2, 0x35, 0xd0, 0x64, 0x1d, 0xde, 0xd9,
59+
0xd2, 0xc3, 0xfd, 0x5c, 0x50, 0x10, 0x02, 0xd3, 0x53, 0x10, 0x1e, 0xd0, 0xf5, 0x34, 0x34, 0x88,
60+
0x1d, 0x5c, 0xa4, 0x92, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
61+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
62+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
63+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
64+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
65+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
66+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
67+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
68+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
69+
0x00, 0x00, 0x00, 0x00,
70+
];
71+
72+
pub global block_header_partial: BlockHeaderPartial =
73+
BlockHeaderPartial { number, hash, state_root, transactions_root, receipts_root };
74+
pub global block_header_rlp: BoundedVec<u8, 708> =
75+
BoundedVec::from_parts(encoded_data, encoded_length);

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::merkle_patricia_proofs::proof::{Proof, ProofInput};
1+
use crate::{merkle_patricia_proofs::proof::{Proof, ProofInput}, misc::types::Bytes32, serde::Serde};
22

33
pub(crate) global proof_input: ProofInput<66, 110, 10, 148> = ProofInput {
44
key: [
@@ -437,3 +437,5 @@ pub(crate) global proof_input: ProofInput<66, 110, 10, 148> = ProofInput {
437437
depth: 9,
438438
},
439439
};
440+
441+
pub global proof_input_serialized: [Field; 5645] = proof_input.serialize();

0 commit comments

Comments
 (0)