Author

Topic: Need little help understanding about transactions. (Read 349 times)

legendary
Activity: 2380
Merit: 5213
Once a node verify your transaction, then it becomes permanent in the bitcoin ledger.
Once a node validates a transaction, the node puts the transaction in its mempool and broadcast it to other nodes. This doesn't mean the transaction will be definitely included in the blockchain.
The transaction will go to the blockchain and will be permanently there, after a miner includes it in a block.

Take note that even a transaction has been been validated by many nodes, there is no guarantee that it will be finally confirmed.
legendary
Activity: 1512
Merit: 4795
Leading Crypto Sports Betting & Casino Platform
First, you need to know that users don't pay for security
But it is worth knowing that the incentive received by the miners encourage them to keep on mining. The incentive consis of the block reward which is decreasing every after mined 210000 blocks, and gradually transaction fee is replacing it.

Nodes equally don't set the fees, basically what they do is they receive transaction when you broadcast it to the bitcoin network, they verify the transaction and relay it to other nodes (both mining node and full node) in their mempool and then mining nodes pick this your transaction and include it  to get verify.
A mining node may not contain the full blockchain or pruned, just like those miners that join mining pool. What is important is the node that has the full blockchain or pruned and has routing function. Solo miners, mining pool operators and other nodes with full blockchain or pruned would be what you are referring to.

Each nodes have its own mempool. Mempool consists of unconfirmed transactions.
sr. member
Activity: 490
Merit: 325
A Bitcoin transaction fee is what a user pays to miners to get their transaction included in the blockchain . transaction fee are the security for users and network transaction fee are set by nodes

First, you need to know that users don't pay for security and transaction fees are not set by the node.

Your transaction fees are can by set by your wallet custom depend on how they see congestion of the bitcoin network and you can equally customize it as you want. You can set your transaction to 1 sats/vbytes if you like even if the current network fee is asking for 20 sats/vbytes but the bad side of it is that you will have to wait for when the network become less congested before your transaction can go through. It may not right now, so don't set fees below the asking fees on the chain.

Nodes equally don't set the fees, basically what they do is they receive transaction when you broadcast it to the bitcoin network, they verify the transaction and relay it to other nodes (both mining node and full node) in their mempool and then mining nodes pick this your transaction and include it  to get verify. Once a node verify your transaction, then it becomes permanent in the bitcoin ledger.
full member
Activity: 532
Merit: 220
Also, where do these fees go?
I came across a thread that was asking the same question, and I think if I shared the link with you, you will know more because I enjoy showing people where I achieve my knowledge for them to understand and even achieve more than me because there is a proverb that says don’t give a child fish, but show him how to catch the fish, which is the same as sharing the source of information and knowledge so that you can understand more.

This is the like https://bitcointalksearch.org/topic/m.62780380
hero member
Activity: 812
Merit: 560
what i don't understand is how these fees are generated. Are they generated automatically or generated by the nodes? Also, where do these fees go?

Miners received those fee and generate them, but you can choose to modify your fee by choosing a lower rate that has higher transaction confirmation time, you can make use of the mempool to know this better, also when you're making your transactions sometimes on weekends when the mempool is less congested.

Secondly, is it possible two transactions to have the same transaction ID? Like a new transaction having same transaction ID with an UTXO.

No, this is not possible, two transactions cannot have the same transaction id, every transaction made is independently of each other and can be only track through its own transaction id.

hero member
Activity: 868
Merit: 952
Transaction fees are charged depending on the legacy address and the number of transactions at a single time.  When the transaction traffic is high, high fees are demanded and if someone wants to pay a low fee then his transaction is completed very late and often fails.
A little correction, a transaction is incurred rather than charged depending on the type of address you, legacy is also type of an (it is an address that start with the prefix 1), and also base on the number of inputs and output of that transaction. High fees are not demanded but rather advised to be used when there is congestion in the mempool.


Miners who mine Bitcoin receive these transcation fee

The proper statement will be mining nodes who get to mine a block gets the transaction fee of the transactions in that block plus the block reward fee

Only 1 TxID for two transactions or two TxIDs for one transaction are not possible.  You will receive a specific TXID for each of your transactions.  Which will never match another transaction

There is a possibility that a TXID can exist for two transactions but that will only happen when one of the transaction must have been spent earlier, it is just total impossible for two unspent transactions to have same TXID
sr. member
Activity: 616
Merit: 322
what i don't understand is how these fees are generated. Are they generated automatically or generated by the nodes?
Transaction fees are charged depending on the legacy address and the number of transactions at a single time.  When the transaction traffic is high, high fees are demanded and if someone wants to pay a low fee then his transaction is completed very late and often fails.

Quote
where do these fees go?
Miners who mine Bitcoin receive these transcation fee

Quote
Secondly, is it possible two transactions to have the same transaction ID?
Only 1 TxID for two transactions or two TxIDs for one transaction are not possible.  You will receive a specific TXID for each of your transactions.  Which will never match another transaction
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
Secondly, is it possible two transactions to have the same transaction ID? Like a new transaction having same transaction ID with an UTXO.
It is theoretically possible for two hash function inputs (pre-images) to share the same output (hash), even though the possibilities for such thing to happen are extremely slim; 1 in 2^256, to be precise. However, from a protocol point of view, it is impossible, because even if you found an SHA256 collision, it is protocol rule to reject that transaction: https://github.com/bitcoin/bitcoin/pull/915

What is worth to be said, is that while two transactions sharing the same TXID is impossible, it is possible for two transactions to spend the exact same inputs, create the exact same outputs and still have different TXIDs, because there can be more than one valid signatures. (Unless you use Segwit, which doesn't take into account the signature when hashing transaction data)
legendary
Activity: 1512
Merit: 4795
Leading Crypto Sports Betting & Casino Platform
Before a block is confirmed in a pool, it must have the following;
A block in a pool? What did you mean by that? That is not correct. Mempool consists of unconfirmed transactions.

2. Upon making a Bitcoin payment, you would be deducted or charged for your transaction which is called a nonce and it varies based on the volume of the payment you want to do.
The fee is called transaction fee, not also called gas fee. Nonce is important in creating new block.
legendary
Activity: 2380
Merit: 5213
It is not possible for two transactions to have one transaction ID or hash at the same time as the transaction is possibly being done in different pool or miners so would definitely give out different transaction hash.
The transaction hash isn't determined by miners or mining pools.
The transaction Hash (TXID) is obtained by hashing the transaction data through SHA256 function twice.


2. Upon making a Bitcoin payment, you would be deducted or charged for your transaction which is called a nonce
Nonce is something completely different.


and it varies based on the volume of the payment you want to do.
What do you mean by volume of the payment?
If you mean the amount of bitcoin, you are wrong. The transaction fee doesn't depend on the amount you send.
The transaction fee depends on the number of inputs and outputs, addresses type, how much you can wait for your transaction to be confirmed and how congested the network is.


The gas fees as earlier said said by a poster is Paid to miners who confirms the transaction for usage.
The gas is the term used for some altcoins like ethereum. There is no gas fee in bitcoin.
sr. member
Activity: 2520
Merit: 280
Hire Bitcointalk Camp. Manager @ r7promotions.com
I recently read about transaction fees in an effort to learn more about bitcoin and i am understanding it gradually. I now know that transaction fees are amounts paid by users who conduct transactions in order for those transactions to be added in a block, and that the fees are estimated based on the number of transactions waiting to be confirmed. However, what i don't understand is how these fees are generated. Are they generated automatically or generated by the nodes? Also, where do these fees go?

Secondly, is it possible two transactions to have the same transaction ID? Like a new transaction having same transaction ID with an UTXO.

Please correct me if my questions are wrong.

You get to set your fees for a transaction and the minimum fee can be 1sat/vbyte, and the estimation depends on the queue of unconfirmed transactions.

If you don't have any idea about how to choose the right fee depending on your requirements then use https://mempool.space/ to get an idea and the wallet also will give you an approx value but you always can decide your own fee as long as the fee changes feature is available on the wallet.

The transaction fees will go to the miners along with block rewards.

For example, the block 812457 mined by antpool miners



so miners will get 0.266BTC from fees + 6.25BTC from block reward then the total of these value will be distributed between the miners in that pool.
full member
Activity: 462
Merit: 117
I recently read about transaction fees in an effort to learn more about bitcoin and i am understanding it gradually. I now know that transaction fees are amounts paid by users who conduct transactions in order for those transactions to be added in a block, and that the fees are estimated based on the number of transactions waiting to be confirmed. However, what i don't understand is how these fees are generated. Are they generated automatically or generated by the nodes? Also, where d

Secondly, is it possible two transactions to have the same transaction ID? Like a new transaction having same transaction ID with an UTXO.

Please correct me if my questions are wrong.

It is not possible for two transactions to have one transaction ID or hash at the same time as the transaction is possibly being done in different pool or miners so would definitely give out different transaction hash.

Before a block is confirmed in a pool, it must have the following;

1. There must be exchange between two wallet addresses which involves one wallet sending and the other receiving.
2. Upon making a Bitcoin payment, you would be deducted or charged for your transaction which is called a nonce and it varies based on the volume of the payment you want to do.
The gas fees as earlier said said by a poster is Paid to miners who confirms the transaction for usage. You can read the article below to further understand how the process works. I believe it would further give you ideas on how it goes.

How Bitcoin transaction works
legendary
Activity: 2380
Merit: 5213
transaction fee are set by nodes
This is completely wrong.
The transaction fee is set the by the person who makes the transaction. To be more precise, the transaction fee is the the total value of inputs minus the total value of outputs and it's the sender who decides on how much is paid a transaction fee.

Miners usually prioritize transactions based on their fee rate and they are free to even include transactions not paying any fee.
Nodes don't determine the transaction fee and it's not that they force people to pay certain amount of fee for their transactions. The only rule we have is that nodes don't relay transactions paying less than 1 sat/vbyte. Even that rule isn't a consensus rule and as I said miners can even include transactions paying zero fee.  
newbie
Activity: 10
Merit: 0
A Bitcoin transaction fee is what a user pays to miners to get their transaction included in the blockchain . transaction fee are the security for users and network transaction fee are set by nodes
hero member
Activity: 1722
Merit: 801
I recently read about transaction fees in an effort to learn more about bitcoin and i am understanding it gradually. I now know that transaction fees are amounts paid by users who conduct transactions in order for those transactions to be added in a block, and that the fees are estimated based on the number of transactions waiting to be confirmed.
You pay fee, not estimated fee. Estimated fee is from fee estimators to give you like probably how long your transaction will get a first confirmation. What you pay is a real fee, not estimation.

Remember to use Replace-by-Fee to bump fee if the initial fee rate is not good but you need faster confirmation.

RBF (Replace By Fee) in Bitcoin Transactions.

Quote
However, what i don't understand is how these fees are generated.
Transaction fee is from transaction size and fee rate. The first one depends on a transaction input, output (the more, the bigger size), and address/ transaction type.

Quote
Also, where do these fees go?
Transaction fee (on chain) goes to miners who confirm your transaction.

If you make a withdrawal request on a centralized exchange, you will lose more expensive fee to that exchange because they over charge you and enjoy profit from it. They only use part of withdrawal fee to pay on chain transaction fee on behalf of you to Bitcoin miners.
legendary
Activity: 1512
Merit: 4795
Leading Crypto Sports Betting & Casino Platform
Legacy addresses starts from 1
Nested segwit starts from 3 (although not only nested segwit starts from 3)
Segwit version 0 starts from bc1q
Segwit version 1 starts from bc1p (pay-to-taproot)

This is the formula necessary for the calculation:

Formula:
For legacy address: vbyte= Input*148 + output*34 + 10 plus or minus input
For nested segwit: vbyte= Input*93 + output*32 + 10 plus or minus input
For segwit version 0: vbyte= Input*68 + output*31 + 10 plus or minus input
For pay-to-taproot: vbyte= Input*57.5 + output*43 + 10 plus or minus input


To know more about the input and output virtual size: https://bitcoinops.org/en/tools/calc-size/
To know more about the transaction virtual size: https://jlopp.github.io/bitcoin-transaction-size-calculator/
For mempool (beginners): https://mempool.space/
Mempool for advanced users: https://jochen-hoenicke.de/queue/#BTC%20(default%20mempool),24h,weight

For example:
If you use the vbyte calculator or that formula above for 1 input and 2 outputs for native segwit addresses, you will get 110 vbyte as the virtual size of 1 input 2 outputs transaction.

To check the fee rate, click on the above second to the last, or last link.

Assuming the fee rate is 5 sat/vbyte.

Fee rate = fee ÷ vbyte

Fee = fee rate * vbyte

Fee = 5 * 110

Fee = 550 sat (0.0000055 BTC). I mean for 1 input and 2 outputs for segwit version 0.


Which means the higher the fee rate, the higher the fee. As mempool is becoming more congested, the fee rate will increase and the fee will increase.

Also if you understand ehat I explained above, you will noticed that as the input count is increasing, the fee will also increase.

Also as the output count is increasing, the fee is also increasing. But if you send to two different addresses separately, the fee would be more. So we can still say increase in the output will make the fee to decrease, despite that the fee is increasing, but lower than sending to each addresses separately.

From the virtual sizes, you can also know that you can save more in fee if you use segwit version 0 and pay-to-taproot addresses while legacy addresses have the highest fee.

Also you will know that pay-to-taproot will be good for consolidation, while segwit version 0 for paying to many addresses.
hero member
Activity: 868
Merit: 952

Secondly, is it possible two transactions to have the same transaction ID? Like a new transaction having same transaction ID with an UTXO.


The other two questions have been answered. In clearer form no two Unspent transactions can have the same TXID, there was a case where two coinbase transaction (transaction for the reward for mining a block) had the same TXID.

These blocks are block 91722 and 91880 have same TXID, also block 91812 and 91842 having the same TXID this was said to be because they use same address to collect the reward. To correct this the BIP30 proposal was that no any transaction can have same identify with a previous spent transaction. Further more BIP34 required that the block height be included into the transaction data of each blocks coinbase transaction, and as the transaction on top it will help to distinguish it.
legendary
Activity: 2380
Merit: 5213
The fee rate is set by the one who makes the transaction and the total fee depends on the fee rate, number of inputs and outputs and addresses type.
Since miners prioritize transactions based on their fee rate, you should set the fee rate depending on how fast you want your transaction to be confirmed and how congested the network is.


However, what i don't understand is how these fees are generated. Are they generated automatically or generated by the nodes?
It's not that nodes force you to use a certain amount of fee. You can set the fee rate to any amount equal or higher than 1 sat/vbyte.


3. No, two transactions cannot have the same TXID.
A transaction can have the same ID as an existing transaction, if all the outputs created in the existing transaction have been spent.

Abbatty, it's very very unlikely that two transactions have the the same ID, but in theory that's possible.
There have been two cases in which two transactions had the same ID, but they happened before implementing BIP34 and it's almost impossible that the same thing happens again.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
how these fees are generated. Are they generated automatically or generated by the nodes?
Fees are created by Bitcoin users, or by their wallet. It's a free market to compete for space in a block. Miners want to earn money, and include the transactions that are most profitable for them. So transactions with high fee get prioritized.

See this topic for further reading.
legendary
Activity: 1512
Merit: 4795
Leading Crypto Sports Betting & Casino Platform
1. The fees are calculated based on the transaction size (number of inputs and outputs) as well as how congested the network is.
I know you know this, that it is not the size that the transactions are calculated unless it is legacy address. Transactions are calculated with the transaction virtual size (vsize) or virtual byte (vbyte), or in weight.
staff
Activity: 3500
Merit: 6152
1. The fees are calculated based on the transaction size (number of inputs and outputs) as well as how congested the network is.
2. The fees go to the miners.
3. No, two transactions cannot have the same TXID.
full member
Activity: 102
Merit: 21
I recently read about transaction fees in an effort to learn more about bitcoin and i am understanding it gradually. I now know that transaction fees are amounts paid by users who conduct transactions in order for those transactions to be added in a block, and that the fees are estimated based on the number of transactions waiting to be confirmed. However, what i don't understand is how these fees are generated. Are they generated automatically or generated by the nodes? Also, where do these fees go?

Secondly, is it possible two transactions to have the same transaction ID? Like a new transaction having same transaction ID with an UTXO.

Please correct me if my questions are wrong.
Jump to: