ethereum / c-kzg-4844

A minimal implementation of the Polynomial Commitments API for EIP-4844 and EIP-7594, written in C.
Apache License 2.0
112 stars 105 forks source link

chore(rust): move Rust bindings to KZGSettings #461

Closed jtraglia closed 1 month ago

jtraglia commented 1 month ago

This moves the public functions to KZGSettings. And we no longer need to pass &kzg_settings as an argument.

Associated with #413.

asn-d6 commented 1 month ago

Hmm. I think this is fine, but I have no strong feelings on this PR in either direction.

I will let @mattsse decide if it works better for their codebase.

IIUC this is a non-backwards compatible change and Lighthouse will also need to adjust their codebase.

jtraglia commented 1 month ago

I believe these functions could be kept on Kzgcommitment for backwards compat and then the new fns on kzgsettings would call them?

Hmm that would work too, but it feels a little confusing. I'm okay with breaking backwards compatibility this time. It's a good time to do this, as we're going to make a v2 release soon-ish. I like having all the public functions accessible in the same way.

mattsse commented 1 month ago

changes should be minimal, @Rjected for vis

Rjected commented 1 month ago

This API makes sense to me, fine with updating our code when the new version is released