Merge remote-tracking branch 'origin/duke' into duke
This commit is contained in:
32
.travis.yml
32
.travis.yml
@@ -10,7 +10,7 @@ branches:
|
||||
only:
|
||||
- master
|
||||
- dev
|
||||
- cctests
|
||||
- duke
|
||||
compiler:
|
||||
- gcc
|
||||
before_install:
|
||||
@@ -24,14 +24,14 @@ before_install:
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew link --overwrite gcc@6; fi
|
||||
script:
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./zcutil/build.sh -j 5; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then tar cvfz komodo_linux_$TRAVIS_BRANCH.tar.gz src/komodod src/komodo-cli; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then tar cvfz hush_linux_$TRAVIS_BRANCH.tar.gz src/komodod src/komodo-cli src/komodo-tx src/hushd src/hush-cli src/hush-tx; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./zcutil/build-mac.sh -j 5; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./makeRelease.sh; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then tar cvfz komodo_osx_$TRAVIS_BRANCH.tar.gz src/komodod src/komodo-cli src/libgcc_s.1.dylib src/libgomp.1.dylib src/libstdc++.6.dylib; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then tar cvfz hush_osx_$TRAVIS_BRANCH.tar.gz src/komodod src/komodo-cli src/libgcc_s.1.dylib src/libgomp.1.dylib src/libstdc++.6.dylib; fi
|
||||
notifications:
|
||||
irc:
|
||||
channels:
|
||||
- chat.freenode.net#komodoplatform
|
||||
- chat.freenode.net#hush
|
||||
template:
|
||||
- "%{repository}/%{branch} (%{commit} - %{author}): %{message}"
|
||||
- 'Alt Message : %{repository_slug} - (%{commit} - %{author}): %{message}, Build
|
||||
@@ -45,44 +45,44 @@ deploy:
|
||||
- provider: releases
|
||||
api_key:
|
||||
secure: id69KBVsY0p41WFlqd5cGrAIksJAkUempmdrQwHtfqIbB6es7MVfXuxfmTxk7lZNEItSvLGilYtqhBMNVAVjRRPvk90hveGDMkbpjFz3XBbFEFqtrAr2GdIcpGtII2T3T/TG7j11TMtJ6GvBVt4OcatHFVsKBCFDIx0fB0fd1oLrEAwgRdBO2Jq7bMzoLdzGx3mVtdW5dSRBQzG/Z0yvx+R9mQHSvyPGh6oNPD6mvXPzEaCeRW6Y8g8y1SW/6zDJR6sSdOKA0jsHkr/hM8st3Qkr5Cu3roEbL8598uvfBahjxVHVT8+lu/nJnQyrvtWZKu/uUefybqgZl7UpGvZVFxbNwAB/ZNn0pBKIpZlX/kh6rdGF0XrAG7g+Ths6iklh7wDefYP2JeGwHWJ38YcdF8T/VcSdOXz7EiWwEeZO5sGcTRSl5Ql8mcU3YyyB7BTdViYNTHf5VFFJ/baLZG+shZ/0tb1Ntx5mLDbV8vcYXJpUNTJcXbhcUDSF3QuSz04ftkzgpcsODzcTzD6+2sezV1vlOAlxK04C+zzxG96Md/TegvZYYns78RSgrP/UH1qwEbgxTo3xpErGllzntzZfHJ887Goez+DeB9ga7pUBc5AXGpfRhYqJP66wR10zqfWuWYvjAwRBRNySjr3pUvaA3T1iSZ5HLrpKBfcHXJOTg8M=
|
||||
name: komodo_linux-$TRAVIS_BRANCH
|
||||
name: hush_linux-$TRAVIS_BRANCH
|
||||
prerelease: true
|
||||
file: komodo_linux_$TRAVIS_BRANCH.tar.gz
|
||||
file: hush_linux_$TRAVIS_BRANCH.tar.gz
|
||||
skip_cleanup: true
|
||||
on:
|
||||
repo: KomodoPlatform/komodo
|
||||
repo: MyHush/hush3
|
||||
branch: master
|
||||
condition: $LINUX_DEPLOY = "true"
|
||||
- provider: releases
|
||||
api_key:
|
||||
secure: id69KBVsY0p41WFlqd5cGrAIksJAkUempmdrQwHtfqIbB6es7MVfXuxfmTxk7lZNEItSvLGilYtqhBMNVAVjRRPvk90hveGDMkbpjFz3XBbFEFqtrAr2GdIcpGtII2T3T/TG7j11TMtJ6GvBVt4OcatHFVsKBCFDIx0fB0fd1oLrEAwgRdBO2Jq7bMzoLdzGx3mVtdW5dSRBQzG/Z0yvx+R9mQHSvyPGh6oNPD6mvXPzEaCeRW6Y8g8y1SW/6zDJR6sSdOKA0jsHkr/hM8st3Qkr5Cu3roEbL8598uvfBahjxVHVT8+lu/nJnQyrvtWZKu/uUefybqgZl7UpGvZVFxbNwAB/ZNn0pBKIpZlX/kh6rdGF0XrAG7g+Ths6iklh7wDefYP2JeGwHWJ38YcdF8T/VcSdOXz7EiWwEeZO5sGcTRSl5Ql8mcU3YyyB7BTdViYNTHf5VFFJ/baLZG+shZ/0tb1Ntx5mLDbV8vcYXJpUNTJcXbhcUDSF3QuSz04ftkzgpcsODzcTzD6+2sezV1vlOAlxK04C+zzxG96Md/TegvZYYns78RSgrP/UH1qwEbgxTo3xpErGllzntzZfHJ887Goez+DeB9ga7pUBc5AXGpfRhYqJP66wR10zqfWuWYvjAwRBRNySjr3pUvaA3T1iSZ5HLrpKBfcHXJOTg8M=
|
||||
name: komodo_linux-$TRAVIS_BRANCH
|
||||
name: hush_linux-$TRAVIS_BRANCH
|
||||
prerelease: true
|
||||
file: komodo_linux_$TRAVIS_BRANCH.tar.gz
|
||||
file: hush_linux_$TRAVIS_BRANCH.tar.gz
|
||||
skip_cleanup: true
|
||||
on:
|
||||
repo: KomodoPlatform/komodo
|
||||
repo: MyHush/hush3
|
||||
branch: dev
|
||||
condition: $LINUX_DEPLOY = "true"
|
||||
- provider: releases
|
||||
api_key:
|
||||
secure: id69KBVsY0p41WFlqd5cGrAIksJAkUempmdrQwHtfqIbB6es7MVfXuxfmTxk7lZNEItSvLGilYtqhBMNVAVjRRPvk90hveGDMkbpjFz3XBbFEFqtrAr2GdIcpGtII2T3T/TG7j11TMtJ6GvBVt4OcatHFVsKBCFDIx0fB0fd1oLrEAwgRdBO2Jq7bMzoLdzGx3mVtdW5dSRBQzG/Z0yvx+R9mQHSvyPGh6oNPD6mvXPzEaCeRW6Y8g8y1SW/6zDJR6sSdOKA0jsHkr/hM8st3Qkr5Cu3roEbL8598uvfBahjxVHVT8+lu/nJnQyrvtWZKu/uUefybqgZl7UpGvZVFxbNwAB/ZNn0pBKIpZlX/kh6rdGF0XrAG7g+Ths6iklh7wDefYP2JeGwHWJ38YcdF8T/VcSdOXz7EiWwEeZO5sGcTRSl5Ql8mcU3YyyB7BTdViYNTHf5VFFJ/baLZG+shZ/0tb1Ntx5mLDbV8vcYXJpUNTJcXbhcUDSF3QuSz04ftkzgpcsODzcTzD6+2sezV1vlOAlxK04C+zzxG96Md/TegvZYYns78RSgrP/UH1qwEbgxTo3xpErGllzntzZfHJ887Goez+DeB9ga7pUBc5AXGpfRhYqJP66wR10zqfWuWYvjAwRBRNySjr3pUvaA3T1iSZ5HLrpKBfcHXJOTg8M=
|
||||
name: komodo_osx-$TRAVIS_BRANCH
|
||||
name: hush_osx-$TRAVIS_BRANCH
|
||||
prerelease: true
|
||||
file: komodo_osx_$TRAVIS_BRANCH.tar.gz
|
||||
file: hush_osx_$TRAVIS_BRANCH.tar.gz
|
||||
skip_cleanup: true
|
||||
on:
|
||||
repo: KomodoPlatform/komodo
|
||||
repo: MyHush/hush3
|
||||
branch: master
|
||||
condition: $OSX_DEPLOY = "true"
|
||||
- provider: releases
|
||||
api_key:
|
||||
secure: id69KBVsY0p41WFlqd5cGrAIksJAkUempmdrQwHtfqIbB6es7MVfXuxfmTxk7lZNEItSvLGilYtqhBMNVAVjRRPvk90hveGDMkbpjFz3XBbFEFqtrAr2GdIcpGtII2T3T/TG7j11TMtJ6GvBVt4OcatHFVsKBCFDIx0fB0fd1oLrEAwgRdBO2Jq7bMzoLdzGx3mVtdW5dSRBQzG/Z0yvx+R9mQHSvyPGh6oNPD6mvXPzEaCeRW6Y8g8y1SW/6zDJR6sSdOKA0jsHkr/hM8st3Qkr5Cu3roEbL8598uvfBahjxVHVT8+lu/nJnQyrvtWZKu/uUefybqgZl7UpGvZVFxbNwAB/ZNn0pBKIpZlX/kh6rdGF0XrAG7g+Ths6iklh7wDefYP2JeGwHWJ38YcdF8T/VcSdOXz7EiWwEeZO5sGcTRSl5Ql8mcU3YyyB7BTdViYNTHf5VFFJ/baLZG+shZ/0tb1Ntx5mLDbV8vcYXJpUNTJcXbhcUDSF3QuSz04ftkzgpcsODzcTzD6+2sezV1vlOAlxK04C+zzxG96Md/TegvZYYns78RSgrP/UH1qwEbgxTo3xpErGllzntzZfHJ887Goez+DeB9ga7pUBc5AXGpfRhYqJP66wR10zqfWuWYvjAwRBRNySjr3pUvaA3T1iSZ5HLrpKBfcHXJOTg8M=
|
||||
name: komodo_osx-$TRAVIS_BRANCH
|
||||
name: hush_osx-$TRAVIS_BRANCH
|
||||
prerelease: true
|
||||
file: komodo_osx_$TRAVIS_BRANCH.tar.gz
|
||||
file: hush_osx_$TRAVIS_BRANCH.tar.gz
|
||||
skip_cleanup: true
|
||||
on:
|
||||
repo: KomodoPlatform/komodo
|
||||
repo: MyHush/hush3
|
||||
branch: dev
|
||||
condition: $OSX_DEPLOY = "true"
|
||||
|
||||
67
COPYING
67
COPYING
@@ -2,6 +2,7 @@ Copyright (c) 2009-2017 The Bitcoin Core developers
|
||||
Copyright (c) 2009-2018 Bitcoin Developers
|
||||
Copyright (c) 2016-2017 The Zcash developers
|
||||
Copyright (c) 2016-2019 The Komodo developers
|
||||
Copyright (c) 2018-2019 The Hush developers
|
||||
Copyright (c) 2018 The VerusCoin developers
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
@@ -34,10 +35,10 @@ OpenSSL Toolkit (https://www.openssl.org/). This product includes cryptographic
|
||||
software written by Eric Young (eay@cryptsoft.com).
|
||||
|
||||
|
||||
Although almost all of the Zcash/Komodo/VerusCoin code is licensed under "permissive" open source
|
||||
Although almost all of this code is licensed under open source
|
||||
licenses, users and distributors should note that when built using the default
|
||||
build options, Zcash depends on Oracle Berkeley DB 6.2.x, which is licensed
|
||||
under the GNU Affero General Public License.
|
||||
build options, it depends on Oracle Berkeley DB 6.2.x, which is licensed
|
||||
under the GNU Affero General Public License. Free Software, Fuck Yeah!!!
|
||||
|
||||
SuperNET COPYING terms:
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
@@ -320,63 +321,3 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
|
||||
|
||||
@@ -333,13 +333,6 @@ void CCoinsViewCache::PopAnchor(const uint256 &newrt, ShieldedType type) {
|
||||
}
|
||||
|
||||
void CCoinsViewCache::SetNullifiers(const CTransaction& tx, bool spent) {
|
||||
for (const JSDescription &joinsplit : tx.vjoinsplit) {
|
||||
for (const uint256 &nullifier : joinsplit.nullifiers) {
|
||||
std::pair<CNullifiersMap::iterator, bool> ret = cacheSproutNullifiers.insert(std::make_pair(nullifier, CNullifiersCacheEntry()));
|
||||
ret.first->second.entered = spent;
|
||||
ret.first->second.flags |= CNullifiersCacheEntry::DIRTY;
|
||||
}
|
||||
}
|
||||
for (const SpendDescription &spendDescription : tx.vShieldedSpend) {
|
||||
std::pair<CNullifiersMap::iterator, bool> ret = cacheSaplingNullifiers.insert(std::make_pair(spendDescription.nullifier, CNullifiersCacheEntry()));
|
||||
ret.first->second.entered = spent;
|
||||
@@ -622,41 +615,14 @@ CAmount CCoinsViewCache::GetValueIn(int32_t nHeight,int64_t *interestp,const CTr
|
||||
|
||||
bool CCoinsViewCache::HaveJoinSplitRequirements(const CTransaction& tx) const
|
||||
{
|
||||
boost::unordered_map<uint256, SproutMerkleTree, CCoinsKeyHasher> intermediates;
|
||||
|
||||
BOOST_FOREACH(const JSDescription &joinsplit, tx.vjoinsplit)
|
||||
{
|
||||
BOOST_FOREACH(const uint256& nullifier, joinsplit.nullifiers)
|
||||
{
|
||||
if (GetNullifier(nullifier, SPROUT)) {
|
||||
// If the nullifier is set, this transaction
|
||||
// double-spends!
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
SproutMerkleTree tree;
|
||||
auto it = intermediates.find(joinsplit.anchor);
|
||||
if (it != intermediates.end()) {
|
||||
tree = it->second;
|
||||
} else if (!GetSproutAnchorAt(joinsplit.anchor, tree)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
BOOST_FOREACH(const uint256& commitment, joinsplit.commitments)
|
||||
{
|
||||
tree.append(commitment);
|
||||
}
|
||||
|
||||
intermediates.insert(std::make_pair(tree.root(), tree));
|
||||
}
|
||||
|
||||
for (const SpendDescription &spendDescription : tx.vShieldedSpend) {
|
||||
if (GetNullifier(spendDescription.nullifier, SAPLING)) // Prevent double spends
|
||||
fprintf(stderr,"%s: sapling nullifier %s exists, preventing double spend\n", __FUNCTION__, spendDescription.nullifier);
|
||||
return false;
|
||||
|
||||
SaplingMerkleTree tree;
|
||||
if (!GetSaplingAnchorAt(spendDescription.anchor, tree)) {
|
||||
fprintf(stderr,"%s: missing sapling anchor: %s \n", __FUNCTION__, spendDescription.anchor);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1195,6 +1195,10 @@ bool ContextualCheckTransaction(int32_t slowflag,const CBlock *block, CBlockInde
|
||||
if (tx.fOverwintered && tx.nVersionGroupId != SAPLING_VERSION_GROUP_ID)
|
||||
{
|
||||
//return state.DoS(dosLevel, error("CheckTransaction(): invalid Sapling tx version"),REJECT_INVALID, "bad-sapling-tx-version-group-id");
|
||||
{
|
||||
string strHex = EncodeHexTx(tx);
|
||||
fprintf(stderr,"invalid Sapling rawtx.%s\n",strHex.c_str());
|
||||
}
|
||||
return state.DoS(isInitBlockDownload() ? 0 : dosLevel,
|
||||
error("CheckTransaction(): invalid Sapling tx version"),
|
||||
REJECT_INVALID, "bad-sapling-tx-version-group-id");
|
||||
|
||||
@@ -275,7 +275,11 @@ bool static InterruptibleRecv(uint8_t* data, size_t len, int timeout, SOCKET& hS
|
||||
// to break off in case of an interruption.
|
||||
const int64_t maxWait = 1000;
|
||||
while (len > 0 && curTime < endTime) {
|
||||
#ifdef _WIN32
|
||||
ssize_t ret = recv(hSocket, (char*)data, len, 0); // Optimistically try the recv first
|
||||
#else
|
||||
ssize_t ret = recv(hSocket, data, len, 0); // Optimistically try the recv first
|
||||
#endif
|
||||
if (ret > 0) {
|
||||
len -= ret;
|
||||
data += ret;
|
||||
|
||||
Reference in New Issue
Block a user