-
Notifications
You must be signed in to change notification settings - Fork 613
Expand file tree
/
Copy pathbc_retrieval.pil
More file actions
73 lines (65 loc) · 2.52 KB
/
Copy pathbc_retrieval.pil
File metadata and controls
73 lines (65 loc) · 2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
// Bytecode retrieval.
namespace bc_retrieval;
pol commit sel;
// No relations will be checked if this identity is satisfied.
#[skippable_if]
sel = 0;
// This id is generated at runtime starting from zero and incremented by 1.
// The primary source of bytecode_id is this sub-trace.
pol commit bytecode_id;
pol commit err; // some error occurred.
pol commit address; // contract address.
// address instance members.
// See barretenberg/cpp/src/barretenberg/vm2/common/aztec_types.hpp
pol commit salt;
pol commit deployer_addr;
pol commit class_id;
pol commit init_hash;
// public keys
pol commit nullifier_key_x;
pol commit nullifier_key_y;
pol commit incoming_viewing_key_x;
pol commit incoming_viewing_key_y;
pol commit outgoing_viewing_key_x;
pol commit outgoing_viewing_key_y;
pol commit tagging_key_x;
pol commit tagging_key_y;
// contract class members.
// See barretenberg/cpp/src/barretenberg/vm2/common/aztec_types.hpp
pol commit artifact_hash;
pol commit private_function_root;
pol commit public_bytecode_commitment;
// TODO: Probably some latch is also needed.
// TODO: Selector needs to be guarded by error flag.
// #[LOOKUP_ADDRESS_DERIVATION]
// sel {
// address, salt, deployer_addr, class_id, init_hash,
// nullifier_key_x, nullifier_key_y,
// incoming_viewing_key_x, incoming_viewing_key_y,
// outgoing_viewing_key_x, outgoing_viewing_key_y,
// tagging_key_x, tagging_key_y
// } in address_derivation.sel {
// address_derivation.address, address_derivation.salt, address_derivation.deployer_addr, address_derivation.class_id, address_derivation.init_hash,
// address_derivation.nullifier_key_x, address_derivation.nullifier_key_y,
// address_derivation.incoming_viewing_key_x, address_derivation.incoming_viewing_key_y,
// address_derivation.outgoing_viewing_key_x, address_derivation.outgoing_viewing_key_y,
// address_derivation.tagging_key_x, address_derivation.tagging_key_y
// }
// Observe the folowing also connects the class_id of the instance to the class members.
// TODO: Probably some latch is also needed.
// TODO: Selector needs to be guarded by error flag.
// #[LOOKUP_CLASS_ID_DERIVATION]
// sel {
// class_id,
// artifact_hash,
// private_function_root,
// public_bytecode_commitment
// } in class_id_derivation.sel {
// class_id_derivation.class_id,
// class_id_derivation.artifact_hash,
// class_id_derivation.private_function_root,
// class_id_derivation.public_bytecode_commitment
// }
// TODO: Siloing, lookups to merkle, bring in error flag.
// Dummy relation to make codegen work.
sel = sel;