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

Move "frontend" column types from middleware to the frontend #300

Merged
merged 7 commits into from
Mar 21, 2024

Conversation

ed255
Copy link
Member

@ed255 ed255 commented Mar 20, 2024

Resolve #270

  • move Fixed, Advice, Instance, ColumnType, Column, sealed from
    middleware to frontend
    • These types are only used in the frontend. In particular, the Fixed, Advice, Instance types are used in the generic Column<C> type which is useful for the fronted because it brings type safety for column types; but in the backend it's unneeded because we use the simplified type ColumnMid.
  • remove metadata::Column in favor of ColumnMid
  • remove phase from Advice
    • I noticed that the phase in the Advice was redundant because a column always exists in the context of a ConstraintSystem which has the advice_column_phase with that same information. This removal simplifies the code.
  • Remove From<(Any, usize)> for Column in favor of using constructors in order to improve code clarity.

- remove phase from Advice
- remove metadata::Column in favour of ColumnMid
- move Fixed, Advice, Instance, ColumnType, Column, sealed from
  middleware to frontend
@ed255 ed255 requested a review from duguorong009 March 20, 2024 15:45
halo2_frontend/src/circuit.rs Outdated Show resolved Hide resolved
halo2_frontend/src/plonk/circuit.rs Outdated Show resolved Hide resolved
@duguorong009
Copy link

duguorong009 commented Mar 21, 2024

Overall, the PR looks good! @ed255
Pls address the minor comments.

halo2_frontend/src/circuit.rs Outdated Show resolved Hide resolved
halo2_frontend/src/plonk/circuit.rs Outdated Show resolved Hide resolved
halo2_frontend/src/plonk/permutation.rs Show resolved Hide resolved
Copy link
Member

@CPerezz CPerezz left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for this work!

Copy link

@duguorong009 duguorong009 left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀

@ed255 ed255 merged commit 6eb4371 into main Mar 21, 2024
15 checks passed
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.

[post frontend-backend split] Remove query_cell methods from middleware
3 participants