Bitcoin Forum
May 25, 2024, 07:46:26 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Transactions, fees, confirmations  (Read 626 times)
errornone (OP)
Member
**
Offline Offline

Activity: 98
Merit: 10

error


View Profile
August 06, 2015, 04:52:17 PM
 #1

hello, after seeing this video, i got one question:


They do 2 transactions during the whole video:

1st: 10000 bits without fees

And then:

2nd: 5000 bits with 100bits fee (from the first 10000bits)


What if the second transaction (5000bits) is confirmed before the first one (10000bits) ??

Let's suppose:

5000bits gets 6 confirmations after an hour. And then the guy pays to another 2 merchants - 400bits and 1200bits. The first transaction is still with ZERO confirmations at this time.


What if the first transaction (10000bits) gets rejected at this time? Double spend or other reason....
What happens to the money received my merchants (400bits and 1200bits) and the 5000bits transaction? All nulled?


error
hexafraction
Sr. Member
****
Offline Offline

Activity: 392
Merit: 259

Tips welcomed: 1CF4GhXX1RhCaGzWztgE1YZZUcSpoqTbsJ


View Profile
August 06, 2015, 05:18:58 PM
 #2

The second will not be confirmed before the first one, since in that case the block it is in won't be validated as valid.

However, in a scenario called CPFP, the second (child) transaction fee will pay for the fee for the first (parent). Both will be mined and confirmed on the same block in that case.

I have recently become active again after a long period of inactivity. Cryptographic proof that my account has not been compromised is available.
errornone (OP)
Member
**
Offline Offline

Activity: 98
Merit: 10

error


View Profile
August 06, 2015, 05:19:59 PM
 #3

The second will not be confirmed before the first one, since in that case the block it is in won't be validated as valid.

However, in a scenario called CPFP, the second (child) transaction fee will pay for the fee for the first (parent). Both will be mined and confirmed on the same block in that case.


oh, thank you for that info.  Wink



So if i make 5 transactions (childs of each other) and only pay the fee in the last one, they will be mined as soon as if i payed fees in every transaction?

error
hexafraction
Sr. Member
****
Offline Offline

Activity: 392
Merit: 259

Tips welcomed: 1CF4GhXX1RhCaGzWztgE1YZZUcSpoqTbsJ


View Profile
August 06, 2015, 05:25:43 PM
 #4

No, that's not necessarily the case. I don't know the exact semantics but there might be more specific conditions for this to occur.

I have recently become active again after a long period of inactivity. Cryptographic proof that my account has not been compromised is available.
AgentofCoin
Legendary
*
Offline Offline

Activity: 1092
Merit: 1001



View Profile
August 06, 2015, 05:30:50 PM
Last edit: August 06, 2015, 07:21:06 PM by AgentofCoin
 #5

I wrote a big complex answer, but Hexafraction beat me to it.

BTW, most Miners do not currently use CPFP. Only Eligius does. That is my understanding and could be incorrect.
The OP should not send transactions as CPFP currently. That is an implementation that is not standard today.

I support a decentralized & unregulatable ledger first, with safe scaling over time.
Request a signed message if you are associating with anyone claiming to be me.
errornone (OP)
Member
**
Offline Offline

Activity: 98
Merit: 10

error


View Profile
August 06, 2015, 06:28:37 PM
 #6

so, miners must confirm older transactions first, with or without fees; Or they will be risking to mine blocks that are dependent of transactions in the pool (not confirmed yet), and invalidating that block they are working on. Is this right?

error
AgentofCoin
Legendary
*
Offline Offline

Activity: 1092
Merit: 1001



View Profile
August 06, 2015, 06:56:50 PM
Last edit: August 06, 2015, 07:17:04 PM by AgentofCoin
 #7

so, miners must confirm older transactions first, with or without fees; Or they will be risking to mine blocks that are dependent of transactions in the pool (not confirmed yet), and invalidating that block they are working on. Is this right?

Yes, if I understand you correctly.
One. Miners will confirm any "new" transaction (the "child") that already has a prior confirmed transaction (the confirmed "parent").
Two. If you place a reasonable miner fee in the "new" transaction, miners will place your "new" transaction in the next block, in theory.
That "new" transaction must have a "confirmed" prior transaction. The "child" can not come before the "parent".
Three. If the "parent" transaction is not confirmed (maybe there was no fee attached), the "child" will not be confirmed with or without a fee.
(As a side note: CPFP is a different story and you should not expect this to work for you ever, but might be different in the future.)

Your statement about a block being invalid is different. Do not worry about invalid blocks in relation to your original question.
Invalid blocks have to do more with the (1) miners racing to publish and thus "orphaning" or (2) miners accidentally(or intentionally) forking the blockchain.
If miners did accept unconfirmed "child" over unconfirmed "parent", I think, but not sure, all other nodes and etc will reject that block immediately.
That would be a violation of the Bitcoin protocol, I believe.

I hope this answers your question.

Edits: Spelling and additions.


I support a decentralized & unregulatable ledger first, with safe scaling over time.
Request a signed message if you are associating with anyone claiming to be me.
manselr
Legendary
*
Offline Offline

Activity: 868
Merit: 1004


View Profile
August 06, 2015, 09:01:39 PM
 #8

As far as I know you need to pay fee per transaction. Imo just don't gamble with this and overthink it, just always pay the default fee to guarantee nothing unexpected happens.
errornone (OP)
Member
**
Offline Offline

Activity: 98
Merit: 10

error


View Profile
August 06, 2015, 09:18:53 PM
 #9

Thank you

I always pay the fee; i use breadwallet and it pays a fee in every transaction. I cant remove the fee.

I am asking this just to learn a little bit more about bitcoin. Thank you for that answers. Really appreciate it.

error
manselr
Legendary
*
Offline Offline

Activity: 868
Merit: 1004


View Profile
August 06, 2015, 09:45:09 PM
 #10

Thank you

I always pay the fee; i use breadwallet and it pays a fee in every transaction. I cant remove the fee.

I am asking this just to learn a little bit more about bitcoin. Thank you for that answers. Really appreciate it.

No problem. I recommend making an offline paper wallet to store your main bitcoin stack there if you start making more money. It's not a good idea generally to carry any relevant amount of BTC with you on a smartphone (if im not mistaking bread wallet is an iPhone wallet) so I would move my funds on the offline paper wallet and put whatever im going to spend on the smartphone, thats what i do.
xhoneyael
Sr. Member
****
Offline Offline

Activity: 462
Merit: 250

www.AntiBitcoinTalk.com


View Profile WWW
August 07, 2015, 10:49:53 AM
 #11

Thank you

I always pay the fee; i use breadwallet and it pays a fee in every transaction. I cant remove the fee.

I am asking this just to learn a little bit more about bitcoin. Thank you for that answers. Really appreciate it.
i recommend use coins ph they dont charge transaction fee..
also xapo but i stop using xapo because of mobile confirmation sometimes delayed..
but sometimes web wallet take time to be add the btc to your wallet but you can send as normal..
use multiple wallet so if you experince some problem in one you have some alternative..


DarkHyudrA
Legendary
*
Offline Offline

Activity: 1386
Merit: 1000


English <-> Portuguese translations


View Profile
August 07, 2015, 10:56:19 AM
 #12

Thank you

I always pay the fee; i use breadwallet and it pays a fee in every transaction. I cant remove the fee.

I am asking this just to learn a little bit more about bitcoin. Thank you for that answers. Really appreciate it.

You may use Electrum, it's the most lightweight and simple to use wallet, and you set arbitrary the fees.

English <-> Brazilian Portuguese translations
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!