David Stancel
Cryptocurrency Expert, Advisor, Lecturer, Author, & exCTO @ Fumbi
Lecture 2
Number of transactions: How many transactions the block contains
Height: The number of the block in the blockchain
Block Reward: The amount rewarded to the miner for computing the block
Timestamp: The time the block was added
Mined by: Who mined the block (Can appear anonymous)
Merkle Root: The combined hash of all the transactions in this block
Previous Block: The previous block’s hash
Difficulty: A value used to calculate how difficult the block is to solve (This value is adjusted every 2016 blocks to aim for » 10 minutes computation time)
Size: The total size of the block
Version: Signals to the rest of the network about intentions to update
Nonce: A value that is changed to find a solution for the block
Unspent Transaction Output
"vout":
[ {
"value": 0.01500000,
"scriptPubKey": "OP_DUP OP_HASH160 ab68025513c3dbd2f7b92a94e0581f5d50f654e7 OP_EQUALVERIFY
OP_CHECKSIG"
},
{
"value": 0.08450000,
"scriptPubKey": "OP_DUP OP_HASH160 7f9b1a7fb68d60c536c2fd8aeaa53a8f3cc025a8 OP_EQUALVERIFY OP_CHECKSIG",
} ]
OP_DUP OP_HASH160 <Cafe Public Key Hash> OP_EQUALVERIFY OP_CHECKSIG
Alice --> Bob's cafe
Two scripts together:
<Cafe Signature> <Cafe Public Key> OP_DUP OP_HASH160
<Cafe Public Key Hash> OP_EQUALVERIFY OP_CHECKSIG
<Cafe Signature> <Cafe Public Key>
Text
Text
Reading:
Bitcoin Wiki Script:
https://en.bitcoin.it/wiki/Script
Playgrounds:
1 - https://www.crmarsh.com/script-playground/
2 - https://github.com/siminchen/bitcoinIDE
More rules at:
https://en.bitcoin.it/wiki/Protocol_rules
1. https://anders.com/blockchain/public-private-keys/keys.html
2. https://anders.com/blockchain/hash.html
1. New TX is broadcasted
2. Each node collects TXs into a block
3. In each "round" a random node is selected to decide what is
"truth"
4. Other nodes accept/reject the block based on predefined criteria
5. Block acceptance is expressed by including its hash into the next block they build upon
Proof of Stake
Delegated Proof of Stake
Proof of Authority
Proof of Importance
Proof of Burn
Proof of Activity
Proof of Elapsed Time
Federated Consensus
Practical Byzantine Fault Tolerance
and many more
from the Commnad Line
gettransaction 0408953d670d0f268b70f449772bd3d1c1b80c690be6f3017e3f9bdaa01c0b6c {
"amount" : -0.01080000,
"fee" : 0.01080000,
"confirmations" : 0,
"txid" : "0408953d670d0f268b70f449772bd3d1c1b80c690be6f3017e3f9bdaa01c0b6c", "walletconflicts" : [
],
"time" : 1399871859,
"timereceived" : 1399871859,
"details" : [
{
"account" : "",
"address" : "1Dima5vfScYn342c7SfcX2pFYSu3rqhtKz",
"category" : "send",
"amount" : -0.00500000,
"fee" : 0.01080000
},
{
"account" : "",
"address" : "18Z6bDrD4Fce8hRW5DkQ68f23xBCFodyxv",
"category" : "send",
"amount" : -0.01080000,
"fee" : 0.01080000
},
{
"account" : "Dima",
"address" : "1Dima5vfScYn342c7SfcX2pFYSu3rqhtKz",
"category" : "receive",
"amount" : 0.00500000
}],......
}
gettransaction
0408953d670d0f268b70f449772bd3d1c1b80c690be6f3017e3f9bdaa01c0b6c
{
"amount" : -0.01080000,
"fee" : 0.01080000,
"confirmations" : 2,
"blockhash" : "00000000000000002320499cc4e60f5a515a03b088925f78b728bdf79ed5ac86", "blockindex" : 189,
"blocktime" : 1399872120,
"txid" : "0408953d670d0f268b70f449772bd3d1c1b80c690be6f3017e3f9bdaa01c0b6c", "walletconflicts" : [
],
"time" : 1399871859,
"timereceived" : 1399871859,
"details" : [
{
...
The buyer commits a payment to escrow.
The seller receives a transaction with the money in escrow, but he can’t spend it until the buyer unlocks it.
The buyer can release the payment at any time after that, which could be never.
This does not allow the buyer to take the money back, but it does give him the option to burn the money by never releasing it.
The seller has the option to release the money back to the buyer.
While this system does not guarantee the parties against loss, it takes the profit out of cheating. If the seller doesn’t send the goods, he doesn’t get paid.
The buyer would still be out the money, but at least the seller has no monetary motivation to cheat.
The buyer can’t benefit by failing to pay. He can’t get the escrow money back. He can’t fail to pay due to lack of funds.
The seller can see that the funds are committed to his key and can’t be sent to anyone else.”
Optional Articles:
By David Stancel
Bitcoin: Blocks, Transactions & Script
Cryptocurrency Expert, Advisor, Lecturer, Author, & exCTO @ Fumbi