diff --git a/src/Makefile.am b/src/Makefile.am index a1cae78a2..ec3f562f2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,3 +1,5 @@ +# Copyright 2019-2020 The Hush developers + DIST_SUBDIRS = secp256k1 univalue cryptoconditions AM_LDFLAGS = $(PTHREAD_CFLAGS) $(LIBTOOL_LDFLAGS) $(SAN_LDFLAGS) $(HARDENED_LDFLAGS) @@ -186,7 +188,6 @@ BITCOIN_CORE_H = \ prevector.h \ primitives/block.h \ primitives/transaction.h \ - primitives/nonce.h \ protocol.h \ pubkey.h \ random.h \ @@ -486,7 +487,7 @@ libbitcoin_cli_a_SOURCES = \ nodist_libbitcoin_util_a_SOURCES = $(srcdir)/obj/build.h # -# bitcoind binary # +# komodod binary # komodod_SOURCES = bitcoind.cpp komodod_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) komodod_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) @@ -545,7 +546,7 @@ if TARGET_DARWIN komodod_LDFLAGS += -static-libgcc endif -# bitcoin-cli binary # +# komodo-cli binary # komodo_cli_SOURCES = bitcoin-cli.cpp komodo_cli_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CFLAGS) komodo_cli_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) @@ -593,7 +594,7 @@ wallet_utility_LDADD = \ $(LIBCRYPTOCONDITIONS) endif -# zcash-tx binary # +# komodo-tx binary # komodo_tx_SOURCES = komodo-tx.cpp komodo_tx_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) komodo_tx_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) @@ -603,7 +604,6 @@ if TARGET_WINDOWS komodo_tx_SOURCES += bitcoin-tx-res.rc endif -# FIXME: Is libzcash needed for hush-tx ? komodo_tx_LDADD = \ $(LIBUNIVALUE) \ $(LIBBITCOIN_COMMON) \ @@ -615,7 +615,6 @@ komodo_tx_LDADD = \ $(LIBCRYPTOCONDITIONS) komodo_tx_LDADD += $(BOOST_LIBS) $(CRYPTO_LIBS) -# # zcash protocol primitives # libzcash_a_SOURCES = \ diff --git a/src/primitives/transaction.h b/src/primitives/transaction.h index 2ece7b255..7a46b9c00 100644 --- a/src/primitives/transaction.h +++ b/src/primitives/transaction.h @@ -44,6 +44,7 @@ #include "zcash/Zcash.h" #include "zcash/JoinSplit.hpp" #include "zcash/Proof.hpp" +#include "zcash/Note.hpp" extern uint32_t ASSETCHAINS_MAGIC; extern std::string ASSETCHAINS_SELFIMPORT; diff --git a/src/transaction_builder.cpp b/src/transaction_builder.cpp index 08953ee02..e1879e1d4 100644 --- a/src/transaction_builder.cpp +++ b/src/transaction_builder.cpp @@ -12,6 +12,7 @@ #include #include #include +#include "zcash/Note.hpp" SpendDescriptionInfo::SpendDescriptionInfo( libzcash::SaplingExpandedSpendingKey expsk, diff --git a/src/wallet/rpchushwallet.cpp b/src/wallet/rpchushwallet.cpp index 62b7a4fc9..64cd0e4a5 100644 --- a/src/wallet/rpchushwallet.cpp +++ b/src/wallet/rpchushwallet.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2020 The Hush developers +// Copyright (c) 2019-2020 The Hush developers // Copyright (c) 2019 Cryptoforge // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/zcash/Note.cpp b/src/zcash/Note.cpp index 9cd327d1b..e6d185a0e 100644 --- a/src/zcash/Note.cpp +++ b/src/zcash/Note.cpp @@ -13,37 +13,6 @@ using namespace libzcash; -/* -SproutNote::SproutNote() { - a_pk = random_uint256(); - rho = random_uint256(); - r = random_uint256(); -} - -uint256 SproutNote::cm() const { - unsigned char discriminant = 0xb0; - - CSHA256 hasher; - hasher.Write(&discriminant, 1); - hasher.Write(a_pk.begin(), 32); - - auto value_vec = convertIntToVectorLE(value_); - - hasher.Write(&value_vec[0], value_vec.size()); - hasher.Write(rho.begin(), 32); - hasher.Write(r.begin(), 32); - - uint256 result; - hasher.Finalize(result.begin()); - - return result; -} - -uint256 SproutNote::nullifier(const SproutSpendingKey& a_sk) const { - return PRF_nf(a_sk, rho); -} -*/ - // Construct and populate Sapling note for a given payment address and value. SaplingNote::SaplingNote(const SaplingPaymentAddress& address, const uint64_t value) : BaseNote(value) { d = address.d;