Commit graph

54 commits

Author SHA1 Message Date
Byron Hambly
47626b5a64 Merge 623745ca74 into merged_master (Bitcoin PR bitcoin/bitcoin#23912) 2023-06-14 15:44:11 +00:00
Byron Hambly
a120b7925d Merge 22feb7fee9 into merged_master (Bitcoin PR bitcoin/bitcoin#23577) 2023-06-02 08:34:54 +00:00
Byron Hambly
eee64b5289 Merge 95d19f8c1a into merged_master (Bitcoin PR bitcoin/bitcoin#16807)
I did not do a great job with this merge, and it could use some
improvement. Commented out some of the assertions in
rpc_invalid_address_message.py
2023-05-30 15:27:30 +00:00
Glenn Willen
6b4228e3a5 Preserve blinding key when parsing taproot address. 2022-10-11 15:30:04 -07:00
Hennadii Stepanov
f47dda2c58
scripted-diff: Bump copyright headers
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-

Commits of previous years:
* 2020: fa0074e2d8
* 2019: aaaaad6ac9
2021-12-30 19:36:57 +02:00
Samuel Dobson
a4fe70171b Make Bech32 LocateErrors return error list rather than using out-arg 2021-12-06 14:17:41 +13:00
Samuel Dobson
bb4d3e9b97 Address review comments for Bech32 error validation 2021-11-23 15:48:59 +13:00
Samuel Dobson
b62b67e06c Add Bech32 error location function 2021-10-12 12:03:14 +13:00
Samuel Dobson
0b06e720c0 More detailed error checking for base58 addresses 2021-10-12 12:03:14 +13:00
Andrew Poelstra
ba3d786a61 Merge 64194498cf into merged_master (Elements PR ElementsProject/elements#1025)
Another annoying one to deal with because it includes partial
backports. In future let's really try to stay up to date with
Core.
2021-09-05 15:42:08 +00:00
Andrew Poelstra
c01e09e8c3 blech32: add blech32m format and use it to decode witness v1+ addresses 2021-08-18 15:54:20 +00:00
Pieter Wuille
b3df66f82e Use Bech32m encoding for v1+ segwit addresses
This also includes updates to the Python test framework implementation,
test vectors, and release notes.

https://github.com/bitcoin/bitcoin/pull/20861 (3/5)
2021-08-17 22:32:47 +00:00
Pieter Wuille
b1d1d94e01 Implement Bech32m encoding/decoding
https://github.com/bitcoin/bitcoin/pull/20861 (1/5)
2021-08-17 22:32:47 +00:00
Bezdrighin
c607835bad Better error messages for invalid addresses
This commit addresses #20809.

We add an additional 'error' property in the result of 'validateaddress' in case the address is not valid that gives a short description of why the address in invalid. We also change the error message returned by 'getaddressinfo' in case the address is invalid.

https://github.com/bitcoin/bitcoin/pull/20832 (1/1)

ELEMENTS: Merge conflicts resolved based on d6c85c5620 (from 22.0 rebase)
2021-08-17 22:32:47 +00:00
Andrew Poelstra
e4746d6297 Merge 914c0cad97 into merged_master (Bitcoin PR bitcoin/bitcoin#22399)
This PR adds a fuzz test ensuring that all the different destination types
round-trip to strings (an important test given that Satoshi managed to mess
this up, having two different address types encode the same way..)

Anyway we fail this test, since both CNoDestination and NullData encode as
empty strings, and then this "decodes" as CNoDestination (and returns an
error, but the fuzztest doesn't check that). To make the fuzzer pass, I
changed NullData to encode and decode as "null".

I think this actually adds some functionality, letting you use "null" as
an "address" for sendtoaddress and createrawtransaction, thus burning the
coins and fixing #1011...but this was not my intent and we probably want
to think a bit more carefully before deliberately supporting this.
2021-07-31 00:58:01 +00:00
Andrew Poelstra
3ffb9aa14f Merge c7dd9ff71b into merged_master (Bitcoin PR bitcoin/bitcoin#22051)
Does the bare minimum to introduce Taproot wallet support with CT; just
adds a CPubKey blinding_pubkey to the taproot destination variant and
updates some visitors.

In future when we define blech32 we will need to make sure we are using
that encoding and using the pubkey.
2021-07-21 23:15:57 +00:00
Andrew Poelstra
d44ce3a73f Merge 8ec881d3b6 into merged_master (Bitcoin PR #20861) 2021-06-27 19:12:42 +00:00
Andrew Poelstra
d6c85c5620 Merge 4b15ffe991 into merged_master (Bitcoin PR #20832) 2021-06-18 20:35:42 +00:00
Andrew Poelstra
acf709b3ab Merge bd6af53e1f into merged_master (Bitcoin PR #20480)
what a trainwreck of a programming language..
2021-06-17 15:15:29 +00:00
Pieter Wuille
a4bf84039c Separate WitnessV1Taproot variant in CTxDestination 2021-05-24 12:14:16 -07:00
Pieter Wuille
fe5e495c31 Use Bech32m encoding for v1+ segwit addresses
This also includes updates to the Python test framework implementation,
test vectors, and release notes.
2021-03-16 10:48:36 -07:00
Pieter Wuille
da2bb6976d Implement Bech32m encoding/decoding 2021-03-15 17:26:35 -07:00
Bezdrighin
8f0b64fb51 Better error messages for invalid addresses
This commit addresses #20809.

We add an additional 'error' property in the result of 'validateaddress' in case the address is not valid that gives a short description of why the address in invalid. We also change the error message returned by 'getaddressinfo' in case the address is invalid.
2021-01-24 02:44:53 +01:00
MarcoFalke
faa8f68943
Replace boost::variant with std::variant 2021-01-05 10:10:50 +01:00
Andrew Poelstra
fa10c4dfe5 Merge bd331bd745 into merged_master (Bitcoin PR #17938)
Also re-`static`'d a method in src/script/standard.cpp which we had made globally
visible for some historical reason, but which I noticed diffing that file against
upstream.
2020-11-26 01:09:10 +00:00
Andrew Poelstra
009bc2fdfb Merge 99813a9745 into merged_master (Bitcoin PR #17829) 2020-11-14 16:52:02 +00:00
Andrew Poelstra
c1ac820649 Merge 3914e877c4 into merged_master (Bitcoin PR #17511) 2020-11-14 16:51:57 +00:00
Andrew Poelstra
38f8a01825 Merge 36191a8bb5 into merged_master (Bitcoin PR #12461) 2020-11-09 23:10:13 +00:00
Andrew Poelstra
821f5256a5 Merge 46d6930f8c into merged_master (Bitcoin PR #16659) 2020-11-09 21:20:41 +00:00
MarcoFalke
aaaaad6ac9
scripted-diff: Bump copyright of files changed in 2019
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-
2019-12-30 10:42:20 +13:00
Pieter Wuille
5909bcd3bf Add bounds checks in key_io before DecodeBase58Check 2019-12-05 16:31:09 -08:00
practicalswift
084e17cebd Remove unused includes 2019-10-15 22:56:43 +00:00
Steven Roose
f4889a5253
UPSTREAM MERGE BROKEN: Merge upstream commit '519b0bc5dc' into master 2019-05-17 16:17:09 +01:00
Steven Roose
7f894ae00b
UPSTREAM MERGE BROKEN: Merge commit 'f617e05c38' into master 2019-05-01 19:18:18 +01:00
Gregory Sanders
70946e7fee Replace CScriptID and CKeyID in CTxDestination with dedicated types 2019-04-29 10:15:23 -04:00
Gregory Sanders
40a62a151d DestinationEncoder: don't assert when a parent destination is unblinded 2019-04-04 11:48:48 -04:00
Gregory Sanders
665d9ebe0e Whitespace and tab linting 2019-03-20 11:19:07 -04:00
Gregory Sanders
14af0b6539
Implement blech32 addresses, expose over RPC 2019-03-20 12:05:36 +00:00
Steven Roose
0f28780364
Add blech32 implementation and API 2019-03-20 12:05:35 +00:00
Steven Roose
17a22f1495
Add support for blinded addresses 2019-03-20 12:05:34 +00:00
Gregory Sanders
aa375e66c1
Replace CScriptID and CKeyID in CTxDestination with dedicated type 2019-03-20 12:05:31 +00:00
practicalswift
d855e4cac8 Avoid triggering undefined behaviour (std::memset(nullptr, 0, 0)) if an invalid string is passed to DecodeSecret(...) 2019-02-07 22:30:25 +01:00
Gregory Sanders
4202671221 MERGE FIX: spelling linter fixes 2019-01-31 10:55:03 +00:00
Gregory Sanders
c62fab2d69 UPSTREAM MERGE BROKEN: Merge commit '3832c25f17' into merge_14225 2019-01-28 18:14:25 +00:00
Gregory Sanders
6366734477 Properly encode parent witness addresses 2019-01-24 11:07:11 -05:00
Steven Roose
18ee3417d8 Add parent address encoding 2019-01-02 16:12:47 +01:00
DrahtBot
06ba77973e Update copyright headers to 2018 2018-12-29 10:15:01 +01:00
Jim Posen
2068f089c8 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/utilmemory.h src/util/memory.h
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 's/<util\.h>/<util\/system\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp')
sed -i 's/<utilmemory\.h>/<util\/memory\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp')
sed -i 's/<utilmoneystr\.h>/<util\/moneystr\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp')
sed -i 's/<utilstrencodings\.h>/<util\/strencodings\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp')
sed -i 's/<utiltime\.h>/<util\/time\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp')

sed -i 's/BITCOIN_UTIL_H/BITCOIN_UTIL_SYSTEM_H/g' src/util/system.h
sed -i 's/BITCOIN_UTILMEMORY_H/BITCOIN_UTIL_MEMORY_H/g' src/util/memory.h
sed -i 's/BITCOIN_UTILMONEYSTR_H/BITCOIN_UTIL_MONEYSTR_H/g' src/util/moneystr.h
sed -i 's/BITCOIN_UTILSTRENCODINGS_H/BITCOIN_UTIL_STRENCODINGS_H/g' src/util/strencodings.h
sed -i 's/BITCOIN_UTILTIME_H/BITCOIN_UTIL_TIME_H/g' src/util/time.h

sed -i 's/ util\.\(h\|cpp\)/ util\/system\.\1/g' src/Makefile.am
sed -i 's/utilmemory\.\(h\|cpp\)/util\/memory\.\1/g' src/Makefile.am
sed -i 's/utilmoneystr\.\(h\|cpp\)/util\/moneystr\.\1/g' src/Makefile.am
sed -i 's/utilstrencodings\.\(h\|cpp\)/util\/strencodings\.\1/g' src/Makefile.am
sed -i 's/utiltime\.\(h\|cpp\)/util\/time\.\1/g' src/Makefile.am

sed -i 's/-> util ->/-> util\/system ->/' test/lint/lint-circular-dependencies.sh
sed -i 's/src\/util\.cpp/src\/util\/system\.cpp/g' test/lint/lint-format-strings.py test/lint/lint-locale-dependence.sh
sed -i 's/src\/utilmoneystr\.cpp/src\/util\/moneystr\.cpp/g' test/lint/lint-locale-dependence.sh
sed -i 's/src\/utilstrencodings\.\(h\|cpp\)/src\/util\/strencodings\.\1/g' test/lint/lint-locale-dependence.sh
sed -i 's/src\\utilstrencodings\.cpp/src\\util\\strencodings\.cpp/' build_msvc/libbitcoinconsensus/libbitcoinconsensus.vcxproj
-END VERIFY SCRIPT-
2018-11-04 22:46:07 -08:00
MarcoFalke
dd34204611
Merge #13769: Mark single-argument constructors "explicit"
1ac3c983bf Mark single-argument constructors "explicit" (practicalswift)

Pull request description:

  Mark single-argument constructors `explicit`.

  Rationale:
  * Avoid unexpected implicit promotions.

  From the developer notes:

  > **By default, declare single-argument constructors explicit.**
  > Rationale: This is a precaution to avoid unintended conversions that might arise when single-argument constructors are used as implicit conversion functions.

Tree-SHA512: 7901ed5be808c9d0ecb5ca501e1bc0395987fe1b7941b8548cebac2ff08a14f7dab61fab374a69b9ba29a9295a04245c814325c7f95b97ae558af0780f111dfa
2018-08-27 13:33:04 -04:00
DrahtBot
eb7daf4d60 Update copyright headers to 2018 2018-07-27 07:15:02 -04:00