1

Why the same Hash 160 has different balance in Bitcoin network?

Hash 160 is B0D5D1FB94B76B39EE82771027BEFD17131042FA.

In the one way it is the address 1H825FgspbkznbiGAnAjFjan7dmYFjpsFe that has zero balance.

By the second way, it is the another address 3Hp2zoBKNW5NsmQhHsqKgMwiGA4FoUj9Q4 that has non-zero balance.

I try to track it on blockchain.info site.

Why there are that differences?

1

Both P2SH and P2PKH addresses rely on HASH160. The difference is in the script.

In a P2SH address (3Hp2zoBKNW5NsmQhHsqKgMwiGA4FoUj9Q4 in your example), the script is a914 B0D5D1FB94B76B39EE82771027BEFD17131042FA 87 (spaces mine). This amounts to OP_HASH160 OP_PUSH(20) B0D5D1FB94B76B39EE82771027BEFD17131042FA OP_EQUAL. In short, the Bitcoin network will take a provided redeemscript and signature data, and compare the hash160 of that redeem script against what is given in the address outputs.

For 1H825FgspbkznbiGAnAjFjan7dmYFjpsFe, the script is 76a914 B0D5D1FB94B76B39EE82771027BEFD17131042FA 88ac (spaces mine). This amounts to OP_DUP OP_HASH160 OP_PUSH(20) B0D5D1FB94B76B39EE82771027BEFD17131042FA OP_EQUALVERIFY OP_CHECKSIG. This essentially tells the network to take the provided public key when spending an input, duplicate it, hash the duplicate, compare it and verify that it equals B0D5D1FB94B76B39EE82771027BEFD17131042FA, then check the signature against the original public key (the one you duplicated).

Wallets and explorers will decide which address format to display based on the opcodes in the script. A P2SH address will always start with a914 and end with 87. A P2PKH will always start with 76a914 and end with 88ac.

Since Hashing by definition is not a one-to-one function, there is some private key out there for which the pubkey hash would be B0D5D1FB94B76B39EE82771027BEFD17131042FA. However, I'm not aware of any known private key/redeem script pairs that correspond to the same HASH160

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.