Historic snippets
The earliest ideas of applying cryptography to cash came from David Chaum in 1983.
1988, along with Fiat and Naor, proposed offline electronic cash.
A paper by Okamoto and Ohta describe Merkle trees to subdivide coins.
Nakamoto started programming on Bitcoin around May 2007.
Compare Printeton bitcoin book, p. 9 ff
Bitcoin Improval Proposal (BIP)
BIPs are Bitcoin Improval Proposals.
A BIP is a design document
- providing information to the Bitcoin community, or
- describing a new feature for Bitcoin or its processes or environment.
BIPs are used to
- propose new features,
- collect community input on an issue
- document design decisions that have gone into Bitcoin
There are three kinds of BIP:
- Standards Track BIP
- Informational BIP
- Process BIP (like Standards Track BIPs but apply to areas other than the Bitcoin protocol itself)
The typical path through the various states («status field») of a BIP (Draft, Proposed, Final/Active, Deferred, Rejected, Withdrawn, Replaced, Obsolete) is outlined in
BIP 2.
A BIP is formally accepted if its status is Final or Active.
BIPs are maintained as text files in a versioned repository (which I believe to be
github.com/bitcoin/bips) , thus, their revision history is the historical record of the feature proposal.
Interesting, IMHO, BIPs include
BIP 39 | Mnemonic code for generating deterministic keys. Definition of 2024 words. The first 4 letters of each of these words are different (where space counts as a letter (add is not the same as addict) |
BIP 64 | Bitcoin XT fork? |
BIP 101 | Increase of the block size |
BIP 141 | Segregated Witness (Consensus layer) |
Compare BIPs with bLIPs.
bitcoin.info REST API
Downloading the information for a block with the bitcoin.info
REST API because the JSON file is rather large (approx 7 MB):
$ curl -s https://blockchain.info/rawblock/875049 -o /tmp/bitcoin-block-875049.json
Extract some information pertaining to the block
$ jq -r '
["Block index" , .block_index ],
["Height" , .height],
["Size" , .size],
["Time" , (.time | todateiso8601)],
["Version" , .ver], # seems to be a flag field
["Weight" , .weight],
["Fee" , .fee],
["hash" , .hash],
["Nonce" , .nonce],
["Main chain" , .main_chain],
["Merkle root" , .mrkl_root],
["nof Trx" , .n_tx],
["Next block[0]" , .next_block[0]],
["Prev block" , .prev_block] |
@tsv' \
/tmp/bitcoin-block-875049.json |
column -ts $'\t'
Block index 875049
Height 875049
Size 1542584
Time 2024-12-16T19:45:11Z
Version 1073676288
Weight 3993407
Fee 10052973
hash 0000000000000000000256360f807b002c9a993db921212a9700c5805f30ca82
nonce 847395996
main chain true
merkle root f6ea21c6e23ec74b65a079a97c283a9f96daffc7734b84a05ffddde303f5f588
nof trx 3822
next block[0] 000000000000000000023703272844fe1d2b713deaf69d8f5fa97835fb079e0e
prev block 0000000000000000000185d0f248f6aefecf5ae2acc0a12398eed5f76f8b79e4
The version is a bit field:
$ printf "%x\n" 1073676288
3fff0000
Display the block's first transaction:
$ jq -r '.tx[0]' /tmp/bitcoin-block-875049.json
…
Show an address's balance:
$ curl -s https://blockchain.info/balance?active=33TbzA5AMiTKUCmeVEdsnTj3GiVXuavCAH | jq
{
"33TbzA5AMiTKUCmeVEdsnTj3GiVXuavCAH": {
"final_balance": 640863808,
"n_tx": 2179,
"total_received": 728660071967
}
}
Unspent outputs:
$ curl -s https://blockchain.info/unspent?active=33TbzA5AMiTKUCmeVEdsnTj3GiVXuavCAH | jq
Unconfirmed transactions
$ curl -s https://blockchain.info/unconfirmed-transactions?format=json | jq