blockchain-etl / bitcoin-etl

ETL scripts for Bitcoin, Litecoin, Dash, Zcash, Doge, Bitcoin Cash. Available in Google BigQuery https://goo.gl/oY5BCQ
https://twitter.com/BlockchainETL
MIT License
410 stars 123 forks source link

Nomenclature - transaction ids are being populated in hash field for transaction #32

Open aknirmal90 opened 5 years ago

aknirmal90 commented 5 years ago

https://github.com/blockchain-etl/bitcoin-etl/blob/master/bitcoinetl/mappers/transaction_mapper.py#L41

Maybe place a disclaimer because I just found out that the hash was actually representing transaction_id.

medvedev1088 commented 5 years ago

I think it's a good idea. Do you know if BlockSci's tx.hash also contains txid https://citp.github.io/BlockSci/reference/chain/tx.html?

aknirmal90 commented 5 years ago

Yes, BlockSci's tx.hash also references the txid and not the hash

Just verified that blocksci is also doing the same by reviewing a few segwit transactions on blocksci and my bitcoin node. The field they call hash is actually the txid field on the bitcoin-cli response.

aknirmal90 commented 5 years ago

Most blockchain explorers support lookups by txid but they call it hash. Seems like most implementations are referencing txid as hash.