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

refactor!: remove generic parameter from proof plans and exprs #339

Merged
merged 7 commits into from
Nov 6, 2024

Conversation

JayWhite2357
Copy link
Contributor

Rationale for this change

The DynProofPlan type does not need to have a generic parameter. It only has one as a relic of past requirements.

What changes are included in this PR?

The first four commits remove the generic Scalar parameter from LiteralValue. In order to not use Scalar as the underlying store for the Decimal75 variant, an I256 type is introduced. (This type could be extended to become the main 256-bit integer used in the crate, but this is left for later work.)

The next 3 commits are the bulk of the PR and remove the generic parameter from the ProofPlan and ProofExpr traits as well as all implementers of them, such as DynProofPlan and DynProofExpr.

Are these changes tested?

Yes. This is a refactoring change, and existing test pass.

@JayWhite2357 JayWhite2357 removed the request for review from stuarttimwhite November 6, 2024 14:02
@JayWhite2357
Copy link
Contributor Author

I addressed the review, fixed a bug, added tests to i256, and ran cargo fmt.

I put all of these changes in one commit: e137206. I figured this will be the easiest way to review.

I will rebase and clean up the commits before merging. If you want me to rebase now before you review, let me know.

@iajoiner iajoiner self-requested a review November 6, 2024 14:40
Copy link
Contributor

@iajoiner iajoiner left a comment

Choose a reason for hiding this comment

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

Really thanks! Merge on green.

…ant, remove `Scalar` generic parameter from `LiteralValue`.

Note: these two changes have to come together.
…arget only)

NOTE: in isolation, this commit will not fully pass CI check because it only applies to the lib target, and not tests, examples, or benches. The next two commits are the corresponding changes to these

The generic parameter removal includes the `ProofPlan` and `ProofExpr` traits as well as all implementors of them, such as `DynProofPlan` and `DynProofExpr`
… target only)

NOTE: in isolation, this commit will not fully pass CI check because it only applies to the lib target, and not tests, examples, or benches. The previous commit next commit are the corresponding changes to these

The generic parameter removal includes the `ProofPlan` and `ProofExpr` traits as well as all implementors of them, such as `DynProofPlan` and `DynProofExpr`
…es and benches targets)

NOTE: in isolation, this commit will not fully pass CI check because it only applies to the examples and benches target, and not lib or tests. The previous two commits are the corresponding changes to these targets

The generic parameter removal includes the `ProofPlan` and `ProofExpr` traits as well as all implementors of them, such as `DynProofPlan` and `DynProofExpr`
@JayWhite2357 JayWhite2357 merged commit b2e6fba into main Nov 6, 2024
11 checks passed
Copy link

github-actions bot commented Nov 6, 2024

🎉 This PR is included in version 0.36.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants