Skip to content

feat(avm)!: WIP remove is_infinite flags from ECADD opcode (outside AVM only)#23031

Open
MirandaWood wants to merge 6 commits into
mw/avm-derive-is-inffrom
mw/avm-rem-inf-opcode-ecadd-ext
Open

feat(avm)!: WIP remove is_infinite flags from ECADD opcode (outside AVM only)#23031
MirandaWood wants to merge 6 commits into
mw/avm-derive-is-inffrom
mw/avm-rem-inf-opcode-ecadd-ext

Conversation

@MirandaWood
Copy link
Copy Markdown
Contributor

@MirandaWood MirandaWood commented May 7, 2026

This branch includes the changes to remove the is_infinite flags from the ECADD opcode fn signature which reside outside vm2. This includes the transpiler, ts simulator, and anything required in ACIR.

Note that ACIR and noir's black box still use the flags and represent points by a triple of elements. Since this touches both private and public execution, I think it's out of scope of this task to update these.

Will partially close Foundation AVM Issue 19 (the previous PR with AVM changes will close the initial portion)


Stack:

ADD d25, $2, d25; pointer to is_infinite
MOV i25, d24; is_infinite
; Also store the original point in d25, d26, d27
; Also store the original point in d25, d26
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: to avoid a large diff/confusion, rather than shift all the addresses when removing inf I just left gaps (e.g. d24). Happy to remove these gaps though!

@MirandaWood MirandaWood force-pushed the mw/avm-rem-inf-opcode-ecadd branch 3 times, most recently from 22dd20e to f0f77cb Compare May 8, 2026 10:55
@MirandaWood MirandaWood force-pushed the mw/avm-rem-inf-opcode-ecadd-ext branch from 3a8ab34 to 0239103 Compare May 8, 2026 14:15
export const DEFAULT_MAX_DEBUG_LOG_MEMORY_READS = 125000;
export enum DomainSeparator {
NOTE_HASH = 116501019,
PARTIAL_NOTE_COMMITMENT = 568912195,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is just leftover from some previous changes not updating constants - unrelated to this work!

@MirandaWood MirandaWood marked this pull request as ready for review May 8, 2026 14:44
MirandaWood added a commit that referenced this pull request May 12, 2026
…#22921)

This branch solely contains the changes needed to remove the
`is_infinite` flag from our `StandardAffinePoint` C++ wrapper. Now, we
check whether `x` and `y` are zero to assign an `inf` underlying point.

Will close [Foundation AVM Issue
17](https://linear.app/aztec-foundation/issue/AVM-17/remove-is-inf-flag-from-avms-standardaffinepoint)

---

Stack:

- #22745
- #22564
- `mw/avm-rem-inf-point-wrapper` <-- here
- #22795
- #22945
- #23031
MirandaWood added a commit that referenced this pull request May 12, 2026
…y) (#22795)

This branch includes the changes to remove the `is_infinite` flag from
our point representation and conceptually treating a point as infinite
iff its coordinates are `(0, 0)`.

It only contains logic changes within the AVM for the above and does not
touch the opcode - this is in a lower PR - so the **CI will probably
fail**.

Will close [Foundation AVM Issue
18](https://linear.app/aztec-foundation/issue/AVM-18/remove-is-inf-flag-from-resulting-ec-points-in-avm-circuits)

---

Stack:
- #22745
- #22564
- #22921
- `mw/avm-explore-remove-is-inf` <-- here
- #22945
- #23031
@MirandaWood MirandaWood force-pushed the mw/avm-rem-inf-opcode-ecadd branch from edf92df to 6b3e875 Compare May 12, 2026 16:32
MirandaWood added a commit that referenced this pull request May 13, 2026
…#22945)

This branch includes the changes to remove the `is_infinite` flags from
the ECADD opcode fn signature. The actual EC logic changes come above
this PR in the stack, and any changes outside the AVM will be below.

For ease of review, I've separated into commits:

- **feat: remove inf flags from ecadd opcode - ec flow only** Isolated
to the EC flow only (does not change registers so non avm tests will
fail)
- f**eat: rem infs from fuzzer (only gadget fuzzer tested)** Isolated
fixes to get the fuzzer(s) compiling

Will partially close [Foundation AVM Issue
19](https://linear.app/aztec-foundation/issue/AVM-19/) (the following PR
#23031 with ts/rs changes will fully close it).

Note that the opcode mismatches that in ts so **CI will fail** until
#23031 is merged into this branch!

---

Stack:
- #22745
- #22564
- #22921
- #22795
- `mw/avm-rem-inf-opcode-ecadd` <-- here
- #23031
Base automatically changed from mw/avm-rem-inf-opcode-ecadd to mw/avm-derive-is-inf May 13, 2026 08:19
@MirandaWood MirandaWood force-pushed the mw/avm-rem-inf-opcode-ecadd-ext branch from 1107aa2 to 5ab28e8 Compare May 13, 2026 08:24
@MirandaWood MirandaWood added the ci-full Run all master checks. label May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-full Run all master checks.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant