Bitcoin block
Bitcoin block
block header
transactions
Block version information, based upon the software version creating this block
The hash value of the previous block this particular block references. Please not that this hash is not reversed (as opposed to Block.hash)
The reference to a Merkle tree collection which is a hash of all transactions related to this block
A timestamp recording when this block was created (Will overflow in 2106[2])
The calculated difficulty target being used for this block
The nonce used to generate this block… to allow variations of the header and compute different hashes
Block version information, based upon the software version creating this block
The hash value of the previous block this particular block references
The reference to a Merkle tree collection which is a hash of all transactions related to this block
A timestamp recording when this block was created (Limited to 2106!)
The calculated difficulty target being used for this block
The nonce used to generate this block… to allow variations of the header and compute different hashes
Number of transactions in the block (including unmatched ones)
hashes in depth-first order (including standard varint size prefix)
flag bits, packed per 8 in a byte, least significant bit first (including standard varint size prefix)
Bitcoin message exchanged by nodes over the network
Bitcoin message exchanged by nodes over the network
Magic value indicating message origin network, and used to seek to next message when stream state is unknown
ASCII string identifying the packet content, NULL padded (non-NULL padding results in packet rejected)
The actual data
an out point is a reference to a specific output in a specific transaction that we want to claim
an out point is a reference to a specific output in a specific transaction that we want to claim
reversed sha256(sha256(tx)) where tx is the transaction we want to refer to
index of the output in tx that we want to refer to
data for signing pay2pk transaction
data for signing pay2pk transaction
previous output public key script
private key associated with the previous output public key
Transaction
Transaction
Transaction data format version
Transaction inputs
Transaction outputs
The block number or timestamp at which this transaction is locked
Transaction input
Transaction input
Previous output transaction reference
Signature script which should match the public key script of the output that we want to spend
Transaction version as defined by the sender. Intended for "replacement" of transactions when information is updated before inclusion into a block. Repurposed for OP_CSV (see BIPs 68 & 112)
Transaction output
Transaction output
amount in Satoshis
public key script which sets the conditions for spending this output
Identifies protocol version being used by the node
bitfield of features to be enabled for this connection
standard UNIX timestamp in seconds
The network address of the node receiving this message
The network address of the node emitting this message
Node random nonce, randomly generated every time a version packet is sent. This nonce is used to detect connections to self.
User Agent
The last block received by the emitting node
Whether the remote peer should announce relayed transactions or not, see BIP 0037, since version >= 70001
https://en.bitcoin.it/wiki/Base58Check_encoding Base58Check is a format based on Base58 and used a lot in bitcoin, for encoding addresses and private keys for example.
https://en.bitcoin.it/wiki/Base58Check_encoding Base58Check is a format based on Base58 and used a lot in bitcoin, for encoding addresses and private keys for example. It includes a prefix (usually a single byte) and a checksum so you know what has been encoded, and that it has been transmitted correctly. For example, to create an address for a public key you could write:
val pub: BinaryData = "0202a406624211f2abbdc68da3df929f938c3399dd79fac1b51b0e4ad1d26a47aa" val address = Base58Check.encode(Base58.Prefix.PubkeyAddress, Crypto.hash160(pub))
And to decode a private key you could write:
// check that is it a mainnet private key val (Base58.Prefix.SecretKey, priv) = Base58Check.decode("5J3mBbAH58CpQ3Y5RNJpUKPE62SQ5tfcvU2JpbnkeyhfsYB1Jcn")
see https://en.bitcoin.it/wiki/Protocol_specification
See https://github.com/bitcoincashorg/bitcoincash.org/blob/master/spec/cashaddr.md
see https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki
Lexicographical Ordering of Transaction Inputs and Outputs see https://github.com/bitcoin/bips/blob/master/bip-0069.mediawiki
see https://en.bitcoin.it/wiki/Protocol_specification#Merkle_Trees
see https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki
see https://github.com/bitcoin/bips/blob/master/bip-0070.mediawiki
signature hash flags
script execution flags
compact size encoded integer as used to encode proof-of-work difficulty target
a (result, isNegative, overflow) tuple were result is the decoded integer
input value
the compact encoding of the input value. this is used to encode proof-of-work target into the bits
block header field
see https://en.bitcoin.it/wiki/Protocol_specification