[Go] Allow minimal preset (#283)

This commit is contained in:
Justin Traglia 2023-04-07 07:57:48 -05:00 committed by GitHub
parent ae2db332a5
commit 928fd9d9b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View File

@ -40,6 +40,14 @@ Run the benchmarks with this command:
go test -bench=Benchmark
```
## Minimal
By default, `FIELD_ELEMENTS_PER_BLOB` will be 4096 (mainnet), but you can
manually set it to 4 (minimal), like so:
```
CGO_CFLAGS="-DFIELD_ELEMENTS_PER_BLOB=4" go build
```
## Note
The `go.mod` and `go.sum` files are in the project's root directory because the

View File

@ -2,7 +2,9 @@ package cgokzg4844
// #cgo CFLAGS: -I${SRCDIR}/../../src
// #cgo CFLAGS: -I${SRCDIR}/blst_headers
// #cgo CFLAGS: -DFIELD_ELEMENTS_PER_BLOB=4096
// #ifndef FIELD_ELEMENTS_PER_BLOB
// #define FIELD_ELEMENTS_PER_BLOB 4096
// #endif
// #include "c_kzg_4844.c"
import "C"