Bitcoin Forum
November 18, 2024, 01:06:30 PM *
News: Check out the artwork 1Dq created to commemorate this forum's 15th anniversary
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How compute transaction fee?  (Read 930 times)
Frodek (OP)
Member
**
Offline Offline

Activity: 138
Merit: 25


View Profile
June 10, 2016, 03:52:51 PM
Merited by ABCbits (1)
 #1

We have sample transaction: https://blockchain.info/tx/fa67048a1d19de38779d9a784980f1fbbc2cffac51e9cf2eb5428cf50463e173
Output is 0.2867 BTC + 0.00057499 BTC = 0.28727499 BTC
Fee is difference between Total Input = 0.28747499 BTC and Total Output = 0.28727499 BTC.
How get value of Total Input?
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3542
Merit: 6886


Just writing some code


View Profile WWW
June 10, 2016, 04:16:20 PM
 #2

How get value of Total Input?
You get the values of the outputs that the inputs reference.

Frodek (OP)
Member
**
Offline Offline

Activity: 138
Merit: 25


View Profile
June 10, 2016, 05:06:35 PM
 #3

I must analyze whole blockchain and hundred of millions addresses?
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3542
Merit: 6886


Just writing some code


View Profile WWW
June 10, 2016, 05:14:57 PM
 #4

I must analyze whole blockchain and hundred of millions addresses?
No, just the output each input references. The inputs specify a transaction id and the output index that the input spends from.

marcuslong
Legendary
*
Offline Offline

Activity: 1036
Merit: 1002


View Profile
June 11, 2016, 08:38:27 AM
 #5

We have sample transaction: https://blockchain.info/tx/fa67048a1d19de38779d9a784980f1fbbc2cffac51e9cf2eb5428cf50463e173
Output is 0.2867 BTC + 0.00057499 BTC = 0.28727499 BTC
Fee is difference between Total Input = 0.28747499 BTC and Total Output = 0.28727499 BTC.
How get value of Total Input?

Nice question hmm i need to research it but i think they dont base it in the output in input because other transaction fees that i see is too much fees.
But i think its error in the blockchain i need to know to too so that when im using blockchain i know why it cost to much fee
piotr_n
Legendary
*
Offline Offline

Activity: 2055
Merit: 1359


aka tonikt


View Profile WWW
June 11, 2016, 09:59:33 AM
Merited by ABCbits (1)
 #6

I must analyze whole blockchain and hundred of millions addresses?
kind of. you must keep a list of all "unspent outputs" - it's usually called UTXO database.

alternatively you can download the raw translations (that the input refers to) from one of the block explorers.
it's actually secured - you just need to verify the downloaded transaction against the ID that is being spent.

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
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!