Commit 26b6d5a
authored
chore: domain separator tweaks (#19199)
Working towards improving domain separation.
(Getting ci to run the tests for me, to see what mistakes I've made)
In this PR:
- Remove unused domain separators from constants.nr
- Add some comments to constants.nr (and some physical reordering to
group them better... this is fine because the eventual goal is to use
strings for domain separators instead of brittle enums).
- Rename from `GENERATOR_INDEX__` to `DOM_SEP__`, because "generator
index" is carried over from when we used to use pedersen hashes and
makes no sense anymore.
- Most of the line changes of this PR come from this.
- Renamed one of the separators from `__CONTRACT_LEAF` to
`__CONTRACT_CLASS_ID` to help my brain.
- Created `domain_separators.nr`, which contains dormant tests to
generate "proper" domain separators using strings. This PR won't go as
far as instating those strings, because all the hard-coded constants in
all tests in the repo will break. That'll be a fun task for someone in
January.
Future domain separation tasks for another PR:
- instate the domain separation strings.
- Claude says there are poseidon2 hashes which aren't using any domain
separator, which could be at risk of collisions. We'll need to add
those.File tree
115 files changed
+845
-555
lines changed- barretenberg/cpp
- pil/vm2
- bytecode
- trees
- src/barretenberg
- avm_fuzzer/common/interfaces
- vm2
- common
- constraining/relations
- generated
- relations
- simulation
- gadgets
- lib
- standalone
- tracegen
- docs
- developer_versioned_docs/version-v3.0.0-nightly.20251223/docs/resources
- docs-developers/docs
- aztec-nr/framework-description
- advanced
- functions
- resources
- noir-projects
- aztec-nr
- aztec/src
- authwit
- entrypoint
- event
- history
- nullifier_inclusion
- nullifier_non_inclusion
- keys
- macros
- functions
- messages
- encryption
- logs
- state_vars
- test/mocks
- uint-note/src
- noir-contracts/contracts
- app
- app_subscription_contract/src
- nft_contract/src/types
- token_blacklist_contract/src/types
- test
- spam_contract/src
- test_contract/src
- noir-protocol-circuits/crates
- private-kernel-lib/src/tests
- private_kernel_tail_to_public
- private_kernel_tail
- types/src
- abis
- kernel_circuit_public_inputs
- transaction
- address
- data
- playground/src/assets/artifacts/2.0.2
- yarn-project
- constants/src
- scripts
- stdlib/src/contract
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
115 files changed
+845
-555
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
| 24 | + | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
178 | 178 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
| 152 | + | |
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
0 commit comments