Bitcoin Forum
May 21, 2024, 03:16:52 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: origin of tx_index in blockchain.info API  (Read 655 times)
schnuber (OP)
Member
**
Offline Offline

Activity: 96
Merit: 18


View Profile
May 10, 2016, 10:41:17 PM
Merited by ABCbits (2), hugeblack (2)
 #1

Hi everybody

I am toying a bit with the json API from blockchain.info. When looking at some transactions I note this tx_index which is always the same for outputs, and different for each input of one tx. It is clear that this references the utx.
But where does this tx_index come from I wonder? Is it inside the blockchain or is it some blockchain.info specific indexing sitting in their index database?

Sincerely
achow101
Staff
Legendary
*
Offline Offline

Activity: 3402
Merit: 6641


Just writing some code


View Profile WWW
May 11, 2016, 01:50:01 AM
Merited by ABCbits (1)
 #2

Hi everybody

I am toying a bit with the json API from blockchain.info. When looking at some transactions I note this tx_index which is always the same for outputs, and different for each input of one tx. It is clear that this references the utx.
But where does this tx_index come from I wonder? Is it inside the blockchain or is it some blockchain.info specific indexing sitting in their index database?

Sincerely
It is blockchain.info's internal tx database. It is not inside the blockchain itself.

schnuber (OP)
Member
**
Offline Offline

Activity: 96
Merit: 18


View Profile
May 11, 2016, 07:32:51 AM
 #3

Is this index the same in every UTX database on every full node? So can I retrieve the tx_index from blockchain.info and then query with this index on any other index database and get the same transaction?
piotr_n
Legendary
*
Offline Offline

Activity: 2053
Merit: 1354


aka tonikt


View Profile WWW
May 11, 2016, 10:42:44 AM
 #4

Is this index the same in every UTX database on every full node? So can I retrieve the tx_index from blockchain.info and then query with this index on any other index database and get the same transaction?
No. The common nodes use TxID as the index, then lookup for Vout inside the record.

Check out gocoin - my original project of full bitcoin node & cold wallet written in Go.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
gmaxwell
Staff
Legendary
*
Offline Offline

Activity: 4172
Merit: 8421



View Profile WWW
May 12, 2016, 01:33:28 PM
Merited by ABCbits (1), hugeblack (1), NotATether (1)
 #5

They've even previously reset the numbers for all transactions on their site. You shouldn't be using that information for anything.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!