Update internal BLST dependency#21
Conversation
| var SrcRoot string | ||
|
|
||
| func init() { | ||
| if _, self, _, ok := runtime.Caller(0); ok { | ||
| SrcRoot = filepath.Dir(filepath.Dir(self)) | ||
| } | ||
| } |
There was a problem hiding this comment.
Could you document what this is for? I couldn't find any usages within this diff.
There was a problem hiding this comment.
Files under ./blst_src and ./internal/blst/ are copied from the blst repo (though ./internal is only used for tests). The changes you see are coming from the blst repo latest changes.
Many functions copied over from blst aren't needed but isolating them makes updating the blst version more complicated. I ended up choosing to copy all the low level code over in the update instructions (the steps to update blst are detailed in this readme https://github.com/onflow/crypto/blob/tarak/update-blst/blst_src/README.md). The Go file you commented is definitely not needed in our code (it's not even built btw), only C and assembly files are needed.
| type Scalar = C.blst_scalar | ||
| type Fp = C.blst_fp | ||
| type Fp2 = C.blst_fp2 | ||
| type Scalar struct{ cgo C.blst_scalar } |
There was a problem hiding this comment.
What is the reason for replacing type aliases with these structs?
There was a problem hiding this comment.
Files under ./blst_src and ./internal/blst/ are copied from the blst repo. ./internal specifically is only used for internal tests. The Go changes you see are coming from the blst repo latest changes and are not relevant for our case.
update BLST to 0.3.14