


























80 bytes block consists of 32 bytes previous block hash, 32 bytes transactions Merkle tree hash, timestamp, bits, nonce, etc. Each block is <= 1MB to minimize the propagation times. Therefore, large transactions require more service fee to compensate miners to include the transaction in the block.
As of Oct 2016, 43M UTXO, 475K unique addresses, and 15.9M BTC in circulation.
Transaction signature is over the whole transaction (except the signature itself) => miners cannot modify any portion of the transaction. P2PKH (Pay to public key hash) does not reveal the public key (but only its hash), this provides added security in terms of someone brute-forcing the public key. The signature scheme ECDSA does not have strong unforgeability which means that miner can change ECDSA pair (r, s) to (r, s’). This changes the transaction hash. Therefore, transaction hashes cannot be relied upon. Not knowing this fact lead to Mt. Gox collapse. Segregated Witness, eventually, fixed this by moving signatures out of the transaction hash.
There are two types of transactions
HASH160 H() EQUAL # Only hash of the script is exposed at the funding time
Spending transaction scriptSig: <sig1> <sig2> ....<sigN> <redeemScript>
Miner verifies thatAnother example of P2SH is multi-sig: m out of n signatures required.
Redeem script: <2> <pk1> <pk2> <pk3> <3> CHECKMULTISIG
Bitcoin implement is buggy so it eats the first element of the ScriptSig, therefore, add a dummy first element <0>
ScriptSig: <0> <sig1> <sig3> <redeemScript>
Applications of multi-sig =>
Base 58 - a-z, A-Z, 0-9 excluding {0,o, i, l} => 34 char addresses
Addresses for P2PKH starts with 1. Addresses for P2SH starts with 3.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。