dash-docs/img/dev
David A. Harding ccda4caa0c
Dev Docs: Document Blocks-First IBD & Orphan Blocks
This commit provides a detailed overview of the current block download
method, which I've retroactively named blocks-first for parallelism with
headers-first.

New And Significantly Revised:

* New Initial Block Download (IBD) section (h3) with Blocks-First
  subsection (h4)

* New Orphan Block subsection (under Blocks Broadcasting) describing
  orphan blocks and how they're handled under blocks-first. Also
  includes a simple illustration of the difference between orphan blocks
  and stale blocks. Thanks to luke-jr for his s/orphan block/stale
  block/ commit a couple months ago---that made this commit much easier.

Edits:

* Cleaned up a couple cases missed by previous s/orphan/stale/ commit
  because they used past tense (orphaned).

* In P2P reference section, mentioned that a `block` message can be sent
  unsolicited by miners.

* Mention that `getheaders` and `headers` were added in protocol
  version 31800.

* Moved a few internal links around and added a few new internal links.

Administrivia:

* Started adding "TODOv0.10" in HTML comments to places that need to be
  updated when 0.10 is released so that I can easily git grep for that
  tag later.
2015-01-31 15:48:16 -05:00
..
gifs Dev Docs: Add P2P Messages That Request Or Reply With Data 2014-11-12 12:39:36 -05:00
animated-en-merkleblock-creation.gif Dev Docs: Add P2P Messages That Request Or Reply With Data 2014-11-12 12:39:36 -05:00
animated-en-merkleblock-parsing.gif Dev Docs: Add P2P Messages That Request Or Reply With Data 2014-11-12 12:39:36 -05:00
COPYING Set license files and headers for bitcoin.org's content 2014-11-21 19:09:12 -05:00
en-block-height-vs-depth.dot Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-block-height-vs-depth.png Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-block-height-vs-depth.svg Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-blockchain-fork.dot Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-blockchain-fork.png Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-blockchain-fork.svg Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-blockchain-overview.dot Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-blockchain-overview.png Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-blockchain-overview.svg Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-bloom-update.dot Dev Docs: Describe Filterload Message (Final P2P Message To Document) 2014-11-27 21:27:01 -05:00
en-bloom-update.png Dev Docs: Describe Filterload Message (Final P2P Message To Document) 2014-11-27 21:27:01 -05:00
en-bloom-update.svg Dev Docs: Describe Filterload Message (Final P2P Message To Document) 2014-11-27 21:27:01 -05:00
en-btcc-payment-request.png Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-cert-order.dot Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-cert-order.png Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-cert-order.svg Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-coinjoin.dot Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-coinjoin.png Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-coinjoin.svg Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-creating-p2pkh-output.dot Replace P2PH by P2PKH in devel-docs 2014-05-14 00:21:00 -04:00
en-creating-p2pkh-output.png Replace P2PH by P2PKH in devel-docs 2014-05-14 00:21:00 -04:00
en-creating-p2pkh-output.svg Replace P2PH by P2PKH in devel-docs 2014-05-14 00:21:00 -04:00
en-creating-p2sh-output.dot Use Terms "Pubkey Script" And "Signature Script" 2014-09-20 15:07:42 -04:00
en-creating-p2sh-output.png Use Terms "Pubkey Script" And "Signature Script" 2014-09-20 15:07:42 -04:00
en-creating-p2sh-output.svg Use Terms "Pubkey Script" And "Signature Script" 2014-09-20 15:07:42 -04:00
en-ecdsa-compressed-public-key.gnuplot Describe Uncompressed And Compressed Public Keys 2014-06-09 22:16:31 -04:00
en-ecdsa-compressed-public-key.png Describe Uncompressed And Compressed Public Keys 2014-06-09 22:16:31 -04:00
en-ecdsa-compressed-public-key.svg Describe Uncompressed And Compressed Public Keys 2014-06-09 22:16:31 -04:00
en-hard-fork.dot Describe Soft And Hard Forks 2014-10-24 09:44:50 -04:00
en-hard-fork.png Describe Soft And Hard Forks 2014-10-24 09:44:50 -04:00
en-hard-fork.svg Describe Soft And Hard Forks 2014-10-24 09:44:50 -04:00
en-hd-cross-generational-key-compromise.dot Fix Formula For Normal HD Key Derivation; Mention Ancestor Key Risk 2014-05-17 14:34:28 -04:00
en-hd-cross-generational-key-compromise.png Fix Formula For Normal HD Key Derivation; Mention Ancestor Key Risk 2014-05-17 14:34:28 -04:00
en-hd-cross-generational-key-compromise.svg Fix Formula For Normal HD Key Derivation; Mention Ancestor Key Risk 2014-05-17 14:34:28 -04:00
en-hd-overview.dot Fix Formula For Normal HD Key Derivation; Mention Ancestor Key Risk 2014-05-17 14:34:28 -04:00
en-hd-overview.png Fix Formula For Normal HD Key Derivation; Mention Ancestor Key Risk 2014-05-17 14:34:28 -04:00
en-hd-overview.svg Fix Formula For Normal HD Key Derivation; Mention Ancestor Key Risk 2014-05-17 14:34:28 -04:00
en-hd-private-parent-to-private-child.dot Fix Formula For Normal HD Key Derivation; Mention Ancestor Key Risk 2014-05-17 14:34:28 -04:00
en-hd-private-parent-to-private-child.png Fix Formula For Normal HD Key Derivation; Mention Ancestor Key Risk 2014-05-17 14:34:28 -04:00
en-hd-private-parent-to-private-child.svg Fix Formula For Normal HD Key Derivation; Mention Ancestor Key Risk 2014-05-17 14:34:28 -04:00
en-hd-public-child-from-public-or-private-parent.dot Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-hd-public-child-from-public-or-private-parent.png Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-hd-public-child-from-public-or-private-parent.svg Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-hd-public-child-from-public-parent.dot Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-hd-public-child-from-public-parent.png Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-hd-public-child-from-public-parent.svg Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-hd-root-keys.dot Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-hd-root-keys.png Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-hd-root-keys.svg Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-hd-tree.dot Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-hd-tree.png Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-hd-tree.svg Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-ibd-block.dot Dev Docs: Document Blocks-First IBD & Orphan Blocks 2015-01-31 15:48:16 -05:00
en-ibd-block.png Dev Docs: Document Blocks-First IBD & Orphan Blocks 2015-01-31 15:48:16 -05:00
en-ibd-block.svg Dev Docs: Document Blocks-First IBD & Orphan Blocks 2015-01-31 15:48:16 -05:00
en-ibd-getblocks.dot Dev Docs: Document Blocks-First IBD & Orphan Blocks 2015-01-31 15:48:16 -05:00
en-ibd-getblocks.png Dev Docs: Document Blocks-First IBD & Orphan Blocks 2015-01-31 15:48:16 -05:00
en-ibd-getblocks.svg Dev Docs: Document Blocks-First IBD & Orphan Blocks 2015-01-31 15:48:16 -05:00
en-ibd-getblocks2.dot Dev Docs: Document Blocks-First IBD & Orphan Blocks 2015-01-31 15:48:16 -05:00
en-ibd-getblocks2.png Dev Docs: Document Blocks-First IBD & Orphan Blocks 2015-01-31 15:48:16 -05:00
en-ibd-getblocks2.svg Dev Docs: Document Blocks-First IBD & Orphan Blocks 2015-01-31 15:48:16 -05:00
en-ibd-getdata.dot Dev Docs: Document Blocks-First IBD & Orphan Blocks 2015-01-31 15:48:16 -05:00
en-ibd-getdata.png Dev Docs: Document Blocks-First IBD & Orphan Blocks 2015-01-31 15:48:16 -05:00
en-ibd-getdata.svg Dev Docs: Document Blocks-First IBD & Orphan Blocks 2015-01-31 15:48:16 -05:00
en-ibd-inv.dot Dev Docs: Document Blocks-First IBD & Orphan Blocks 2015-01-31 15:48:16 -05:00
en-ibd-inv.png Dev Docs: Document Blocks-First IBD & Orphan Blocks 2015-01-31 15:48:16 -05:00
en-ibd-inv.svg Dev Docs: Document Blocks-First IBD & Orphan Blocks 2015-01-31 15:48:16 -05:00
en-merkle-tree-construction.dot Dev Docs: Describe Serialized Block Header And Block Format 2014-11-07 22:50:27 -05:00
en-merkle-tree-construction.png Dev Docs: Describe Serialized Block Header And Block Format 2014-11-07 22:50:27 -05:00
en-merkle-tree-construction.svg Dev Docs: Describe Serialized Block Header And Block Format 2014-11-07 22:50:27 -05:00
en-micropayment-channel.dot Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-micropayment-channel.png Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-micropayment-channel.svg Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-nbits-overview.dot Dev Docs: Describe Serialized Block Header And Block Format 2014-11-07 22:50:27 -05:00
en-nbits-overview.png Dev Docs: Describe Serialized Block Header And Block Format 2014-11-07 22:50:27 -05:00
en-nbits-overview.svg Dev Docs: Describe Serialized Block Header And Block Format 2014-11-07 22:50:27 -05:00
en-nbits-quick-parse.dot Dev Docs: Describe Serialized Block Header And Block Format 2014-11-07 22:50:27 -05:00
en-nbits-quick-parse.png Dev Docs: Describe Serialized Block Header And Block Format 2014-11-07 22:50:27 -05:00
en-nbits-quick-parse.svg Dev Docs: Describe Serialized Block Header And Block Format 2014-11-07 22:50:27 -05:00
en-orphan-stale-definition.dot Dev Docs: Document Blocks-First IBD & Orphan Blocks 2015-01-31 15:48:16 -05:00
en-orphan-stale-definition.png Dev Docs: Document Blocks-First IBD & Orphan Blocks 2015-01-31 15:48:16 -05:00
en-orphan-stale-definition.svg Dev Docs: Document Blocks-First IBD & Orphan Blocks 2015-01-31 15:48:16 -05:00
en-p2p-control-messages.dot Dev Docs: Describe Almost All Remaining P2P Network Messages 2014-11-17 01:23:11 -05:00
en-p2p-control-messages.png Dev Docs: Describe Almost All Remaining P2P Network Messages 2014-11-17 01:23:11 -05:00
en-p2p-control-messages.svg Dev Docs: Describe Almost All Remaining P2P Network Messages 2014-11-17 01:23:11 -05:00
en-p2p-data-messages.dot Dev Docs: Add P2P Messages That Request Or Reply With Data 2014-11-12 12:39:36 -05:00
en-p2p-data-messages.png Dev Docs: Add P2P Messages That Request Or Reply With Data 2014-11-12 12:39:36 -05:00
en-p2p-data-messages.svg Dev Docs: Add P2P Messages That Request Or Reply With Data 2014-11-12 12:39:36 -05:00
en-p2pkh-stack.dot Use Terms "Pubkey Script" And "Signature Script" 2014-09-20 15:07:42 -04:00
en-p2pkh-stack.png Use Terms "Pubkey Script" And "Signature Script" 2014-09-20 15:07:42 -04:00
en-p2pkh-stack.svg Use Terms "Pubkey Script" And "Signature Script" 2014-09-20 15:07:42 -04:00
en-payment-processing.dot Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-payment-processing.png Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-payment-processing.svg Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-payment-protocol.dot Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-payment-protocol.png Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-payment-protocol.svg Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-pooled-mining-overview.dot Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-pooled-mining-overview.png Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-pooled-mining-overview.svg Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-qr-code.png Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-qr-code.svg Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-signing-output-to-spend.dot Use Terms "Pubkey Script" And "Signature Script" 2014-09-20 15:07:42 -04:00
en-signing-output-to-spend.png Use Terms "Pubkey Script" And "Signature Script" 2014-09-20 15:07:42 -04:00
en-signing-output-to-spend.svg Use Terms "Pubkey Script" And "Signature Script" 2014-09-20 15:07:42 -04:00
en-soft-fork.dot Describe Soft And Hard Forks 2014-10-24 09:44:50 -04:00
en-soft-fork.png Describe Soft And Hard Forks 2014-10-24 09:44:50 -04:00
en-soft-fork.svg Describe Soft And Hard Forks 2014-10-24 09:44:50 -04:00
en-solo-mining-overview.dot Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-solo-mining-overview.png Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-solo-mining-overview.svg Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-transaction-propagation.dot Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-transaction-propagation.png Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-transaction-propagation.svg Contributions by @harding to devel docs 2014-05-09 22:13:59 -04:00
en-tx-overview-spending.dot Revise TX Overview Image 2014-10-01 18:40:38 -04:00
en-tx-overview-spending.png Revise TX Overview Image 2014-10-01 18:40:38 -04:00
en-tx-overview-spending.svg Revise TX Overview Image 2014-10-01 18:40:38 -04:00
en-tx-overview.dot Revise TX Overview Image 2014-10-01 18:40:38 -04:00
en-tx-overview.png Revise TX Overview Image 2014-10-01 18:40:38 -04:00
en-tx-overview.svg Revise TX Overview Image 2014-10-01 18:40:38 -04:00
en-unlocking-p2pkh-output.dot Use Terms "Pubkey Script" And "Signature Script" 2014-09-20 15:07:42 -04:00
en-unlocking-p2pkh-output.png Use Terms "Pubkey Script" And "Signature Script" 2014-09-20 15:07:42 -04:00
en-unlocking-p2pkh-output.svg Use Terms "Pubkey Script" And "Signature Script" 2014-09-20 15:07:42 -04:00
en-unlocking-p2sh-output.dot Use Terms "Pubkey Script" And "Signature Script" 2014-09-20 15:07:42 -04:00
en-unlocking-p2sh-output.png Use Terms "Pubkey Script" And "Signature Script" 2014-09-20 15:07:42 -04:00
en-unlocking-p2sh-output.svg Use Terms "Pubkey Script" And "Signature Script" 2014-09-20 15:07:42 -04:00
en-wallets-distributing-only.dot Add Subsection About Wallet Programs, Incl. Hardware Wallets 2014-06-07 19:27:49 -04:00
en-wallets-distributing-only.png Add Subsection About Wallet Programs, Incl. Hardware Wallets 2014-06-07 19:27:49 -04:00
en-wallets-distributing-only.svg Add Subsection About Wallet Programs, Incl. Hardware Wallets 2014-06-07 19:27:49 -04:00
en-wallets-full-service.dot Add Subsection About Wallet Programs, Incl. Hardware Wallets 2014-06-07 19:27:49 -04:00
en-wallets-full-service.png Add Subsection About Wallet Programs, Incl. Hardware Wallets 2014-06-07 19:27:49 -04:00
en-wallets-full-service.svg Add Subsection About Wallet Programs, Incl. Hardware Wallets 2014-06-07 19:27:49 -04:00
en-wallets-signing-only.dot Add Subsection About Wallet Programs, Incl. Hardware Wallets 2014-06-07 19:27:49 -04:00
en-wallets-signing-only.png Add Subsection About Wallet Programs, Incl. Hardware Wallets 2014-06-07 19:27:49 -04:00
en-wallets-signing-only.svg Add Subsection About Wallet Programs, Incl. Hardware Wallets 2014-06-07 19:27:49 -04:00
README Dev Docs: Document Blocks-First IBD & Orphan Blocks 2015-01-31 15:48:16 -05:00

## Files Ending In .dot, .neato, .circo

Many of the images are generated using dot from the graphviz package.  For
assistance with these files, feel free to contact dave@dtrt.org.

The following examples generate a .png or .svg file from a .dot file:

dot -T svg file.dot -o file.svg
dot -T png file.dot -o file.png

You can change a .circo or .neato file into a .png or .svg using
corresponding commands:

circo -T svg file.circo -o file.svg
neato -T png file.neato -o file.png

Notice: Graphviz can be inconsistent across versions. 
Up until commit ab415e8b6 (2014-12-17), all of the SVG and
PNG images here were generated using graphviz version 2.26.3
(20100126.1600) on Debian 7 using the following shell loop:

    fn="fontname=Sans"
    for f in *dot
    do 
        dot -N$fn -G$fn -E$fn -o ${f/.dot}.svg -T svg $f
        dot -N$fn -G$fn -E$fn -o ${f/.dot}.png -T png $f
        optipng -o7 ${f/.dot}.png
    done

Images created after commit ab415e8b6 used Debian Graphviz version
2.38.0-7.  This higher version is required to support the HTML bold and
italics tags used in some newer images, and we may come to use some of
its other extra features such as the sides="" parameter.

For improved compatability between Graphviz versions, files created or
updated after 6 May 2014 are recommend to include the following code
near the top of the file:

    edge [ fontname="Sans" ]
    node [ fontname="Sans" ]
    graph [ fontname="Sans" ]

Also, splines=ortho should not be used in new or updated files until
Graphviz fixes its post-2.26.3 ortho code.


## Files Ending In .gnuplot

Some images are generated using gnuplot.  As of this writing, you can
generate both the SVG and PNG output for any of these files by running
the following command:

    gnuplot <filename.gnuplot>

After generating, you should use optipng to reduce the PNG filesize.
(Reductions here tend to be small, ~10%):

    optipng -o7 <filename.png>

If your plot has a high sample rate, you can reduce the SVG filesize by
opening it in Inkscape, ungrouping the graphic, selecting plot lines,
and using Path->Simplify.  Then select all, regroup, and save.  Be sure
to double-check your work---if you simplify text, it becomes unreadable.
(Reductions here tend to be large, I've seen ~80%.)