1
0
mirror of https://github.com/bitcoinbook/bitcoinbook synced 2024-10-10 09:59:03 +00:00
bitcoinbook/ch01.asciidoc

59 lines
1.9 KiB
Plaintext
Raw Normal View History

2013-07-24 19:58:12 +00:00
[[ch01_how_does_bitcoin_work]]
== How Does Bitcoin Work?
2013-07-24 19:58:12 +00:00
=== Bitcoin currency and units
=== Bitcoin addresses and public key crypto
=== Simple Transactions
=== Wallets, addresses and coins
=== The Blockchain
2013-08-12 19:40:07 +00:00
==== The Genesis Block
The very first block mined, by Satoshi Nakamoto on Sat, 03 Jan 2009, is included in the source code of any "full node" client, as the basis for validating the entire blockchain.
[[genesis_block_cpp]]
.The Genesis Block, statically encoded in the source code of the reference client
link:$$https://github.com/bitcoin/bitcoin/blob/master/src/chainparams.cpp#L120$$[bitcoin/src/chainparams.cpp:line 120]
====
[source, c++]
----
const char* pszTimestamp = "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks";
CTransaction txNew;
txNew.vin.resize(1);
txNew.vout.resize(1);
txNew.vin[0].scriptSig = CScript() << 486604799 << CBigNum(4) << vector<unsigned char>((const unsigned char*)pszTimestamp, (const unsigned char*)pszTimestamp + strlen(pszTimestamp));
txNew.vout[0].nValue = 50 * COIN;
txNew.vout[0].scriptPubKey = CScript() << ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f") << OP_CHECKSIG;
genesis.vtx.push_back(txNew);
genesis.hashPrevBlock = 0;
genesis.hashMerkleRoot = genesis.BuildMerkleTree();
genesis.nVersion = 1;
genesis.nTime = 1231006505;
genesis.nBits = 0x1d00ffff;
genesis.nNonce = 2083236893;
----
====
2013-07-24 19:58:12 +00:00
=== Bitcoin mining
=== Transaction Fees
=== Currency exchange
2013-08-05 18:39:21 +00:00
[[complex_transactions]]
2013-07-24 19:58:12 +00:00
=== Complex transactions
=== Peer-to-peer protocol
=== Transaction pool
=== Double-spend protection
=== Asymptotic reward reduction
=== Finite monetary supply
=== Divisibility and deflation
=== Full node client
=== Overlay networks (Stratum)
=== Light-weight clients
=== Offline processing
=== Hardware clients
=== Brain wallets
=== Paper wallets