Kris Nuttycombe
3cec519ce4
scripted-diff: Update Zcash copyrights to 2023
...
-BEGIN VERIFY SCRIPT-
for party in "The Zcash developers" "The Bitcoin Core developers" "Bitcoin Developers"; do
sed -i"" -e "s#Copyright (c) \([0-9]\{4\}\)\(-[0-9]\{4\}\)\? $party#Copyright (c) \1-2023 $party#" COPYING
sed -i"" -e "s#\(.*\)\([0-9]\{4\}\)\(-[0-9]\{4\}\)\, $party#\1\2-2023, $party#" contrib/debian/copyright
done
sed -i"" -e "s/define(_COPYRIGHT_YEAR, [0-9]\{4\})/define(_COPYRIGHT_YEAR, 2023)/" configure.ac
sed -i"" -e "s/#define COPYRIGHT_YEAR [0-9]\{4\}/#define COPYRIGHT_YEAR 2023/" src/clientversion.h
git grep "^// Copyright (c) .* The Zcash developers" \
| awk -F ':' '{print $1}' \
| xargs -I {} sed -i"" -e "s#// Copyright (c) \([0-9]\{4\}\)\(-[0-9]\{4\}\)\? The Zcash developers#// Copyright (c) \1-2023 The Zcash developers#" {}
-END VERIFY SCRIPT-
2023-01-23 11:31:54 -07:00
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
5ae1772d2b
scripted-diff: Update Zcash copyrights to 2022
...
-BEGIN VERIFY SCRIPT-
git grep "// Copyright (c) .* The Zcash developers" \
| awk -F ':' '{print $1}' \
| xargs -I {} sed -i"" -e "s#// Copyright (c) \([0-9]\{4\}\)\(-[0-9]\{4\}\)\? The Zcash developers#// Copyright (c) \1-2022 The Zcash developers#" {}
-END VERIFY SCRIPT-
2022-05-11 16:47:12 -06:00
Jack Grigg
bb4e792c84
Merge branch 'master' into feature/wallet_orchard-orchard_sendmany
2022-02-25 00:33:28 +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
d08c992b5e
Move parsing of unified addresses to UnifiedAddress.
...
In cases where we want to be able to decode a string that
is known to be a unified address, it doesn't make sense to have
to route through KeyIO::DecodePaymentAddress and then return
an error depending upon the result type, when it's possible to
provide unified address parsing more directly.
KeyIO::DecodePaymentAddress has been modified to delegate
to UnifiedAddress::Parse
2022-02-17 18:27:15 -07:00
Kris Nuttycombe
cc392c70a6
Merge branch 'master' into feature/wallet_unified_addresses
2022-01-12 16:54:12 -07:00
Kris Nuttycombe
d3b599eac1
Apply suggestions from code review
...
Co-authored-by: str4d <jack@electriccoin.co>
2022-01-07 11:49:09 -07:00
Kris Nuttycombe
890e1d841d
Add raw transparent address types to PaymentAddress
...
The addition of `UnifiedAddress` to the `PaymentAddress` type
introduced the need for methods that interact with payment addresses
to support transparent receivers as shielded ones, which is somewhat
inconsistent with previous uses of the `PaymentAddress` type.
This commit adds both `CKeyID` and `CScriptID` as new variants
of the `PaymentAddress` type. Following commits will shift encoding
and decoding to use the `PaymentAddress` type exclusively wherever
possible, rather than the current mix of `CDestination` and
`PaymentAddress` that complicates the wallet codebase.
2022-01-06 13:44:45 -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
217c56811d
Add UnifiedFullViewingKey type.
...
This type is backed by the `zcash_address` implementaion of
unified full viewing keys. It is intended for serialization
and parsing of UFVKs, and provides conversion functions that
allow for construction to and from ZcashdUnifiedFullViewingKey
values.
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
Jack Grigg
2aa9f766b2
Migrate to latest revisions of orchard and the zcash_* crates
2021-09-17 03:56:32 +01:00
str4d
037bfa32f3
Track lengths when copying receiver data from C++ to Rust
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-07-30 01:38:38 +01:00
Jack Grigg
612f250814
Pass network type through to UA address handling logic
2021-07-13 13:40:13 +01: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
9228c3113d
Fix typo in constant.
2020-07-09 18:26:11 -06:00
Kris Nuttycombe
9119ca8f86
Rename KeyInfo -> KeyConstants and move out of Consensus namespace.
2020-07-09 18:19:13 -06: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
Alfredo Garcia
0987bf349a
add missing calls to DecodeAny
2020-02-17 14:54:08 -03:00
Alfredo Garcia
df38c039f5
make type and size a pair in DecodeAny arguments
2020-02-17 14:27:56 -03:00
Alfredo Garcia
750078ae67
dedup decode keys and addresses
2020-02-06 16:13:54 -03:00
Daira Hopwood
bc909a7a7f
Replace http with https: in links to the MIT license.
...
Also change MIT/X11 to just MIT, since no distinction was intended.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2019-07-18 15:26:01 +01: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
74f5b010df
Rename Serialized*Size -> SerializedSprout*Size
2018-08-03 01:57:40 +01:00
Jack Grigg
dd7417c8d0
Add comment about size calculations for converted serialized keys
2018-06-12 15:47:56 +12:00
Jack Grigg
bec3e62bc1
Implement encoding and decoding of Sapling keys and addresses
2018-06-07 17:28:50 +12:00
Jack Grigg
e5eab182b5
Use boost::variant to represent shielded addresses and keys
...
libzcash::PaymentAddress has been renamed to libzcash::SproutPaymentAddress,
and a new typedef boost::variant is now libzcash::PaymentAddress. Similarly
for ViewingKey and SpendingKey.
A new class InvalidEncoding is introduced as the default boost::variant
option for each address and key type; it is used during decoding instead
of boost::optional.
All address and key storage functions in the wallet have been modified to
refer specifically to the Sprout types, as they are used very precisely.
In most other cases, the more general type is leveraged as much as possible,
and we convert to the Sprout type when necessary. This will be subsequently
wrapped in, or replaced with, context-specific functions once Sapling
types are implemented.
2018-05-11 17:14:49 -04:00
Pieter Wuille
3d31e09cbb
Split key_io (address/key encodings) off from base58
2018-05-08 21:39:56 +01:00