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

Make Expression Copyable #143

Open
Brechtpd opened this issue Feb 10, 2023 · 3 comments
Open

Make Expression Copyable #143

Brechtpd opened this issue Feb 10, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@Brechtpd
Copy link

Imagine a world without .clone() or .expr() everywhere anytime you want to do something with Expressions. That is a world I want to live in.

@CPerezz CPerezz added the enhancement New feature or request label Feb 23, 2023
@Brechtpd
Copy link
Author

Unfortunately because of the heavy limitations rust put on objects that want to implement Copy, this is a tricky one. Expressions are variable sized objects, built recursively, so not something that rust deems worth of being Copyable. You could come up with some very hacky workarounds (make it fixed size by having some max Expression size), but none that seem preferable than just sticking with the status quo.

Anyone have an idea how we could achieve this in a decent way?

iquerejeta pushed a commit to input-output-hk/halo2 that referenced this issue May 8, 2024
…-hk/dev-feature/97-gen-vbsm

Generalize vbsm part of Ecc Chip

This is the variable-base scalar-mul (vbsm) part of the SOW task of generalizing the Ecc Chip to Pluto.

This builds on top of privacy-scaling-explorations#124: that issue generalized the algorithm, while keeping the curve fixed to Pallas, and this PR generalizes the curves supported.

The goal of this issue is to generalize vbsm to arbitrary curves over fields of "arbitrary" bit-width: we can make restrictions as needed, but at minimum need to support Pluto, Eris, Pallas, and Vesta. In practice, the assumptions amount to the base and scalar fields having the same bit-width, and (simplified) both field moduli having a zero-bit in the second-to-highest-order position. See the Halo2 book chapter as updated in this PR for details.
iquerejeta pushed a commit to input-output-hk/halo2 that referenced this issue May 8, 2024
…-hk/dev-feature/53-gen-eccc

Implement Ecc Chip for Pluto ... and Vesta and Eris

# Project Context

This issue corresponds to the Milestone 3 updated SOW task "New: Extend EccChip to support Pluto". There is no corresponding GitHub issue, since this is the Pluto/Eris analog of supporting Pallas, which was the starting state. However, the work for this issue overlaps significantly with SOW task "zcash#578: Extend EccChip to support ~~Vesta~~ Eris" ([zcash#578](zcash#578)), since it seems easiest to just generalize to all curves at the same time. So, while we only need to ensure Pluto support for Milestone 3, the strategy we're using also gives Eris and Vesta support "for free".

This builds on top of privacy-scaling-explorations#145 directly, depends directly on privacy-scaling-explorations#143 and privacy-scaling-explorations#144 as well, and is the culmination of generalization work that started at a lower level with privacy-scaling-explorations#101, privacy-scaling-explorations#107, and privacy-scaling-explorations#114. 

The corresponding Galois internal issue is [Galois#53](https://gitlab-ext.galois.com/iog-midnight/halo2/-/issues/53).

# Issue Description

Generalize the Ecc Chip to arbitrary curves, allowing any assumptions that apply to all of Pallas, Vesta, Pluto, and Eris. This work is broken up into several subtasks, concerned with updating the major components of the Ecc Chip ([vbsm](privacy-scaling-explorations#143), [fbsm](privacy-scaling-explorations#145), and [point witnessing](privacy-scaling-explorations#144)), along with the final work here of updating the full Ecc Chip to use all of the updated components, have tests for all curves, and provide instantiations for all curves.

Behind the scenes there are various traits associated with the vbsm and fbsm generalizations, but the final Ecc Chip interface exposes `EccCurve` and `EccField` as the traits required for curves and fields used with Ecc Chip (and of course these traits are implemented for Pallas, Vesta, Pluto, Eris, and their fields).
@adria0
Copy link
Member

adria0 commented Oct 2, 2024

An initial implementation #354

@mahmudsudo
Copy link

hello ,can i take on this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants