spaceandtimelabs / sxt-proof-of-sql

Space and Time | Proof of SQL
Other
2.75k stars 96 forks source link

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

Closed JayWhite2357 closed 3 weeks ago

JayWhite2357 commented 3 weeks ago

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 commented 3 weeks ago

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

I put all of these changes in one commit: https://github.com/spaceandtimelabs/sxt-proof-of-sql/pull/339/commits/e1372060ec479fa5c7f7f3ed151939f5be7b53cb. 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.

github-actions[bot] commented 3 weeks ago

:tada: This PR is included in version 0.36.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: