Jim Posen
9a7e2c153d
scripted-diff: Move util files to separate directory.
...
-BEGIN VERIFY SCRIPT-
mkdir -p src/util
git mv src/util.h src/util/system.h
git mv src/util.cpp src/util/system.cpp
git mv src/utilmoneystr.h src/util/moneystr.h
git mv src/utilmoneystr.cpp src/util/moneystr.cpp
git mv src/utilstrencodings.h src/util/strencodings.h
git mv src/utilstrencodings.cpp src/util/strencodings.cpp
git mv src/utiltime.h src/util/time.h
git mv src/utiltime.cpp src/util/time.cpp
sed -i -e 's/"util\.h"/"util\/system\.h"/g' $(git ls-files 'src/*.h' 'src/*.cpp')
git checkout HEAD -- src/secp256k1 # exclude secp256k1, which has its own "util.h"
sed -i -e 's/"utilmoneystr\.h"/"util\/moneystr\.h"/g' $(git ls-files 'src/*.h' 'src/*.cpp')
sed -i -e 's/"utilstrencodings\.h"/"util\/strencodings\.h"/g' $(git ls-files 'src/*.h' 'src/*.cpp')
sed -i -e 's/<utilstrencodings\.h>/<util\/strencodings\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp')
sed -i -e 's/"utiltime\.h"/"util\/time\.h"/g' $(git ls-files 'src/*.h' 'src/*.cpp')
sed -i -e 's/BITCOIN_UTIL_H/BITCOIN_UTIL_SYSTEM_H/g' src/util/system.h
sed -i -e 's/BITCOIN_UTILMONEYSTR_H/BITCOIN_UTIL_MONEYSTR_H/g' src/util/moneystr.h
sed -i -e 's/BITCOIN_UTILSTRENCODINGS_H/BITCOIN_UTIL_STRENCODINGS_H/g' src/util/strencodings.h
sed -i -e 's/BITCOIN_UTILTIME_H/BITCOIN_UTIL_TIME_H/g' src/util/time.h
sed -i -e 's/ util\.\(h\|cpp\)/ util\/system\.\1/g' src/Makefile.am
sed -i -e 's/utilmoneystr\.\(h\|cpp\)/util\/moneystr\.\1/g' src/Makefile.am
sed -i -e 's/utilstrencodings\.\(h\|cpp\)/util\/strencodings\.\1/g' src/Makefile.am
sed -i -e 's/utiltime\.\(h\|cpp\)/util\/time\.\1/g' src/Makefile.am
sed -i -e 's/src\/util\.cpp/src\/util\/system\.cpp/g' test/lint/lint-locale-dependence.sh
sed -i -e 's/src\/utilmoneystr\.cpp/src\/util\/moneystr\.cpp/g' test/lint/lint-locale-dependence.sh
sed -i -e 's/src\/utilstrencodings\.\(h\|cpp\)/src\/util\/strencodings\.\1/g' test/lint/lint-locale-dependence.sh
-END VERIFY SCRIPT-
2022-07-01 17:50:09 -06:00
Jack Grigg
df08281f25
Migrate BLAKE2b Rust FFI to `cxx`
2022-05-27 20:15:05 +00:00
Jack Grigg
2d172e121f
Replace libsodium's crypto_generichash_blake2b with blake2b_simd
2020-09-24 15:58:14 +01:00
Daira Hopwood
40b9cbf0b1
Allow Equihash validation tests to be compiled with --disable-mining.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-07-25 16:33:02 +01:00
avnish
fa5b6f1225
changed "equihash_tests" to EquihashTests
2018-10-10 08:54:12 +05:30
Jack Grigg
2cc0a252ad
Add compile flag to disable compilation of mining code
2017-01-30 21:14:46 +01:00
zkbot
cd9d373987
Auto merge of #1260 - str4d:1175-byte-array-manipulation, r=ebfull
...
Update Equihash implementation to match the Zcash spec
Closes #1175
2016-08-24 03:01:13 +00:00
Jack Grigg
90b740fd3b
Test conversion between solution indices and minimal representation
2016-08-24 13:42:52 +12:00
Jack Grigg
6e629886e5
Add another test case based on example in the spec
2016-08-21 05:57:46 +12:00
Jack Grigg
5be6abbf84
Store the Equihash solution in minimal representation in the block header
...
The genesis blocks and miner tests have been regenerated, because changing the
block header serialisation format changes the block hash, and thus validity.
The Equihash solutions have been removed from the bloom test inputs for
simplicity (block validity is not checked there; only a valid serialisation is
necessary).
2016-08-16 16:02:39 +12:00
Jack Grigg
20abe2083c
Extend byte array expansion and compression methods with optional padding
2016-08-16 11:02:04 +12:00
Jack Grigg
caa0348f04
Update Equihash hash generation to match the Zcash spec
...
Changes:
- floor(512/n)*n/8 bytes of BLAKE2b output is split between floor(512/n)
adjacent indices, instead of using one hash call per index.
- Parameters with n/(k+1) mod 8 != 0 will expand the BLAKE2b output to byte
boundaries for colliding, instead of using a longer output and clearing bits.
- The genesis blocks have been regenerated.
- The test vectors have been regenerated.
- The Equihash inputs for the cancellation tests were modified to ensure that
valid solutions were available to exercise the full solver.
2016-08-16 11:02:04 +12:00
Jack Grigg
881ffbfc87
Add methods for byte array expansion and compression
...
These methods convert between:
- A byte array of length NL/8, and
- An array of N blocks of ceil(L/8) bytes.
2016-08-16 11:02:00 +12:00
Robert C. Seacord
47251e8460
Update test_equihash.cpp
2016-08-10 22:02:00 -04:00
Jack Grigg
fa19e1b357
Add test showing bug in IsProbablyDuplicate()
2016-08-06 15:23:47 +12:00
Jack Grigg
51eb5273f5
Equihash: Pass each obtained solution to a callback for immediate checking
...
Closes #1143
2016-07-27 19:15:49 +12:00
Jack Grigg
1655db285d
Move initialisations to simplify cancelled checks
2016-07-22 23:54:14 +12:00
Jack Grigg
5b4ebcd5e2
Add tests that exercise the cancellation code branches
2016-07-21 16:39:32 +12:00