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

run automated tests for libsnark, libzerocash, and zerocashd #78

Closed
daira opened this issue Jan 29, 2015 · 7 comments
Closed

run automated tests for libsnark, libzerocash, and zerocashd #78

daira opened this issue Jan 29, 2015 · 7 comments
Labels
A-CI Area: Continuous Integration A-testing Area: Tests and testing infrastructure libzcash task Z-libsnark Historic: libsnark Zcash codebase

Comments

@daira
Copy link
Contributor

daira commented Jan 29, 2015

Run automated tests for libsnark, libzerocash, and zerocashd; make sure that they pass before doing anything else.

@daira daira added task Z-libsnark Historic: libsnark libzcash Zcash codebase A-testing Area: Tests and testing infrastructure labels Jan 29, 2015
@daira daira added this to the zerocashd in-house security review milestone Jan 29, 2015
@daira daira self-assigned this Jan 29, 2015
@nathan-at-least
Copy link
Contributor

Here is the upstream bitcoin's README.md Testing section which describes how to run tests. To execute unit tests:

make check

@nathan-at-least
Copy link
Contributor

Should we rename this ticket to be specific to "automated tests" or "unit tests"?

I'm interested in deterministic tests which tell the user "success" or "failure" without much other noise, which makes it easy to quickly spot regressions. This would be in contrast to tests as in #71 which require a fair amount of user involvement.

@daira
Copy link
Contributor Author

daira commented Jan 30, 2015

make check fails for me with the following error (looks like it can't find libzerocash):

  CXXLD    bitcoin-cli
libbitcoin_common.a(core.o): In function `CTxInZerocoinPourDataCacheEntry::CTxInZerocoinPourDataCacheEntry(CScript const&)':
/home/davidsarah/zecc/zerocashd/src/core.cpp:20: undefined reference to `libzerocash::PourTransaction::PourTransaction()'
/home/davidsarah/zecc/zerocashd/src/core.cpp:28: undefined reference to `libzerocash::PourTransaction::getSpentSerial1() const'
/home/davidsarah/zecc/zerocashd/src/core.cpp:32: undefined reference to `libzerocash::PourTransaction::getSpentSerial2() const'
/home/davidsarah/zecc/zerocashd/src/core.cpp:36: undefined reference to `libzerocash::PourTransaction::getNewCoinCommitmentValue1() const'
/home/davidsarah/zecc/zerocashd/src/core.cpp:40: undefined reference to `libzerocash::PourTransaction::getNewCoinCommitmentValue2() const'
/home/davidsarah/zecc/zerocashd/src/core.cpp:43: undefined reference to `libzerocash::PourTransaction::getMonetaryValueOut() const'
libbitcoin_common.a(core.o): In function `CTxInZerocoinMintDataCacheEntry::CTxInZerocoinMintDataCacheEntry(CScript const&)':
/home/davidsarah/zecc/zerocashd/src/core.cpp:46: undefined reference to `libzerocash::MintTransaction::MintTransaction()'
/home/davidsarah/zecc/zerocashd/src/core.cpp:54: undefined reference to `libzerocash::MintTransaction::getMintedCoinCommitmentValue() const'
/home/davidsarah/zecc/zerocashd/src/core.cpp:57: undefined reference to `libzerocash::MintTransaction::getMonetaryValue() const'
libbitcoin_common.a(script.o): In function `std::_Rb_tree<uint256, std::pair<uint256 const, CBlockIndex*>, std::_Select1st<std::pair<uint256 const, CBlockIndex*> >, std::less<uint256>, std::allocator<std::pair<uint256 const, CBlockIndex*> > >::find(uint256 const&) const':
/usr/include/c++/4.9/bits/stl_tree.h:1929: undefined reference to `mapBlockIndex'
libbitcoin_common.a(script.o): In function `EvalScript(std::vector<std::vector<unsigned char, std::allocator<unsigned char> >, std::allocator<std::vector<unsigned char, std::allocator<unsigned char> > > >&, CScript const&, CTransaction const&, unsigned int, unsigned int, int)':
/home/davidsarah/zecc/zerocashd/src/script.cpp:501: undefined reference to `mapBlockIndex'
/home/davidsarah/zecc/zerocashd/src/script.cpp:463: undefined reference to `libzerocash::MintTransaction::MintTransaction()'
/home/davidsarah/zecc/zerocashd/src/script.cpp:466: undefined reference to `libzerocash::MintTransaction::verify() const'
libbitcoin_common.a(script.o): In function `std::string::_Rep::_M_dispose(std::allocator<char> const&)':
/usr/include/c++/4.9/bits/basic_string.h:240: undefined reference to `mapBlockIndex'
libbitcoin_common.a(script.o): In function `std::_Rb_tree<uint256, std::pair<uint256 const, CBlockIndex*>, std::_Select1st<std::pair<uint256 const, CBlockIndex*> >, std::less<uint256>, std::allocator<std::pair<uint256 const, CBlockIndex*> > >::_M_lower_bound(std::_Rb_tree_node<std::pair<uint256 const, CBlockIndex*> > const*, std::_Rb_tree_node<std::pair<uint256 const, CBlockIndex*> > const*, uint256 const&) const':
/usr/include/c++/4.9/bits/stl_tree.h:1276: undefined reference to `mapBlockIndex'
libbitcoin_common.a(script.o): In function `EvalScript(std::vector<std::vector<unsigned char, std::allocator<unsigned char> >, std::allocator<std::vector<unsigned char, std::allocator<unsigned char> > > >&, CScript const&, CTransaction const&, unsigned int, unsigned int, int)':
/home/davidsarah/zecc/zerocashd/src/script.cpp:518: undefined reference to `libzerocash::PourTransaction::PourTransaction()'
/home/davidsarah/zecc/zerocashd/src/script.cpp:529: undefined reference to `pzerocashParams'
/home/davidsarah/zecc/zerocashd/src/script.cpp:529: undefined reference to `libzerocash::PourTransaction::verify(libzerocash::ZerocashParams&, std::vector<unsigned char, std::allocator<unsigned char> >&, std::vector<unsigned char, std::allocator<unsigned char> > const&) const'
collect2: error: ld returned 1 exit status
make[2]: *** [bitcoin-cli] Error 1
make[2]: Leaving directory `/home/davidsarah/zecc/zerocashd/src'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/home/davidsarah/zecc/zerocashd/src'
make: *** [check-recursive] Error 1

@daira daira changed the title run tests for libsnark, libzerocash, and zerocashd run automated tests for libsnark, libzerocash, and zerocashd Jan 30, 2015
@imichaelmiers
Copy link

This may be a known error. Remember, libbitcoin_common should not compile period because of alterations I made in Script.cpp that depend on libzerocash functions. , while libzerocash is linked when you compile bitcoind, I at least never tried to get it to link into libbitcoin_common.
I think it’s a simple matter of changing what’s linked into libbitcoin_common when compiling .

Ian
On Jan 30, 2015, at 2:52 PM, Daira Hopwood notifications@github.com wrote:

make check fails for me with the following linking error (looks like it can't find libzerocash):

CXXLD bitcoin-cli
libbitcoin_common.a(core.o): In function CTxInZerocoinPourDataCacheEntry::CTxInZerocoinPourDataCacheEntry(CScript const&)': /home/davidsarah/zecc/zerocashd/src/core.cpp:20: undefined reference tolibzerocash::PourTransaction::PourTransaction()'
/home/davidsarah/zecc/zerocashd/src/core.cpp:28: undefined reference to libzerocash::PourTransaction::getSpentSerial1() const' /home/davidsarah/zecc/zerocashd/src/core.cpp:32: undefined reference tolibzerocash::PourTransaction::getSpentSerial2() const'
/home/davidsarah/zecc/zerocashd/src/core.cpp:36: undefined reference to libzerocash::PourTransaction::getNewCoinCommitmentValue1() const' /home/davidsarah/zecc/zerocashd/src/core.cpp:40: undefined reference tolibzerocash::PourTransaction::getNewCoinCommitmentValue2() const'
/home/davidsarah/zecc/zerocashd/src/core.cpp:43: undefined reference to libzerocash::PourTransaction::getMonetaryValueOut() const' libbitcoin_common.a(core.o): In functionCTxInZerocoinMintDataCacheEntry::CTxInZerocoinMintDataCacheEntry(CScript const&)':
/home/davidsarah/zecc/zerocashd/src/core.cpp:46: undefined reference to libzerocash::MintTransaction::MintTransaction()' /home/davidsarah/zecc/zerocashd/src/core.cpp:54: undefined reference tolibzerocash::MintTransaction::getMintedCoinCommitmentValue() const'
/home/davidsarah/zecc/zerocashd/src/core.cpp:57: undefined reference to libzerocash::MintTransaction::getMonetaryValue() const' libbitcoin_common.a(script.o): In functionstd::_Rb_tree<uint256, std::pair<uint256 const, CBlockIndex*>, std::_Select1st<std::pair<uint256 const, CBlockIndex*> >, std::less, std::allocator<std::pair<uint256 const, CBlockIndex*> > >::find(uint256 const&) const':
/usr/include/c++/4.9/bits/stl_tree.h:1929: undefined reference to mapBlockIndex' libbitcoin_common.a(script.o): In functionEvalScript(std::vector<std::vector<unsigned char, std::allocator >, std::allocator<std::vector<unsigned char, std::allocator > > >&, CScript const&, CTransaction const&, unsigned int, unsigned int, int)':
/home/davidsarah/zecc/zerocashd/src/script.cpp:501: undefined reference to mapBlockIndex' /home/davidsarah/zecc/zerocashd/src/script.cpp:463: undefined reference tolibzerocash::MintTransaction::MintTransaction()'
/home/davidsarah/zecc/zerocashd/src/script.cpp:466: undefined reference to libzerocash::MintTransaction::verify() const' libbitcoin_common.a(script.o): In functionstd::string::_Rep::_M_dispose(std::allocator const&)':
/usr/include/c++/4.9/bits/basic_string.h:240: undefined reference to mapBlockIndex' libbitcoin_common.a(script.o): In functionstd::_Rb_tree<uint256, std::pair<uint256 const, CBlockIndex*>, std::_Select1st<std::pair<uint256 const, CBlockIndex*> >, std::less, std::allocator<std::pair<uint256 const, CBlockIndex*> > >::M_lower_bound(std::Rb_tree_node<std::pair<uint256 const, CBlockIndex*> > const, std::Rb_tree_node<std::pair<uint256 const, CBlockIndex> > const, uint256 const&) const':
/usr/include/c++/4.9/bits/stl_tree.h:1276: undefined reference to mapBlockIndex' libbitcoin_common.a(script.o): In functionEvalScript(std::vector<std::vector<unsigned char, std::allocator >, std::allocator<std::vector<unsigned char, std::allocator > > >&, CScript const&, CTransaction const&, unsigned int, unsigned int, int)':
/home/davidsarah/zecc/zerocashd/src/script.cpp:518: undefined reference to libzerocash::PourTransaction::PourTransaction()' /home/davidsarah/zecc/zerocashd/src/script.cpp:529: undefined reference topzerocashParams'
/home/davidsarah/zecc/zerocashd/src/script.cpp:529: undefined reference to libzerocash::PourTransaction::verify(libzerocash::ZerocashParams&, std::vector<unsigned char, std::allocator<unsigned char> >&, std::vector<unsigned char, std::allocator<unsigned char> > const&) const' collect2: error: ld returned 1 exit status make[2]: *_\* [bitcoin-cli] Error 1 make[2]: Leaving directory /home/davidsarah/zecc/zerocashd/src'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory`/home/davidsarah/zecc/zerocashd/src'
make: *** [check-recursive] Error 1

Reply to this email directly or view it on GitHub.

@nathan-at-least
Copy link
Contributor

Just noticed this old ticket. Current status:

@nathan-at-least nathan-at-least added Travis-CI A-CI Area: Continuous Integration labels Oct 19, 2015
@ebfull ebfull removed the Travis-CI label Nov 2, 2015
@nathan-at-least
Copy link
Contributor

I believe @ebfull removed Travis-CI because we've deprecated it in favor of self-hosted buildbot.

The status for self-hosted buildbot is as per my last comment here, except it's executed by buildbot (thus no "artificial" time/memory restrictions).

@daira
Copy link
Contributor Author

daira commented Dec 15, 2015

We are testing libzerocash and zerocashd. I'll open another ticket for CI testing of libsnark.

@daira daira closed this as completed Dec 15, 2015
@daira daira removed their assignment Feb 18, 2016
WaveringAna pushed a commit to WaveringAna/zclassic-addressindexing that referenced this issue Aug 23, 2017
[Softfork] BIP Implementation for TX Replay Protection and BIP 9 implementation
buck54321 pushed a commit to buck54321/zcash that referenced this issue Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CI Area: Continuous Integration A-testing Area: Tests and testing infrastructure libzcash task Z-libsnark Historic: libsnark Zcash codebase
Projects
None yet
Development

No branches or pull requests

4 participants