aboutsummaryrefslogtreecommitdiff
path: root/depends
diff options
context:
space:
mode:
authormerge-script <32963518+hebasto@users.noreply.github.com>2024-04-18 10:05:05 +0100
committermerge-script <32963518+hebasto@users.noreply.github.com>2024-04-18 10:05:05 +0100
commitc05c214f2e9cfd6070a3c7680bfa09358fd9d97a (patch)
tree6c67a6018eb55cbf83ccd8f20a02e1c232f86e5d /depends
parentaaab5fb3c51c6a0fb96270fd6cfb0ba0bfbfe1c1 (diff)
parentc6d1b8de89d87fe4fd171dc85557299e429e6564 (diff)
downloadbitcoin-c05c214f2e9cfd6070a3c7680bfa09358fd9d97a.tar.xz
Merge bitcoin-core/gui#808: Change example address from legacy (P2PKH) to bech32m (P2TR)
c6d1b8de89d87fe4fd171dc85557299e429e6564 gui: change example address from legacy (P2PKH) to bech32m (P2TR) (Sebastian Falbesoner) Pull request description: Legacy addresses are less and less common these days and not recommended to use, so it seems senseful to also reflect that in the example addresses and update to the most recent address / output type (bech32m / P2TR). Also, as I couldn't see any value in computing these at runtime, they are pre-generated. This was done with the following Python script, executed in `./test/functional` (it's also included in the commit body, though without the she-bang): ```python #!/usr/bin/env python3 from test_framework.segwit_addr import CHARSET, decode_segwit_address, encode_segwit_address from test_framework.messages import sha256 output_key = sha256(b'bitcoin dummy taproot output key') for network, hrp in [('mainnet', 'bc'), ('signet', 'tb'), ('testnet', 'tb'), ('regtest', 'bcrt')]: dummy_address = encode_segwit_address(hrp, 1, output_key) while decode_segwit_address(hrp, dummy_address) != (None, None): last_char = CHARSET[(CHARSET.index(dummy_address[-1]) + 1) % 32] dummy_address = dummy_address[:-1] + last_char print(f'{network:7} example address: {dummy_address}') ``` Note that the last bech32 character is modified in order to make the checksum fail. master (mainnet): ![image](https://github.com/bitcoin-core/gui/assets/91535/8c94cc1e-5649-47ed-8b2d-33b18654f6a2) PR (mainnet): ![image](https://github.com/bitcoin-core/gui/assets/91535/1ce208a6-1218-4850-93e0-5323c73e9049) ACKs for top commit: maflcko: lgtm ACK c6d1b8de89d87fe4fd171dc85557299e429e6564 pablomartin4btc: tACK c6d1b8de89d87fe4fd171dc85557299e429e6564 Tree-SHA512: a53c267a3e0d29b9c41bf043b123e7152fbf297e2322d74ce047ba2582b54768187162d462cc334e91a84874731c2e0793726ad44d9970c10ecfe70a1d4f3f1c
Diffstat (limited to 'depends')
0 files changed, 0 insertions, 0 deletions