Bitcoin Forum
April 30, 2024, 01:48:31 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Will a failed transaction get included on the chain?  (Read 239 times)
pierxiu (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
April 13, 2018, 06:26:13 AM
 #1

In Ethereum, it is possible for a failed transaction to get on to the chain with a receipt status of failed. Does Bitcoin has similar implementation? Thank you.
If you see garbage posts (off-topic, trolling, spam, no point, etc.), use the "report to moderator" links. All reports are investigated, though you will rarely be contacted about your reports.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
nc50lc
Legendary
*
Offline Offline

Activity: 2394
Merit: 5568


Self-proclaimed Genius


View Profile
April 13, 2018, 07:10:38 AM
Last edit: April 13, 2018, 07:22:48 AM by nc50lc
 #2

In Bitcoin, an unconfirmed transaction's inputs will return to the original wallet if it stayed unconfirmed for a long time (failed).
Unless you/someone rebroadcast that transaction, it will stay in "limbo" for a while.

In other words, a failed transaction will "reset" like nothing happened.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Xynerise
Sr. Member
****
Offline Offline

Activity: 322
Merit: 363

39twH4PSYgDSzU7sLnRoDfthR6gWYrrPoD


View Profile
April 13, 2018, 07:42:45 AM
Last edit: April 13, 2018, 11:04:07 AM by Xynerise
Merited by suchmoon (2), ABCbits (2)
 #3

In Ethereum, it is possible for a failed transaction to get on to the chain with a receipt status of failed. Does Bitcoin has similar implementation? Thank you.
Ethereum is vastly different from bitcoin.
Ethereum poses itself as a decentralised computer, so the transactions are actually computations.
So the transaction fees (gas) are "pay as you go", you specify the amount of gas you want to pay for computation, if the transaction succeeds then your ETH is taken for transaction fees, and the rest is refunded to you. Even if it fails, you'll need to pay for the computations already undertaken.
Bitcoin is different; it's a currency, so a transaction state is atomic, it's either confirmed or not.
If it's confirmed, then it's on the blockchain, if it isn't confirmed, then it isn't on the blockchain.
There are no in-betweens.
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
April 13, 2018, 10:17:21 AM
Merited by DannyHamilton (2), ABCbits (1)
 #4

In Bitcoin, an unconfirmed transaction's inputs will return to the original wallet if it stayed unconfirmed for a long time (failed).

Theoretically it does not return, because 'the coins' never left the wallet.



Unless you/someone rebroadcast that transaction, it will stay in "limbo" for a while.

Nothing stays in 'limbo'. There is no 'limbo'.
The inputs of unconfirmed transactions did never 'leave' the wallet and can be used in another transaction.
The problem is just that quite a few nodes do not relay conflicting transactions.
But with the Replace-By-Fee tag, this can be 'bypassed'.

Miners can have conflicting transactions in their mempool. They just can't (or better: are not allowed to) include both of them into a block.
If they do, the block is considered as invalid from the whole network.


hugeblack
Legendary
*
Offline Offline

Activity: 2492
Merit: 3623


Buy/Sell crypto at BestChange


View Profile WWW
April 15, 2018, 08:50:07 AM
 #5

If you have one unconfirmed transaction you can use (Replace-By-Fee) tag to rebrodcast your transaction with a higher fee.

If you have many unconfirmed transactionrs you can use the following:
  • Make a list containing the unconfirmed addresses
  • Open Bitcoin Core ----> "-zapwallettxes".
  • Send all the listed transactions once with a higher fees.

you can calso use "Child Pays For Parent"

This is the general principle of CPFP, and it may not be entirely correct.

Step 1: Find the txid of your unconfirmed transaction
Step 2: Calculate the fee for the unconfirmed transaction with a fee of 0.0001 BTC/Kb
Step 3: Create a transaction that spends the unconfirmed transaction to another Bitcoin address. Include in its fee the recommended fee and the fee you calculated in step 2. (e.g. fee of 0.0001 BTC for both transactions means 0.0002 BTC fee in this new one)
Step 4: Sign the new transaction.
Step 5: Push the transaction to the network. It is recommended to use http://eligius.st/~wizkid057/newstats/pushtxn.php because the mining pool Eligius is one of the only pools to implement CPFP. This will push straight to them and the rest of the network.
Step 6: Wait for someone, probably Eligius, to mine a block and include both of your transactions. This could take a couple hours since Eligius has a small percentage of the hashrate of the network.

Congrats! You now have two confirmed transactions

If you follow the sticky topic in this section you will never get an unconfirmed transaction https://bitcointalk.org/index.php?topic=1802212.0

.BEST..CHANGE.███████████████
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
███████████████
..BUY/ SELL CRYPTO..
wilwxk
Sr. Member
****
Offline Offline

Activity: 476
Merit: 314


View Profile
April 15, 2018, 12:56:08 PM
Last edit: April 15, 2018, 05:23:11 PM by wilwxk
 #6

And if your transaction is valid but has a very low fee, the nodes can chose whats transactions they will keep, and if your transaction stays unconfirmed for a long time, the node can opt for "delete" the txid from their own mempool, but there still have a chance for other node (which kept your transaction), to broadcast again and get confirmed by some miner. - correct me if im wrong please.
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!