Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose remaining gates #201

Merged
merged 12 commits into from
Nov 1, 2023
Merged

Expose remaining gates #201

merged 12 commits into from
Nov 1, 2023

Conversation

mitschabaude
Copy link
Collaborator

@mitschabaude mitschabaude commented Nov 1, 2023

  • expose all gates
  • make gate definitions shorter
  • put gates in the same order as in plonk_constraint_system.ml

@mitschabaude mitschabaude force-pushed the feature/expose-all-gates branch from 6e23de6 to 0823354 Compare November 1, 2023 15:38
Copy link
Member

@Trivo25 Trivo25 left a comment

Choose a reason for hiding this comment

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

this makes the code much more cleaner, really like that!

ocaml/lib/snarky_bindings.ml Outdated Show resolved Hide resolved
let ec_add p1 p2 p3 inf same_x slope inf_z x21_inv =
add_gate "ec_add"
(EC_add_complete { p1; p2; p3; inf; same_x; slope; inf_z; x21_inv }) ;
(* TODO: do we need this? *)
Copy link
Member

Choose a reason for hiding this comment

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

do you mean the return value?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah

Copy link
Member

Choose a reason for hiding this comment

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

I think we dont. That was probably my fault when I originally rewrote the Group.add function in TypeScript

https://github.com/o1-labs/o1js/blob/main/src/lib/group.ts#L173-L181

can probably just return

(x3, y3)

@mitschabaude mitschabaude merged commit 2a60a9b into main Nov 1, 2023
@mitschabaude mitschabaude deleted the feature/expose-all-gates branch November 1, 2023 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants