A raw Bitcoin transaction has the following top-level format:
Posted: Thu May 22, 2025 4:20 am
version (4 bytes, little-endian): Indicates the block version number, which signals the rules and features that the block adheres to.
previous_block_hash (32 bytes): The SHA256 hash of the header of the previous block in the chain. This is what cryptographically links blocks together.
merkle_root (32 bytes): A hash of all the transactions included in this block, organized into a Merkle tree. This allows for efficient verification that specific transactions are part of the block without needing to read all transactions.
timestamp (4 bytes, little-endian): The approximate time the block was mined, as a Unix timestamp.
nBits (4 bytes, little-endian): A compact representation of the current difficulty target that miners must achieve for their block hash.
nonce (4 bytes, little-endian): A albania phone number list random number that miners increment to find a block hash that meets the nBits difficulty target.
Transaction Counter (CompactSize integer): Indicates how many transactions are included in this block. This is a variable-length integer encoding.
Transactions (Variable size): The list of all validated transactions included in this block. The format of individual transactions is detailed below.
2. Transactions
Transactions are the core data units on the blockchain, representing the transfer of Bitcoin value. They are broadcast between peers in a serialized byte format, often represented in hexadecimal.
version (4 bytes, little-endian): The transaction version number.
previous_block_hash (32 bytes): The SHA256 hash of the header of the previous block in the chain. This is what cryptographically links blocks together.
merkle_root (32 bytes): A hash of all the transactions included in this block, organized into a Merkle tree. This allows for efficient verification that specific transactions are part of the block without needing to read all transactions.
timestamp (4 bytes, little-endian): The approximate time the block was mined, as a Unix timestamp.
nBits (4 bytes, little-endian): A compact representation of the current difficulty target that miners must achieve for their block hash.
nonce (4 bytes, little-endian): A albania phone number list random number that miners increment to find a block hash that meets the nBits difficulty target.
Transaction Counter (CompactSize integer): Indicates how many transactions are included in this block. This is a variable-length integer encoding.
Transactions (Variable size): The list of all validated transactions included in this block. The format of individual transactions is detailed below.
2. Transactions
Transactions are the core data units on the blockchain, representing the transfer of Bitcoin value. They are broadcast between peers in a serialized byte format, often represented in hexadecimal.
version (4 bytes, little-endian): The transaction version number.