Bitcoin.org/img/dev/en-nbits-quick-parse.svg
David A. Harding a8f8f750c8
Dev Docs: Describe Serialized Block Header And Block Format
* Replace current description of the block header with a better
description.

    * Describe the various version numbers.

    * Describe how the merkle root is constructed.

    * Describe how nBits is parsed and how to correctly create it to
      avoid negative values.

* Describe the serialized block format used to calculate max block size.
2014-11-07 22:50:27 -05:00

299 lines
14 KiB
XML

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.26.3 (20100126.1600)
-->
<!-- Title: _anonymous_0 Pages: 1 -->
<svg width="450pt" height="138pt"
viewBox="0.00 0.00 450.00 138.16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph1" class="graph" transform="scale(0.194049 0.194049) rotate(0) translate(4 708)">
<title>_anonymous_0</title>
<polygon fill="white" stroke="white" points="-4,5 -4,-708 2316,-708 2316,5 -4,5"/>
<text text-anchor="middle" x="1155.5" y="-160" font-family="Sans" font-size="60.00"> </text>
<text text-anchor="middle" x="1155.5" y="-90" font-family="Sans" font-size="60.00">Quickly Converting nBits 0x181bc330 Into The Target</text>
<text text-anchor="middle" x="1155.5" y="-20" font-family="Sans" font-size="60.00">Threshold 0x1bc330000000000000000000000000000000</text>
<g id="graph2" class="cluster"><title>cluster_n</title>
<polygon fill="none" stroke="black" stroke-width="0" points="8,-374 8,-484 2303,-484 2303,-374 8,-374"/>
</g>
<g id="graph3" class="cluster"><title>cluster_l</title>
<polygon fill="none" stroke="black" stroke-width="0" points="8,-492 8,-602 2303,-602 2303,-492 8,-492"/>
</g>
<g id="graph4" class="cluster"><title>cluster_s</title>
<polygon fill="none" stroke="black" stroke-width="0" points="8,-226 8,-336 1387,-336 1387,-226 8,-226"/>
</g>
<!-- byte_length -->
<g id="node1" class="node"><title>byte_length</title>
<text text-anchor="middle" x="1773" y="-638" font-family="Sans" font-size="60.00">Byte Length: 0x18 (Decimal 24)</text>
</g>
<!-- l19 -->
<g id="node46" class="node"><title>l19</title>
<text text-anchor="middle" x="1773" y="-528" font-family="Sans" font-size="60.00">19</text>
</g>
<!-- byte_length&#45;&gt;l19 -->
<!-- n24 -->
<g id="node3" class="node"><title>n24</title>
<polygon fill="none" stroke="black" stroke-width="1.75" points="2295,-476 2201,-476 2201,-382 2295,-382 2295,-476"/>
<text text-anchor="middle" x="2248" y="-410" font-family="Sans" font-size="60.00">0</text>
</g>
<!-- n23 -->
<g id="node4" class="node"><title>n23</title>
<polygon fill="none" stroke="black" stroke-width="1.75" points="2200,-476 2106,-476 2106,-382 2200,-382 2200,-476"/>
<text text-anchor="middle" x="2153" y="-410" font-family="Sans" font-size="60.00">0</text>
</g>
<!-- n22 -->
<g id="node5" class="node"><title>n22</title>
<polygon fill="none" stroke="black" stroke-width="1.75" points="2105,-476 2011,-476 2011,-382 2105,-382 2105,-476"/>
<text text-anchor="middle" x="2058" y="-410" font-family="Sans" font-size="60.00">0</text>
</g>
<!-- n21 -->
<g id="node6" class="node"><title>n21</title>
<polygon fill="none" stroke="black" stroke-width="1.75" points="2010,-476 1916,-476 1916,-382 2010,-382 2010,-476"/>
<text text-anchor="middle" x="1963" y="-410" font-family="Sans" font-size="60.00">0</text>
</g>
<!-- n20 -->
<g id="node7" class="node"><title>n20</title>
<polygon fill="none" stroke="black" stroke-width="1.75" points="1915,-476 1821,-476 1821,-382 1915,-382 1915,-476"/>
<text text-anchor="middle" x="1868" y="-410" font-family="Sans" font-size="60.00">0</text>
</g>
<!-- n19 -->
<g id="node8" class="node"><title>n19</title>
<polygon fill="none" stroke="black" stroke-width="1.75" points="1820,-476 1726,-476 1726,-382 1820,-382 1820,-476"/>
<text text-anchor="middle" x="1773" y="-410" font-family="Sans" font-size="60.00">0</text>
</g>
<!-- n18 -->
<g id="node9" class="node"><title>n18</title>
<polygon fill="none" stroke="black" stroke-width="1.75" points="1725,-476 1631,-476 1631,-382 1725,-382 1725,-476"/>
<text text-anchor="middle" x="1678" y="-410" font-family="Sans" font-size="60.00">0</text>
</g>
<!-- n17 -->
<g id="node10" class="node"><title>n17</title>
<polygon fill="none" stroke="black" stroke-width="1.75" points="1630,-476 1536,-476 1536,-382 1630,-382 1630,-476"/>
<text text-anchor="middle" x="1583" y="-410" font-family="Sans" font-size="60.00">0</text>
</g>
<!-- n16 -->
<g id="node11" class="node"><title>n16</title>
<polygon fill="none" stroke="black" stroke-width="1.75" points="1535,-476 1441,-476 1441,-382 1535,-382 1535,-476"/>
<text text-anchor="middle" x="1488" y="-410" font-family="Sans" font-size="60.00">0</text>
</g>
<!-- n15 -->
<g id="node12" class="node"><title>n15</title>
<polygon fill="none" stroke="black" stroke-width="1.75" points="1440,-476 1346,-476 1346,-382 1440,-382 1440,-476"/>
<text text-anchor="middle" x="1393" y="-410" font-family="Sans" font-size="60.00">0</text>
</g>
<!-- n14 -->
<g id="node13" class="node"><title>n14</title>
<polygon fill="none" stroke="black" stroke-width="1.75" points="1345,-476 1251,-476 1251,-382 1345,-382 1345,-476"/>
<text text-anchor="middle" x="1298" y="-410" font-family="Sans" font-size="60.00">0</text>
</g>
<!-- n13 -->
<g id="node14" class="node"><title>n13</title>
<polygon fill="none" stroke="black" stroke-width="1.75" points="1250,-476 1156,-476 1156,-382 1250,-382 1250,-476"/>
<text text-anchor="middle" x="1203" y="-410" font-family="Sans" font-size="60.00">0</text>
</g>
<!-- n12 -->
<g id="node15" class="node"><title>n12</title>
<polygon fill="none" stroke="black" stroke-width="1.75" points="1155,-476 1061,-476 1061,-382 1155,-382 1155,-476"/>
<text text-anchor="middle" x="1108" y="-410" font-family="Sans" font-size="60.00">0</text>
</g>
<!-- n11 -->
<g id="node16" class="node"><title>n11</title>
<polygon fill="none" stroke="black" stroke-width="1.75" points="1060,-476 966,-476 966,-382 1060,-382 1060,-476"/>
<text text-anchor="middle" x="1013" y="-410" font-family="Sans" font-size="60.00">0</text>
</g>
<!-- n10 -->
<g id="node17" class="node"><title>n10</title>
<polygon fill="none" stroke="black" stroke-width="1.75" points="965,-476 871,-476 871,-382 965,-382 965,-476"/>
<text text-anchor="middle" x="918" y="-410" font-family="Sans" font-size="60.00">0</text>
</g>
<!-- n9 -->
<g id="node18" class="node"><title>n9</title>
<polygon fill="none" stroke="black" stroke-width="1.75" points="870,-476 776,-476 776,-382 870,-382 870,-476"/>
<text text-anchor="middle" x="823" y="-410" font-family="Sans" font-size="60.00">0</text>
</g>
<!-- n8 -->
<g id="node19" class="node"><title>n8</title>
<polygon fill="none" stroke="black" stroke-width="1.75" points="775,-476 681,-476 681,-382 775,-382 775,-476"/>
<text text-anchor="middle" x="728" y="-410" font-family="Sans" font-size="60.00">0</text>
</g>
<!-- n7 -->
<g id="node20" class="node"><title>n7</title>
<polygon fill="none" stroke="black" stroke-width="1.75" points="680,-476 586,-476 586,-382 680,-382 680,-476"/>
<text text-anchor="middle" x="633" y="-410" font-family="Sans" font-size="60.00">0</text>
</g>
<!-- n6 -->
<g id="node21" class="node"><title>n6</title>
<polygon fill="none" stroke="black" stroke-width="1.75" points="585,-476 491,-476 491,-382 585,-382 585,-476"/>
<text text-anchor="middle" x="538" y="-410" font-family="Sans" font-size="60.00">0</text>
</g>
<!-- n5 -->
<g id="node22" class="node"><title>n5</title>
<polygon fill="none" stroke="black" stroke-width="1.75" points="490,-476 396,-476 396,-382 490,-382 490,-476"/>
<text text-anchor="middle" x="443" y="-410" font-family="Sans" font-size="60.00">0</text>
</g>
<!-- n4 -->
<g id="node23" class="node"><title>n4</title>
<polygon fill="none" stroke="black" stroke-width="1.75" points="395,-476 301,-476 301,-382 395,-382 395,-476"/>
<text text-anchor="middle" x="348" y="-410" font-family="Sans" font-size="60.00">0</text>
</g>
<!-- n1 -->
<g id="node24" class="node"><title>n1</title>
<polygon fill="none" stroke="black" stroke-width="1.75" points="110,-476 16,-476 16,-382 110,-382 110,-476"/>
</g>
<!-- s1 -->
<g id="node80" class="node"><title>s1</title>
<text text-anchor="middle" x="63" y="-262" font-family="Sans" font-size="60.00">1b</text>
</g>
<!-- n1&#45;&gt;s1 -->
<g id="edge53" class="edge"><title>n1&#45;&gt;s1</title>
<path fill="none" stroke="black" stroke-width="1.75" d="M63,-351.47C63,-343.48 63,-335.546 63,-328.04"/>
<polygon fill="black" stroke="black" points="52.5001,-351.765 63,-381.765 73.5001,-351.765 52.5001,-351.765"/>
</g>
<!-- n2 -->
<g id="node25" class="node"><title>n2</title>
<polygon fill="none" stroke="black" stroke-width="1.75" points="205,-476 111,-476 111,-382 205,-382 205,-476"/>
</g>
<!-- s2 -->
<g id="node79" class="node"><title>s2</title>
<text text-anchor="middle" x="158" y="-262" font-family="Sans" font-size="60.00">c3</text>
</g>
<!-- n2&#45;&gt;s2 -->
<g id="edge55" class="edge"><title>n2&#45;&gt;s2</title>
<path fill="none" stroke="black" stroke-width="1.75" d="M158,-351.47C158,-343.48 158,-335.546 158,-328.04"/>
<polygon fill="black" stroke="black" points="147.5,-351.765 158,-381.765 168.5,-351.765 147.5,-351.765"/>
</g>
<!-- n3 -->
<g id="node26" class="node"><title>n3</title>
<polygon fill="none" stroke="black" stroke-width="1.75" points="300,-476 206,-476 206,-382 300,-382 300,-476"/>
</g>
<!-- s3 -->
<g id="node78" class="node"><title>s3</title>
<text text-anchor="middle" x="253" y="-262" font-family="Sans" font-size="60.00">30</text>
</g>
<!-- n3&#45;&gt;s3 -->
<g id="edge57" class="edge"><title>n3&#45;&gt;s3</title>
<path fill="none" stroke="black" stroke-width="1.75" d="M253,-351.47C253,-343.48 253,-335.546 253,-328.04"/>
<polygon fill="black" stroke="black" points="242.5,-351.765 253,-381.765 263.5,-351.765 242.5,-351.765"/>
</g>
<!-- l1 -->
<g id="node28" class="node"><title>l1</title>
<text text-anchor="middle" x="63" y="-528" font-family="Sans" font-size="60.00">1</text>
</g>
<!-- l1&#45;&gt;n1 -->
<!-- l2 -->
<g id="node29" class="node"><title>l2</title>
<text text-anchor="middle" x="158" y="-528" font-family="Sans" font-size="60.00">2</text>
</g>
<!-- l2&#45;&gt;n2 -->
<!-- l3 -->
<g id="node30" class="node"><title>l3</title>
<text text-anchor="middle" x="253" y="-528" font-family="Sans" font-size="60.00">3</text>
</g>
<!-- l3&#45;&gt;n3 -->
<!-- l4 -->
<g id="node31" class="node"><title>l4</title>
<text text-anchor="middle" x="348" y="-528" font-family="Sans" font-size="60.00">4</text>
</g>
<!-- l4&#45;&gt;n4 -->
<!-- l5 -->
<g id="node32" class="node"><title>l5</title>
<text text-anchor="middle" x="443" y="-528" font-family="Sans" font-size="60.00">5</text>
</g>
<!-- l5&#45;&gt;n5 -->
<!-- l6 -->
<g id="node33" class="node"><title>l6</title>
<text text-anchor="middle" x="538" y="-528" font-family="Sans" font-size="60.00">6</text>
</g>
<!-- l6&#45;&gt;n6 -->
<!-- l7 -->
<g id="node34" class="node"><title>l7</title>
<text text-anchor="middle" x="633" y="-528" font-family="Sans" font-size="60.00">7</text>
</g>
<!-- l7&#45;&gt;n7 -->
<!-- l8 -->
<g id="node35" class="node"><title>l8</title>
<text text-anchor="middle" x="728" y="-528" font-family="Sans" font-size="60.00">8</text>
</g>
<!-- l8&#45;&gt;n8 -->
<!-- l9 -->
<g id="node36" class="node"><title>l9</title>
<text text-anchor="middle" x="823" y="-528" font-family="Sans" font-size="60.00">9</text>
</g>
<!-- l9&#45;&gt;n9 -->
<!-- l10 -->
<g id="node37" class="node"><title>l10</title>
<text text-anchor="middle" x="918" y="-528" font-family="Sans" font-size="60.00">10</text>
</g>
<!-- l10&#45;&gt;n10 -->
<!-- l11 -->
<g id="node38" class="node"><title>l11</title>
<text text-anchor="middle" x="1013" y="-528" font-family="Sans" font-size="60.00">11</text>
</g>
<!-- l11&#45;&gt;n11 -->
<!-- l12 -->
<g id="node39" class="node"><title>l12</title>
<text text-anchor="middle" x="1108" y="-528" font-family="Sans" font-size="60.00">12</text>
</g>
<!-- l12&#45;&gt;n12 -->
<!-- l13 -->
<g id="node40" class="node"><title>l13</title>
<text text-anchor="middle" x="1203" y="-528" font-family="Sans" font-size="60.00">13</text>
</g>
<!-- l13&#45;&gt;n13 -->
<!-- l14 -->
<g id="node41" class="node"><title>l14</title>
<text text-anchor="middle" x="1298" y="-528" font-family="Sans" font-size="60.00">14</text>
</g>
<!-- l14&#45;&gt;n14 -->
<!-- l15 -->
<g id="node42" class="node"><title>l15</title>
<text text-anchor="middle" x="1393" y="-528" font-family="Sans" font-size="60.00">15</text>
</g>
<!-- l15&#45;&gt;n15 -->
<!-- l16 -->
<g id="node43" class="node"><title>l16</title>
<text text-anchor="middle" x="1488" y="-528" font-family="Sans" font-size="60.00">16</text>
</g>
<!-- l16&#45;&gt;n16 -->
<!-- l17 -->
<g id="node44" class="node"><title>l17</title>
<text text-anchor="middle" x="1583" y="-528" font-family="Sans" font-size="60.00">17</text>
</g>
<!-- l17&#45;&gt;n17 -->
<!-- l18 -->
<g id="node45" class="node"><title>l18</title>
<text text-anchor="middle" x="1678" y="-528" font-family="Sans" font-size="60.00">18</text>
</g>
<!-- l18&#45;&gt;n18 -->
<!-- l19&#45;&gt;n19 -->
<!-- l20 -->
<g id="node47" class="node"><title>l20</title>
<text text-anchor="middle" x="1868" y="-528" font-family="Sans" font-size="60.00">20</text>
</g>
<!-- l20&#45;&gt;n20 -->
<!-- l21 -->
<g id="node48" class="node"><title>l21</title>
<text text-anchor="middle" x="1963" y="-528" font-family="Sans" font-size="60.00">21</text>
</g>
<!-- l21&#45;&gt;n21 -->
<!-- l22 -->
<g id="node49" class="node"><title>l22</title>
<text text-anchor="middle" x="2058" y="-528" font-family="Sans" font-size="60.00">22</text>
</g>
<!-- l22&#45;&gt;n22 -->
<!-- l23 -->
<g id="node50" class="node"><title>l23</title>
<text text-anchor="middle" x="2153" y="-528" font-family="Sans" font-size="60.00">23</text>
</g>
<!-- l23&#45;&gt;n23 -->
<!-- l24 -->
<g id="node51" class="node"><title>l24</title>
<text text-anchor="middle" x="2248" y="-528" font-family="Sans" font-size="60.00">24</text>
</g>
<!-- l24&#45;&gt;n24 -->
<!-- significand -->
<g id="node77" class="node"><title>significand</title>
<text text-anchor="middle" x="840" y="-262" font-family="Sans" font-size="60.00">Most Significant Bytes (Significand)</text>
</g>
</g>
</svg>