gcarq / rusty-blockparser

Bitcoin Blockchain Parser written in Rust language
GNU General Public License v3.0
370 stars 145 forks source link

Question about csvdump #85

Closed AlvinLi20 closed 1 year ago

AlvinLi20 commented 1 year ago

Hi, I'm using this block parser for a school project, and I was wondering what indexPrevOut and indexOut mean. I would like to get transaction fees for each block, and the number of unique address by day from the data within the block so I'm not sure which columns to use

AlvinLi20 commented 1 year ago

i have figured out how to get miners revenue

gcarq commented 1 year ago

hashPrevOut and IndexPrevOut define the Outpoint that is going to be used as transaction input for the current transaction. Where hashPrevOut holds the txid and IndexPrevOut the index that references the specific output to spend. IndexOut is also an index that references this specific output in a transaction, which will be IndexPrevOut in the followup transaction when the unspent transaction is going to be spent.

As you probably already figured out, the first transaction in a block is the coinbase transaction which has no hashPrevOut and IndexPrevOut set as they are newly minted.

Hope this helps