Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explore CI bugs. #238

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ 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')
Expand Down
4 changes: 3 additions & 1 deletion src/Makefile.vdf-client
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/parameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ const int checkpoint_interval=10000; //at each checkpoint, the slave thread is r

// ==== test ====
#if VDF_MODE==1
#define VDF_TEST
//#define VDF_TEST
const bool is_vdf_test=true;

const bool enable_random_error_injection=false;
Expand Down
9 changes: 9 additions & 0 deletions src/vdf.h
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,13 @@ void repeated_square(uint64_t iterations, form f, const integer& D, const intege

#ifdef VDF_TEST
if (vdf_test_correctness) {
/*
form f_copy_2=f;
weso->reduce(f_copy_2);

repeated_square_original(*weso->vdfo, f_copy, D, L, actual_iterations);
assert(f_copy==f_copy_2);
*/
}
#endif
}
Expand Down Expand Up @@ -637,6 +639,7 @@ class ProverManager {
}

if (fast_storage != NULL) {
throw std::runtime_error("using fast storage");
intermediates_iter = fast_storage -> GetFinishedSegment();
} else {
intermediates_iter = vdf_iteration;
Expand All @@ -653,6 +656,9 @@ class ProverManager {
/*x=*/weso->checkpoints[last_appended[i] / (1 << 16)],
/*y=*/weso->checkpoints[(last_appended[i] + sg_length) / (1 << 16)]
);
if (sg.y.a == integer(0) && sg.y.b == integer(0) && sg.y.c == integer(0)) {
throw std::runtime_error("Null form");
}
pending_segments[i].emplace_back(sg);
if (!warned && pending_segments[i].size() >= kWindowSize - 2) {
warned = true;
Expand Down Expand Up @@ -725,6 +731,9 @@ class ProverManager {
if (!new_segment) {
provers[index].first->resume();
} else {
if (best.is_empty) {
throw std::runtime_error("Empty segment being spawned");
}
if (!stopped) {
provers.emplace_back(
std::make_pair(
Expand Down
Loading