Commit Graph

26 Commits

Author SHA1 Message Date
Kris Nuttycombe 71b6a59ec3 scripted-diff: Move utiltest to src/util
-BEGIN VERIFY SCRIPT-
git mv src/utiltest.h src/util/test.h
git mv src/utiltest.cpp src/util/test.cpp
sed -i -e 's/"utiltest\.h"/"util\/test\.h"/g' $(git ls-files 'src/*.h' 'src/*.cpp')
sed -i -e 's/ZCASH_UTILTEST_H/ZCASH_UTIL_TEST_H/g' src/util/test.h
sed -i -e 's/utiltest\.\(h\|cpp\)/util\/test\.\1/g' src/Makefile.am
-END VERIFY SCRIPT-
2022-07-06 10:25:28 -06:00
Kris Nuttycombe 7c3afad111 Add debug printing for receivers and recipient addresses. 2022-03-18 11:08:04 -06:00
Kris Nuttycombe 225c78f3ab Add Orchard components to unified spending keys
Co-authored-by: Jack Grigg <jack@z.cash>
2022-02-22 21:08:10 +00:00
Kris Nuttycombe 258f0fc72f Add Orchard components to unified full viewing keys
Co-authored-by: Jack Grigg <jack@z.cash>
2022-02-22 21:08:10 +00:00
Kris Nuttycombe 1a1522a4f1 Add Orchard components to unified address
Co-authored-by: Jack Grigg <jack@z.cash>
2022-02-21 17:04:27 +00:00
Kris Nuttycombe 67e871a40c Add test vectors for UFVK derivation
Also update test vectors for unified addresses.
2022-02-12 15:07:05 -07:00
Kris Nuttycombe cc392c70a6 Merge branch 'master' into feature/wallet_unified_addresses 2022-01-12 16:54:12 -07:00
Kris Nuttycombe 62b86d6afc Use CKeyID and CScriptID instead of new P2PKH/P2SHAddress classes. 2022-01-06 13:44:45 -07:00
Kris Nuttycombe b305ad2892 Remove the `InvalidEncoding` type from key & address variants.
The presence of this variant results in a situation where more
of the code than necessary needs to be aware of and handle
decoding failures. This change moves all handling of decoding
failures to the point of decoding.
2022-01-06 13:44:45 -07:00
Kris Nuttycombe 1e18410b55 Apply suggestions from code review
Co-authored-by: str4d <jack@electriccoin.co>
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-12-14 13:02:41 -07:00
Kris Nuttycombe 6cccc4ad3c Apply suggestions from code review
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-12-13 18:53:27 -07:00
Kris Nuttycombe 8ae8ddd7d1 Add tests for ufvk roundtrip serialization. 2021-12-13 18:53:27 -07:00
Kris Nuttycombe a2f8e3b56c Use CKeyID and CScriptID instead of new P2PKH/P2SHAddress classes. 2021-11-30 11:24:37 -07:00
Kris Nuttycombe 83dee7e886 Adds basic unified spending key derivation.
Also, begin pruning Sapling key derivation down to the
minimal amount required to support the legacy Sapling
key derivation process.
2021-10-19 11:48:02 -06:00
Jack Grigg 776e9c5a4b Add support for decoding and encoding Unified Addresses 2021-07-13 03:22:47 +01:00
Jack Grigg b521cb8932 scripted-diff: Migrate from boost::variant to std::variant
-BEGIN VERIFY SCRIPT-
sed -i 's/boost::variant/std::variant/' ./src/*.h ./src/*.cpp ./src/*/*.h* ./src/*/*.cpp ;
sed -i 's/boost::get<\(.*\)>(&/std::get_if<\1>(\&/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.cpp ;
sed -i 's/boost::get</std::get</' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.cpp ;
sed -i 's/boost::apply_visitor(/std::visit(/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ;
sed -i 's/class \(.*\)\b \?: public boost::static_visitor<.*>/class \1/' ./src/*.h ./src/*.cpp ./src/*/*.h* ./src/*/*.cpp ;
sed -i ':a;N;$!ba;s/#include <boost\/variant\(\/.*\)\?.hpp>\n//' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ;
sed -i ':a;N;$!ba;s/#include "boost\/variant\/.*.hpp"\n//' ./src/*/*.cpp ;
-END VERIFY SCRIPT-
2020-12-16 22:49:53 +00:00
Jack Grigg f68c79554f Add <variant> header to files that will need it 2020-12-16 22:48:21 +00:00
Kris Nuttycombe 07ff0d19a0 Make evident the relationship between chainparams and key IO. 2020-07-09 17:48:47 -06:00
Jack Grigg 3c7385bc8e Add encoding and decoding for Sapling extended full viewing keys 2020-02-21 00:59:27 +00:00
Jack Grigg 9658c87d4a Move ZIP 32 classes inside zcash/Address.hpp
This fixes the dependency graph between the general address-handling
logic, ZIP 32, and the core Sapling address classes.
2020-02-20 12:26:58 +00:00
Eirik Ogilvie-Wigley 8a1d19307b Renaming and other minor cleanup 2019-01-29 21:18:10 -07:00
Eirik Ogilvie-Wigley 1534671fb0 Add test method for generating master Sapling extended spending keys 2019-01-23 14:45:37 -07:00
Jack Grigg 34e222c18e
Revert "Disable Sapling features on mainnet"
This reverts commit 554e00e8f9.
2018-09-21 23:43:31 +01:00
Jack Grigg 70b4ad2dcd
wallet: Switch from SaplingSpendingKey to SaplingExtendedSpendingKey
The wallet now only stores Sapling extended spending keys, and thus can
only be used with keys generated from an HDSeed via ZIP 32.

Note that not all Sapling keys in the wallet will correspond to the
wallet's HDSeed, as a standalone Sapling xsk can be imported via
z_importkey. However, it must have been generated from a seed itself,
and thus is more likely to be backed up elsewhere.
2018-09-03 10:45:37 +01:00
Jack Grigg 554e00e8f9
Disable Sapling features on mainnet
Also places them behind an experimental features flag on testnet
2018-08-13 14:18:18 +01:00
Jack Grigg e7ca4eb3c3
test: gtest for Sapling encoding and decoding 2018-08-13 13:20:07 +01:00