Bitcoin Block Data
Inherent Raw Data Fields and Derived or Indexer-Generated Fields
Inherent Block Data (prefix "IB")
IB1
magic
Network identifier
4 bytes
IB2
blockSize
Size of the block
4 bytes
IB3
version
Block version number
4 bytes
IB4
hashPrevBlock
Hash of the previous block
32 bytes
IB5
hashMerkleRoot
Root of the Merkle tree of transactions
32 bytes
IB6
time
Block creation time
4 bytes
IB7
bits
Compact representation of the target difficulty
4 bytes
IB8
nonce
Value used in the mining process
4 bytes
IB9
vtx
Vector of transactions in the block
Variable
Derived Block Data (prefix "DB")
DB1
hash
Double SHA256 hash of the block header
32 bytes (hex string)
DB2
height
Block height in the blockchain
Integer
DB3
strippedsize
Block size without witness data
Integer
DB4
weight
Block weight (for SegWit)
Integer
DB5
versionHex
Hexadecimal representation of block version
Hex string
DB6
mediantime
Median time of past several blocks
Timestamp
DB7
difficulty
Current mining difficulty
Float
DB8
chainwork
Total work done to produce the chain up to this block
Hex string
Inherent Transaction Data (prefix "IT")
IT1
version
Transaction version number
4 bytes
IT2
vin
Vector of input information
Variable
IT2.1
txid
Hash of the transaction containing the UTXO being spent
32 bytes
IT2.2
vout
The index of the specific output in the previous transaction
4 bytes
IT2.3
scriptSig
Unlocking script
Variable
IT2.3.1
scriptSig.length
Length of the unlocking script
Variable (1-9 bytes)
IT2.3.2
scriptSig.asm
The assembly code of the unlocking script
Variable
IT2.4
nSequence
Input sequence number
4 bytes
IT3
vout
Vector of output information
Variable
IT3.1
value
Amount of satoshis to send
8 bytes
IT3.2
scriptPubKey
Locking script
Variable
IT3.2.1
scriptPubKey.length
Length of the locking script
Variable (1-9 bytes)
IT3.2.2
scriptPubKey.asm
The assembly code of the locking script
Variable
IT4
nLockTime
Transaction-level timelock
4 bytes
IT5
vwitness
Vector of witness data (one for each input)
Variable
Derived Transaction Data (prefix "DT")
DT1
txid
Transaction ID (hash without witness data)
32 bytes (hex string)
DT2
hash
Transaction hash (with witness data for SegWit)
32 bytes (hex string)
DT3
size
Total transaction size
Integer
DT4
vsize
Virtual transaction size
Integer
DT5
weight
Transaction weight (for SegWit)
Integer
DT6
fee
Transaction fee in BTC
Float
DT7
is_coinbase
Whether the transaction is a coinbase transaction
Boolean
DT8
has_witness
Whether the transaction uses SegWit
Boolean
Bitcoin Addresses
An ID to reference bitcoin addresses within specific block height transactions is also supported. Bitcoin addresses themselves are not stored onchain but are derived from transaction data (scriptPubKey
). Patterns can still be defined and use addresses as the block data target. This is aligned with current support for other derived block data in addition to inherent raw block data.
This ID combines the ID for block height (DB2
) followed by ADDR
and this is followed by a height number, a transaction index number and optionally a transaction output index number. These are all separated by colons.
DB2:ADDR:<HEIGHT#>:<TXINDEX#>:<OUTPUTINDEX#>
Patterns can target specific transactions and one level deeper to specific outputs in those transactions. If not output index is included, the pattern search uses all addresses in the transaction to find matches.
Last updated