Author

Topic: How to write raw taproot transaction and apply an RBF flag? (Read 117 times)

sr. member
Activity: 310
Merit: 727
---------> 1231006505
I was able to find my RBF answer here
https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/blob/master/05_2_Resending_a_Transaction_with_RBF.md

But do I need a sequence for each input? If I have 4 inputs, do I need 4 sequence fields?
This is described in BIP-125 (https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki):
  • Explicit signaling: A transaction is considered to have opted in to allowing replacement of itself if any of its inputs have an nSequence number less than (0xffffffff - 1).

So one sequence is enough.
newbie
Activity: 21
Merit: 11
I was able to find my RBF answer here
https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/blob/master/05_2_Resending_a_Transaction_with_RBF.md

But do I need a sequence for each input? If I have 4 inputs, do I need 4 sequence fields?
newbie
Activity: 21
Merit: 11
Thank you!
I ran the help for createrawtransaction and I see what you're saying about the sequence field. I also see it references locktime and replaceable fields. Replaceable seems like it would need to be set to True to turn on RBF, correct?

For the sequence number, it can be anything as long as it's lower than 4294967293? (and lol where does that number come from? Now I am curious AF)
sr. member
Activity: 310
Merit: 727
---------> 1231006505
Hi all,
I have 2 unrelated questions, but both about how to properly formulate a transaction template.

1. I'd like to know how to add an RBF indicator to the transaction (and any relevant details).

Here's my current standard raw transaction template I use;

Code:

 createrawtransaction \
'[{"txid": "txid1", "vout": vout1},
{"txid": "txid2", "vout": vout2},
{"txid": "txid3", "vout": vout3},
{"txid": "txid4", "vout": vout4}]' \
'{"address1": Amount1,
"address2": Amount2,
"address3": Amount3,
"address4": Amount4}'

The software I am using to create, sign, and send transactions is Bitcoin Core QT (console)
In createrawtransaction, there's an optional sequence field that you can set when specifying the inputs. To set a transaction to Opt into RBF, you need to set the sequence for at least one input to be 4294967293 or lower.
newbie
Activity: 21
Merit: 11
Hi all,
I have 2 unrelated questions, but both about how to properly formulate a transaction template.

1. I'd like to know how to add an RBF indicator to the transaction (and any relevant details).

2. I'd like to know how to create a taproot transaction template I can use

Here's my current standard raw transaction template I use;

Code:

 createrawtransaction \
'[{"txid": "txid1", "vout": vout1},
{"txid": "txid2", "vout": vout2},
{"txid": "txid3", "vout": vout3},
{"txid": "txid4", "vout": vout4}]' \
'{"address1": Amount1,
"address2": Amount2,
"address3": Amount3,
"address4": Amount4}'


If there are any resources you can point me to, please let me know.

The software I am using to create, sign, and send transactions is Bitcoin Core QT (console)

Edit I found this, looks like the address type I need to get will use this command -getnewaddress "" "bech32m"
The rest of this post is gonna take a few times of me reading it to get my head around this...
https://bitcoin.stackexchange.com/questions/108006/how-to-make-a-taproot-transaction-with-bitcoin-cli
Jump to: