Bitcoin Forum
May 06, 2024, 09:10:53 PM *
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
1715029853
Hero Member
*
Offline Offline

Posts: 1715029853

View Profile Personal Message (Offline)

Ignore
1715029853
Reply with quote  #2

1715029853
Report to moderator
Each block is stacked on top of the previous one. Adding another block to the top makes all lower blocks more difficult to remove: there is more "weight" above each block. A transaction in a block 6 blocks deep (6 confirmations) will be very difficult to remove.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715029853
Hero Member
*
Offline Offline

Posts: 1715029853

View Profile Personal Message (Offline)

Ignore
1715029853
Reply with quote  #2

1715029853
Report to moderator
1715029853
Hero Member
*
Offline Offline

Posts: 1715029853

View Profile Personal Message (Offline)

Ignore
1715029853
Reply with quote  #2

1715029853
Report to moderator
achow101
Staff
Legendary
*
Offline Offline

Activity: 3388
Merit: 6587


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
*
Online Online

Activity: 4158
Merit: 8382



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!