Bitcoin Forum
June 26, 2024, 08:46:27 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Development & Technical Discussion / Re: Can RBF be used to replace a graph of transactions in the mempool? [SOLVED] on: May 25, 2024, 12:02:12 AM
I realyzed that I can change the layer 2 algo so that RBF is no longer required.
Thanks for informative help anyway.
2  Bitcoin / Development & Technical Discussion / Re: Can RBF be used to replace a graph of transactions in the mempool? on: May 24, 2024, 07:33:09 PM
I hoped that RBF would work as follows:

Assume I have the first graph consisting of the three transactions in the mempool as described earlier.
In order to replace them, I would broadcast an "inv" message containing the inventories of the 3 RBF transactions (the second graph). Upon reception of this inv message, a node would know, that these three transactions come as a package. So when the node sends me the getdata message where he request the three messages. I send back those three messages with three distinct "tx" messages (There is no "txs" message where you can send bulk transactions). Now when the node receives the first RBF tx message, he would not yet reject it, even though it does not pay more fees than the sum of all transactions removed from the mempool, but first it would also evaluate the next two messages. Only then it would decide whether to reject the three RBF txs or not and it would not, because each RBF tx pays one sat/B more that the txs that are replaced. Does that make sense? Is that not how it should, or maybe even is, implemented?
3  Bitcoin / Development & Technical Discussion / Re: Can RBF be used to replace a graph of transactions in the mempool? on: May 24, 2024, 06:34:21 PM
Quote
Quote
Because this is not about payments
But then, why do you want to do it on Bitcoin?

Because Bitcoin is the most secure and most widely adopted PoW network.

Quote
In that case, why do you need more than one unconfirmed transaction at all?
Because that is how the consensus algo of my layer 2 protocol works. Every token votes for a layer 2 block. The more tokens there are, the more voting power you have, it's similar to PoW. So a layer 2 miner may want the vote with only one token, but he may also chose to increase his voting power by doing several tokens. If his tokens get not included in the next Bitcoin block however, he loses the fee he paid for the tokens, in this case RBF would be good.
4  Bitcoin / Development & Technical Discussion / Re: Can RBF be used to replace a graph of transactions in the mempool? on: May 24, 2024, 11:01:15 AM
Would child-pays-for-parent be a solution? In other words, RBF the last transaction with enough fee to pay for its unconfirmed ancestors.

No it's not. Because this is not about payments, these graphs are used for some layer 2 protocol. Each tx in the graph contains one OP_Return output plus a change addess. It's a token. The change output is used by the subsequent tx to make a new token. However, the tokens are only usefull for the layer 2 protocol, if they are inserted in the latest block. If the miner does not include them in the block, they sort of expire from the perspective of layer 2. Therefore they have to be RBF ed.
5  Bitcoin / Development & Technical Discussion / Re: Can RBF be used to replace a graph of transactions in the mempool? on: May 24, 2024, 03:02:16 AM
Quote
According to BIP125, the fee paid for the replacement transaction must be higher than the total fee of the transactions that should be removed from the mempool after the replacement.
If you replace the first transactions with a new one, the second and third transactions will be removed from mempools too and the fee you pay for the new transaction must be higher than the total fee paid for the transactions.

If I understand correctly, this is poses a problem for me. What I want to do is to replace all three transactions.
Let's say my first graph looks like this

TX11 (9 sat/B) -> TX21 (9 sat/B) -> TX31 (9 sat/B)

Now I want this graph be replaced by this graph

TX12 (10 sat/B) -> TX22 (10 sat/B) -> TX32 (10 sat/B)

For the miner it would make sense to replace the first graph with the second one since it pays 10 sat/B instead of 9. However, if I understand you correctly, when I broadcast the first RBF transaction TX12, the miner does not yet know that I am up to also replace TX21 and TX31. So he wants me to pay a transaction fee of like 30 sat/B for TX12 which is not what I want, since I intend to replace TX21 and TX31 with TX22 and TX32 as well.
Is there a solution to my problem?
6  Bitcoin / Development & Technical Discussion / Can RBF be used to replace a graph of transactions in the mempool? [SOLVED] on: May 24, 2024, 12:06:41 AM
I have three transactions that build a graph, i.e. the output of the first transaction is the input of the second transaction and the output of the second transaction is the input of the third transaction. RBF is enabled. All three transactions are still unconfirmed in the mempool. Now I want to replace all three transactions by a new graph of three transactions that each pay one satoshi per byte more fee than the old ones. Is it possible to replace all three transactions this way, or is it necessary that the first transaction of the new graph pays more fee than all three transactions of the first graph combined?

I ask this, because I have manually tried this with the Broadcast raw transaction online tool of the Blockstream website. I generate the raw transactions with my own program.
I was successfull to send the first three transactions of the first graph with a fee of 9 sat/byte. Then I wanted to replace the graph, so I incremented the sequence by one and increased the fee to 10 sat/byte and spent the same input that was spent by the first graph. But when I wanted to broadcast the first transaction I got the message, that the replacing tx does not pay enough fee, it should pay more fee, and the number it suggested was so high that it seems to me it wanted that the transaction paid a higher fee than the whole graph it opted to replace.

Now, I wonder if it would work, if I sent the new graph with a client directly to the network, where I could announce all three transactions of the new graph at once by an "inv" message, instead of using the online broadcasting tool where I can only send one tx at once.

If it does not work to replace a graph as I described then I think that would be a bug.

Please enlighten me
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!