mirror of
https://github.com/bitcoin/bips.git
synced 2025-01-18 21:35:13 +01:00
Archive Revision as of 20:30, 18 January 2013
https://en.bitcoin.it/w/index.php?title=BIP_0013&oldid=35307
This commit is contained in:
parent
f6db0af39f
commit
4be890738e
@ -1,8 +1,10 @@
|
||||
{{bip}}
|
||||
|
||||
<pre>
|
||||
BIP: 13
|
||||
Title: Address Format for OP_EVAL
|
||||
Title: Address Format for pay-to-script-hash
|
||||
Author: Gavin Andresen <gavinandresen@gmail.com>
|
||||
Status: Accepted
|
||||
Status: Final
|
||||
Type: Standards Track
|
||||
Created: 18-10-2011
|
||||
</pre>
|
||||
@ -22,7 +24,7 @@ The new bitcoin address type is constructed in the same manner as existing bitco
|
||||
|
||||
base58-encode: [one-byte version][20-byte hash][4-byte checksum]
|
||||
|
||||
Version byte is 2 for a main-network address, 109 for a testnet address.
|
||||
Version byte is 5 for a main-network address, 196 for a testnet address.
|
||||
The 20-byte hash is the hash of the script that will be used to redeem the coins.
|
||||
And the 4-byte checksum is the first four bytes of the SHA256 hash of the version and hash.
|
||||
|
||||
@ -38,15 +40,21 @@ This is one piece of the simplest path to a more secure bitcoin infrastructure.
|
||||
|
||||
Assuming that typing in bitcoin addresses manually will become increasingly rare in the future, and given that the existing checksum method for bitcoin addresses seems to work "well enough" in practice and has already been implemented multiple times, the Author believes no change to the checksum algorithm is necessary.
|
||||
|
||||
The leading version bytes are chosen so that, after base58 encoding, the leading character is consistent: for the main network, byte 5 becomes the character '3'. For the testnet, byte 196 is encoded into '2'.
|
||||
|
||||
==Backwards Compatibility==
|
||||
|
||||
This proposal is not backwards compatible, but it fails gracefully-- if an older implementation is given one of these new bitcoin addresses, it will report the address as invalid and will refuse to create a transaction.
|
||||
|
||||
==Reference Implementation==
|
||||
|
||||
https://github.com/gavinandresen/bitcoin-git/tree/op_eval
|
||||
See base58.cpp1/base58.h at https://github.com/bitcoin/bitcoin/src
|
||||
|
||||
==See Also==
|
||||
|
||||
The OP_EVAL BIP.
|
||||
* [[BIP 0012|BIP 12: OP_EVAL, the original P2SH design]]
|
||||
* [[BIP 0016|BIP 16: Pay to Script Hash (aka "/P2SH/")]]
|
||||
* [[BIP 0017|BIP 17: OP_CHECKHASHVERIFY, another P2SH design]]
|
||||
|
||||
[[Category:BIP|D]]
|
||||
[[Category:Security]]
|
||||
|
Loading…
Reference in New Issue
Block a user