dash-docs/img/dev/README
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

64 lines
2.2 KiB
Text

## 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%.)