Commit Graph

34 Commits

Author SHA1 Message Date
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
Kris Nuttycombe 8b44cc7072 Add a roundtrip test for Orchard merkle frontier serialization from the C++ side.
Co-authored-by: str4d <thestr4d@gmail.com>
2022-03-03 11:04:40 -07:00
Kris Nuttycombe f49f4c73d8 Rename OrchardMerkleTree -> OrchardMerkleFrontier
Remove IncrementalSinsemillaTree; this will be replaced by
a more full-featured OrchardWallet type which embeds the
incremental merkle tree used in wallet operations.
2021-11-23 07:27:34 -07:00
Kris Nuttycombe a3214285c2 Apply suggestions from code review
Co-authored-by: str4d <jack@electriccoin.co>
2021-06-28 13:54:15 -06:00
Kris Nuttycombe 13fd4c9a1c Add Orchard merkle tree anchor tests. 2021-06-23 16:06:30 -06:00
Kris Nuttycombe 437b8c488a Orchard changes to coins & consensus. 2021-06-23 16:06:30 -06:00
Jorge Timón c3983ccb1c scripted-diff: Remove #include <boost/foreach.hpp>
-BEGIN VERIFY SCRIPT-
sed -i ':a;N;$!ba;s/#include <boost\/foreach.hpp>\n//' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp
-END VERIFY SCRIPT-
2020-11-23 23:07:15 +00:00
Jorge Timón 92a867febc scripted-diff: Fully remove BOOST_FOREACH
-BEGIN VERIFY SCRIPT-
sed -i 's/BOOST_FOREACH *(\(.*\),/for (\1 :/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ;
-END VERIFY SCRIPT-
2020-11-23 23:07:15 +00:00
Larry Ruane a3eb2b8708 update unit tests to compute empty roots 2019-10-12 18:03:36 -06:00
Jack Grigg 5f84491d82
Remove libsnark code for pre-Sapling Sprout proofs 2019-08-22 15:42:47 +01:00
Eirik0 a84125aacd Fix tree depth in comment 2019-05-10 12:58:11 -06:00
David Mercer 32d3a3352e
libsnark: convert long long and unsigned long to C++11 fixed-width types
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2018-08-17 18:53:59 +01:00
Eirik Ogilvie-Wigley 7d379f18c5 Rename test objects to include sprout or sapling 2018-08-01 10:52:58 -06:00
Eirik Ogilvie-Wigley 4fc309f0f5 Rename Merkle Trees to include sprout or sapling 2018-08-01 10:31:09 -06:00
Sean Bowe 8f5429a13a Update merkle tree and pedersen hash tests to account for new encoding 2018-05-18 13:26:39 -06:00
Sean Bowe 40bfb9e5b9 Swap bit endianness of test vectors 2018-05-07 18:57:04 -06:00
Sean Bowe 7b62078782 Remove underscores from gtest test names. 2018-05-07 14:37:46 -06:00
Sean Bowe 2f23a656fb Add regression tests and test vectors for Sapling merkle tree 2018-05-07 13:46:06 -06:00
Jack Grigg d58ed91af0
Optimise serialization of MerklePath, avoiding ambiguity of std::vector<bool>
The serialization enforces a maximum supported Merkle tree depth of 64.

Closes #2831.
2018-03-28 18:26:08 +02:00
Jack Grigg fee8835388
Mark libsnark includes as library includes 2017-11-15 16:49:10 +00:00
Jack Grigg 02972a1bcd
[cleanup] Simplify test code 2017-02-10 00:53:15 +00:00
Jack Grigg 5fb326d41d
Manually iterate over UniValue arrays in tests 2017-02-10 00:53:09 +00:00
Jack Grigg 0d37ae3a59
Migrate Zcash-specific code to UniValue 2017-02-10 00:52:57 +00:00
Sean Bowe fc538ec2ea Add test for IncrementalMerkleTree::size(). 2016-12-16 13:50:55 -07:00
Sean Bowe 3e2e8b5b42 Add test that `last` and `element` will throw exception when the tree is blank. 2016-11-15 12:17:19 -07:00
Sean Bowe d92bea9888 Add tests for witness `element` and tree `last` methods. Strengthen testing by inserting a different commitment into the tree at each step. 2016-11-14 10:13:06 -07:00
Sean Bowe ae6b333c75 Perform curve parameter initialization at start of gtest suite. 2016-08-22 15:47:00 -06:00
Sean Bowe f0dab51cf3 Implement zkSNARK compression. 2016-08-22 00:36:12 -06:00
Sean Bowe 2668a1bc13 Remove the rest of libzerocash. 2016-07-10 20:25:02 -06:00
Sean Bowe 6ab0a227c6 Fix test against merkle tree root. 2016-06-15 15:31:14 -06:00
Taylor Hornby bf2e3122ac Remove the Merkle tree hash function's fixed point. 2016-05-16 20:20:36 -06:00
Sean Bowe 0d990f31a7 Stop testing old tree against new tree. 2016-05-12 16:44:49 -06:00
Sean Bowe 6850b45e4d Move incremental merkle tree tests to zcash-gtest. 2016-04-28 16:10:21 -06:00
Taylor Hornby 0000d23121 Add empty merkle/noteencryption tests so Sean can rebase. 2016-04-28 10:10:40 -06:00