Bitcoin Forum
June 17, 2024, 02:46:32 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: About Bitcoin Fee  (Read 1401 times)
Star.Wars (OP)
Member
**
Offline Offline

Activity: 72
Merit: 10


View Profile
January 07, 2017, 04:52:08 PM
 #1

How much should the fee be? Do we have to pay the fee in one address to another bitcoin address?
OmegaStarScream
Staff
Legendary
*
Offline Offline

Activity: 3514
Merit: 6162



View Profile
January 07, 2017, 04:55:54 PM
 #2

How much should the fee be? Do we have to pay the fee in one address to another bitcoin address?

You should pay the fees while sending BTC from an address to another and nothing else as for how much then I suggest taking a look at : https://bitcoinfees.21.co/ It contains pretty much everything in details.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Lauda
Legendary
*
Offline Offline

Activity: 2674
Merit: 2965


Terminated.


View Profile WWW
January 07, 2017, 05:03:51 PM
Last edit: January 07, 2017, 05:14:06 PM by Lauda
 #3

In the past, you could also get zero-fee transactions to confirm. However, this is no longer the case today. The fee included will impact the time it takes for your TX to get included in a block (confirmed).

You should pay the fees while sending BTC from an address to another and nothing else as for how much then
I'll build upon your reply here. OP, this purely depends on the size of your transaction, not the amount being transferred! The usual contributing factors are the number of inputs and number of outputs that your transaction has.  A standard TX has 1 input and 2 outputs (the address that you're sending to and the change address). The formula for calculating the size is:
Quote
180bytes per input + 34 bytes per output + 10 bytes +- 'input'
For the standard TX (as mentioned above) this gives us 258 bytes +- 10 bytes.

I suggest taking a look at : https://bitcoinfees.21.co/ It contains pretty much everything in details.
Once you know the transaction size, you can use the information available here (although their estimate may be too high at times) to figure out what the recommended fee is. The TX that I've mentioned (~258bytes) would require a fee of ~25 800 satoshis.

If you tell us which wallet you are using, we may be able to give you even better advice.



Fees depends on what your wallet is.
False. It doesn't depend on your wallet. Proper wallet let's you choose the fee that you want, and the required fee is determined by the free market (i.e. number of unconfirmed TX and the fees that people are using).

Afaik the normal fee for transactions to get it to a priority is 90 satoshi/ byte like 25k satoshi fee shoul be enough for your confirmation to be confirmed fast if tere is no traffic in blockchain.
If there is 'no traffic in blockchain', then the fee would be much lower than that. You are aware that most Bitcoin blocks have been full for quite some time now? There is always traffic (number of unconfirmed TX is variable though).

You can put a custo fee on your transaction if your wallet allows it to but normally you will just have to choose between sending it with 10k sats - 15k sats - 25k sats to 30k sats as fees.
Fixed fees are a horrible idea. The fee rate in satoshis/byte is what matters.

This post was likely removed because it was horrible and misleading.

"The Times 03/Jan/2009 Chancellor on brink of second bailout for banks"
😼 Bitcoin Core (onion)
Star.Wars (OP)
Member
**
Offline Offline

Activity: 72
Merit: 10


View Profile
January 07, 2017, 05:59:45 PM
 #4

I use an electrum wallet. But I am a little confused and I do not understand much. Is there any definite explanation for this? So if I send you some money, what should I give as a miner fee?
Lauda
Legendary
*
Offline Offline

Activity: 2674
Merit: 2965


Terminated.


View Profile WWW
January 07, 2017, 06:03:36 PM
 #5

I use an electrum wallet.
Electrum has some pre-set fee values, but you can also set the fees manually by using 'set fees manually’. I wouldn't recommend this considering your knowledge.

But I am a little confused and I do not understand much. Is there any definite explanation for this? So if I send you some money, what should I give as a miner fee?
I have pretty much explained it to you. Re-read the first part of my response and let me know what part is actually unclear.

"The Times 03/Jan/2009 Chancellor on brink of second bailout for banks"
😼 Bitcoin Core (onion)
shorena
Copper Member
Legendary
*
Offline Offline

Activity: 1498
Merit: 1520


No I dont escrow anymore.


View Profile WWW
January 07, 2017, 06:43:35 PM
 #6

I use an electrum wallet. But I am a little confused and I do not understand much. Is there any definite explanation for this? So if I send you some money, what should I give as a miner fee?

If you have electrum open go to Tools -> Preferences and select the Fees tab. Make sure you have use dynamic fees checked. This will add a slider to the Send tab where you create transactions. If you want a quick confirmation (e.g. when you buy something) move it almost to the right so that it shows Within 2 blocks (or 5). In the next block is usually overly expensive in comparison and probably not worth it unless its some sort of emergency. If you have time (e.g. because you are just moving funds around between different wallets of yours and can wait a day or two) move it more to the left.

Dont change these settings until you are more fimilar with fees. Keep in mind that the estimates are not perfect and that you usually have to wait a little longer than estimated. A typical transaction will be ~250 bytes so you can just divide the fee you see by 4 and have a rough estimate what you will be paying in btc for the transaction. Note that this is not true if you receive funds from faucets, I have writte a lengthy explanation as to why here[1] if you want to know more.



[1] https://bitcointalk.org/index.php?topic=1044399.0

Im not really here, its just your imagination.
Star.Wars (OP)
Member
**
Offline Offline

Activity: 72
Merit: 10


View Profile
January 07, 2017, 06:45:14 PM
 #7

I use an electrum wallet.
Electrum has some pre-set fee values, but you can also set the fees manually by using 'set fees manually’. I wouldn't recommend this considering your knowledge.

But I am a little confused and I do not understand much. Is there any definite explanation for this? So if I send you some money, what should I give as a miner fee?
I have pretty much explained it to you. Re-read the first part of my response and let me know what part is actually unclear.


I still do not understand how the value is calculated.

Quote
180bytes per input + 34 bytes per output + 10 bytes +- 'input'
Where do these values come from.
Quote
For the standard TX (as mentioned above) this gives us 258 bytes +- 10 bytes.
But the sum is 224 bytes. (180 bytes + 34 bytes + 10 bytes = 224 bytes)
Quote
The TX that I've mentioned (~258bytes) would require a fee of ~25 800 satoshis.
So we have to send a fee 100 times the total byte value?

I do not have much technical knowledge. Could you just say a little more simple. And how much minimum bitcoin can I send?
shorena
Copper Member
Legendary
*
Offline Offline

Activity: 1498
Merit: 1520


No I dont escrow anymore.


View Profile WWW
January 07, 2017, 06:51:37 PM
 #8

-snip-
And how much minimum bitcoin can I send?

See my post above on how to configure electrum in a reasonable way currently without the need to understand why. Make sure you make yourself familiar with how fees work over time though. You are essentially buying space in a bitcoin block, which is currently limited to 1 MB. The more people use bitcoin the more expensive this space becomes unless there is a solution. There are several possible solutions in the works, but it seems difficult for everyone involved to agree on what is the best solution.

As in the minimum, there is a practical minimum and its called "dust". Never send less than 2730 Satoshi or 0.000 027 30 Bitcoin. Usually its not nice if you send someone 2740 satoshi either, so I personally wouldnt bother if its below 0.0001 BTC or 10k satoshi which is currently valued at ~8 centEUR or ~9centUSD.

Im not really here, its just your imagination.
Star.Wars (OP)
Member
**
Offline Offline

Activity: 72
Merit: 10


View Profile
January 07, 2017, 06:56:54 PM
 #9

I use an electrum wallet. But I am a little confused and I do not understand much. Is there any definite explanation for this? So if I send you some money, what should I give as a miner fee?

If you have electrum open go to Tools -> Preferences and select the Fees tab. Make sure you have use dynamic fees checked. This will add a slider to the Send tab where you create transactions. If you want a quick confirmation (e.g. when you buy something) move it almost to the right so that it shows Within 2 blocks (or 5). In the next block is usually overly expensive in comparison and probably not worth it unless its some sort of emergency. If you have time (e.g. because you are just moving funds around between different wallets of yours and can wait a day or two) move it more to the left.

Dont change these settings until you are more fimilar with fees. Keep in mind that the estimates are not perfect and that you usually have to wait a little longer than estimated. A typical transaction will be ~250 bytes so you can just divide the fee you see by 4 and have a rough estimate what you will be paying in btc for the transaction. Note that this is not true if you receive funds from faucets, I have writte a lengthy explanation as to why here[1] if you want to know more.



[1] https://bitcointalk.org/index.php?topic=1044399.0


When I bring the slider to the left in the fee portion of the Electrum wallet, it says "within 25 blocks". When I bring it to the far right, it says "In the next block". And each section has "BTC / kb" values.

What do these blocks mean?
achow101
Staff
Legendary
*
Offline Offline

Activity: 3430
Merit: 6705


Just writing some code


View Profile WWW
January 07, 2017, 07:01:10 PM
 #10

I still do not understand how the value is calculated.
The fee for the transaction is the size in bytes times the fee rate. The fee rate is usually expressed in satoshis per byte. So if you have a transaction that is 224 bytes and the fee rate is 100 satoshis per byte, then you pay 224 * 100 = 22400 satoshis. Convert that to BTC and you get 0.00022400 BTC as your transaction fee. The fee rate changes and is calculated by examining the fees of transactions included in the most recent blocks. Calculating the fee rate requires knowledge of statistics. Your wallet, if it has dynamic fees, takes care of that for you. There are also websites that do this too such as http://bitcoinfees.21.co/.

Where do these values come from.
These are standard values for inputs and outputs. The same input types are generally the same size and the same output types are generally the same size. The input and output types are generally standard input and output types so their size can be accurately predicted. There is then also the standard number of bytes of overhead in every single transaction.

And how much minimum bitcoin can I send?
The minimum bitcoin you can send is known as the dust limit. IIRC the current dust limit is 2730 satoshis, but it is also dynamic and node dependent. There is no consensus rule that specifies a minimum amount, but if you send below the dust limit your transaction may not reach the entire network and thus will take longer to confirm.

When I bring the slider to the left in the fee portion of the Electrum wallet, it says "within 25 blocks". When I bring it to the far right, it says "In the next block". And each section has "BTC / kb" values.

What do these blocks mean?
Blocks are Bitcoin blocks. These blocks contain transactions. Bitcoin miners create the blocks and choose what transactions to include in each block. They typically choose transactions to include in a block based on the fee rate of a transaction, which is the BTC/Kb value.

Lauda
Legendary
*
Offline Offline

Activity: 2674
Merit: 2965


Terminated.


View Profile WWW
January 07, 2017, 07:34:03 PM
 #11

Quote
180bytes per input + 34 bytes per output + 10 bytes +- 'input'
Where do these values come from.
This was explained by other posters, so I will ignore it.

Quote
For the standard TX (as mentioned above) this gives us 258 bytes +- 10 bytes.
But the sum is 224 bytes. (180 bytes + 34 bytes + 10 bytes = 224 bytes)
As I've mentioned in a standard transaction, you have 1 input (left side) and 2 outputs (right side of arrow): [Address that you're sending from] --> [Address that you're sending to] + [Change address]. Think of it as paying in a grocery store, where your bills (inputs) are bigger than your total. When you do that, the cashier usually gives you other bills as change (change address / amount). Something similar happens with Bitcoin, and I will provide an example.

Let's say you have 1.0 Bitcoin in your address and want to pay Alice 0.5 Bitcoin. You do the following:
You create a transaction which uses your own address as input (1.0 Bitcoin), specify that you want to send 0.5 Bitcoin to Alice's address (which is the output of the transactions). Now if we deduce a fee of 0.0001 BTC (arbitrarily chosen for this example), the remainder is 0.4999 (1 - 0.5 - 0.0001) BTC. This remainder has to go somewhere, right? It goes to an address that is either automatically chosen by your wallet or is specified by you. This address is called the change address.



"The Times 03/Jan/2009 Chancellor on brink of second bailout for banks"
😼 Bitcoin Core (onion)
Star.Wars (OP)
Member
**
Offline Offline

Activity: 72
Merit: 10


View Profile
January 10, 2017, 03:15:23 PM
 #12

I still do not understand how the value is calculated.
The fee for the transaction is the size in bytes times the fee rate. The fee rate is usually expressed in satoshis per byte. So if you have a transaction that is 224 bytes and the fee rate is 100 satoshis per byte, then you pay 224 * 100 = 22400 satoshis. Convert that to BTC and you get 0.00022400 BTC as your transaction fee. The fee rate changes and is calculated by examining the fees of transactions included in the most recent blocks. Calculating the fee rate requires knowledge of statistics. Your wallet, if it has dynamic fees, takes care of that for you. There are also websites that do this too such as http://bitcoinfees.21.co/.

Where do these values come from.
These are standard values for inputs and outputs. The same input types are generally the same size and the same output types are generally the same size. The input and output types are generally standard input and output types so their size can be accurately predicted. There is then also the standard number of bytes of overhead in every single transaction.

And how much minimum bitcoin can I send?
The minimum bitcoin you can send is known as the dust limit. IIRC the current dust limit is 2730 satoshis, but it is also dynamic and node dependent. There is no consensus rule that specifies a minimum amount, but if you send below the dust limit your transaction may not reach the entire network and thus will take longer to confirm.

When I bring the slider to the left in the fee portion of the Electrum wallet, it says "within 25 blocks". When I bring it to the far right, it says "In the next block". And each section has "BTC / kb" values.

What do these blocks mean?
Blocks are Bitcoin blocks. These blocks contain transactions. Bitcoin miners create the blocks and choose what transactions to include in each block. They typically choose transactions to include in a block based on the fee rate of a transaction, which is the BTC/Kb value.

---
What are the statistical methods used when calculating the transaction fee? Is there a document showing how the transaction fee is calculated? I want to examine it.
http://bitcoinfees.21.co does this site use statistical methods when calculating transaction fees?
---
Could you explain these blocks a little more?
As far as I know, miners receive 12.5 BTC awards per block. How do miners find the blocks?
---


Star.Wars (OP)
Member
**
Offline Offline

Activity: 72
Merit: 10


View Profile
January 10, 2017, 03:24:43 PM
 #13

Quote
180bytes per input + 34 bytes per output + 10 bytes +- 'input'
Where do these values come from.
This was explained by other posters, so I will ignore it.

Quote
For the standard TX (as mentioned above) this gives us 258 bytes +- 10 bytes.
But the sum is 224 bytes. (180 bytes + 34 bytes + 10 bytes = 224 bytes)
As I've mentioned in a standard transaction, you have 1 input (left side) and 2 outputs (right side of arrow): [Address that you're sending from] --> [Address that you're sending to] + [Change address]. Think of it as paying in a grocery store, where your bills (inputs) are bigger than your total. When you do that, the cashier usually gives you other bills as change (change address / amount). Something similar happens with Bitcoin, and I will provide an example.

Let's say you have 1.0 Bitcoin in your address and want to pay Alice 0.5 Bitcoin. You do the following:
You create a transaction which uses your own address as input (1.0 Bitcoin), specify that you want to send 0.5 Bitcoin to Alice's address (which is the output of the transactions). Now if we deduce a fee of 0.0001 BTC (arbitrarily chosen for this example), the remainder is 0.4999 (1 - 0.5 - 0.0001) BTC. This remainder has to go somewhere, right? It goes to an address that is either automatically chosen by your wallet or is specified by you. This address is called the change address.



I would like to learn about these input and output parameters. What input fields do these input parameters correspond to in my wallet?
My wallet fields has Pay to, Description, Amount, Fee sections. Is "180bytes per input" the sum of these input values in my wallet?
longbob72
Hero Member
*****
Offline Offline

Activity: 574
Merit: 503


V2h5IGFyZSB5b3UgcmVhZGluZyB0aGlzPw==


View Profile
January 10, 2017, 03:45:57 PM
Last edit: January 10, 2017, 03:59:32 PM by longbob72
 #14

Input is just the previous transaction output where you get the bitcoins from. So if you're sending 2 btc and they comes from 2 different transaction outputs of 1 btc each, that's 2 inputs.

Quote
What are the statistical methods used when calculating the transaction fee? Is there a document showing how the transaction fee is calculated? I want to examine it.
http://bitcoinfees.21.co does this site use statistical methods when calculating transaction fees?

The recommended fees are basically calculated by taking account of the number of unconfirmed transaction and their fees and the block size. I'd guess http://bitcoinfees.21.co uses such calculation.

                                                                       
    ▄▄███████▄▄                           ▄      ▄
   ██████████████▄                       ███    ███
  ███▀ ▄▄▄▄▄▄▄ ▀████                     ███    ███
  █████████████▄ ▀███                    ███    ███   █▄ ▄▄
   ▀████▄  ▄▄███  ▀███                   ███    ███  ▄████
   ▄███████████   ▄███                  ███    ███  ▀▀███▀▀
   ███           ▄███         ▄▄▄▄      ███    ███     █    ▄▄  ▄▄▄▄
  ▄███     ▄▄▄▄█████        ▄█████▄    ▄██▀   ▄██▀    ███   █████████
  ███▄    ████████         ▄███▀▀███   ███    ███    ███▀   █████▀████
   ███     ▀▀█████▄      ▄█████▄ ███   ███    ███    ███    ████   ███
   ███         ▀███▄     ███▀███ ███  ███▀   ███▀    ███    ███▀   ███
   ███           ███▄    ███  ▀▀ ███  ███    ███    ███▀   ▄███    ███
   ▀██▄           ███    ███▄  ▄███   ███    ███    ███    ███    ███▀
    ███           ▀███▄   ████████    ███    ███    ███    ███    ███
    ▀██            ▀████   ▀████▀      ██     ██    ▀██    ▀█▀    ▀█▀


.
.
.
        ▄▄▀                ▀▄▄
     ▄ ▀▀                    ▀▀ ▄
   ▄ ▀▀▀                      ▀▀▀ ▄
  ▄▀▀▀                          ▀▀▀▄
 ▀█▄▄                            ▄▄█▀
▄█  ▄                            ▄  █▄
▀█ █▀                            ▀█ █▀
█▄  ▄                            ▄  ▄█
▀█ █                              █ █▀
█▄   █                          █   ▄█
 ██▄█▀                          ▀█▄██
  ▀▀  ▄█                      █▄  ▀▀
  ▀██▄ ▀  █▄              ▄█  ▀ ▄██▀
    ▀▀▀   ██  █▄      ▄█  ██   ▀▀▀
     ▀███▄▄▀  ███    ███  ▀▄▄███▀
        ▀▀▀▀▄▄▄▄▀    ▀▄▄▄▄▀▀▀▀
          ▀▀█████▀▀▀▀█████▀▀
.
.
Free Bitcoins
Chat Lottery & Games
Level Up System with Rewards
▄████████▄  ▄████████▄
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
 ████████    ████████
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
▀████████▀  ▀████████▀
.
achow101
Staff
Legendary
*
Offline Offline

Activity: 3430
Merit: 6705


Just writing some code


View Profile WWW
January 10, 2017, 04:08:59 PM
 #15

What are the statistical methods used when calculating the transaction fee? Is there a document showing how the transaction fee is calculated? I want to examine it.
There are different methods that can be used to calculate the transaction fee. There is not just one method used.

The code and comments here: https://github.com/bitcoin/bitcoin/blob/f646275b90b1de93bc62b4c4d045d75ac0b96eee/src/policy/fees.cpp#L78 describe what Bitcoin Core does to estimate fees. However not all places will use the same methodology.

http://bitcoinfees.21.co does this site use statistical methods when calculating transaction fees?
Yes. What their actual algorithm is, I do not know.

Could you explain these blocks a little more?
As far as I know, miners receive 12.5 BTC awards per block. How do miners find the blocks?
I highly suggest that you do some research into how Bitcoin works. The developer documentation at bitcoin.org here: https://bitcoin.org/en/developer-documentation is a good place for this detailed information.

A block is a data structure that contains transactions. Miners select the transactions that they want to include in a block by examining their own mempool. Typically they choose the transactions with the highest fees. Then the miners hash all of the transactions together to create a merkle root, the hash of all of the transactions. Then they build an 80-byte block header as described here: https://bitcoin.org/en/developer-reference#block-headers. The block header has fields that can change such as the timestamp, the merkle root, and the nonce. What the miner then does is he hashes the block header and compares it to the current network target. The comparison is done by treating the hash and the target as large integers, not as strings. If the hash is less than the target, he sends the block to the network. If it is not, he changes one of the fields that can be changed (e.g. increments the nonce) and tries again. This is done until a hash that is less than the target is found.

The miner makes money because the very first transaction in the block (known as the coinbase transaction) contains no inputs and just outputs whose values add up to the block subsidy (currently 12.5 BTC) and all of the transaction fees paid by the transactions in his block.

I would like to learn about these input and output parameters. What input fields do these input parameters correspond to in my wallet?
My wallet fields has Pay to, Description, Amount, Fee sections. Is "180bytes per input" the sum of these input values in my wallet?
I highly suggest that you read the developer documentation I linked above. The raw transaction format is described here: https://bitcoin.org/en/developer-reference#raw-transaction-format

The transaction input contains nothing that you see in your wallet. It is actually a reference to the transaction output you are spending from (chosen by your wallet unless you do advanced stuff) and an input script. The transaction is valid when the scripts are validated and result in a non-zero stack or "True". This validation is done by appending the output script of the output you are spending from and the input script of your input. Then the script is evaluated command by command and once it is done, the stack is examined to check for non-zero or "True". If it is, it passes and the transaction is valid.

The input script of a transaction spending from '1...' addresses just contains a signature signing the hash of the spending transaction and the public key that maps to your address.

The 180 bytes thing is actually incorrect. The actual value is usually around 146 bytes because public keys are smaller now than before. This size is because the reference to the previous transaction is 36 bytes, and the script is ~106 bytes but can vary, and ~5 additional bytes of overhead (size parameter for script, and sequence number). 36+105+5=146 bytes.

When you spend Bitcoin, you spend from previous transaction outputs that become the inputs I just described. Each output becomes one input, they are not all aggregated together into one input. This means that if you spend from a lot of outputs (e.g. a lot of small outputs from faucet payouts) then you will end up having a lot of inputs and thus your transaction will increase in size.

Velkro
Legendary
*
Offline Offline

Activity: 2296
Merit: 1014



View Profile
January 10, 2017, 10:11:39 PM
 #16

How much should the fee be? Do we have to pay the fee in one address to another bitcoin address?
Fee is automatically collected by miners, which are using their computing power while confirming your transaction from one address to another.
Very accurate in few words Wink beat that.
matrix zion
Sr. Member
****
Offline Offline

Activity: 381
Merit: 251


View Profile
January 10, 2017, 10:35:34 PM
 #17

In the past, you could also get zero-fee transactions to confirm. However, this is no longer the case today. The fee included will impact the time it takes for your TX to get included in a block (confirmed).

-snip-

Hey, thanks Lauda.
I don't consider myself as a noob but I never understood the technical aspect of transaction fees. So thanks for the detailed explanation.
Velkro
Legendary
*
Offline Offline

Activity: 2296
Merit: 1014



View Profile
January 11, 2017, 12:21:17 AM
 #18


Hey, thanks Lauda.
I don't consider myself as a noob but I never understood the technical aspect of transaction fees. So thanks for the detailed explanation.
You are not the only one, dont worry.
I know about bitcoin quite much, im more technical person than average person out there.
I don't know how fees are calculated either Tongue. There is no way to calculate right fee on the fly in your head before sending any bitcoin.
Digitalbitcoin
Hero Member
*****
Offline Offline

Activity: 1554
Merit: 502



View Profile WWW
January 11, 2017, 03:25:19 PM
 #19

How much should the fee be? Do we have to pay the fee in one address to another bitcoin address?

Bitcoin is based on P2P network. Where every transaction held within network require certain fee to reward to miner who verify these transaction. If you own both address and wish to transfer bitcoins from one wallet to another then it will surely require transaction fees which will be rewarded to miner to verify this transaction within network.
Star.Wars (OP)
Member
**
Offline Offline

Activity: 72
Merit: 10


View Profile
January 16, 2017, 03:29:21 PM
 #20

What are the statistical methods used when calculating the transaction fee? Is there a document showing how the transaction fee is calculated? I want to examine it.
There are different methods that can be used to calculate the transaction fee. There is not just one method used.

The code and comments here: https://github.com/bitcoin/bitcoin/blob/f646275b90b1de93bc62b4c4d045d75ac0b96eee/src/policy/fees.cpp#L78 describe what Bitcoin Core does to estimate fees. However not all places will use the same methodology.

http://bitcoinfees.21.co does this site use statistical methods when calculating transaction fees?
Yes. What their actual algorithm is, I do not know.

Could you explain these blocks a little more?
As far as I know, miners receive 12.5 BTC awards per block. How do miners find the blocks?
I highly suggest that you do some research into how Bitcoin works. The developer documentation at bitcoin.org here: https://bitcoin.org/en/developer-documentation is a good place for this detailed information.

A block is a data structure that contains transactions. Miners select the transactions that they want to include in a block by examining their own mempool. Typically they choose the transactions with the highest fees. Then the miners hash all of the transactions together to create a merkle root, the hash of all of the transactions. Then they build an 80-byte block header as described here: https://bitcoin.org/en/developer-reference#block-headers. The block header has fields that can change such as the timestamp, the merkle root, and the nonce. What the miner then does is he hashes the block header and compares it to the current network target. The comparison is done by treating the hash and the target as large integers, not as strings. If the hash is less than the target, he sends the block to the network. If it is not, he changes one of the fields that can be changed (e.g. increments the nonce) and tries again. This is done until a hash that is less than the target is found.

The miner makes money because the very first transaction in the block (known as the coinbase transaction) contains no inputs and just outputs whose values add up to the block subsidy (currently 12.5 BTC) and all of the transaction fees paid by the transactions in his block.

I would like to learn about these input and output parameters. What input fields do these input parameters correspond to in my wallet?
My wallet fields has Pay to, Description, Amount, Fee sections. Is "180bytes per input" the sum of these input values in my wallet?
I highly suggest that you read the developer documentation I linked above. The raw transaction format is described here: https://bitcoin.org/en/developer-reference#raw-transaction-format

The transaction input contains nothing that you see in your wallet. It is actually a reference to the transaction output you are spending from (chosen by your wallet unless you do advanced stuff) and an input script. The transaction is valid when the scripts are validated and result in a non-zero stack or "True". This validation is done by appending the output script of the output you are spending from and the input script of your input. Then the script is evaluated command by command and once it is done, the stack is examined to check for non-zero or "True". If it is, it passes and the transaction is valid.

The input script of a transaction spending from '1...' addresses just contains a signature signing the hash of the spending transaction and the public key that maps to your address.

The 180 bytes thing is actually incorrect. The actual value is usually around 146 bytes because public keys are smaller now than before. This size is because the reference to the previous transaction is 36 bytes, and the script is ~106 bytes but can vary, and ~5 additional bytes of overhead (size parameter for script, and sequence number). 36+105+5=146 bytes.

When you spend Bitcoin, you spend from previous transaction outputs that become the inputs I just described. Each output becomes one input, they are not all aggregated together into one input. This means that if you spend from a lot of outputs (e.g. a lot of small outputs from faucet payouts) then you will end up having a lot of inputs and thus your transaction will increase in size.

Thanks for your explanatory message.
Pages: [1] 2 »  All
  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!