diff --git a/src/Makefile b/src/Makefile index 058da21..cbe99e7 100644 --- a/src/Makefile +++ b/src/Makefile @@ -8,11 +8,13 @@ endif CLANG_EXECUTABLE=clang BLST_BUILD_SCRIPT=./build.sh +FIELD_ELEMENTS_PER_BLOB?=4096 all: c_kzg_4844.o lib +# If you change FIELD_ELEMENTS_PER_BLOB, remember to rm c_kzg_4844.o and make again c_kzg_4844.o: c_kzg_4844.c Makefile - ${CLANG_EXECUTABLE} -Wall -I$(INCLUDE_DIRS) $(CFLAGS) -c $< + ${CLANG_EXECUTABLE} -Wall -I$(INCLUDE_DIRS) -DFIELD_ELEMENTS_PER_BLOB=$(FIELD_ELEMENTS_PER_BLOB) $(CFLAGS) -c $< # Will fail with "patch does not apply" if it has already been patched. # Safe to ignore. diff --git a/src/c_kzg_4844.h b/src/c_kzg_4844.h index 6437925..4230325 100644 --- a/src/c_kzg_4844.h +++ b/src/c_kzg_4844.h @@ -36,7 +36,6 @@ extern "C" { #define BYTES_PER_COMMITMENT 48 #define BYTES_PER_PROOF 48 -#define FIELD_ELEMENTS_PER_BLOB 4096 #define BYTES_PER_FIELD_ELEMENT 32 #define BYTES_PER_BLOB FIELD_ELEMENTS_PER_BLOB * BYTES_PER_FIELD_ELEMENT static const uint8_t FIAT_SHAMIR_PROTOCOL_DOMAIN[] = {70, 83, 66, 76, 79, 66, 86, 69, 82, 73, 70, 89, 95, 86, 49, 95}; // "FSBLOBVERIFY_V1_"