Commit 2b7d2c3
authored
feat(avm)!: Derive
### Update
Will also close [Foundation AVM Issue
13](https://linear.app/aztec-foundation/issue/AVM-13/enforce-canonical-point-at-infinity-representation)
Note that this is currently being used as a base for removing the flag
from AVM's point representation ([Foundation AVM Issue
14](https://linear.app/aztec-foundation/issue/AVM-14/remove-is-inf-flag-from-avm-ec-point-representation)):
- ~#22745 (in merge
train)
- #23342 (ACIR
changes from #23155 for removing `inf`)
- #22564 <-- here
- #22921 ✅
- #22795 ✅
- #22945 ✅
- #23031 ✅
**Everything in this branch has been reviewed**, see above PRs for
individual work ⬆️
### [OLD] Overview
Will close
[AVM-248](https://linear.app/aztec-labs/issue/AVM-248/enforce-canonical-point-at-infinity-representation)
As a kind of stopgap before removing the `is_infinite` flag completely
from the AVM
([AVM-266](https://linear.app/aztec-labs/issue/AVM-266/remove-is-inf-flag-from-ec-point-representation)),
we now follow Noir behaviour more closely by deriving `is_inf` from
coordinates inside the circuits ( `(x, y) == (0, 0) ? is_inf == true`).
This replaces previous logic remapping points to (0, 0) from `is_inf`.
This method relies on the on curve check (for `(0, 0) ==> is_inf `) and
some new relations enforcing coordinates (for `is_inf ==> (0, 0)`)
rather than (more expensive) error handling. However this does mean that
the former will fail with an on curve error whereas the latter will
simply fail a relation.is_infinite flag from point coordinates (#22564)47 files changed
Lines changed: 559 additions & 930 deletions
File tree
- avm-transpiler/src
- procedures
- barretenberg/cpp
- pil/vm2
- bytecode
- src/barretenberg
- avm_fuzzer
- fuzz_lib
- harness
- mutations/instructions
- aztec
- vm2
- common
- constraining
- relations
- generated
- relations
- simulation
- gadgets
- lib
- tracegen
- noir-projects/noir-protocol-circuits/crates/types/src
- yarn-project
- constants/src
- simulator
- docs/avm
- src/public
- avm/opcodes
- fixtures
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1285 | 1285 | | |
1286 | 1286 | | |
1287 | 1287 | | |
1288 | | - | |
| 1288 | + | |
1289 | 1289 | | |
1290 | 1290 | | |
1291 | 1291 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
188 | 190 | | |
189 | 191 | | |
190 | 192 | | |
| |||
312 | 314 | | |
313 | 315 | | |
314 | 316 | | |
315 | | - | |
| 317 | + | |
316 | 318 | | |
317 | 319 | | |
318 | 320 | | |
319 | | - | |
| 321 | + | |
320 | 322 | | |
321 | 323 | | |
322 | 324 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | | - | |
14 | | - | |
15 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
16 | 19 | | |
17 | | - | |
18 | | - | |
19 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
20 | 25 | | |
21 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
22 | 31 | | |
23 | 32 | | |
24 | 33 | | |
| |||
37 | 46 | | |
38 | 47 | | |
39 | 48 | | |
40 | | - | |
| 49 | + | |
41 | 50 | | |
42 | 51 | | |
43 | 52 | | |
44 | | - | |
| 53 | + | |
45 | 54 | | |
46 | 55 | | |
47 | 56 | | |
| |||
70 | 79 | | |
71 | 80 | | |
72 | 81 | | |
| 82 | + | |
73 | 83 | | |
74 | 84 | | |
75 | 85 | | |
76 | 86 | | |
77 | 87 | | |
78 | 88 | | |
| 89 | + | |
79 | 90 | | |
80 | 91 | | |
81 | 92 | | |
82 | 93 | | |
83 | 94 | | |
84 | 95 | | |
85 | | - | |
86 | | - | |
87 | 96 | | |
88 | 97 | | |
89 | 98 | | |
| |||
147 | 156 | | |
148 | 157 | | |
149 | 158 | | |
150 | | - | |
| 159 | + | |
151 | 160 | | |
152 | | - | |
| 161 | + | |
153 | 162 | | |
154 | 163 | | |
155 | 164 | | |
| |||
182 | 191 | | |
183 | 192 | | |
184 | 193 | | |
185 | | - | |
186 | | - | |
187 | 194 | | |
0 commit comments