Bitcoin Forum
January 19, 2019, 03:23:17 AM *
News: Latest Bitcoin Core release: 0.17.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: totalReceived is inconsistent - help improve it  (Read 822 times)
mav
Full Member
***
Offline Offline

Activity: 169
Merit: 100


View Profile
March 20, 2014, 10:00:48 AM
 #1

I've been interfacing with a lot of third-party blockchain APIs lately, and have found an inconsistency regarding the 'total received' value.

It's easiest to give an example:

Here's a list for totalReceived for the address 173MjkFkm1iCYTkW7fBZj5EoPHb5JWhyYJ

Blockchain.info: 462477517
https://blockchain.info/q/getreceivedbyaddress/173MjkFkm1iCYTkW7fBZj5EoPHb5JWhyYJ

BlockExplorer: 8.35757472
https://blockexplorer.com/q/getreceivedbyaddress/173MjkFkm1iCYTkW7fBZj5EoPHb5JWhyYJ

blockr.io: 4.62477517
https://blockr.io/address/info/173MjkFkm1iCYTkW7fBZj5EoPHb5JWhyYJ

live.bitcore.io: 8.35757472
http://live.bitcore.io/address/173MjkFkm1iCYTkW7fBZj5EoPHb5JWhyYJ

biteasy.com: 4.62477517
https://www.biteasy.com/blockchain/addresses/173MjkFkm1iCYTkW7fBZj5EoPHb5JWhyYJ

Helloblock: 835757472
https://mainnet.helloblock.io/v1/addresses/173MjkFkm1iCYTkW7fBZj5EoPHb5JWhyYJ
Although this seems to have recently changed and is no longer reporting totalReceived

Another address with the same issue is 1RckWiDzbdNEfRuTG1zStNpCYRUWaLJkr (0.9795 vs 1.929), but there are many cases. Mycelium sends change back to the same address so pretty-much every Mycelium transaction will be subject to this issue.

The value reported depends whether amounts sent from the address to itself are counted as received amounts or not. Some services count it, some don't.

Neither approach is necessarily 'right' or 'wrong'. My personal opinion is that amounts sent from the address to itself should not be counted in totalReceived, and in this case 462477517 would be the better value.

It would be good to see some discussion around which option should be chosen, so that some kind of standard can be reached and we don't have two different values for what should be the same value. Maybe there's a need to be more explicit and have both values reported, although I have no idea what naming convention you'd use to differentiate them.

Please post suggestions about which direction you think is most appropriate to take on this issue. Once a clear and logical decision has been reached regarding which value is most appropriate, any blockchain data providers with the conflicting value can be contacted and asked to update. This way the value will hopefully end up consistent across all data sources.

Also if you know of other sources of blockchain data please post them and I will add it to this list.
1547868197
Hero Member
*
Offline Offline

Posts: 1547868197

View Profile Personal Message (Offline)

Ignore
1547868197
Reply with quote  #2

1547868197
Report to moderator
Satoshi is no god. He did not come down from the mountain with 10 golden rules engraved in stone for no one to question.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1001



View Profile
March 20, 2014, 04:26:37 PM
 #2

In my opinion, this topic belongs in Alternative Clients, not here.

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
mav
Full Member
***
Offline Offline

Activity: 169
Merit: 100


View Profile
March 27, 2014, 11:08:29 PM
 #3

This is being discussed in bitpay/insight-api

https://github.com/bitpay/insight-api/issues/31
Pages: [1]
  Print  
 
Jump to:  

Bitcointalk.org is not available or authorized for sale. Do not believe any fake listings.
Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!