Skip to content

Commit 007191a

Browse files
committed
faster cert gen for new entries, skip verifying existing certs
1 parent 007429d commit 007191a

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

Makefile

+7-1
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,11 @@ fastverify: splits bases
3232
cat factorbase_* | sort -n > factorbase.txt.new
3333
rm -f factorbase_*
3434

35-
verify: .git/image
35+
containerverify: .git/image
3636
docker run --gpus all --rm --name primemath -it --init -v $(shell pwd):/var/primemath primemath /var/primemath/driver.pl --check --color --curves=0 --thorough
37+
38+
gencerts:
39+
./driver.pl --check --color --curves=0 --thorough
40+
41+
fastgencerts:
42+
./driver.pl --check --color --curves=0 --thorough --skipverify

driver.pl

+3-1
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ sub combine_factor_bases {
144144
}
145145

146146
my $g_thorough; # global for Getopt, defaults to off
147+
my $g_skipverify; # global for Getopt, defaults to off
147148
sub prime_check {
148149
my ($num) = @_;
149150

@@ -153,7 +154,7 @@ sub prime_check {
153154
my ($provable, $certificate);
154155
$certificate = read_prime_certificate($num);
155156
if ($certificate) {
156-
if (Math::Prime::Util::verify_prime($certificate)) {
157+
if ($g_skipverify || Math::Prime::Util::verify_prime($certificate)) {
157158
return 1;
158159
} else {
159160
progress("Error with prime cert, deleting to recalculate");
@@ -452,6 +453,7 @@ sub pre_filter {
452453
"repeat=i" => \$repeat,
453454
"shuffle" => \$shuffle,
454455
"thorough" => \$g_thorough,
456+
"skipverify" => \$g_skipverify,
455457
);
456458

457459
if ($use_color) {

0 commit comments

Comments
 (0)