From 204ab427e80bdf96eb9d76ef3b11d6ec8aad17eb Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Wed, 5 Feb 2025 17:41:18 +0100 Subject: [PATCH 1/2] Set VDF_MODE according to the passed env var, and make it 1 on the CI test workflows. --- .github/workflows/test.yaml | 3 ++- src/Makefile.vdf-client | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 7000579a..58ac320c 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -36,13 +36,14 @@ jobs: run: | sudo apt-get install libgmp-dev libboost-python-dev libpython3-dev libboost-system-dev build-essential -y cd src - make ${{ matrix.config }} -f Makefile.vdf-client + VDF_MODE=1 make ${{ matrix.config }} -f Makefile.vdf-client - name: Build vdf-client on Mac if: startsWith(matrix.os, 'mac') run: | brew install boost cd src + # TODO: Are we expected to fail to compile with VDF_MODE=1 on macOS make ${{ matrix.config }} -f Makefile.vdf-client - name: Test vdf-client diff --git a/src/Makefile.vdf-client b/src/Makefile.vdf-client index 4376142f..80b3f206 100644 --- a/src/Makefile.vdf-client +++ b/src/Makefile.vdf-client @@ -8,7 +8,9 @@ endif LDFLAGS += -flto $(NOPIE) -g LDLIBS += -lgmpxx -lgmp -lboost_system -pthread -CXXFLAGS += -flto -std=c++1z -D VDF_MODE=0 -D FAST_MACHINE=1 -pthread $(NOPIE) -fvisibility=hidden + +VDF_MODE ?= 0 +CXXFLAGS += -flto -std=c++1z -D VDF_MODE=$(VDF_MODE) -D FAST_MACHINE=1 -pthread $(NOPIE) -fvisibility=hidden ifeq ($(UNAME),Darwin) CXXFLAGS += -D CHIAOSX=1 endif From d3b5aaf8bde94c0fadc3ffe8bfe976c0d150e518 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Wed, 5 Feb 2025 19:53:00 +0100 Subject: [PATCH 2/2] Explore adapting repeated_square_original call to its current signature. --- src/vdf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vdf.h b/src/vdf.h index 9ab4aef4..1d1eb909 100644 --- a/src/vdf.h +++ b/src/vdf.h @@ -231,7 +231,7 @@ void repeated_square(uint64_t iterations, form f, const integer& D, const intege form f_copy_2=f; weso->reduce(f_copy_2); - repeated_square_original(*weso->vdfo, f_copy, D, L, actual_iterations); + repeated_square_original(*weso->vdfo, f_copy, D, L, actual_iterations, 1, NULL); assert(f_copy==f_copy_2); } #endif