aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorW. J. van der Laan <laanwj@protonmail.com>2021-11-22 12:37:41 +0100
committerW. J. van der Laan <laanwj@protonmail.com>2021-11-22 13:26:01 +0100
commit95d19f8c1a40a7531d2bb00febd245d127293a64 (patch)
tree546576fedec7d6037629ac8bac87ec6a295ed949 /doc
parentee7e06156357c333caef381b6acb3109d0187666 (diff)
parent88cc4810926e4f5af6757ee1b0eed61abda3d746 (diff)
downloadbitcoin-95d19f8c1a40a7531d2bb00febd245d127293a64.tar.xz
Merge bitcoin/bitcoin#16807: Let validateaddress locate error in Bech32 address
88cc4810926e4f5af6757ee1b0eed61abda3d746 Modify copyright header on Bech32 code (Samuel Dobson) 5599813b80e53a1539c66625b4320ab1b4fb4848 Add lots of comments to Bech32 (Samuel Dobson) 2eb5792ec7bbeaf7138420b6c85c5cd0a0404946 Add release notes for validateaddress Bech32 error detection (MeshCollider) 42d6a029e57a32f2d1d829ff7718b6d40d58b9d1 Refactor and add more tests for validateaddress (Samuel Dobson) c4979f77c1264f0099d1dfa278b1d9c18340b5f9 Add boost tests for bech32 error detection (MeshCollider) 02a7bdee429ae307a5e57832727fed789e2e04fb Add error_locations to validateaddress RPC (Samuel Dobson) b62b67e06cc406fdad68da4c091168fb5f11c1d4 Add Bech32 error location function (Samuel Dobson) 0b06e720c0182dee8b560d2e8d3891b036f63ea7 More detailed error checking for base58 addresses (Samuel Dobson) Pull request description: Addresses (partially) #16779 - no GUI change in this PR Adds a LocateError function the bech32 library, which is then called by `validateaddress` RPC, (and then eventually from a GUI tool too, future work). I think modifying validateaddress is nicer than adding a separate RPC for this. Includes tests. Based on https://github.com/sipa/bech32/blob/master/ecc/javascript/bech32_ecc.js Credit to sipa for that code ACKs for top commit: laanwj: Code review and manually tested ACK 88cc4810926e4f5af6757ee1b0eed61abda3d746 ryanofsky: Code review ACK 88cc4810926e4f5af6757ee1b0eed61abda3d746 with caveat that I only checked the new `LocateErrors` code to try to verify it didn't have unsafe or unexpected operations or loop forever or crash. Did not try to verify behavior corresponds to the spec. In the worst case bugs here should just affect error messages not actual decoding of addresses so this seemed ok. w0xlt: tACK 88cc481 Tree-SHA512: 9c7fe9745bc7527f80a30bd4c1e3034e16b96a02cc7f6c268f91bfad08a6965a8064fe44230aa3f87e4fa3c938f662ff4446bc682c83cb48c1a3f95cf4186688
Diffstat (limited to 'doc')
-rw-r--r--doc/release-notes-16807.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/release-notes-16807.md b/doc/release-notes-16807.md
new file mode 100644
index 0000000000..5027550a99
--- /dev/null
+++ b/doc/release-notes-16807.md
@@ -0,0 +1,6 @@
+Updated RPCs
+------------
+
+- The `validateaddress` RPC now optionally returns an `error_locations` array, with the indices of
+invalid characters in the address. For example, this will return the locations of up to two Bech32
+errors. \ No newline at end of file