Update bignum_pure.go - Minor edit -> handling zero division in InvModFr - #37
Update bignum_pure.go - Minor edit -> handling zero division in InvModFr#37RDxR10 wants to merge 3 commits into
Conversation
| } | ||
|
|
||
| func InvModFr(dst *Fr, v *Fr) { | ||
| func InvModFr(dst *Fr, v *Fr) error { |
There was a problem hiding this comment.
The idea is that this function signature matches InvModFr in:
- Herumi BLS:
Line 104 in c91cee5
- Holiman uint256:
Line 118 in c91cee5
- Kilic BLS (default):
Line 113 in c91cee5
With build tags the performance of different implementations of field-element operations can be compared in benchmarks etc. since a big part of this repository is FFT related code for data-availability-sampling.
And since native divide by zero behaves the same with a panic, and this error return is a breaking API change, I'm a bit hesitant to merge this. What do you use go-kzg for, and what is the motivation for this PR?
There was a problem hiding this comment.
I'm just exploring your repo for the sake of learning. This PR is for error handling - might be helpful if used at scale
No description provided.