4 # of inputs Positive var-int 1∼9 List of inputs Variable # of outputs Positive var-int 1∼9 List of outputs Variable Lock time 4 — 2016-07-15 – p.29/47
Digest Double SHA-256 value 32 Merkle root Double SHA-256 value 32 Time Seconds (since 1970-01-01T00:00 UTC) 4 Target Compressed format 4 Nonce Appropriate value 4 Merkle root is the digest of all TXs — 2016-07-15 – p.37/47
supported since v0.7 of reference implementation (v0.9.4 as of Jan. 2015) Can use IPv4, IPv6 or Tor In reference implementation Max # of outbound connections : 8 Max # of all connections : 125 (by default) Only one outbound connection to an address group High 16bit in IPv4 High 32bit in IPv6 — 2016-07-15 – p.39/47
block # verack Acknowledges version addr (address) Sends list of IP address/port # getaddr Requests addr Data inv (inventory) Sends (new) blocks and/or txs transfer getblocks Requests inv for all blocks within range getdata Requests block/tx by the digest block Sends block replying to getdata tx (transaction) Sends tx replying to getdata Header getheaders Requests headers for all blocks within range transfer headers Sends block headers up to 2,000 Others alert Broadcasts alert ping Confirms connection pong Acknowledges ping — 2016-07-15 – p.40/47
Command Message name (ASCII string) 12 Payload length Size of payload in bytes 4 Checksum Double SHA-256 value of payload First 4 Payload Message data Variable All integers are encoded in Little Endian except IP address and port # We’ve just seen the payloads for block and tx messages — 2016-07-15 – p.41/47