Skip to content

28.0 Release Candidate Testing Guide

rkrux edited this page Sep 18, 2024 · 50 revisions

Testing Guide: Bitcoin Core 28.0 Release Candidate

For feedback on this guide, please visit this issue.

This document outlines some of the upcoming Bitcoin Core 28.0 release changes and provides steps to help test them. This guide is meant to be the starting point for experimentation and further testing, but is in no way comprehensive! After running through the steps in this guide, you are encouraged to do your own testing.

This can be as simple as testing the same features in this guide but trying it a different way. Even better, think of features you use regularly and test that they still work as expected in the release candidate. You can also read the release notes to find something not covered in this guide. This is a great way to be involved with Bitcoin's development and helps keep Bitcoin running smoothly and bug-minimized! Your help in this endeavour is greatly appreciated.

Overview

Changes covered in this testing guide include:

  1. testnet4 support (#29775)
  2. v3 transactions truc (#28948)
  3. package rbf (#28984)
  4. mempool conflicting transactions (#27307)
  5. mempoolfullrbf by default (#30493)
  6. paytoanchor script spending (#30352)
  7. new dumptxoutset output format (#29612)

Bonus: 8. assumeutxo mainnet (#28553)


For a comprehensive list of changes in Bitcoin Core 28.0, check out the release notes.

Preparation

Choose a directory to work from, for example:

export RC_TEST_DIR=~/rctesting
mkdir $RC_TEST_DIR
cd $RC_TEST_DIR

1. Obtain Latest Release Candidate

Current Release Candidate: Bitcoin Core 28.0rc1 (release-notes)

There are two ways to grab the latest release candidate: source code or pre-compiled binary. Choose one of the two.

From Source

The source code for the release candidate can be obtained from the releases page (and extracted), or by using git directly:

cd $RC_TEST_DIR
git clone https://github.com/bitcoin/bitcoin.git -b v28.0rc1 --depth 1
cd bitcoin

(Ensure source is present in RC_TEST_DIR/bitcoin in either instance (run mv if necessary)).

From Binary

If using a binary is preferred, make sure to obtain the correct one for your system. When working from binary, extract (example for x86_64):

cd $RC_TEST_DIR
wget https://bitcoincore.org/bin/bitcoin-core-28.0/test.rc1/bitcoin-28.0rc1-x86_64-apple-darwin.tar.gz
tar xf bitcoin-28.0rc1-x86_64-apple-darwin.tar.gz

(Directory $RC_TEST_DIR/bitcoin-28.0rc1/ now exists)

2. Compile Release Candidate

If testing v28 from binary (rather than building from source), skip this step

Before compiling, make sure that your system has all the correct dependencies installed.

For more information on compiling from source, here are some guides to compile Bitcoin Core for UNIX/Linux, macOS, Windows, FreeBSD, NetBSD, and OpenBSD.

3. Obtain Previous Release

Some testing in this guide involves using previous releases such as v27.1.

Obtain the v27.1 binary from here and extract within RC_TEST_DIR:

cd $RC_TEST_DIR
wget https://bitcoincore.org/bin/bitcoin-core-27.1/bitcoin-27.1-x86_64-apple-darwin.tar.gz
tar xf bitcoin-27.1-x86_64-apple-darwin.tar.gz
(directory $RC_TEST_DIR/bitcoin-27.1 now exists)

4. Setting up command line environment

Create data directories

Create temporary data directories for each version.

export DATA_DIR_28=/tmp/28-rc-test
mkdir $DATA_DIR_28
export DATA_DIR_27=/tmp/27-test
mkdir $DATA_DIR_27

Specify paths

Define paths containing binaries that will be executed.

v28 from Source

If testing with v28 compiled source, run:

export BINARY_PATH_28=$RC_TEST_DIR/bitcoin/src

v28 Pre-Compiled Binaries

If testing from v28 downloaded binaries, run:

export BINARY_PATH_28=$RC_TEST_DIR/bitcoin-28.0rc1/bin

Previous Release

Specify the binary path for the v27.1 binary.

export BINARY_PATH_27=$RC_TEST_DIR/bitcoin-27.1/bin

Create Aliases

To avoid specifying the data directory (-datadir=$DATA_DIR) on each command, below are a few extra variables to set.

v28 Aliases

alias bitcoind28="$BINARY_PATH_28/bitcoind -datadir=$DATA_DIR_28"
alias bcli28="$BINARY_PATH_28/bitcoin-cli -datadir=$DATA_DIR_28"

Aliases for Previous Release

alias bitcoind27="$BINARY_PATH_27/bitcoind -datadir=$DATA_DIR_27"
alias bcli27="$BINARY_PATH_27/bitcoin-cli -datadir=$DATA_DIR_27"

Alias for Datadir cleanup

datadir-cleanup is created to make cleaning easier between tests.

alias datadir-cleanup='rm -r $DATA_DIR_28; mkdir $DATA_DIR_28; rm -r $DATA_DIR_27; mkdir $DATA_DIR_27;'

Verify Aliases

Verify that all versions are correct (e.g. that there are no accidental duplicates):

bcli28 --version | grep version
bitcoind28 --version | grep version
bcli27 --version | grep version
bitcoind27 --version | grep version

Expected results:

Bitcoin Core RPC client version v28.0.0rc1
Bitcoin Core version v28.0.0rc1
Bitcoin Core RPC client version v27.1.0
Bitcoin Core version v27.1.0

Command Execution

Throughout the rest of the guide, command execution will look similar to the following:

When using RPC:

bcli28 [cli args]

Starting a node in the foreground:

bitcoind28

Use CTRL-C to stop a node running in the foreground.

Note: When starting a node, allow a few seconds to pass (e.g. 10 seconds) for the node to listen for RPC before running subsequent bcli commands

For the rest of the guide, bitcoind will be started in daemon mode (-daemonwait) and as such CTRL-C will not stop the process. Instead, use bcli stop.


1. Testnet4 Support

Support for Testnet4 as specified in BIP94 has been added. The network can be selected with the -testnet4 option and the section header is also named [testnet4].

We will use 2 nodes for this test: V28-rc and V27.

testnet4 network should be connected in v28. Update the configuration file and run V28.

echo "testnet4=1" > $DATA_DIR_28/bitcoin.conf
bitcoind28 -daemonwait

Notice the testnet4 value in the chain property.

➜  bcli28 getblockchaininfo
{
  "chain": "testnet4",
  "blocks": 576,
  "headers": 42496,
  "bestblockhash": "000000002a97ade00f8468f03d7019974f004c6f1e525b8ff295785f644d4909",
  "difficulty": 1,
  "time": 1715010901,
  "mediantime": 1715010812,
  "verificationprogress": 0.0007345297406152536,
  "initialblockdownload": true,
  "chainwork": "0000000000000000000000000000000000000000000000000000024102410241",
  "size_on_disk": 176041,
  "pruned": false,
  "warnings": [
  ]
}

Stop the V28 node

bcli28 stop

Adding testnet4 in v27 configuration file would connect to the main network instead.

echo "testnet4=1" > $DATA_DIR_27/bitcoin.conf
bitcoind27 -daemonwait
➜  bcli27 getblockchaininfo
{
  "chain": "main",
  "blocks": 0,
  "headers": 0,
  "bestblockhash": "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f",
  "difficulty": 1,
  "time": 1231006505,
  "mediantime": 1231006505,
  "verificationprogress": 9.204822134768123e-10,
  "initialblockdownload": true,
  "chainwork": "0000000000000000000000000000000000000000000000000000000100010001",
  "size_on_disk": 293,
  "pruned": false,
  "warnings": ""
}

Stop the V27 node and cleanup

bcli27 stop
datadir-cleanup

2. V3 Transactions TRUC

Transactions with version number set to 3 are now treated as standard on all networks (#29496), subject to Opt-in Topologically Restricted Until Confirmation (TRUC) Transactions policy as described in BIP 431. The policy includes limits on spending unconfirmed outputs (#28948), eviction of a previous descendant if a more incentive-compatible one is submitted (#29306), and a maximum transaction size of 10,000vB (#29873). These restrictions simplify the assessment of incentive compatibility of accepting or replacing TRUC transactions, thus ensuring any replacements are more profitable for the node and making fee-bumping more reliable.

  1. We should be able to create, sign and broadcast V3 transactions without the need of acceptnonstdtxn flag.
  2. We should be able to replace V3 transactions without the need of BIP125 signalling while running the node with mempoolfullrbf=0.
  3. We should be able to evict sibling already present in mempool in case a higher fee sibling comes up while respecting the max ancestor size of 2 constraint.

i) Create, sign, and broadcast V3 txs

Configure regtest support in the v28 node. Alternatively, you can stay connected to testnet4 like in the previous test. Though you would need to fund your wallet with test coins (if not already) from a faucet in order to spend but with the upside being able to see your V3 transactions getting mined in the network!

echo "regtest=1" > $DATA_DIR_28/bitcoin.conf

Run the V28 node without full rbf

bitcoind28 -daemonwait -mempoolfullrbf=0

Verify by checking the fullrbf property in getmempoolinfo output.

➜  bcli28 getmempoolinfo
{
  "loaded": true,
  "size": 0,
  "bytes": 0,
  "usage": 0,
  "total_fee": 0.00000000,
  "maxmempool": 300000000,
  "mempoolminfee": 0.00001000,
  "minrelaytxfee": 0.00001000,
  "incrementalrelayfee": 0.00001000,
  "unbroadcastcount": 0,
  "fullrbf": false
}

Create your wallet for testing.

bcli28 createwallet test
{
  "name": "test"
}

Fund your wallet by generating 101 blocks that sends newly minted bitcoins to your wallet. 101 blocks are needed to be generated so that the coins from the first block are spendable.

bcli28 -rpcwallet=test -generate 101

List unspents and pick one of them to spend in the V3 transaction.

➜  bcli28 listunspent
[
  {
    "txid": "64cf7f383756d261278155556d37ca92f3f35d740fc75f2357354ed4e82f3e7c",
    "vout": 0,
    "address": "bcrt1q6le3q23dz2zg7ws9cuuw8k4rqsv53x2w2kzd8d",
    "label": "",
    "scriptPubKey": "0014d7f3102a2d12848f3a05c738e3daa3041948994e",
    "amount": 50.00000000,
    "confirmations": 101,
    "spendable": true,
    "solvable": true,
    "desc": "wpkh([676ae39d/84h/1h/0h/0/0]03b756471b1bb9b5890e315f6523dfbd5ec4a9e43e27ae95d0d937e25f7fccd095)#dhf3w0tj",
    "parent_descs": [
      "wpkh(tpubD6NzVbkrYhZ4WkLPQthTrEkaN1XY6jjgnTSiVDw4BLFHq62Qi5nmsk6brxdzuZrd9bwhdYXJ8hRLGtJry2q374b4Ca5ycay7b4cwervU3iz/84h/1h/0h/0/*)#qfkdxl0n"
    ],
    "safe": true
  }
]

Generate a new address in your wallet to be used for receiving the bitcoins to be spent in the new transaction.

➜  bcli28 getnewaddress
bcrt1qnnpzfmd62qvalzwu6jnxg08svnuhv7uvwneged

Create a new transaction without BIP125 signalling, notice the false flag at the end that unsets BIP125 signalling.

➜  bcli28 createrawtransaction "[{\"txid\": \"64cf7f383756d261278155556d37ca92f3f35d740fc75f2357354ed4e82f3e7c\", \"vout\": 0}]" "[{\"bcrt1qnnpzfmd62qvalzwu6jnxg08svnuhv7uvwneged\": 49.99999}]" 0 false
02000000017c3e2fe8d44e3557235fc70f745df3f392ca376d5555812761d25637387fcf640000000000ffffffff0118ee052a010000001600149cc224edba5019df89dcd4a6643cf064f9767b8c00000000

Notice the 02 at the start of the raw transaction hex that means this is a V2 transaction, replace the first 02 with 03 to make it a V3 transaction, and now sign it with the wallet.

➜  bcli28 signrawtransactionwithwallet 03000000017c3e2fe8d44e3557235fc70f745df3f392ca376d5555812761d25637387fcf640000000000ffffffff0118ee052a010000001600149cc224edba5019df89dcd4a6643cf064f9767b8c00000000
{
  "hex": "030000000001017c3e2fe8d44e3557235fc70f745df3f392ca376d5555812761d25637387fcf640000000000ffffffff0118ee052a010000001600149cc224edba5019df89dcd4a6643cf064f9767b8c0247304402201a3aaa15d7db4868da08add2faf887980b000d0b24f838af8c41da0ac58f743102205278b853b6638199108cdca9ee9bcc494bbb67a2194e2ce3e246b4c3a7a830d1012103b756471b1bb9b5890e315f6523dfbd5ec4a9e43e27ae95d0d937e25f7fccd09500000000",
  "complete": true
}

Verify that this transaction doesn't signal for RBF by checking the sequence property of the first input vin - it's not less than 4294967295 and as per the BIP125 spec it doesn't signal for RBF.

bcli28 decoderawtransaction
➜  bcli28 decoderawtransaction 030000000001017c3e2fe8d44e3557235fc70f745df3f392ca376d5555812761d25637387fcf640000000000ffffffff0118ee052a010000001600149cc224edba5019df89dcd4a6643cf064f9767b8c0247304402201a3aaa15d7db4868da08add2faf887980b000d0b24f838af8c41da0ac58f743102205278b853b6638199108cdca9ee9bcc494bbb67a2194e2ce3e246b4c3a7a830d1012103b756471b1bb9b5890e315f6523dfbd5ec4a9e43e27ae95d0d937e25f7fccd09500000000
{
  "txid": "662ee93e28bc7e5cb4b7ad4961e000ad062096e13667c251a750217dda827b84",
  "hash": "201c056a0e0f83e579e67bb922d28d799dbee331a053a396794f3e8bf2c4d836",
  "version": 3,
  "size": 191,
  "vsize": 110,
  "weight": 437,
  "locktime": 0,
  "vin": [
    {
      "txid": "64cf7f383756d261278155556d37ca92f3f35d740fc75f2357354ed4e82f3e7c",
      "vout": 0,
      "scriptSig": {
        "asm": "",
        "hex": ""
      },
      "txinwitness": [
        "304402201a3aaa15d7db4868da08add2faf887980b000d0b24f838af8c41da0ac58f743102205278b853b6638199108cdca9ee9bcc494bbb67a2194e2ce3e246b4c3a7a830d101",
        "03b756471b1bb9b5890e315f6523dfbd5ec4a9e43e27ae95d0d937e25f7fccd095"
      ],
      "sequence": 4294967295
    }
  ],
  "vout": [
    {
      "value": 49.99999000,
      "n": 0,
      "scriptPubKey": {
        "asm": "0 9cc224edba5019df89dcd4a6643cf064f9767b8c",
        "desc": "addr(bcrt1qnnpzfmd62qvalzwu6jnxg08svnuhv7uvwneged)#nsrq3g4g",
        "hex": "00149cc224edba5019df89dcd4a6643cf064f9767b8c",
        "address": "bcrt1qnnpzfmd62qvalzwu6jnxg08svnuhv7uvwneged",
        "type": "witness_v0_keyhash"
      }
    }
  ]
}

Send this transaction to the network.

➜  bcli28 sendrawtransaction 030000000001017c3e2fe8d44e3557235fc70f745df3f392ca376d5555812761d25637387fcf640000000000ffffffff0118ee052a010000001600149cc224edba5019df89dcd4a6643cf064f9767b8c0247304402201a3aaa15d7db4868da08add2faf887980b000d0b24f838af8c41da0ac58f743102205278b853b6638199108cdca9ee9bcc494bbb67a2194e2ce3e246b4c3a7a830d1012103b756471b1bb9b5890e315f6523dfbd5ec4a9e43e27ae95d0d937e25f7fccd09500000000
662ee93e28bc7e5cb4b7ad4961e000ad062096e13667c251a750217dda827b84

Verify its presence in the mempool using getrawmempool and getmempoolinfo. Alternatively, getmempoolentry <txid> also works.

➜  bcli28 getrawmempool
[
  "662ee93e28bc7e5cb4b7ad4961e000ad062096e13667c251a750217dda827b84"
]
➜  bcli28 getmempoolinfo
{
  "loaded": true,
  "size": 1,
  "bytes": 110,
  "usage": 1072,
  "total_fee": 0.00001000,
  "maxmempool": 300000000,
  "mempoolminfee": 0.00001000,
  "minrelaytxfee": 0.00001000,
  "incrementalrelayfee": 0.00001000,
  "unbroadcastcount": 1,
  "fullrbf": false
}

Fetch this in-wallet tx using gettransaction and check bip125-replaceable property in the output.

bcli28 gettransaction 662ee93e28bc7e5cb4b7ad4961e000ad062096e13667c251a750217dda827b84
➜  bcli28 gettransaction 662ee93e28bc7e5cb4b7ad4961e000ad062096e13667c251a750217dda827b84
{
  "amount": 0.00000000,
  "fee": -0.00001000,
  "confirmations": 0,
  "trusted": true,
  "txid": "662ee93e28bc7e5cb4b7ad4961e000ad062096e13667c251a750217dda827b84",
  "wtxid": "201c056a0e0f83e579e67bb922d28d799dbee331a053a396794f3e8bf2c4d836",
  "walletconflicts": [
  ],
  "mempoolconflicts": [
  ],
  "time": 1725629926,
  "timereceived": 1725629926,
  "bip125-replaceable": "no",
  "details": [
    {
      "address": "bcrt1qnnpzfmd62qvalzwu6jnxg08svnuhv7uvwneged",
      "category": "send",
      "amount": -49.99999000,
      "label": "",
      "vout": 0,
      "fee": -0.00001000,
      "abandoned": false
    },
    {
      "address": "bcrt1qnnpzfmd62qvalzwu6jnxg08svnuhv7uvwneged",
      "parent_descs": [
        "wpkh(tpubD6NzVbkrYhZ4WkLPQthTrEkaN1XY6jjgnTSiVDw4BLFHq62Qi5nmsk6brxdzuZrd9bwhdYXJ8hRLGtJry2q374b4Ca5ycay7b4cwervU3iz/84h/1h/0h/0/*)#qfkdxl0n"
      ],
      "category": "receive",
      "amount": 49.99999000,
      "label": "",
      "vout": 0,
      "abandoned": false
    }
  ],
  "hex": "030000000001017c3e2fe8d44e3557235fc70f745df3f392ca376d5555812761d25637387fcf640000000000ffffffff0118ee052a010000001600149cc224edba5019df89dcd4a6643cf064f9767b8c0247304402201a3aaa15d7db4868da08add2faf887980b000d0b24f838af8c41da0ac58f743102205278b853b6638199108cdca9ee9bcc494bbb67a2194e2ce3e246b4c3a7a830d1012103b756471b1bb9b5890e315f6523dfbd5ec4a9e43e27ae95d0d937e25f7fccd09500000000",
  "lastprocessedblock": {
    "hash": "35c32c380e3ca3a0cfd06b794781f4f78a371be262fb5f844db87ad14851c46f",
    "height": 101
  }
}

ii) Replace V3 txs without BIP125 signalling while running the node with mempoolfullrbf=0.

Now that we have a V3 transaction in the mempool that has NOT signalled for RBF, lets create a new transaction that double spends this one by spending the same input used in the first transaction (same source & destination as before, just decreased value/increased fee).

➜  bcli28 createrawtransaction "[{\"txid\": \"64cf7f383756d261278155556d37ca92f3f35d740fc75f2357354ed4e82f3e7c\", \"vout\": 0}]" "[{\"bcrt1qnnpzfmd62qvalzwu6jnxg08svnuhv7uvwneged\": 49.99995}]" 0 false
02000000017c3e2fe8d44e3557235fc70f745df3f392ca376d5555812761d25637387fcf640000000000ffffffff0178de052a010000001600149cc224edba5019df89dcd4a6643cf064f9767b8c00000000

Similar to the previous transaction, edit it to make it a V3 one, and sign it using the wallet.

➜  bcli28 signrawtransactionwithwallet 03000000017c3e2fe8d44e3557235fc70f745df3f392ca376d5555812761d25637387fcf640000000000ffffffff0178de052a010000001600149cc224edba5019df89dcd4a6643cf064f9767b8c00000000
{
  "hex": "030000000001017c3e2fe8d44e3557235fc70f745df3f392ca376d5555812761d25637387fcf640000000000ffffffff0178de052a010000001600149cc224edba5019df89dcd4a6643cf064f9767b8c02473044022073dd31048f3f085a4b16f567fa18a0afe5a622b83e2a5f8d3581411188db165102205747e1729fb3168d760393c642a54110e18da8307ce4f2639ca72b6875cad07f012103b756471b1bb9b5890e315f6523dfbd5ec4a9e43e27ae95d0d937e25f7fccd09500000000",
  "complete": true
}

Send it to the network.

➜  bcli28 sendrawtransaction 030000000001017c3e2fe8d44e3557235fc70f745df3f392ca376d5555812761d25637387fcf640000000000ffffffff0178de052a010000001600149cc224edba5019df89dcd4a6643cf064f9767b8c02473044022073dd31048f3f085a4b16f567fa18a0afe5a622b83e2a5f8d3581411188db165102205747e1729fb3168d760393c642a54110e18da8307ce4f2639ca72b6875cad07f012103b756471b1bb9b5890e315f6523dfbd5ec4a9e43e27ae95d0d937e25f7fccd09500000000
b72a9cf3f04eeb49b0baccc710a8de32985b565b50f9c54339d42fcb554dd81a

Use the gettransaction to fetch this in-wallet tx, notice the walletconflicts property of the output that contains the previous transaction that has been replaced by this one.

bcli28 gettransaction b72a9cf3f04eeb49b0baccc710a8de32985b565b50f9c54339d42fcb554dd81a
➜  bcli28 gettransaction b72a9cf3f04eeb49b0baccc710a8de32985b565b50f9c54339d42fcb554dd81a
{
  "amount": 0.00000000,
  "fee": -0.00005000,
  "confirmations": 0,
  "trusted": true,
  "txid": "b72a9cf3f04eeb49b0baccc710a8de32985b565b50f9c54339d42fcb554dd81a",
  "wtxid": "b44669e06188d8aeedc5bd8bbf5676b8462826e003bdd223ebe9dd611d3596e4",
  "walletconflicts": [
    "662ee93e28bc7e5cb4b7ad4961e000ad062096e13667c251a750217dda827b84"
  ],
  "mempoolconflicts": [
  ],
  "time": 1725630037,
  "timereceived": 1725630037,
  "bip125-replaceable": "no",
  "details": [
    {
      "address": "bcrt1qnnpzfmd62qvalzwu6jnxg08svnuhv7uvwneged",
      "category": "send",
      "amount": -49.99995000,
      "label": "",
      "vout": 0,
      "fee": -0.00005000,
      "abandoned": false
    },
    {
      "address": "bcrt1qnnpzfmd62qvalzwu6jnxg08svnuhv7uvwneged",
      "parent_descs": [
        "wpkh(tpubD6NzVbkrYhZ4WkLPQthTrEkaN1XY6jjgnTSiVDw4BLFHq62Qi5nmsk6brxdzuZrd9bwhdYXJ8hRLGtJry2q374b4Ca5ycay7b4cwervU3iz/84h/1h/0h/0/*)#qfkdxl0n"
      ],
      "category": "receive",
      "amount": 49.99995000,
      "label": "",
      "vout": 0,
      "abandoned": false
    }
  ],
  "hex": "030000000001017c3e2fe8d44e3557235fc70f745df3f392ca376d5555812761d25637387fcf640000000000ffffffff0178de052a010000001600149cc224edba5019df89dcd4a6643cf064f9767b8c02473044022073dd31048f3f085a4b16f567fa18a0afe5a622b83e2a5f8d3581411188db165102205747e1729fb3168d760393c642a54110e18da8307ce4f2639ca72b6875cad07f012103b756471b1bb9b5890e315f6523dfbd5ec4a9e43e27ae95d0d937e25f7fccd09500000000",
  "lastprocessedblock": {
    "hash": "35c32c380e3ca3a0cfd06b794781f4f78a371be262fb5f844db87ad14851c46f",
    "height": 101
  }
}

iii) Sibling Eviction in V3 transactions

For testing this feature, we will create a parent transaction parentTx having 2 outputs and then subsequently create a child transaction siblingTx1 spending the first output of the parent transaction. We will then send both these transactions and they should be accepted in the mempool. Later we will create another child transaction siblingTx2 of the parent transaction by spending its second output but with higher fees, this would become a sibling of the first child transaction. Also, we will create a child transaction txWithUncle of this new child transaction and then submit both the siblingTx2 and txWithUncle together. Expectation is that the siblingTx2 is accepted while replacing the siblingTx1 in mempool and the txWithUncle is not accepted because it is a third generation transaction violating the max size of 2 unconfirmed transactions rule of TRUC.

flowchart TB
    subgraph phase 1
        parentTx--->siblingTx1
    end

    subgraph phase 2
        parentTx--->siblingTx2
        siblingTx2-.->txWithUncle
    end
Loading

Note: While creating all these transactions, we'd need to replace the initial 02 with 03 in the hexes manually to make them V3 transactions.

List the unspent and pick any one of them. We will pick one with 50 coins (you might need to call bcli28 -rpcwallet=test -generate 1 to make more coinbase transactions spendable).

➜  bcli28 listunspent
[
  {
    "txid": "7572bad5f205769d562b53b44e36d1c701e9b6cf5fb54d50e6ac9946640d5273",
    "vout": 0,
    "address": "bcrt1qvmk6yjyh8vuvlg6plwtfpvqmfa7c6t9qslueje",
    "label": "",
    "scriptPubKey": "001466eda248973b38cfa341fb9690b01b4f7d8d2ca0",
    "amount": 50.00000000,
    "confirmations": 101,
    "spendable": true,
    "solvable": true,
    "desc": "wpkh([540581fe/84h/1h/0h/0/0]02b7aa482b7bf5743f0241895be2f48c9635e66711effe34ca78375f2a69ad5960)#epkhyed2",
    "parent_descs": [
      "wpkh(tpubD6NzVbkrYhZ4WZ7k9gFQFovGRTSJjkeWU1MtNJaDLyaDor9r1JmCZ55PAQbmWWkXxpgarQmbhdKk6SxP4hNWcbjCN5toapPchZX1z9twoo7/84h/1h/0h/0/*)#s0uchgt0"
    ],
    "safe": true
  }
]

Create 2 new addresses.

➜  bcli28 getnewaddress
bcrt1qmzv3uh4hempmevme7h29fu046sz86pryhfk5np
➜  bcli28 getnewaddress
bcrt1qwr9wenawexc9hp5np2z54jm4navgvjtdwc0nj5

Create the transaction, edit it to make it V3, and sign it with wallet.

➜  bcli28 createrawtransaction "[{\"txid\": \"7572bad5f205769d562b53b44e36d1c701e9b6cf5fb54d50e6ac9946640d5273\", \"vout\": 0}]" "[{\"bcrt1qmzv3uh4hempmevme7h29fu046sz86pryhfk5np\": 1},{\"bcrt1qwr9wenawexc9hp5np2z54jm4navgvjtdwc0nj5\": 48.99999}]"
020000000173520d644699ace6504db55fcfb6e901c7d1364eb4532b569d7605f2d5ba72750000000000fdffffff0200e1f50500000000160014d8991e5eb7cec3bcb379f5d454f1f5d4047d0464180d10240100000016001470caeccfaec9b05b86930a854acb759f5886496d00000000
➜  test28rc bcli28 signrawtransactionwithwallet 030000000173520d644699ace6504db55fcfb6e901c7d1364eb4532b569d7605f2d5ba72750000000000fdffffff0200e1f50500000000160014d8991e5eb7cec3bcb379f5d454f1f5d4047d0464180d10240100000016001470caeccfaec9b05b86930a854acb759f5886496d00000000
{
  "hex": "0300000000010173520d644699ace6504db55fcfb6e901c7d1364eb4532b569d7605f2d5ba72750000000000fdffffff0200e1f50500000000160014d8991e5eb7cec3bcb379f5d454f1f5d4047d0464180d10240100000016001470caeccfaec9b05b86930a854acb759f5886496d02473044022047f2ebba64923360285a8d42d84356df2d354671b06bac64916632baf1955e6002207374789a1be04ebf3ad12189986b0613a23bf1076a7d44bcc4602d4d0004552d012102b7aa482b7bf5743f0241895be2f48c9635e66711effe34ca78375f2a69ad596000000000",
  "complete": true
}
Decode the transaction to verify its `version` property.
➜  bcli28 decoderawtransaction 0300000000010173520d644699ace6504db55fcfb6e901c7d1364eb4532b569d7605f2d5ba72750000000000fdffffff0200e1f50500000000160014d8991e5eb7cec3bcb379f5d454f1f5d4047d0464180d10240100000016001470caeccfaec9b05b86930a854acb759f5886496d02473044022047f2ebba64923360285a8d42d84356df2d354671b06bac64916632baf1955e6002207374789a1be04ebf3ad12189986b0613a23bf1076a7d44bcc4602d4d0004552d012102b7aa482b7bf5743f0241895be2f48c9635e66711effe34ca78375f2a69ad596000000000
{
  "txid": "66799d1d03264e0a968f23dde0d1b493aeb4e38ed458df044553364056a9d39a",
  "hash": "5113424fcf95468f6ec77319fbbef13b93c0f9812c17e3532a29b73bf6118102",
  "version": 3,
  "size": 222,
  "vsize": 141,
  "weight": 561,
  "locktime": 0,
  "vin": [
    {
      "txid": "7572bad5f205769d562b53b44e36d1c701e9b6cf5fb54d50e6ac9946640d5273",
      "vout": 0,
      "scriptSig": {
        "asm": "",
        "hex": ""
      },
      "txinwitness": [
        "3044022047f2ebba64923360285a8d42d84356df2d354671b06bac64916632baf1955e6002207374789a1be04ebf3ad12189986b0613a23bf1076a7d44bcc4602d4d0004552d01",
        "02b7aa482b7bf5743f0241895be2f48c9635e66711effe34ca78375f2a69ad5960"
      ],
      "sequence": 4294967293
    }
  ],
  "vout": [
    {
      "value": 1.00000000,
      "n": 0,
      "scriptPubKey": {
        "asm": "0 d8991e5eb7cec3bcb379f5d454f1f5d4047d0464",
        "desc": "addr(bcrt1qmzv3uh4hempmevme7h29fu046sz86pryhfk5np)#u4ctrucy",
        "hex": "0014d8991e5eb7cec3bcb379f5d454f1f5d4047d0464",
        "address": "bcrt1qmzv3uh4hempmevme7h29fu046sz86pryhfk5np",
        "type": "witness_v0_keyhash"
      }
    },
    {
      "value": 48.99999000,
      "n": 1,
      "scriptPubKey": {
        "asm": "0 70caeccfaec9b05b86930a854acb759f5886496d",
        "desc": "addr(bcrt1qwr9wenawexc9hp5np2z54jm4navgvjtdwc0nj5)#5n86e6cd",
        "hex": "001470caeccfaec9b05b86930a854acb759f5886496d",
        "address": "bcrt1qwr9wenawexc9hp5np2z54jm4navgvjtdwc0nj5",
        "type": "witness_v0_keyhash"
      }
    }
  ]
}

Send the transaction to the mempool and verify its presence there.

➜  bcli28 sendrawtransaction 0300000000010173520d644699ace6504db55fcfb6e901c7d1364eb4532b569d7605f2d5ba72750000000000fdffffff0200e1f50500000000160014d8991e5eb7cec3bcb379f5d454f1f5d4047d0464180d10240100000016001470caeccfaec9b05b86930a854acb759f5886496d02473044022047f2ebba64923360285a8d42d84356df2d354671b06bac64916632baf1955e6002207374789a1be04ebf3ad12189986b0613a23bf1076a7d44bcc4602d4d0004552d012102b7aa482b7bf5743f0241895be2f48c9635e66711effe34ca78375f2a69ad596000000000
66799d1d03264e0a968f23dde0d1b493aeb4e38ed458df044553364056a9d39a
➜  bcli28 getrawmempool
[
  "66799d1d03264e0a968f23dde0d1b493aeb4e38ed458df044553364056a9d39a"
]

Create a new address and the siblingTx1, and then sign it with wallet.

➜  bcli28 getnewaddress
bcrt1qugms4rq4qnerjx2dzk8tpv29pjfjk44fexy380
➜  test28rc bcli28 createrawtransaction "[{\"txid\": \"66799d1d03264e0a968f23dde0d1b493aeb4e38ed458df044553364056a9d39a\", \"vout\": 0}]" "[{\"bcrt1qugms4rq4qnerjx2dzk8tpv29pjfjk44fexy380\": 0.99999}]"
02000000019ad3a9564036534504df58d48ee3b4ae93b4d1e0dd238f960a4e26031d9d79660000000000fdffffff0118ddf50500000000160014e2370a8c1504f239194d158eb0b1450c932b56a900000000
➜  bcli28 signrawtransactionwithwallet 03000000019ad3a9564036534504df58d48ee3b4ae93b4d1e0dd238f960a4e26031d9d79660000000000fdffffff0118ddf50500000000160014e2370a8c1504f239194d158eb0b1450c932b56a900000000
{
  "hex": "030000000001019ad3a9564036534504df58d48ee3b4ae93b4d1e0dd238f960a4e26031d9d79660000000000fdffffff0118ddf50500000000160014e2370a8c1504f239194d158eb0b1450c932b56a902473044022008796589eb12062f203311cfa6543e52610d33be4767d569dea38bacd0d89f6a02205aa28d47a9875d33aa9d0f762e1e49aac2754af2982da3a9298fd1cb98955201012103db3e6a167d82ed3cbbee107e06d2ee7fcc09e664924d402df95abdcae345950900000000",
  "complete": true
}
Decode it to verify just like the parent transaction.
➜  bcli28 decoderawtransaction 030000000001019ad3a9564036534504df58d48ee3b4ae93b4d1e0dd238f960a4e26031d9d79660000000000fdffffff0118ddf50500000000160014e2370a8c1504f239194d158eb0b1450c932b56a902473044022008796589eb12062f203311cfa6543e52610d33be4767d569dea38bacd0d89f6a02205aa28d47a9875d33aa9d0f762e1e49aac2754af2982da3a9298fd1cb98955201012103db3e6a167d82ed3cbbee107e06d2ee7fcc09e664924d402df95abdcae345950900000000
{
  "txid": "f4e0f49135aca968372dd0d207bf0aba223f9a5022e647edee7255cd90c178b4",
  "hash": "86a9324c77566cd9e76b33d7b31fe50c9ff77f55927b39af121cd3d725428a2c",
  "version": 3,
  "size": 191,
  "vsize": 110,
  "weight": 437,
  "locktime": 0,
  "vin": [
    {
      "txid": "66799d1d03264e0a968f23dde0d1b493aeb4e38ed458df044553364056a9d39a",
      "vout": 0,
      "scriptSig": {
        "asm": "",
        "hex": ""
      },
      "txinwitness": [
        "3044022008796589eb12062f203311cfa6543e52610d33be4767d569dea38bacd0d89f6a02205aa28d47a9875d33aa9d0f762e1e49aac2754af2982da3a9298fd1cb9895520101",
        "03db3e6a167d82ed3cbbee107e06d2ee7fcc09e664924d402df95abdcae3459509"
      ],
      "sequence": 4294967293
    }
  ],
  "vout": [
    {
      "value": 0.99999000,
      "n": 0,
      "scriptPubKey": {
        "asm": "0 e2370a8c1504f239194d158eb0b1450c932b56a9",
        "desc": "addr(bcrt1qugms4rq4qnerjx2dzk8tpv29pjfjk44fexy380)#yl9fvtz5",
        "hex": "0014e2370a8c1504f239194d158eb0b1450c932b56a9",
        "address": "bcrt1qugms4rq4qnerjx2dzk8tpv29pjfjk44fexy380",
        "type": "witness_v0_keyhash"
      }
    }
  ]
}

Send the siblingTx1 and verify the presence of parentTx and siblingTx1 in the mempool.

➜  bcli28 sendrawtransaction 030000000001019ad3a9564036534504df58d48ee3b4ae93b4d1e0dd238f960a4e26031d9d79660000000000fdffffff0118ddf50500000000160014e2370a8c1504f239194d158eb0b1450c932b56a902473044022008796589eb12062f203311cfa6543e52610d33be4767d569dea38bacd0d89f6a02205aa28d47a9875d33aa9d0f762e1e49aac2754af2982da3a9298fd1cb98955201012103db3e6a167d82ed3cbbee107e06d2ee7fcc09e664924d402df95abdcae345950900000000
f4e0f49135aca968372dd0d207bf0aba223f9a5022e647edee7255cd90c178b4
➜  bcli28 getrawmempool
[
  "66799d1d03264e0a968f23dde0d1b493aeb4e38ed458df044553364056a9d39a",
  "f4e0f49135aca968372dd0d207bf0aba223f9a5022e647edee7255cd90c178b4"
]

Create the siblingTx2 now but with fees higher than the siblingTx1 by sending lesser amount to the recipient, edit it, and sign it.

➜  bcli28 createrawtransaction "[{\"txid\": \"66799d1d03264e0a968f23dde0d1b493aeb4e38ed458df044553364056a9d39a\", \"vout\": 1}]" "[{\"bcrt1qugms4rq4qnerjx2dzk8tpv29pjfjk44fexy380\": 48.99989}]"
02000000019ad3a9564036534504df58d48ee3b4ae93b4d1e0dd238f960a4e26031d9d79660100000000fdffffff0108e60f2401000000160014e2370a8c1504f239194d158eb0b1450c932b56a900000000
➜  bcli28 signrawtransactionwithwallet 03000000019ad3a9564036534504df58d48ee3b4ae93b4d1e0dd238f960a4e26031d9d79660100000000fdffffff0108e60f2401000000160014e2370a8c1504f239194d158eb0b1450c932b56a900000000
{
  "hex": "030000000001019ad3a9564036534504df58d48ee3b4ae93b4d1e0dd238f960a4e26031d9d79660100000000fdffffff0108e60f2401000000160014e2370a8c1504f239194d158eb0b1450c932b56a90247304402204776d01d03e28fa40aa651b12d83cd4f896a166f1a0bce67498cf2c4d7750c4802202424b019fc7a11022cd7cede78ca08e00c1289bd74710792c651c66f7bc71e500121035d276773f6e233b41aba595b63e1fa31c3c21b68ca58c4383bb658a3ead4d29600000000",
  "complete": true
}
Decode it to verify its contents including the fees.
➜  bcli28 decoderawtransaction 030000000001019ad3a9564036534504df58d48ee3b4ae93b4d1e0dd238f960a4e26031d9d79660100000000fdffffff0108e60f2401000000160014e2370a8c1504f239194d158eb0b1450c932b56a90247304402204776d01d03e28fa40aa651b12d83cd4f896a166f1a0bce67498cf2c4d7750c4802202424b019fc7a11022cd7cede78ca08e00c1289bd74710792c651c66f7bc71e500121035d276773f6e233b41aba595b63e1fa31c3c21b68ca58c4383bb658a3ead4d29600000000
{
  "txid": "3fbf2a1f3fff0cab10fa573c2d3cf1002242f643e41602ffe740f5a5e6aa0df7",
  "hash": "468ec7f33d8b664565bc1926d96d934f89315218896e868d348afb3aafc4adc3",
  "version": 3,
  "size": 191,
  "vsize": 110,
  "weight": 437,
  "locktime": 0,
  "vin": [
    {
      "txid": "66799d1d03264e0a968f23dde0d1b493aeb4e38ed458df044553364056a9d39a",
      "vout": 1,
      "scriptSig": {
        "asm": "",
        "hex": ""
      },
      "txinwitness": [
        "304402204776d01d03e28fa40aa651b12d83cd4f896a166f1a0bce67498cf2c4d7750c4802202424b019fc7a11022cd7cede78ca08e00c1289bd74710792c651c66f7bc71e5001",
        "035d276773f6e233b41aba595b63e1fa31c3c21b68ca58c4383bb658a3ead4d296"
      ],
      "sequence": 4294967293
    }
  ],
  "vout": [
    {
      "value": 48.99989000,
      "n": 0,
      "scriptPubKey": {
        "asm": "0 e2370a8c1504f239194d158eb0b1450c932b56a9",
        "desc": "addr(bcrt1qugms4rq4qnerjx2dzk8tpv29pjfjk44fexy380)#yl9fvtz5",
        "hex": "0014e2370a8c1504f239194d158eb0b1450c932b56a9",
        "address": "bcrt1qugms4rq4qnerjx2dzk8tpv29pjfjk44fexy380",
        "type": "witness_v0_keyhash"
      }
    }
  ]
}

Create the txWithUncle now that spends the output of the siblingTx2, edit it, and sign it. Note that while signing this transaction we must pass few details of the previous transaction it is spending because at the moment that previous transaction is not in the mempool and therefore we must provide those details to the sign command. Namely the previous transaction details (found in the above decodetx command) are: txid, vout, scriptPubKey (vout[0].scriptPubKey.hex), witnessScript (vin[0].txinwitness[1]).

➜  bcli28 createrawtransaction "[{\"txid\": \"3fbf2a1f3fff0cab10fa573c2d3cf1002242f643e41602ffe740f5a5e6aa0df7\", \"vout\": 0}]" "[{\"bcrt1qugms4rq4qnerjx2dzk8tpv29pjfjk44fexy380\": 48.99988}]"
0200000001f70daae6a5f540e7ff0216e443f6422200f13c2d3c57fa10ab0cff3f1f2abf3f0000000000fdffffff0120e20f2401000000160014e2370a8c1504f239194d158eb0b1450c932b56a900000000
➜  bcli28 signrawtransactionwithwallet 0300000001f70daae6a5f540e7ff0216e443f6422200f13c2d3c57fa10ab0cff3f1f2abf3f0000000000fdffffff0120e20f2401000000160014e2370a8c1504f239194d158eb0b1450c932b56a900000000 "[{\"txid\":\"3fbf2a1f3fff0cab10fa573c2d3cf1002242f643e41602ffe740f5a5e6aa0df7\", \"vout\": 0, \"scriptPubKey\": \"0014e2370a8c1504f239194d158eb0b1450c932b56a9\", \"witnessScript\": \"035d276773f6e233b41aba595b63e1fa31c3c21b68ca58c4383bb658a3ead4d296\", \"amount\": 48.99989}]"
{
  "hex": "03000000000101f70daae6a5f540e7ff0216e443f6422200f13c2d3c57fa10ab0cff3f1f2abf3f0000000000fdffffff0120e20f2401000000160014e2370a8c1504f239194d158eb0b1450c932b56a9024730440220562a76cf2d701f61bd34a7e741523b1925dfa96b303df94ae7d25c45e186ac3f02207e420ee8a9b9c792b3c67bad8d108c0fc4f0a8d8605f66d61282115a63982d8c0121037dd7593d1344e3b8a13b95ab8cc320ee93466f2b558d2869a6d03361b251d65800000000",
  "complete": true
}
Decode the transaction.
➜  bcli28 decoderawtransaction 03000000000101f70daae6a5f540e7ff0216e443f6422200f13c2d3c57fa10ab0cff3f1f2abf3f0000000000fdffffff0120e20f2401000000160014e2370a8c1504f239194d158eb0b1450c932b56a9024730440220562a76cf2d701f61bd34a7e741523b1925dfa96b303df94ae7d25c45e186ac3f02207e420ee8a9b9c792b3c67bad8d108c0fc4f0a8d8605f66d61282115a63982d8c0121037dd7593d1344e3b8a13b95ab8cc320ee93466f2b558d2869a6d03361b251d65800000000
{
  "txid": "b27bfda21be76ea4bd48cfdffb202d497c441abb1d6f390b605993ff5cafcc28",
  "hash": "1ac1dd8bc88e7917dad311612f2bc992cd6d8e75623d439ee7bb29a60306d550",
  "version": 3,
  "size": 191,
  "vsize": 110,
  "weight": 437,
  "locktime": 0,
  "vin": [
    {
      "txid": "3fbf2a1f3fff0cab10fa573c2d3cf1002242f643e41602ffe740f5a5e6aa0df7",
      "vout": 0,
      "scriptSig": {
        "asm": "",
        "hex": ""
      },
      "txinwitness": [
        "30440220562a76cf2d701f61bd34a7e741523b1925dfa96b303df94ae7d25c45e186ac3f02207e420ee8a9b9c792b3c67bad8d108c0fc4f0a8d8605f66d61282115a63982d8c01",
        "037dd7593d1344e3b8a13b95ab8cc320ee93466f2b558d2869a6d03361b251d658"
      ],
      "sequence": 4294967293
    }
  ],
  "vout": [
    {
      "value": 48.99988000,
      "n": 0,
      "scriptPubKey": {
        "asm": "0 e2370a8c1504f239194d158eb0b1450c932b56a9",
        "desc": "addr(bcrt1qugms4rq4qnerjx2dzk8tpv29pjfjk44fexy380)#yl9fvtz5",
        "hex": "0014e2370a8c1504f239194d158eb0b1450c932b56a9",
        "address": "bcrt1qugms4rq4qnerjx2dzk8tpv29pjfjk44fexy380",
        "type": "witness_v0_keyhash"
      }
    }
  ]
}

Now we test the mempool acceptance of the package containing siblingTx2 and txWithUncle.

➜  bcli28 testmempoolaccept "[\"030000000001019ad3a9564036534504df58d48ee3b4ae93b4d1e0dd238f960a4e26031d9d79660100000000fdffffff0108e60f2401000000160014e2370a8c1504f239194d158eb0b1450c932b56a90247304402204776d01d03e28fa40aa651b12d83cd4f896a166f1a0bce67498cf2c4d7750c4802202424b019fc7a11022cd7cede78ca08e00c1289bd74710792c651c66f7bc71e500121035d276773f6e233b41aba595b63e1fa31c3c21b68ca58c4383bb658a3ead4d29600000000\",\"03000000000101f70daae6a5f540e7ff0216e443f6422200f13c2d3c57fa10ab0cff3f1f2abf3f0000000000fdffffff0120e20f2401000000160014e2370a8c1504f239194d158eb0b1450c932b56a9024730440220562a76cf2d701f61bd34a7e741523b1925dfa96b303df94ae7d25c45e186ac3f02207e420ee8a9b9c792b3c67bad8d108c0fc4f0a8d8605f66d61282115a63982d8c0121037dd7593d1344e3b8a13b95ab8cc320ee93466f2b558d2869a6d03361b251d65800000000\"]"
[
  {
    "txid": "3fbf2a1f3fff0cab10fa573c2d3cf1002242f643e41602ffe740f5a5e6aa0df7",
    "wtxid": "468ec7f33d8b664565bc1926d96d934f89315218896e868d348afb3aafc4adc3",
    "allowed": false,
    "reject-reason": "TRUC-violation"
  },
  {
    "txid": "b27bfda21be76ea4bd48cfdffb202d497c441abb1d6f390b605993ff5cafcc28",
    "wtxid": "1ac1dd8bc88e7917dad311612f2bc992cd6d8e75623d439ee7bb29a60306d550"
  }
]

Note: The above output of the testmempoolaccept currently differs from the submitpackage output below but they both should be consistent in the future releases.

Now submit the package to the mempool and carefully check the output contents. Notice that the siblingTx2 is accepted while replacing the siblingTx1 and the txWithUncle is not accepted in the mempool because it violates the TRUC rule of unconfirmed ancestor count.

➜  bcli28 submitpackage "[\"030000000001019ad3a9564036534504df58d48ee3b4ae93b4d1e0dd238f960a4e26031d9d79660100000000fdffffff0108e60f2401000000160014e2370a8c1504f239194d158eb0b1450c932b56a90247304402204776d01d03e28fa40aa651b12d83cd4f896a166f1a0bce67498cf2c4d7750c4802202424b019fc7a11022cd7cede78ca08e00c1289bd74710792c651c66f7bc71e500121035d276773f6e233b41aba595b63e1fa31c3c21b68ca58c4383bb658a3ead4d29600000000\",\"03000000000101f70daae6a5f540e7ff0216e443f6422200f13c2d3c57fa10ab0cff3f1f2abf3f0000000000fdffffff0120e20f2401000000160014e2370a8c1504f239194d158eb0b1450c932b56a9024730440220562a76cf2d701f61bd34a7e741523b1925dfa96b303df94ae7d25c45e186ac3f02207e420ee8a9b9c792b3c67bad8d108c0fc4f0a8d8605f66d61282115a63982d8c0121037dd7593d1344e3b8a13b95ab8cc320ee93466f2b558d2869a6d03361b251d65800000000\"]"
{
  "package_msg": "transaction failed",
  "tx-results": {
    "468ec7f33d8b664565bc1926d96d934f89315218896e868d348afb3aafc4adc3": {
      "txid": "3fbf2a1f3fff0cab10fa573c2d3cf1002242f643e41602ffe740f5a5e6aa0df7",
      "vsize": 110,
      "fees": {
        "base": 0.00010000,
        "effective-feerate": 0.00090909,
        "effective-includes": [
          "468ec7f33d8b664565bc1926d96d934f89315218896e868d348afb3aafc4adc3"
        ]
      }
    },
    "1ac1dd8bc88e7917dad311612f2bc992cd6d8e75623d439ee7bb29a60306d550": {
      "txid": "b27bfda21be76ea4bd48cfdffb202d497c441abb1d6f390b605993ff5cafcc28",
      "error": "TRUC-violation, tx b27bfda21be76ea4bd48cfdffb202d497c441abb1d6f390b605993ff5cafcc28 (wtxid=1ac1dd8bc88e7917dad311612f2bc992cd6d8e75623d439ee7bb29a60306d550) would have too many ancestors"
    }
  },
  "replaced-transactions": [
    "f4e0f49135aca968372dd0d207bf0aba223f9a5022e647edee7255cd90c178b4"
  ]
}

Check the raw mempool to verify the transactions present.

➜  bcli28 getrawmempool
[
  "66799d1d03264e0a968f23dde0d1b493aeb4e38ed458df044553364056a9d39a",
  "3fbf2a1f3fff0cab10fa573c2d3cf1002242f643e41602ffe740f5a5e6aa0df7"
]

3. Package RBF

Limited package RBF is now enabled, where the proposed conflicting package would result in a connected component, aka cluster, of size 2 in the mempool. All clusters being conflicted against must be of size 2 or lower.

Firstly, we will create a package of a parent and child transaction and submit it in the mempool & it should be accepted. Later, we will create another package of parent and child transaction where the new parent double spends the input of the first parent to make them conflicting with each other. The child of this new package will have higher fees than the child of the previous package due to which this new package would be accepted in the mempool while replacing the first package.

List the unspents present in the wallet. If none, please generate few blocks as done in the above tests and send some coins to your wallet.

bcli28 listunspent
➜  bcli28 listunspent
[
  {
    "txid": "2c99befd21e7ff2f7515cec10224b9075eec597a9f3889904ecba8363595f8b5",
    "vout": 0,
    "address": "bcrt1qwqpxdvp3utduz9zstqx4zca5wpkgzsprqplmhq",
    "label": "",
    "scriptPubKey": "0014700266b031e2dbc11450580d5163b4706c814023",
    "amount": 48.99000000,
    "confirmations": 1,
    "spendable": true,
    "solvable": true,
    "desc": "wpkh([befd193f/84h/1h/0h/0/5]03604ca249d331180c0d9b0b4058e37384acce0e1bc59731bd4a318e41185a8d24)#dmwna3vp",
    "parent_descs": [
      "wpkh(tpubD6NzVbkrYhZ4XeDDHuSAwAXKzSoTYE3cJvSpT2iVpkYnB5CKxib3wH4i8KzHjXRdQ5VmypVNvxcgUhNx5RuqHEWf3Vu2RWZ8EWeCWXP1AAQ/84h/1h/0h/0/*)#feqmcumc"
    ],
    "safe": true
  },
  {
    "txid": "00b536e8bb097c42ccc07e17351a0baa38fd4f4f907bfabfc01f1fbb1313fead",
    "vout": 0,
    "address": "bcrt1qxf83gem5qma7hgzv30c0gy5v7ln209kmpmqex2",
    "label": "",
    "scriptPubKey": "0014324f14677406fbeba04c8bf0f4128cf7e6a796db",
    "amount": 1.00000000,
    "confirmations": 2,
    "spendable": true,
    "solvable": true,
    "desc": "wpkh([befd193f/84h/1h/0h/0/1]02b0d3f50ba9481840f2dd9c8474c5c199f065f3b0a0c60ffb17058a087fed7711)#w8y2yqu5",
    "parent_descs": [
      "wpkh(tpubD6NzVbkrYhZ4XeDDHuSAwAXKzSoTYE3cJvSpT2iVpkYnB5CKxib3wH4i8KzHjXRdQ5VmypVNvxcgUhNx5RuqHEWf3Vu2RWZ8EWeCWXP1AAQ/84h/1h/0h/0/*)#feqmcumc"
    ],
    "safe": true
  },
  {
    "txid": "f8aa3395fef9d65faa713c55cc167cc31452ecfaafd3ea8001dedd7ae064c446",
    "vout": 0,
    "address": "bcrt1q54vsrywy08hzzu3ep4dvhc7qfyvgmx9yz74eul",
    "label": "",
    "scriptPubKey": "0014a5590191c479ee2172390d5acbe3c049188d98a4",
    "amount": 50.00000000,
    "confirmations": 101,
    "spendable": true,
    "solvable": true,
    "desc": "wpkh([befd193f/84h/1h/0h/0/0]021a5fcc0536964a3dc08ebb118ce58a2707768ddcc3340a51f6331bf60a7d6c89)#yrqa0p4a",
    "parent_descs": [
      "wpkh(tpubD6NzVbkrYhZ4XeDDHuSAwAXKzSoTYE3cJvSpT2iVpkYnB5CKxib3wH4i8KzHjXRdQ5VmypVNvxcgUhNx5RuqHEWf3Vu2RWZ8EWeCWXP1AAQ/84h/1h/0h/0/*)#feqmcumc"
    ],
    "safe": true
  }
]

Feel free to generate a new address for the destination in the below transaction.

bcli28 getnewaddress

Pick any one unspent and spend it in a new transaction. And then sign it using the wallet.

➜  bcli28 createrawtransaction "[{\"txid\": \"f8aa3395fef9d65faa713c55cc167cc31452ecfaafd3ea8001dedd7ae064c446\", \"vout\": 0}]" "[{\"bcrt1qs20p3shcvg04vv7dmvfdjskawrucgmgsglycdf\": 49.99999}]"
020000000146c464e07addde0180ead3affaec5214c37c16cc553c71aa5fd6f9fe9533aaf80000000000fdffffff0118ee052a01000000160014829e18c2f8621f5633cddb12d942dd70f9846d1000000000
➜  bcli28 signrawtransactionwithwallet 020000000146c464e07addde0180ead3affaec5214c37c16cc553c71aa5fd6f9fe9533aaf80000000000fdffffff0118ee052a01000000160014829e18c2f8621f5633cddb12d942dd70f9846d1000000000
{
  "hex": "0200000000010146c464e07addde0180ead3affaec5214c37c16cc553c71aa5fd6f9fe9533aaf80000000000fdffffff0118ee052a01000000160014829e18c2f8621f5633cddb12d942dd70f9846d1002473044022041b3ce001f1194ead100966874fe2fc90a0ecb8861f24b69d58b22c2094245cb02203dd223c018f282b6ce08d185cc8a892626e46c31eef98562136c33216c78b6260121021a5fcc0536964a3dc08ebb118ce58a2707768ddcc3340a51f6331bf60a7d6c8900000000",
  "complete": true
}
Decode the transaction hex to verify its contents.
➜  bcli28 decoderawtransaction 0200000000010146c464e07addde0180ead3affaec5214c37c16cc553c71aa5fd6f9fe9533aaf80000000000fdffffff0118ee052a01000000160014829e18c2f8621f5633cddb12d942dd70f9846d1002473044022041b3ce001f1194ead100966874fe2fc90a0ecb8861f24b69d58b22c2094245cb02203dd223c018f282b6ce08d185cc8a892626e46c31eef98562136c33216c78b6260121021a5fcc0536964a3dc08ebb118ce58a2707768ddcc3340a51f6331bf60a7d6c8900000000
{
  "txid": "8251718f3bc9b5e54a15d0197f3f263550d0ae17668e1a01519dfbbf6e1b32eb",
  "hash": "b418ab56242d9c35ccbf205d31b419d21853b5ca3b29136b3c97a20702551ced",
  "version": 2,
  "size": 191,
  "vsize": 110,
  "weight": 437,
  "locktime": 0,
  "vin": [
    {
      "txid": "f8aa3395fef9d65faa713c55cc167cc31452ecfaafd3ea8001dedd7ae064c446",
      "vout": 0,
      "scriptSig": {
        "asm": "",
        "hex": ""
      },
      "txinwitness": [
        "3044022041b3ce001f1194ead100966874fe2fc90a0ecb8861f24b69d58b22c2094245cb02203dd223c018f282b6ce08d185cc8a892626e46c31eef98562136c33216c78b62601",
        "021a5fcc0536964a3dc08ebb118ce58a2707768ddcc3340a51f6331bf60a7d6c89"
      ],
      "sequence": 4294967293
    }
  ],
  "vout": [
    {
      "value": 49.99999000,
      "n": 0,
      "scriptPubKey": {
        "asm": "0 829e18c2f8621f5633cddb12d942dd70f9846d10",
        "desc": "addr(bcrt1qs20p3shcvg04vv7dmvfdjskawrucgmgsglycdf)#nk08vsdz",
        "hex": "0014829e18c2f8621f5633cddb12d942dd70f9846d10",
        "address": "bcrt1qs20p3shcvg04vv7dmvfdjskawrucgmgsglycdf",
        "type": "witness_v0_keyhash"
      }
    }
  ]
}

Create a child transaction spending the output of the previous transaction and sign it. Note that we must provide the previous transaction details in the signrawtransaction command just like done in the sibling eviction test earlier.

➜  bcli28 createrawtransaction "[{\"txid\": \"8251718f3bc9b5e54a15d0197f3f263550d0ae17668e1a01519dfbbf6e1b32eb\", \"vout\": 0}]" "[{\"bcrt1qs20p3shcvg04vv7dmvfdjskawrucgmgsglycdf\": 49.99998}]"
0200000001eb321b6ebffb9d51011a8e6617aed05035263f7f19d0154ae5b5c93b8f7151820000000000fdffffff0130ea052a01000000160014829e18c2f8621f5633cddb12d942dd70f9846d1000000000
➜  bcli28 signrawtransactionwithwallet 0200000001eb321b6ebffb9d51011a8e6617aed05035263f7f19d0154ae5b5c93b8f7151820000000000fdffffff0130ea052a01000000160014829e18c2f8621f5633cddb12d942dd70f9846d1000000000 "[{\"txid\":\"8251718f3bc9b5e54a15d0197f3f263550d0ae17668e1a01519dfbbf6e1b32eb\", \"vout\": 0, \"scriptPubKey\": \"0014829e18c2f8621f5633cddb12d942dd70f9846d10\", \"witnessScript\": \"021a5fcc0536964a3dc08ebb118ce58a2707768ddcc3340a51f6331bf60a7d6c89\", \"amount\": 49.99999}]"
{
  "hex": "02000000000101eb321b6ebffb9d51011a8e6617aed05035263f7f19d0154ae5b5c93b8f7151820000000000fdffffff0130ea052a01000000160014829e18c2f8621f5633cddb12d942dd70f9846d100247304402202823339d61053a2619e4441929f0518b2805ab47ae7ee49dc9cd36c19482d951022024b96c67398ecb877d2d3e457eff6d8a13d7616d627695f884014544bbbc0c89012103e16f2b99a34bf116476550286b91225a81174d0de86b8c434d81d02e06f2b8d200000000",
  "complete": true
}

Test mempool acceptance of the package of the parent and child transactions, both should pass.

➜  bcli28 testmempoolaccept "[\"0200000000010146c464e07addde0180ead3affaec5214c37c16cc553c71aa5fd6f9fe9533aaf80000000000fdffffff0118ee052a01000000160014829e18c2f8621f5633cddb12d942dd70f9846d1002473044022041b3ce001f1194ead100966874fe2fc90a0ecb8861f24b69d58b22c2094245cb02203dd223c018f282b6ce08d185cc8a892626e46c31eef98562136c33216c78b6260121021a5fcc0536964a3dc08ebb118ce58a2707768ddcc3340a51f6331bf60a7d6c8900000000\",\"02000000000101eb321b6ebffb9d51011a8e6617aed05035263f7f19d0154ae5b5c93b8f7151820000000000fdffffff0130ea052a01000000160014829e18c2f8621f5633cddb12d942dd70f9846d100247304402202823339d61053a2619e4441929f0518b2805ab47ae7ee49dc9cd36c19482d951022024b96c67398ecb877d2d3e457eff6d8a13d7616d627695f884014544bbbc0c89012103e16f2b99a34bf116476550286b91225a81174d0de86b8c434d81d02e06f2b8d200000000\"]"
[
  {
    "txid": "8251718f3bc9b5e54a15d0197f3f263550d0ae17668e1a01519dfbbf6e1b32eb",
    "wtxid": "b418ab56242d9c35ccbf205d31b419d21853b5ca3b29136b3c97a20702551ced",
    "allowed": true,
    "vsize": 110,
    "fees": {
      "base": 0.00001000,
      "effective-feerate": 0.00009090,
      "effective-includes": [
        "b418ab56242d9c35ccbf205d31b419d21853b5ca3b29136b3c97a20702551ced"
      ]
    }
  },
  {
    "txid": "ec3e8ce0da7f3b1216ec9973d37b424954e8c62a2962026c6b5c83915fcf06e1",
    "wtxid": "f5d1ed64e39ac9bcd4b3c7fff79b32b874b5f91250a0cb07ccc8517fd408c867",
    "allowed": true,
    "vsize": 110,
    "fees": {
      "base": 0.00001000,
      "effective-feerate": 0.00009090,
      "effective-includes": [
        "f5d1ed64e39ac9bcd4b3c7fff79b32b874b5f91250a0cb07ccc8517fd408c867"
      ]
    }
  }
]

Submit the package to the mempool!

➜  bcli28 submitpackage "[\"0200000000010146c464e07addde0180ead3affaec5214c37c16cc553c71aa5fd6f9fe9533aaf80000000000fdffffff0118ee052a01000000160014829e18c2f8621f5633cddb12d942dd70f9846d1002473044022041b3ce001f1194ead100966874fe2fc90a0ecb8861f24b69d58b22c2094245cb02203dd223c018f282b6ce08d185cc8a892626e46c31eef98562136c33216c78b6260121021a5fcc0536964a3dc08ebb118ce58a2707768ddcc3340a51f6331bf60a7d6c8900000000\",\"02000000000101eb321b6ebffb9d51011a8e6617aed05035263f7f19d0154ae5b5c93b8f7151820000000000fdffffff0130ea052a01000000160014829e18c2f8621f5633cddb12d942dd70f9846d100247304402202823339d61053a2619e4441929f0518b2805ab47ae7ee49dc9cd36c19482d951022024b96c67398ecb877d2d3e457eff6d8a13d7616d627695f884014544bbbc0c89012103e16f2b99a34bf116476550286b91225a81174d0de86b8c434d81d02e06f2b8d200000000\"]"
{
  "package_msg": "success",
  "tx-results": {
    "b418ab56242d9c35ccbf205d31b419d21853b5ca3b29136b3c97a20702551ced": {
      "txid": "8251718f3bc9b5e54a15d0197f3f263550d0ae17668e1a01519dfbbf6e1b32eb",
      "vsize": 110,
      "fees": {
        "base": 0.00001000,
        "effective-feerate": 0.00009090,
        "effective-includes": [
          "b418ab56242d9c35ccbf205d31b419d21853b5ca3b29136b3c97a20702551ced"
        ]
      }
    },
    "f5d1ed64e39ac9bcd4b3c7fff79b32b874b5f91250a0cb07ccc8517fd408c867": {
      "txid": "ec3e8ce0da7f3b1216ec9973d37b424954e8c62a2962026c6b5c83915fcf06e1",
      "vsize": 110,
      "fees": {
        "base": 0.00001000,
        "effective-feerate": 0.00009090,
        "effective-includes": [
          "f5d1ed64e39ac9bcd4b3c7fff79b32b874b5f91250a0cb07ccc8517fd408c867"
        ]
      }
    }
  },
  "replaced-transactions": [
  ]
}

Now lets create a new address to create a conflicting transaction. This is done because we are sending the same amount from the same unspent and not using the same address will help in getting a different transaction hex created.

➜  bcli28 getnewaddress
bcrt1qk884zxv67cfr4q2rvffkshvcuefa9wedxeplx5

Create a new parent transaction that spends the same unspent of the first parent transaction. And sign it.

➜  bcli28 createrawtransaction "[{\"txid\": \"f8aa3395fef9d65faa713c55cc167cc31452ecfaafd3ea8001dedd7ae064c446\", \"vout\": 0}]" "[{\"bcrt1qk884zxv67cfr4q2rvffkshvcuefa9wedxeplx5\": 49.99999}]"
020000000146c464e07addde0180ead3affaec5214c37c16cc553c71aa5fd6f9fe9533aaf80000000000fdffffff0118ee052a01000000160014b1cf51199af6123a81436253685d98e653d2bb2d00000000
➜  bcli28 signrawtransactionwithwallet 020000000146c464e07addde0180ead3affaec5214c37c16cc553c71aa5fd6f9fe9533aaf80000000000fdffffff0118ee052a01000000160014b1cf51199af6123a81436253685d98e653d2bb2d00000000
{
  "hex": "0200000000010146c464e07addde0180ead3affaec5214c37c16cc553c71aa5fd6f9fe9533aaf80000000000fdffffff0118ee052a01000000160014b1cf51199af6123a81436253685d98e653d2bb2d02463043021f236396273e63d77813bfae8a8e1fb867c31673facb4515e1be50d3fd9537870220764470dc4554e255aeaa7baa3ef07abb0733737a79a4617b79dae55aa11101540121021a5fcc0536964a3dc08ebb118ce58a2707768ddcc3340a51f6331bf60a7d6c8900000000",
  "complete": true
}
Decode the transaction.
➜  bcli28 decoderawtransaction 0200000000010146c464e07addde0180ead3affaec5214c37c16cc553c71aa5fd6f9fe9533aaf80000000000fdffffff0118ee052a01000000160014b1cf51199af6123a81436253685d98e653d2bb2d02463043021f236396273e63d77813bfae8a8e1fb867c31673facb4515e1be50d3fd9537870220764470dc4554e255aeaa7baa3ef07abb0733737a79a4617b79dae55aa11101540121021a5fcc0536964a3dc08ebb118ce58a2707768ddcc3340a51f6331bf60a7d6c8900000000
{
  "txid": "3de428a8ab508ded638b30652f19300fee62d91b0a0bddc1f150a676ac7f0577",
  "hash": "e6eeddd05b08928125e800b43906f11b768cd29ae30782618c7d4caab059a444",
  "version": 2,
  "size": 190,
  "vsize": 109,
  "weight": 436,
  "locktime": 0,
  "vin": [
    {
      "txid": "f8aa3395fef9d65faa713c55cc167cc31452ecfaafd3ea8001dedd7ae064c446",
      "vout": 0,
      "scriptSig": {
        "asm": "",
        "hex": ""
      },
      "txinwitness": [
        "3043021f236396273e63d77813bfae8a8e1fb867c31673facb4515e1be50d3fd9537870220764470dc4554e255aeaa7baa3ef07abb0733737a79a4617b79dae55aa111015401",
        "021a5fcc0536964a3dc08ebb118ce58a2707768ddcc3340a51f6331bf60a7d6c89"
      ],
      "sequence": 4294967293
    }
  ],
  "vout": [
    {
      "value": 49.99999000,
      "n": 0,
      "scriptPubKey": {
        "asm": "0 b1cf51199af6123a81436253685d98e653d2bb2d",
        "desc": "addr(bcrt1qk884zxv67cfr4q2rvffkshvcuefa9wedxeplx5)#vvhp0ffp",
        "hex": "0014b1cf51199af6123a81436253685d98e653d2bb2d",
        "address": "bcrt1qk884zxv67cfr4q2rvffkshvcuefa9wedxeplx5",
        "type": "witness_v0_keyhash"
      }
    }
  ]
}

Create a new child transaction of this new parent transaction BUT with fees higher than the previous child transaction. And sign it. Note that we must provide the previous transaction details just like done in the sibling eviction test.

➜  bcli28 createrawtransaction "[{\"txid\": \"3de428a8ab508ded638b30652f19300fee62d91b0a0bddc1f150a676ac7f0577\", \"vout\": 0}]" "[{\"bcrt1qk884zxv67cfr4q2rvffkshvcuefa9wedxeplx5\": 49.99995}]"
020000000177057fac76a650f1c1dd0b0a1bd962ee0f30192f65308b63ed8d50aba828e43d0000000000fdffffff0178de052a01000000160014b1cf51199af6123a81436253685d98e653d2bb2d00000000
➜  bcli28 signrawtransactionwithwallet 020000000177057fac76a650f1c1dd0b0a1bd962ee0f30192f65308b63ed8d50aba828e43d0000000000fdffffff0178de052a01000000160014b1cf51199af6123a81436253685d98e653d2bb2d00000000 "[{\"txid\":\"3de428a8ab508ded638b30652f19300fee62d91b0a0bddc1f150a676ac7f0577\", \"vout\": 0, \"scriptPubKey\": \"0014b1cf51199af6123a81436253685d98e653d2bb2d\", \"witnessScript\": \"021a5fcc0536964a3dc08ebb118ce58a2707768ddcc3340a51f6331bf60a7d6c89\", \"amount\": 49.99999}]"
{
  "hex": "0200000000010177057fac76a650f1c1dd0b0a1bd962ee0f30192f65308b63ed8d50aba828e43d0000000000fdffffff0178de052a01000000160014b1cf51199af6123a81436253685d98e653d2bb2d0247304402200a5d722bbdaa5483463a1ba6d85f3e3af52608bc9a95287ca6b7c959138fc916022012611f1773e5d8161446acd3e097b4536580f9dbc35913677ddbdf6fc890bca60121029a438f2462df06d9bbbe78084c8736f1c14148bc75c29d9cbd290d2b6b2d36cd00000000",
  "complete": true
}

Test the mempool acceptance of this new package.

➜  bcli28 testmempoolaccept "[\"0200000000010146c464e07addde0180ead3affaec5214c37c16cc553c71aa5fd6f9fe9533aaf80000000000fdffffff0118ee052a01000000160014b1cf51199af6123a81436253685d98e653d2bb2d02463043021f236396273e63d77813bfae8a8e1fb867c31673facb4515e1be50d3fd9537870220764470dc4554e255aeaa7baa3ef07abb0733737a79a4617b79dae55aa11101540121021a5fcc0536964a3dc08ebb118ce58a2707768ddcc3340a51f6331bf60a7d6c8900000000\",\"0200000000010177057fac76a650f1c1dd0b0a1bd962ee0f30192f65308b63ed8d50aba828e43d0000000000fdffffff0178de052a01000000160014b1cf51199af6123a81436253685d98e653d2bb2d0247304402200a5d722bbdaa5483463a1ba6d85f3e3af52608bc9a95287ca6b7c959138fc916022012611f1773e5d8161446acd3e097b4536580f9dbc35913677ddbdf6fc890bca60121029a438f2462df06d9bbbe78084c8736f1c14148bc75c29d9cbd290d2b6b2d36cd00000000\"]"
[
  {
    "txid": "3de428a8ab508ded638b30652f19300fee62d91b0a0bddc1f150a676ac7f0577",
    "wtxid": "e6eeddd05b08928125e800b43906f11b768cd29ae30782618c7d4caab059a444",
    "allowed": false,
    "reject-reason": "bip125-replacement-disallowed"
  },
  {
    "txid": "2698b9d37be5b06492708028a17b4dd0efc3c7e60d2b8dd0ae83e70141a1e4f0",
    "wtxid": "78c6127556981a849c0567e9de622cdbccba1e7deca998e2f4f547d8f3a524ce"
  }
]

Note the current status of the mempool, it contains the transactions of the previous package atm.

➜  bcli28 getrawmempool
[
  "eb97817523305aa2f65f0c6b7ad3a4b3010904003426893478d80ab11d6b3163",
  "8251718f3bc9b5e54a15d0197f3f263550d0ae17668e1a01519dfbbf6e1b32eb",
  "ec3e8ce0da7f3b1216ec9973d37b424954e8c62a2962026c6b5c83915fcf06e1"
]

Submit the new package to the mempool and note that the transactions of the previous package are replaced by the ones in the new package!

➜  bcli28 submitpackage "[\"0200000000010146c464e07addde0180ead3affaec5214c37c16cc553c71aa5fd6f9fe9533aaf80000000000fdffffff0118ee052a01000000160014b1cf51199af6123a81436253685d98e653d2bb2d02463043021f236396273e63d77813bfae8a8e1fb867c31673facb4515e1be50d3fd9537870220764470dc4554e255aeaa7baa3ef07abb0733737a79a4617b79dae55aa11101540121021a5fcc0536964a3dc08ebb118ce58a2707768ddcc3340a51f6331bf60a7d6c8900000000\",\"0200000000010177057fac76a650f1c1dd0b0a1bd962ee0f30192f65308b63ed8d50aba828e43d0000000000fdffffff0178de052a01000000160014b1cf51199af6123a81436253685d98e653d2bb2d0247304402200a5d722bbdaa5483463a1ba6d85f3e3af52608bc9a95287ca6b7c959138fc916022012611f1773e5d8161446acd3e097b4536580f9dbc35913677ddbdf6fc890bca60121029a438f2462df06d9bbbe78084c8736f1c14148bc75c29d9cbd290d2b6b2d36cd00000000\"]"
{
  "package_msg": "success",
  "tx-results": {
    "e6eeddd05b08928125e800b43906f11b768cd29ae30782618c7d4caab059a444": {
      "txid": "3de428a8ab508ded638b30652f19300fee62d91b0a0bddc1f150a676ac7f0577",
      "vsize": 109,
      "fees": {
        "base": 0.00001000,
        "effective-feerate": 0.00022831,
        "effective-includes": [
          "e6eeddd05b08928125e800b43906f11b768cd29ae30782618c7d4caab059a444",
          "78c6127556981a849c0567e9de622cdbccba1e7deca998e2f4f547d8f3a524ce"
        ]
      }
    },
    "78c6127556981a849c0567e9de622cdbccba1e7deca998e2f4f547d8f3a524ce": {
      "txid": "2698b9d37be5b06492708028a17b4dd0efc3c7e60d2b8dd0ae83e70141a1e4f0",
      "vsize": 110,
      "fees": {
        "base": 0.00004000,
        "effective-feerate": 0.00022831,
        "effective-includes": [
          "e6eeddd05b08928125e800b43906f11b768cd29ae30782618c7d4caab059a444",
          "78c6127556981a849c0567e9de622cdbccba1e7deca998e2f4f547d8f3a524ce"
        ]
      }
    }
  },
  "replaced-transactions": [
    "ec3e8ce0da7f3b1216ec9973d37b424954e8c62a2962026c6b5c83915fcf06e1",
    "8251718f3bc9b5e54a15d0197f3f263550d0ae17668e1a01519dfbbf6e1b32eb"
  ]
}

4. Mempool Conflicting Transactions

The wallet now detects when wallet transactions conflict with the mempool. Mempool conflicting transactions can be seen in the "mempoolconflicts" field of gettransaction. The inputs of mempool conflicted transactions can now be respent without manually abandoning the transactions when the parent transaction is dropped from the mempool, which can cause wallet balances to appear higher.

List the unspents present in the wallet. If none, please generate few blocks as done in the above tests and send some coins to your wallet.
➜  bcli28 listunspent
[
  {
    "txid": "00b536e8bb097c42ccc07e17351a0baa38fd4f4f907bfabfc01f1fbb1313fead",
    "vout": 0,
    "address": "bcrt1qxf83gem5qma7hgzv30c0gy5v7ln209kmpmqex2",
    "label": "",
    "scriptPubKey": "0014324f14677406fbeba04c8bf0f4128cf7e6a796db",
    "amount": 1.00000000,
    "confirmations": 1,
    "spendable": true,
    "solvable": true,
    "desc": "wpkh([befd193f/84h/1h/0h/0/1]02b0d3f50ba9481840f2dd9c8474c5c199f065f3b0a0c60ffb17058a087fed7711)#w8y2yqu5",
    "parent_descs": [
      "wpkh(tpubD6NzVbkrYhZ4XeDDHuSAwAXKzSoTYE3cJvSpT2iVpkYnB5CKxib3wH4i8KzHjXRdQ5VmypVNvxcgUhNx5RuqHEWf3Vu2RWZ8EWeCWXP1AAQ/84h/1h/0h/0/*)#feqmcumc"
    ],
    "safe": true
  },
  {
    "txid": "00b536e8bb097c42ccc07e17351a0baa38fd4f4f907bfabfc01f1fbb1313fead",
    "vout": 1,
    "address": "bcrt1q6u4s3v5kx2etxe5dhmx5dn9n6ydrwguxn8l9n7",
    "label": "",
    "scriptPubKey": "0014d72b08b29632b2b3668dbecd46ccb3d11a372386",
    "amount": 48.99900000,
    "confirmations": 1,
    "spendable": true,
    "solvable": true,
    "desc": "wpkh([befd193f/84h/1h/0h/0/2]03eac615d207bb5eb367ac06cfc421848e8ec94e17117e5755d384d715502d7844)#njjx64ly",
    "parent_descs": [
      "wpkh(tpubD6NzVbkrYhZ4XeDDHuSAwAXKzSoTYE3cJvSpT2iVpkYnB5CKxib3wH4i8KzHjXRdQ5VmypVNvxcgUhNx5RuqHEWf3Vu2RWZ8EWeCWXP1AAQ/84h/1h/0h/0/*)#feqmcumc"
    ],
    "safe": true
  },
  {
    "txid": "ddfd54ac08be6510112183447e1ff7775f02f526bb9ad1a5a6ecb539b35077d7",
    "vout": 0,
    "address": "bcrt1q54vsrywy08hzzu3ep4dvhc7qfyvgmx9yz74eul",
    "label": "",
    "scriptPubKey": "0014a5590191c479ee2172390d5acbe3c049188d98a4",
    "amount": 50.00000000,
    "confirmations": 101,
    "spendable": true,
    "solvable": true,
    "desc": "wpkh([befd193f/84h/1h/0h/0/0]021a5fcc0536964a3dc08ebb118ce58a2707768ddcc3340a51f6331bf60a7d6c89)#yrqa0p4a",
    "parent_descs": [
      "wpkh(tpubD6NzVbkrYhZ4XeDDHuSAwAXKzSoTYE3cJvSpT2iVpkYnB5CKxib3wH4i8KzHjXRdQ5VmypVNvxcgUhNx5RuqHEWf3Vu2RWZ8EWeCWXP1AAQ/84h/1h/0h/0/*)#feqmcumc"
    ],
    "safe": true
  }
]

Generate a new address in your wallet.

➜  bcli28 getnewaddress
bcrt1qwqpxdvp3utduz9zstqx4zca5wpkgzsprqplmhq

Create a transaction spending any one unspent. And then sign it.

➜  bcli28 createrawtransaction "[{\"txid\": \"00b536e8bb097c42ccc07e17351a0baa38fd4f4f907bfabfc01f1fbb1313fead\", \"vout\": 1}]" "[{\"bcrt1qwqpxdvp3utduz9zstqx4zca5wpkgzsprqplmhq\": 48.991}]"
0200000001adfe1313bb1f1fc0bffa7b904f4ffd38aa0b1a35177ec0cc427c09bbe836b5000100000000fdffffff016055022401000000160014700266b031e2dbc11450580d5163b4706c81402300000000
➜  bcli28 signrawtransactionwithwallet 0200000001adfe1313bb1f1fc0bffa7b904f4ffd38aa0b1a35177ec0cc427c09bbe836b5000100000000fdffffff016055022401000000160014700266b031e2dbc11450580d5163b4706c81402300000000
{
  "hex": "02000000000101adfe1313bb1f1fc0bffa7b904f4ffd38aa0b1a35177ec0cc427c09bbe836b5000100000000fdffffff016055022401000000160014700266b031e2dbc11450580d5163b4706c8140230247304402201939df1d0d7e460de6208cbab75730f62adc209f830231550c212ef605d9e9690220295ca95e526fd498b7e72fa78cef0ad93d25a5be1b75e1f930d1a19e93d67d1c012103eac615d207bb5eb367ac06cfc421848e8ec94e17117e5755d384d715502d784400000000",
  "complete": true
}

Test mempool acceptance of this transaction, it should pass.

➜  bcli28 testmempoolaccept "[\"02000000000101adfe1313bb1f1fc0bffa7b904f4ffd38aa0b1a35177ec0cc427c09bbe836b5000100000000fdffffff016055022401000000160014700266b031e2dbc11450580d5163b4706c8140230247304402201939df1d0d7e460de6208cbab75730f62adc209f830231550c212ef605d9e9690220295ca95e526fd498b7e72fa78cef0ad93d25a5be1b75e1f930d1a19e93d67d1c012103eac615d207bb5eb367ac06cfc421848e8ec94e17117e5755d384d715502d784400000000\"]"
[
  {
    "txid": "0cd3e4446fd300b56cf543ff64a1f3d06cf5ecbfd06a2ec937c8cfcb4afa492e",
    "wtxid": "a4a56f89f619d32ed482893d86b60153e50f3c3e98d34680827bc8865d489fe5",
    "allowed": true,
    "vsize": 110,
    "fees": {
      "base": 0.00800000,
      "effective-feerate": 0.07272727,
      "effective-includes": [
        "a4a56f89f619d32ed482893d86b60153e50f3c3e98d34680827bc8865d489fe5"
      ]
    }
  }
]
Decode the transaction to verify its contents.
➜  bcli28 decoderawtransaction 02000000000101adfe1313bb1f1fc0bffa7b904f4ffd38aa0b1a35177ec0cc427c09bbe836b5000100000000fdffffff016055022401000000160014700266b031e2dbc11450580d5163b4706c8140230247304402201939df1d0d7e460de6208cbab75730f62adc209f830231550c212ef605d9e9690220295ca95e526fd498b7e72fa78cef0ad93d25a5be1b75e1f930d1a19e93d67d1c012103eac615d207bb5eb367ac06cfc421848e8ec94e17117e5755d384d715502d784400000000
{
  "txid": "0cd3e4446fd300b56cf543ff64a1f3d06cf5ecbfd06a2ec937c8cfcb4afa492e",
  "hash": "a4a56f89f619d32ed482893d86b60153e50f3c3e98d34680827bc8865d489fe5",
  "version": 2,
  "size": 191,
  "vsize": 110,
  "weight": 437,
  "locktime": 0,
  "vin": [
    {
      "txid": "00b536e8bb097c42ccc07e17351a0baa38fd4f4f907bfabfc01f1fbb1313fead",
      "vout": 1,
      "scriptSig": {
        "asm": "",
        "hex": ""
      },
      "txinwitness": [
        "304402201939df1d0d7e460de6208cbab75730f62adc209f830231550c212ef605d9e9690220295ca95e526fd498b7e72fa78cef0ad93d25a5be1b75e1f930d1a19e93d67d1c01",
        "03eac615d207bb5eb367ac06cfc421848e8ec94e17117e5755d384d715502d7844"
      ],
      "sequence": 4294967293
    }
  ],
  "vout": [
    {
      "value": 48.99100000,
      "n": 0,
      "scriptPubKey": {
        "asm": "0 700266b031e2dbc11450580d5163b4706c814023",
        "desc": "addr(bcrt1qwqpxdvp3utduz9zstqx4zca5wpkgzsprqplmhq)#tvsd4x6l",
        "hex": "0014700266b031e2dbc11450580d5163b4706c814023",
        "address": "bcrt1qwqpxdvp3utduz9zstqx4zca5wpkgzsprqplmhq",
        "type": "witness_v0_keyhash"
      }
    }
  ]
}

Send it! It should be accepted.

➜  bcli28 sendrawtransaction "02000000000101adfe1313bb1f1fc0bffa7b904f4ffd38aa0b1a35177ec0cc427c09bbe836b5000100000000fdffffff016055022401000000160014700266b031e2dbc11450580d5163b4706c8140230247304402201939df1d0d7e460de6208cbab75730f62adc209f830231550c212ef605d9e9690220295ca95e526fd498b7e72fa78cef0ad93d25a5be1b75e1f930d1a19e93d67d1c012103eac615d207bb5eb367ac06cfc421848e8ec94e17117e5755d384d715502d784400000000"
0cd3e4446fd300b56cf543ff64a1f3d06cf5ecbfd06a2ec937c8cfcb4afa492e

Verify the mempool contents. Alternatively, getmempoolentry <txid> also works.

➜  bcli28 getrawmempool
[
  "0cd3e4446fd300b56cf543ff64a1f3d06cf5ecbfd06a2ec937c8cfcb4afa492e"
]
➜  bcli28 getmempoolinfo
{
  "loaded": true,
  "size": 1,
  "bytes": 110,
  "usage": 1072,
  "total_fee": 0.00800000,
  "maxmempool": 300000000,
  "mempoolminfee": 0.00001000,
  "minrelaytxfee": 0.00001000,
  "incrementalrelayfee": 0.00001000,
  "unbroadcastcount": 1,
  "fullrbf": true
}
List the unspents in the wallet, the one spent in the previous transaction should not show up in the output now.
➜  bcli28 listunspent
[
  {
    "txid": "00b536e8bb097c42ccc07e17351a0baa38fd4f4f907bfabfc01f1fbb1313fead",
    "vout": 0,
    "address": "bcrt1qxf83gem5qma7hgzv30c0gy5v7ln209kmpmqex2",
    "label": "",
    "scriptPubKey": "0014324f14677406fbeba04c8bf0f4128cf7e6a796db",
    "amount": 1.00000000,
    "confirmations": 1,
    "spendable": true,
    "solvable": true,
    "desc": "wpkh([befd193f/84h/1h/0h/0/1]02b0d3f50ba9481840f2dd9c8474c5c199f065f3b0a0c60ffb17058a087fed7711)#w8y2yqu5",
    "parent_descs": [
      "wpkh(tpubD6NzVbkrYhZ4XeDDHuSAwAXKzSoTYE3cJvSpT2iVpkYnB5CKxib3wH4i8KzHjXRdQ5VmypVNvxcgUhNx5RuqHEWf3Vu2RWZ8EWeCWXP1AAQ/84h/1h/0h/0/*)#feqmcumc"
    ],
    "safe": true
  },
  {
    "txid": "ddfd54ac08be6510112183447e1ff7775f02f526bb9ad1a5a6ecb539b35077d7",
    "vout": 0,
    "address": "bcrt1q54vsrywy08hzzu3ep4dvhc7qfyvgmx9yz74eul",
    "label": "",
    "scriptPubKey": "0014a5590191c479ee2172390d5acbe3c049188d98a4",
    "amount": 50.00000000,
    "confirmations": 101,
    "spendable": true,
    "solvable": true,
    "desc": "wpkh([befd193f/84h/1h/0h/0/0]021a5fcc0536964a3dc08ebb118ce58a2707768ddcc3340a51f6331bf60a7d6c89)#yrqa0p4a",
    "parent_descs": [
      "wpkh(tpubD6NzVbkrYhZ4XeDDHuSAwAXKzSoTYE3cJvSpT2iVpkYnB5CKxib3wH4i8KzHjXRdQ5VmypVNvxcgUhNx5RuqHEWf3Vu2RWZ8EWeCWXP1AAQ/84h/1h/0h/0/*)#feqmcumc"
    ],
    "safe": true
  }
]

Create another transaction that double spends the input of the previous transaction so that it conflicts with the previous one. And sign it.

➜  bcli28 createrawtransaction "[{\"txid\": \"00b536e8bb097c42ccc07e17351a0baa38fd4f4f907bfabfc01f1fbb1313fead\", \"vout\": 1}]" "[{\"bcrt1qwqpxdvp3utduz9zstqx4zca5wpkgzsprqplmhq\": 48.99}]"
0200000001adfe1313bb1f1fc0bffa7b904f4ffd38aa0b1a35177ec0cc427c09bbe836b5000100000000fdffffff01c0ce002401000000160014700266b031e2dbc11450580d5163b4706c81402300000000
➜  bcli28 signrawtransactionwithwallet 0200000001adfe1313bb1f1fc0bffa7b904f4ffd38aa0b1a35177ec0cc427c09bbe836b5000100000000fdffffff01c0ce002401000000160014700266b031e2dbc11450580d5163b4706c81402300000000
{
  "hex": "02000000000101adfe1313bb1f1fc0bffa7b904f4ffd38aa0b1a35177ec0cc427c09bbe836b5000100000000fdffffff01c0ce002401000000160014700266b031e2dbc11450580d5163b4706c814023024730440220380b49cb30c8cad3ecf1f1c25ea1864b0242a8de57da6370e7547eced15bd84402201a43e9e6308bed63899f2aa63fe486259017a9005e920fedc27760c68fabf3e7012103eac615d207bb5eb367ac06cfc421848e8ec94e17117e5755d384d715502d784400000000",
  "complete": true
}
Decode the transaction.
➜  bcli28 decoderawtransaction 02000000000101adfe1313bb1f1fc0bffa7b904f4ffd38aa0b1a35177ec0cc427c09bbe836b5000100000000fdffffff01c0ce002401000000160014700266b031e2dbc11450580d5163b4706c814023024730440220380b49cb30c8cad3ecf1f1c25ea1864b0242a8de57da6370e7547eced15bd84402201a43e9e6308bed63899f2aa63fe486259017a9005e920fedc27760c68fabf3e7012103eac615d207bb5eb367ac06cfc421848e8ec94e17117e5755d384d715502d784400000000
{
  "txid": "2c99befd21e7ff2f7515cec10224b9075eec597a9f3889904ecba8363595f8b5",
  "hash": "b959b41807e3cd6569d07d4e45eb808fdad5ba7ffa555645b66bc090e2b0aabc",
  "version": 2,
  "size": 191,
  "vsize": 110,
  "weight": 437,
  "locktime": 0,
  "vin": [
    {
      "txid": "00b536e8bb097c42ccc07e17351a0baa38fd4f4f907bfabfc01f1fbb1313fead",
      "vout": 1,
      "scriptSig": {
        "asm": "",
        "hex": ""
      },
      "txinwitness": [
        "30440220380b49cb30c8cad3ecf1f1c25ea1864b0242a8de57da6370e7547eced15bd84402201a43e9e6308bed63899f2aa63fe486259017a9005e920fedc27760c68fabf3e701",
        "03eac615d207bb5eb367ac06cfc421848e8ec94e17117e5755d384d715502d7844"
      ],
      "sequence": 4294967293
    }
  ],
  "vout": [
    {
      "value": 48.99000000,
      "n": 0,
      "scriptPubKey": {
        "asm": "0 700266b031e2dbc11450580d5163b4706c814023",
        "desc": "addr(bcrt1qwqpxdvp3utduz9zstqx4zca5wpkgzsprqplmhq)#tvsd4x6l",
        "hex": "0014700266b031e2dbc11450580d5163b4706c814023",
        "address": "bcrt1qwqpxdvp3utduz9zstqx4zca5wpkgzsprqplmhq",
        "type": "witness_v0_keyhash"
      }
    }
  ]
}

Test mempool acceptance of this new transaction, it should pass.

➜  bcli28 testmempoolaccept "[\"02000000000101adfe1313bb1f1fc0bffa7b904f4ffd38aa0b1a35177ec0cc427c09bbe836b5000100000000fdffffff01c0ce002401000000160014700266b031e2dbc11450580d5163b4706c814023024730440220380b49cb30c8cad3ecf1f1c25ea1864b0242a8de57da6370e7547eced15bd84402201a43e9e6308bed63899f2aa63fe486259017a9005e920fedc27760c68fabf3e7012103eac615d207bb5eb367ac06cfc421848e8ec94e17117e5755d384d715502d784400000000\"]"
[
  {
    "txid": "2c99befd21e7ff2f7515cec10224b9075eec597a9f3889904ecba8363595f8b5",
    "wtxid": "b959b41807e3cd6569d07d4e45eb808fdad5ba7ffa555645b66bc090e2b0aabc",
    "allowed": true,
    "vsize": 110,
    "fees": {
      "base": 0.00900000,
      "effective-feerate": 0.08181818,
      "effective-includes": [
        "b959b41807e3cd6569d07d4e45eb808fdad5ba7ffa555645b66bc090e2b0aabc"
      ]
    }
  }
]
Check the in-wallet tx RPC of the previous transaction and note that `walletconflicts` and `mempoolconflicts` are empty atm.
➜  bcli28 gettransaction 0cd3e4446fd300b56cf543ff64a1f3d06cf5ecbfd06a2ec937c8cfcb4afa492e
{
  "amount": 0.00000000,
  "fee": -0.00800000,
  "confirmations": 0,
  "trusted": true,
  "txid": "0cd3e4446fd300b56cf543ff64a1f3d06cf5ecbfd06a2ec937c8cfcb4afa492e",
  "wtxid": "a4a56f89f619d32ed482893d86b60153e50f3c3e98d34680827bc8865d489fe5",
  "walletconflicts": [
  ],
  "mempoolconflicts": [
  ],
  "time": 1725531026,
  "timereceived": 1725531026,
  "bip125-replaceable": "yes",
  "details": [
    {
      "address": "bcrt1qwqpxdvp3utduz9zstqx4zca5wpkgzsprqplmhq",
      "category": "send",
      "amount": -48.99100000,
      "label": "",
      "vout": 0,
      "fee": -0.00800000,
      "abandoned": false
    },
    {
      "address": "bcrt1qwqpxdvp3utduz9zstqx4zca5wpkgzsprqplmhq",
      "parent_descs": [
        "wpkh(tpubD6NzVbkrYhZ4XeDDHuSAwAXKzSoTYE3cJvSpT2iVpkYnB5CKxib3wH4i8KzHjXRdQ5VmypVNvxcgUhNx5RuqHEWf3Vu2RWZ8EWeCWXP1AAQ/84h/1h/0h/0/*)#feqmcumc"
      ],
      "category": "receive",
      "amount": 48.99100000,
      "label": "",
      "vout": 0,
      "abandoned": false
    }
  ],
  "hex": "02000000000101adfe1313bb1f1fc0bffa7b904f4ffd38aa0b1a35177ec0cc427c09bbe836b5000100000000fdffffff016055022401000000160014700266b031e2dbc11450580d5163b4706c8140230247304402201939df1d0d7e460de6208cbab75730f62adc209f830231550c212ef605d9e9690220295ca95e526fd498b7e72fa78cef0ad93d25a5be1b75e1f930d1a19e93d67d1c012103eac615d207bb5eb367ac06cfc421848e8ec94e17117e5755d384d715502d784400000000",
  "lastprocessedblock": {
    "hash": "74f90bd640f204230074f03819951757e6fb001c64c4f5ca56299e0739f7c1fe",
    "height": 102
  }
}

Send the transaction to the mempool.

➜  bcli28 sendrawtransaction 02000000000101adfe1313bb1f1fc0bffa7b904f4ffd38aa0b1a35177ec0cc427c09bbe836b5000100000000fdffffff01c0ce002401000000160014700266b031e2dbc11450580d5163b4706c814023024730440220380b49cb30c8cad3ecf1f1c25ea1864b0242a8de57da6370e7547eced15bd84402201a43e9e6308bed63899f2aa63fe486259017a9005e920fedc27760c68fabf3e7012103eac615d207bb5eb367ac06cfc421848e8ec94e17117e5755d384d715502d784400000000
2c99befd21e7ff2f7515cec10224b9075eec597a9f3889904ecba8363595f8b5

Verify the mempool contents, note that the new transaction has replaced the previous one.

➜  bcli28 getrawmempool
[
  "2c99befd21e7ff2f7515cec10224b9075eec597a9f3889904ecba8363595f8b5"
]
Execute the `gettransaction` RPC for the old transaction and check the `mempoolconflicts` field - it contains the new transaction!
➜  bcli28 gettransaction 0cd3e4446fd300b56cf543ff64a1f3d06cf5ecbfd06a2ec937c8cfcb4afa492e
{
  "amount": 0.00000000,
  "fee": -0.00800000,
  "confirmations": 0,
  "trusted": false,
  "txid": "0cd3e4446fd300b56cf543ff64a1f3d06cf5ecbfd06a2ec937c8cfcb4afa492e",
  "wtxid": "a4a56f89f619d32ed482893d86b60153e50f3c3e98d34680827bc8865d489fe5",
  "walletconflicts": [
    "2c99befd21e7ff2f7515cec10224b9075eec597a9f3889904ecba8363595f8b5"
  ],
  "mempoolconflicts": [
    "2c99befd21e7ff2f7515cec10224b9075eec597a9f3889904ecba8363595f8b5"
  ],
  "time": 1725531026,
  "timereceived": 1725531026,
  "bip125-replaceable": "yes",
  "details": [
    {
      "address": "bcrt1qwqpxdvp3utduz9zstqx4zca5wpkgzsprqplmhq",
      "category": "send",
      "amount": -48.99100000,
      "label": "",
      "vout": 0,
      "fee": -0.00800000,
      "abandoned": false
    },
    {
      "address": "bcrt1qwqpxdvp3utduz9zstqx4zca5wpkgzsprqplmhq",
      "parent_descs": [
        "wpkh(tpubD6NzVbkrYhZ4XeDDHuSAwAXKzSoTYE3cJvSpT2iVpkYnB5CKxib3wH4i8KzHjXRdQ5VmypVNvxcgUhNx5RuqHEWf3Vu2RWZ8EWeCWXP1AAQ/84h/1h/0h/0/*)#feqmcumc"
      ],
      "category": "receive",
      "amount": 48.99100000,
      "label": "",
      "vout": 0,
      "abandoned": false
    }
  ],
  "hex": "02000000000101adfe1313bb1f1fc0bffa7b904f4ffd38aa0b1a35177ec0cc427c09bbe836b5000100000000fdffffff016055022401000000160014700266b031e2dbc11450580d5163b4706c8140230247304402201939df1d0d7e460de6208cbab75730f62adc209f830231550c212ef605d9e9690220295ca95e526fd498b7e72fa78cef0ad93d25a5be1b75e1f930d1a19e93d67d1c012103eac615d207bb5eb367ac06cfc421848e8ec94e17117e5755d384d715502d784400000000",
  "lastprocessedblock": {
    "hash": "74f90bd640f204230074f03819951757e6fb001c64c4f5ca56299e0739f7c1fe",
    "height": 102
  }
}

5. mempoolfullrbf by default

mempoolfullrbf=1 is now set by default without the need to explicitly add it in the configuration file.

In this new version there is no need to set this flag while running bitcoind. The expectation is that we should be able to replace a transaction with higher fees even if the original transaction didn't signal for RBF.

Run the V28 node without any mempoolfullrbf arguments, as evident by the name of the test, it will pick them by default.

bitcoind28 -daemonwait
➜ bcli28 listunspent
[
  {
    "txid": "00b536e8bb097c42ccc07e17351a0baa38fd4f4f907bfabfc01f1fbb1313fead",
    "vout": 0,
    "address": "bcrt1qxf83gem5qma7hgzv30c0gy5v7ln209kmpmqex2",
    "label": "",
    "scriptPubKey": "0014324f14677406fbeba04c8bf0f4128cf7e6a796db",
    "amount": 1.00000000,
    "confirmations": 2,
    "spendable": true,
    "solvable": true,
    "desc": "wpkh([befd193f/84h/1h/0h/0/1]02b0d3f50ba9481840f2dd9c8474c5c199f065f3b0a0c60ffb17058a087fed7711)#w8y2yqu5",
    "parent_descs": [
      "wpkh(tpubD6NzVbkrYhZ4XeDDHuSAwAXKzSoTYE3cJvSpT2iVpkYnB5CKxib3wH4i8KzHjXRdQ5VmypVNvxcgUhNx5RuqHEWf3Vu2RWZ8EWeCWXP1AAQ/84h/1h/0h/0/*)#feqmcumc"
    ],
    "safe": true
  },
  {
    "txid": "ddfd54ac08be6510112183447e1ff7775f02f526bb9ad1a5a6ecb539b35077d7",
    "vout": 0,
    "address": "bcrt1q54vsrywy08hzzu3ep4dvhc7qfyvgmx9yz74eul",
    "label": "",
    "scriptPubKey": "0014a5590191c479ee2172390d5acbe3c049188d98a4",
    "amount": 50.00000000,
    "confirmations": 102,
    "spendable": true,
    "solvable": true,
    "desc": "wpkh([befd193f/84h/1h/0h/0/0]021a5fcc0536964a3dc08ebb118ce58a2707768ddcc3340a51f6331bf60a7d6c89)#yrqa0p4a",
    "parent_descs": [
      "wpkh(tpubD6NzVbkrYhZ4XeDDHuSAwAXKzSoTYE3cJvSpT2iVpkYnB5CKxib3wH4i8KzHjXRdQ5VmypVNvxcgUhNx5RuqHEWf3Vu2RWZ8EWeCWXP1AAQ/84h/1h/0h/0/*)#feqmcumc"
    ],
    "safe": true
  },
  {
    "txid": "2c99befd21e7ff2f7515cec10224b9075eec597a9f3889904ecba8363595f8b5",
    "vout": 0,
    "address": "bcrt1qwqpxdvp3utduz9zstqx4zca5wpkgzsprqplmhq",
    "label": "",
    "scriptPubKey": "0014700266b031e2dbc11450580d5163b4706c814023",
    "amount": 48.99000000,
    "confirmations": 1,
    "spendable": true,
    "solvable": true,
    "desc": "wpkh([befd193f/84h/1h/0h/0/5]03604ca249d331180c0d9b0b4058e37384acce0e1bc59731bd4a318e41185a8d24)#dmwna3vp",
    "parent_descs": [
      "wpkh(tpubD6NzVbkrYhZ4XeDDHuSAwAXKzSoTYE3cJvSpT2iVpkYnB5CKxib3wH4i8KzHjXRdQ5VmypVNvxcgUhNx5RuqHEWf3Vu2RWZ8EWeCWXP1AAQ/84h/1h/0h/0/*)#feqmcumc"
    ],
    "safe": true
  },
  {
    "txid": "f8aa3395fef9d65faa713c55cc167cc31452ecfaafd3ea8001dedd7ae064c446",
    "vout": 0,
    "address": "bcrt1q54vsrywy08hzzu3ep4dvhc7qfyvgmx9yz74eul",
    "label": "",
    "scriptPubKey": "0014a5590191c479ee2172390d5acbe3c049188d98a4",
    "amount": 50.00000000,
    "confirmations": 101,
    "spendable": true,
    "solvable": true,
    "desc": "wpkh([befd193f/84h/1h/0h/0/0]021a5fcc0536964a3dc08ebb118ce58a2707768ddcc3340a51f6331bf60a7d6c89)#yrqa0p4a",
    "parent_descs": [
      "wpkh(tpubD6NzVbkrYhZ4XeDDHuSAwAXKzSoTYE3cJvSpT2iVpkYnB5CKxib3wH4i8KzHjXRdQ5VmypVNvxcgUhNx5RuqHEWf3Vu2RWZ8EWeCWXP1AAQ/84h/1h/0h/0/*)#feqmcumc"
    ],
    "safe": true
  }
]

Create a new address.

➜  bcli28 getnewaddress
bcrt1q842ua0rhl0evkv93nplehjup5twd5ury7c8jxc

Create a new transaction spending any one of the unspents while not signalling for RBF - notice the false flag at the end. Sign the tx!

➜  bcli28 createrawtransaction "[{\"txid\": \"ddfd54ac08be6510112183447e1ff7775f02f526bb9ad1a5a6ecb539b35077d7\", \"vout\": 0}]" "[{\"bcrt1q842ua0rhl0evkv93nplehjup5twd5ury7c8jxc\": 49.9999}]" 0 false
0200000001d77750b339b5eca6a5d19abb26f5025f77f71f7e448321111065be08ac54fddd0000000000ffffffff01f0ca052a010000001600143d55cebc77fbf2cb30b1987f9bcb81a2dcda706400000000
➜  bcli28 signrawtransactionwithwallet 0200000001d77750b339b5eca6a5d19abb26f5025f77f71f7e448321111065be08ac54fddd0000000000ffffffff01f0ca052a010000001600143d55cebc77fbf2cb30b1987f9bcb81a2dcda706400000000
{
  "hex": "02000000000101d77750b339b5eca6a5d19abb26f5025f77f71f7e448321111065be08ac54fddd0000000000ffffffff01f0ca052a010000001600143d55cebc77fbf2cb30b1987f9bcb81a2dcda706402473044022067fbe5ff4734d306188d7ef84fbc64d098ede809d31d9a498a9cc73171ee99d002205a0871b5021c4b0605eb6000d5778b797987a5f68a658c829ef3c1bb26b36eff0121021a5fcc0536964a3dc08ebb118ce58a2707768ddcc3340a51f6331bf60a7d6c8900000000",
  "complete": true
}
Decode it to verify its contents.
➜  bcli28 decoderawtransaction 02000000000101d77750b339b5eca6a5d19abb26f5025f77f71f7e448321111065be08ac54fddd0000000000ffffffff01f0ca052a010000001600143d55cebc77fbf2cb30b1987f9bcb81a2dcda706402473044022067fbe5ff4734d306188d7ef84fbc64d098ede809d31d9a498a9cc73171ee99d002205a0871b5021c4b0605eb6000d5778b797987a5f68a658c829ef3c1bb26b36eff0121021a5fcc0536964a3dc08ebb118ce58a2707768ddcc3340a51f6331bf60a7d6c8900000000
{
  "txid": "60b7fbc11e0e946778491f3d575c3bf224bc72309a8515d252f8bce7a10c628e",
  "hash": "fef08783be35318d67b71d257a3241c8bf4d0374faf081625639065b7ce57a12",
  "version": 2,
  "size": 191,
  "vsize": 110,
  "weight": 437,
  "locktime": 0,
  "vin": [
    {
      "txid": "ddfd54ac08be6510112183447e1ff7775f02f526bb9ad1a5a6ecb539b35077d7",
      "vout": 0,
      "scriptSig": {
        "asm": "",
        "hex": ""
      },
      "txinwitness": [
        "3044022067fbe5ff4734d306188d7ef84fbc64d098ede809d31d9a498a9cc73171ee99d002205a0871b5021c4b0605eb6000d5778b797987a5f68a658c829ef3c1bb26b36eff01",
        "021a5fcc0536964a3dc08ebb118ce58a2707768ddcc3340a51f6331bf60a7d6c89"
      ],
      "sequence": 4294967295
    }
  ],
  "vout": [
    {
      "value": 49.99990000,
      "n": 0,
      "scriptPubKey": {
        "asm": "0 3d55cebc77fbf2cb30b1987f9bcb81a2dcda7064",
        "desc": "addr(bcrt1q842ua0rhl0evkv93nplehjup5twd5ury7c8jxc)#y9vljk9j",
        "hex": "00143d55cebc77fbf2cb30b1987f9bcb81a2dcda7064",
        "address": "bcrt1q842ua0rhl0evkv93nplehjup5twd5ury7c8jxc",
        "type": "witness_v0_keyhash"
      }
    }
  ]
}

Send the transaction to the mempool.

➜  bcli28 sendrawtransaction 02000000000101d77750b339b5eca6a5d19abb26f5025f77f71f7e448321111065be08ac54fddd0000000000ffffffff01f0ca052a010000001600143d55cebc77fbf2cb30b1987f9bcb81a2dcda706402473044022067fbe5ff4734d306188d7ef84fbc64d098ede809d31d9a498a9cc73171ee99d002205a0871b5021c4b0605eb6000d5778b797987a5f68a658c829ef3c1bb26b36eff0121021a5fcc0536964a3dc08ebb118ce58a2707768ddcc3340a51f6331bf60a7d6c8900000000
60b7fbc11e0e946778491f3d575c3bf224bc72309a8515d252f8bce7a10c628e

Verify its presence in the mempool.

➜  bcli28 getrawmempool
[
  "60b7fbc11e0e946778491f3d575c3bf224bc72309a8515d252f8bce7a10c628e"
]
➜  bcli28 getmempoolinfo
{
  "loaded": true,
  "size": 1,
  "bytes": 110,
  "usage": 1072,
  "total_fee": 0.00010000,
  "maxmempool": 300000000,
  "mempoolminfee": 0.00001000,
  "minrelaytxfee": 0.00001000,
  "incrementalrelayfee": 0.00001000,
  "unbroadcastcount": 1,
  "fullrbf": true
}
Optionally can also verify the BIP125 non-signalling by checking the `bip125-replaceable` field in `gettransaction` command.
➜  bcli28 gettransaction 60b7fbc11e0e946778491f3d575c3bf224bc72309a8515d252f8bce7a10c628e
{
  "amount": 0.00000000,
  "fee": -0.00010000,
  "confirmations": 0,
  "trusted": true,
  "txid": "60b7fbc11e0e946778491f3d575c3bf224bc72309a8515d252f8bce7a10c628e",
  "wtxid": "fef08783be35318d67b71d257a3241c8bf4d0374faf081625639065b7ce57a12",
  "walletconflicts": [
  ],
  "mempoolconflicts": [
  ],
  "time": 1725533667,
  "timereceived": 1725533667,
  "bip125-replaceable": "no",
  "details": [
    {
      "address": "bcrt1q842ua0rhl0evkv93nplehjup5twd5ury7c8jxc",
      "category": "send",
      "amount": -49.99990000,
      "label": "",
      "vout": 0,
      "fee": -0.00010000,
      "abandoned": false
    },
    {
      "address": "bcrt1q842ua0rhl0evkv93nplehjup5twd5ury7c8jxc",
      "parent_descs": [
        "wpkh(tpubD6NzVbkrYhZ4XeDDHuSAwAXKzSoTYE3cJvSpT2iVpkYnB5CKxib3wH4i8KzHjXRdQ5VmypVNvxcgUhNx5RuqHEWf3Vu2RWZ8EWeCWXP1AAQ/84h/1h/0h/0/*)#feqmcumc"
      ],
      "category": "receive",
      "amount": 49.99990000,
      "label": "",
      "vout": 0,
      "abandoned": false
    }
  ],
  "hex": "02000000000101d77750b339b5eca6a5d19abb26f5025f77f71f7e448321111065be08ac54fddd0000000000ffffffff01f0ca052a010000001600143d55cebc77fbf2cb30b1987f9bcb81a2dcda706402473044022067fbe5ff4734d306188d7ef84fbc64d098ede809d31d9a498a9cc73171ee99d002205a0871b5021c4b0605eb6000d5778b797987a5f68a658c829ef3c1bb26b36eff0121021a5fcc0536964a3dc08ebb118ce58a2707768ddcc3340a51f6331bf60a7d6c8900000000",
  "lastprocessedblock": {
    "hash": "17ffd288ee9e9c233d7d664f7cb6d46b0253a503a3b0816a9abc15a920c46d3d",
    "height": 103
  }
}

Create a new transaction that double spends the input of the previous transaction but pass in a higher fee. And sign it!

➜  bcli28 createrawtransaction "[{\"txid\": \"ddfd54ac08be6510112183447e1ff7775f02f526bb9ad1a5a6ecb539b35077d7\", \"vout\": 0}]" "[{\"bcrt1q842ua0rhl0evkv93nplehjup5twd5ury7c8jxc\": 49.9997}]" 0 false
0200000001d77750b339b5eca6a5d19abb26f5025f77f71f7e448321111065be08ac54fddd0000000000ffffffff01d07c052a010000001600143d55cebc77fbf2cb30b1987f9bcb81a2dcda706400000000
➜  bcli28 signrawtransactionwithwallet 0200000001d77750b339b5eca6a5d19abb26f5025f77f71f7e448321111065be08ac54fddd0000000000ffffffff01d07c052a010000001600143d55cebc77fbf2cb30b1987f9bcb81a2dcda706400000000
{
  "hex": "02000000000101d77750b339b5eca6a5d19abb26f5025f77f71f7e448321111065be08ac54fddd0000000000ffffffff01d07c052a010000001600143d55cebc77fbf2cb30b1987f9bcb81a2dcda706402473044022075b0b1bf27da4400e221a0993ab7aa0d915c6594b3250b1ab4254b7351f84ab002202be5010446bd96672092a689de8d2ab85a249ca105d43cd1eb59344f10e1e1e10121021a5fcc0536964a3dc08ebb118ce58a2707768ddcc3340a51f6331bf60a7d6c8900000000",
  "complete": true
}
Decode the transaction.
➜  bcli28 decoderawtransaction 02000000000101d77750b339b5eca6a5d19abb26f5025f77f71f7e448321111065be08ac54fddd0000000000ffffffff01d07c052a010000001600143d55cebc77fbf2cb30b1987f9bcb81a2dcda706402473044022075b0b1bf27da4400e221a0993ab7aa0d915c6594b3250b1ab4254b7351f84ab002202be5010446bd96672092a689de8d2ab85a249ca105d43cd1eb59344f10e1e1e10121021a5fcc0536964a3dc08ebb118ce58a2707768ddcc3340a51f6331bf60a7d6c8900000000
{
  "txid": "eb97817523305aa2f65f0c6b7ad3a4b3010904003426893478d80ab11d6b3163",
  "hash": "d0f80f7944e79451c3bc3081efcde323b7116ddef93abfd214847e1ba72ddfa2",
  "version": 2,
  "size": 191,
  "vsize": 110,
  "weight": 437,
  "locktime": 0,
  "vin": [
    {
      "txid": "ddfd54ac08be6510112183447e1ff7775f02f526bb9ad1a5a6ecb539b35077d7",
      "vout": 0,
      "scriptSig": {
        "asm": "",
        "hex": ""
      },
      "txinwitness": [
        "3044022075b0b1bf27da4400e221a0993ab7aa0d915c6594b3250b1ab4254b7351f84ab002202be5010446bd96672092a689de8d2ab85a249ca105d43cd1eb59344f10e1e1e101",
        "021a5fcc0536964a3dc08ebb118ce58a2707768ddcc3340a51f6331bf60a7d6c89"
      ],
      "sequence": 4294967295
    }
  ],
  "vout": [
    {
      "value": 49.99970000,
      "n": 0,
      "scriptPubKey": {
        "asm": "0 3d55cebc77fbf2cb30b1987f9bcb81a2dcda7064",
        "desc": "addr(bcrt1q842ua0rhl0evkv93nplehjup5twd5ury7c8jxc)#y9vljk9j",
        "hex": "00143d55cebc77fbf2cb30b1987f9bcb81a2dcda7064",
        "address": "bcrt1q842ua0rhl0evkv93nplehjup5twd5ury7c8jxc",
        "type": "witness_v0_keyhash"
      }
    }
  ]
}

Test its mempool acceptance and it should pass.

➜  bcli28 testmempoolaccept "[\"02000000000101d77750b339b5eca6a5d19abb26f5025f77f71f7e448321111065be08ac54fddd0000000000ffffffff01d07c052a010000001600143d55cebc77fbf2cb30b1987f9bcb81a2dcda706402473044022075b0b1bf27da4400e221a0993ab7aa0d915c6594b3250b1ab4254b7351f84ab002202be5010446bd96672092a689de8d2ab85a249ca105d43cd1eb59344f10e1e1e10121021a5fcc0536964a3dc08ebb118ce58a2707768ddcc3340a51f6331bf60a7d6c8900000000\"]"
[
  {
    "txid": "eb97817523305aa2f65f0c6b7ad3a4b3010904003426893478d80ab11d6b3163",
    "wtxid": "d0f80f7944e79451c3bc3081efcde323b7116ddef93abfd214847e1ba72ddfa2",
    "allowed": true,
    "vsize": 110,
    "fees": {
      "base": 0.00030000,
      "effective-feerate": 0.00272727,
      "effective-includes": [
        "d0f80f7944e79451c3bc3081efcde323b7116ddef93abfd214847e1ba72ddfa2"
      ]
    }
  }
]

Send it to the mempool!

➜  bcli28 sendrawtransaction "02000000000101d77750b339b5eca6a5d19abb26f5025f77f71f7e448321111065be08ac54fddd0000000000ffffffff01d07c052a010000001600143d55cebc77fbf2cb30b1987f9bcb81a2dcda706402473044022075b0b1bf27da4400e221a0993ab7aa0d915c6594b3250b1ab4254b7351f84ab002202be5010446bd96672092a689de8d2ab85a249ca105d43cd1eb59344f10e1e1e10121021a5fcc0536964a3dc08ebb118ce58a2707768ddcc3340a51f6331bf60a7d6c8900000000"
eb97817523305aa2f65f0c6b7ad3a4b3010904003426893478d80ab11d6b3163

Verify its presence in mempool and absence of the previous transaction.

➜  bcli28 getrawmempool
[
  "eb97817523305aa2f65f0c6b7ad3a4b3010904003426893478d80ab11d6b3163"
]
Verify that the new transaction didn't signal for RBF and it conflicts with the previous transaction.
➜  bcli28 gettransaction eb97817523305aa2f65f0c6b7ad3a4b3010904003426893478d80ab11d6b3163
{
  "amount": 0.00000000,
  "fee": -0.00030000,
  "confirmations": 0,
  "trusted": true,
  "txid": "eb97817523305aa2f65f0c6b7ad3a4b3010904003426893478d80ab11d6b3163",
  "wtxid": "d0f80f7944e79451c3bc3081efcde323b7116ddef93abfd214847e1ba72ddfa2",
  "walletconflicts": [
    "60b7fbc11e0e946778491f3d575c3bf224bc72309a8515d252f8bce7a10c628e"
  ],
  "mempoolconflicts": [
  ],
  "time": 1725533806,
  "timereceived": 1725533806,
  "bip125-replaceable": "no",
  "details": [
    {
      "address": "bcrt1q842ua0rhl0evkv93nplehjup5twd5ury7c8jxc",
      "category": "send",
      "amount": -49.99970000,
      "label": "",
      "vout": 0,
      "fee": -0.00030000,
      "abandoned": false
    },
    {
      "address": "bcrt1q842ua0rhl0evkv93nplehjup5twd5ury7c8jxc",
      "parent_descs": [
        "wpkh(tpubD6NzVbkrYhZ4XeDDHuSAwAXKzSoTYE3cJvSpT2iVpkYnB5CKxib3wH4i8KzHjXRdQ5VmypVNvxcgUhNx5RuqHEWf3Vu2RWZ8EWeCWXP1AAQ/84h/1h/0h/0/*)#feqmcumc"
      ],
      "category": "receive",
      "amount": 49.99970000,
      "label": "",
      "vout": 0,
      "abandoned": false
    }
  ],
  "hex": "02000000000101d77750b339b5eca6a5d19abb26f5025f77f71f7e448321111065be08ac54fddd0000000000ffffffff01d07c052a010000001600143d55cebc77fbf2cb30b1987f9bcb81a2dcda706402473044022075b0b1bf27da4400e221a0993ab7aa0d915c6594b3250b1ab4254b7351f84ab002202be5010446bd96672092a689de8d2ab85a249ca105d43cd1eb59344f10e1e1e10121021a5fcc0536964a3dc08ebb118ce58a2707768ddcc3340a51f6331bf60a7d6c8900000000",
  "lastprocessedblock": {
    "hash": "17ffd288ee9e9c233d7d664f7cb6d46b0253a503a3b0816a9abc15a920c46d3d",
    "height": 103
  }
}
Note the `walletconflicts` and `mempoolconflicts` fields in the `gettransaction` output of the replaced transaction - they point to the new replacing transaction.
➜  bcli28 gettransaction 60b7fbc11e0e946778491f3d575c3bf224bc72309a8515d252f8bce7a10c628e
{
  "amount": 0.00000000,
  "fee": -0.00010000,
  "confirmations": 0,
  "trusted": false,
  "txid": "60b7fbc11e0e946778491f3d575c3bf224bc72309a8515d252f8bce7a10c628e",
  "wtxid": "fef08783be35318d67b71d257a3241c8bf4d0374faf081625639065b7ce57a12",
  "walletconflicts": [
    "eb97817523305aa2f65f0c6b7ad3a4b3010904003426893478d80ab11d6b3163"
  ],
  "mempoolconflicts": [
    "eb97817523305aa2f65f0c6b7ad3a4b3010904003426893478d80ab11d6b3163"
  ],
  "time": 1725533667,
  "timereceived": 1725533667,
  "bip125-replaceable": "unknown",
  "details": [
    {
      "address": "bcrt1q842ua0rhl0evkv93nplehjup5twd5ury7c8jxc",
      "category": "send",
      "amount": -49.99990000,
      "label": "",
      "vout": 0,
      "fee": -0.00010000,
      "abandoned": false
    },
    {
      "address": "bcrt1q842ua0rhl0evkv93nplehjup5twd5ury7c8jxc",
      "parent_descs": [
        "wpkh(tpubD6NzVbkrYhZ4XeDDHuSAwAXKzSoTYE3cJvSpT2iVpkYnB5CKxib3wH4i8KzHjXRdQ5VmypVNvxcgUhNx5RuqHEWf3Vu2RWZ8EWeCWXP1AAQ/84h/1h/0h/0/*)#feqmcumc"
      ],
      "category": "receive",
      "amount": 49.99990000,
      "label": "",
      "vout": 0,
      "abandoned": false
    }
  ],
  "hex": "02000000000101d77750b339b5eca6a5d19abb26f5025f77f71f7e448321111065be08ac54fddd0000000000ffffffff01f0ca052a010000001600143d55cebc77fbf2cb30b1987f9bcb81a2dcda706402473044022067fbe5ff4734d306188d7ef84fbc64d098ede809d31d9a498a9cc73171ee99d002205a0871b5021c4b0605eb6000d5778b797987a5f68a658c829ef3c1bb26b36eff0121021a5fcc0536964a3dc08ebb118ce58a2707768ddcc3340a51f6331bf60a7d6c8900000000",
  "lastprocessedblock": {
    "hash": "17ffd288ee9e9c233d7d664f7cb6d46b0253a503a3b0816a9abc15a920c46d3d",
    "height": 103
  }
}

6. Paytoanchor Script Spending

Pay To Anchor(P2A) is a new standard witness output type for spending, a newly recognised output template. This allows for key-less anchor outputs, with compact spending conditions for additional efficiencies on top of an equivalent sh(OP_TRUE) output, in addition to the txid stability of the spending transaction.

We will create 2 transactions in this one, the first sends some coins to a P2A address and then the second one spends from that address.

Create a new address that will act as the change output for the first transaction.

➜  bcli28 getnewaddress
bcrt1qwzx8g53y4gemsd624sej2vvk9e4qqtw6dntnpn

Create a new transaction that sends to a P2A address, which is the first output in the below transaction. We send 0.0001 coins to it. Sign the transaction.

➜  bcli28 createrawtransaction "[{\"txid\": \"a86b6506bff1a95e450f5b9e2c9aa3e95c8888a93131ed30e0417b781b31f3bb\", \"vout\": 0}]" "[{\"bcrt1pfeesnyr2tx\": 0.0001},{\"bcrt1qwzx8g53y4gemsd624sej2vvk9e4qqtw6dntnpn\": 49.9998}]"
0200000001bbf3311b787b41e030ed3131a988885ce9a39a2c9e5b0f455ea9f1bf06656ba80000000000fdffffff0210270000000000000451024e73e0a3052a01000000160014708c745224aa33b8374aac332531962e6a002dda00000000
➜  test28rc bcli28 signrawtransactionwithwallet 0200000001bbf3311b787b41e030ed3131a988885ce9a39a2c9e5b0f455ea9f1bf06656ba80000000000fdffffff0210270000000000000451024e73e0a3052a01000000160014708c745224aa33b8374aac332531962e6a002dda00000000
{
  "hex": "02000000000101bbf3311b787b41e030ed3131a988885ce9a39a2c9e5b0f455ea9f1bf06656ba80000000000fdffffff0210270000000000000451024e73e0a3052a01000000160014708c745224aa33b8374aac332531962e6a002dda024730440220149568beade9f37a4ae5742e71ee3938e01c1c6eee04b2384021205265691d6b0220276e83691546ddde9d6cf08e130c1c35df2529f1a62ba537d2a7dabf15c85f89012102b7aa482b7bf5743f0241895be2f48c9635e66711effe34ca78375f2a69ad596000000000",
  "complete": true
}
Decode the transaction.
➜  bcli28 decoderawtransaction 02000000000101bbf3311b787b41e030ed3131a988885ce9a39a2c9e5b0f455ea9f1bf06656ba80000000000fdffffff0210270000000000000451024e73e0a3052a01000000160014708c745224aa33b8374aac332531962e6a002dda024730440220149568beade9f37a4ae5742e71ee3938e01c1c6eee04b2384021205265691d6b0220276e83691546ddde9d6cf08e130c1c35df2529f1a62ba537d2a7dabf15c85f89012102b7aa482b7bf5743f0241895be2f48c9635e66711effe34ca78375f2a69ad596000000000
{
  "txid": "3fbbb2bb55e9dda9d8479b5f5d4252dd68847a59aa7ff28cbc947300879a64eb",
  "hash": "e9f41ca03d2074b26696c1ae11c2b42b7e2f41e199cdf487cb338f7f8fadfbda",
  "version": 2,
  "size": 204,
  "vsize": 123,
  "weight": 489,
  "locktime": 0,
  "vin": [
    {
      "txid": "a86b6506bff1a95e450f5b9e2c9aa3e95c8888a93131ed30e0417b781b31f3bb",
      "vout": 0,
      "scriptSig": {
        "asm": "",
        "hex": ""
      },
      "txinwitness": [
        "30440220149568beade9f37a4ae5742e71ee3938e01c1c6eee04b2384021205265691d6b0220276e83691546ddde9d6cf08e130c1c35df2529f1a62ba537d2a7dabf15c85f8901",
        "02b7aa482b7bf5743f0241895be2f48c9635e66711effe34ca78375f2a69ad5960"
      ],
      "sequence": 4294967293
    }
  ],
  "vout": [
    {
      "value": 0.00010000,
      "n": 0,
      "scriptPubKey": {
        "asm": "1 29518",
        "desc": "addr(bcrt1pfeesnyr2tx)#swxgse0y",
        "hex": "51024e73",
        "address": "bcrt1pfeesnyr2tx",
        "type": "anchor"
      }
    },
    {
      "value": 49.99980000,
      "n": 1,
      "scriptPubKey": {
        "asm": "0 708c745224aa33b8374aac332531962e6a002dda",
        "desc": "addr(bcrt1qwzx8g53y4gemsd624sej2vvk9e4qqtw6dntnpn)#mw0qsfqh",
        "hex": "0014708c745224aa33b8374aac332531962e6a002dda",
        "address": "bcrt1qwzx8g53y4gemsd624sej2vvk9e4qqtw6dntnpn",
        "type": "witness_v0_keyhash"
      }
    }
  ]
}

Send it to the mempool.

➜  bcli28 sendrawtransaction 02000000000101bbf3311b787b41e030ed3131a988885ce9a39a2c9e5b0f455ea9f1bf06656ba80000000000fdffffff0210270000000000000451024e73e0a3052a01000000160014708c745224aa33b8374aac332531962e6a002dda024730440220149568beade9f37a4ae5742e71ee3938e01c1c6eee04b2384021205265691d6b0220276e83691546ddde9d6cf08e130c1c35df2529f1a62ba537d2a7dabf15c85f89012102b7aa482b7bf5743f0241895be2f48c9635e66711effe34ca78375f2a69ad596000000000
3fbbb2bb55e9dda9d8479b5f5d4252dd68847a59aa7ff28cbc947300879a64eb
➜  bcli28 getmempoolentry 3fbbb2bb55e9dda9d8479b5f5d4252dd68847a59aa7ff28cbc947300879a64eb
{
  "vsize": 123,
  "weight": 489,
  "time": 1725692815,
  "height": 102,
  "descendantcount": 1,
  "descendantsize": 123,
  "ancestorcount": 1,
  "ancestorsize": 123,
  "wtxid": "e9f41ca03d2074b26696c1ae11c2b42b7e2f41e199cdf487cb338f7f8fadfbda",
  "fees": {
    "base": 0.00010000,
    "modified": 0.00010000,
    "ancestor": 0.00010000,
    "descendant": 0.00010000
  },
  "depends": [
  ],
  "spentby": [
  ],
  "bip125-replaceable": true,
  "unbroadcast": true
}

Create the second transaction that spends from the first transaction, note that the first output of the previous transaction is used. Sign it!

➜  bcli28 createrawtransaction "[{\"txid\": \"3fbbb2bb55e9dda9d8479b5f5d4252dd68847a59aa7ff28cbc947300879a64eb\", \"vout\": 0}]" "[{\"bcrt1qwzx8g53y4gemsd624sej2vvk9e4qqtw6dntnpn\": 0.00009}]"
0200000001eb649a87007394bc8cf27faa597a8468dd52425d5f9b47d8a9dde955bbb2bb3f0000000000fdffffff012823000000000000160014708c745224aa33b8374aac332531962e6a002dda00000000
➜  bcli28 signrawtransactionwithwallet 0200000001eb649a87007394bc8cf27faa597a8468dd52425d5f9b47d8a9dde955bbb2bb3f0000000000fdffffff012823000000000000160014708c745224aa33b8374aac332531962e6a002dda00000000
{
  "hex": "0200000001eb649a87007394bc8cf27faa597a8468dd52425d5f9b47d8a9dde955bbb2bb3f0000000000fdffffff012823000000000000160014708c745224aa33b8374aac332531962e6a002dda00000000",
  "complete": true
}

Note: The unsigned transaction hex is same as the signed transaction hex, this is because there is only one P2A input in the transaction, which is "keyless". Hence, it could be submitted to the mempool without signing as well.

Decode the transaction.
➜  bcli28 decoderawtransaction 0200000001eb649a87007394bc8cf27faa597a8468dd52425d5f9b47d8a9dde955bbb2bb3f0000000000fdffffff012823000000000000160014708c745224aa33b8374aac332531962e6a002dda00000000
{
  "txid": "ea9c01b92327f8a36e9c28d5e78cb91bfa693b83e57a74e57ef423dbe5f37f64",
  "hash": "ea9c01b92327f8a36e9c28d5e78cb91bfa693b83e57a74e57ef423dbe5f37f64",
  "version": 2,
  "size": 82,
  "vsize": 82,
  "weight": 328,
  "locktime": 0,
  "vin": [
    {
      "txid": "3fbbb2bb55e9dda9d8479b5f5d4252dd68847a59aa7ff28cbc947300879a64eb",
      "vout": 0,
      "scriptSig": {
        "asm": "",
        "hex": ""
      },
      "sequence": 4294967293
    }
  ],
  "vout": [
    {
      "value": 0.00009000,
      "n": 0,
      "scriptPubKey": {
        "asm": "0 708c745224aa33b8374aac332531962e6a002dda",
        "desc": "addr(bcrt1qwzx8g53y4gemsd624sej2vvk9e4qqtw6dntnpn)#mw0qsfqh",
        "hex": "0014708c745224aa33b8374aac332531962e6a002dda",
        "address": "bcrt1qwzx8g53y4gemsd624sej2vvk9e4qqtw6dntnpn",
        "type": "witness_v0_keyhash"
      }
    }
  ]
}

Send it to the mempool! The broadcast should be successful.

➜  bcli28 sendrawtransaction 0200000001eb649a87007394bc8cf27faa597a8468dd52425d5f9b47d8a9dde955bbb2bb3f0000000000fdffffff012823000000000000160014708c745224aa33b8374aac332531962e6a002dda00000000
ea9c01b92327f8a36e9c28d5e78cb91bfa693b83e57a74e57ef423dbe5f37f64
➜  bcli28 getmempoolentry ea9c01b92327f8a36e9c28d5e78cb91bfa693b83e57a74e57ef423dbe5f37f64
{
  "vsize": 82,
  "weight": 328,
  "time": 1725693091,
  "height": 102,
  "descendantcount": 1,
  "descendantsize": 82,
  "ancestorcount": 2,
  "ancestorsize": 205,
  "wtxid": "ea9c01b92327f8a36e9c28d5e78cb91bfa693b83e57a74e57ef423dbe5f37f64",
  "fees": {
    "base": 0.00001000,
    "modified": 0.00001000,
    "ancestor": 0.00011000,
    "descendant": 0.00001000
  },
  "depends": [
    "3fbbb2bb55e9dda9d8479b5f5d4252dd68847a59aa7ff28cbc947300879a64eb"
  ],
  "spentby": [
  ],
  "bip125-replaceable": true,
  "unbroadcast": true
}

7. New dumptxoutset output format

The dumptxoutset RPC now returns the UTXO set dump in a new and improved format. At the same time the loadtxoutset RPC now expects this new format in dumps it tries to load. Dumps with the old format are no longer supported and need to be recreated using the new format in order to be usable.

We will use 2 nodes for this test - V28-rc and V27. We will run dumptxoutset in both the nodes. We will note the sizes of both the utxo.dat files. On average, the size of the dump in the V28 should be lesser. We will try to load the dump of the V27 in V28 and note that it should fail because of the difference in the format.

Dump in both the nodes. Only one is shown here.

 ➜  bcli28 dumptxoutset utxo.dat
{
  "coins_written": 101,
  "base_hash": "1db7319f6e9d2b52494f03be63dd8713e8976a21097b73b2713233b16067567e",
  "base_height": 101,
  "path": "/tmp/28-rc-test/regtest/utxo.txt",
  "txoutset_hash": "5a5aac62e75d3bb3398bdbe328a1b442a078f6c01a1daa3bf5ebde8ed42d6eec",
  "nchaintx": 102
}

Note the sizes of both the dumps.

➜  /tmp ls -lhrt /tmp/28-rc-test/regtest/utxo.dat
-rw-------  1 rkrux  rkrux   5.9K Sep  3 19:06 /tmp/28-rc-test/regtest/utxo.txt
➜  regtest ls -lhrt /tmp/27-test/regtest/utxo.dat
-rw-------  1 rkrux  rkrux   6.1K Sep  3 19:29 /tmp/27-test/regtest/utxo.dat

Try to load the dump of V27 in V28 and note an error about the incompatibility of the formats.

➜  bcli28 loadtxoutset $DATA_DIR_27/regtest/utxo.dat
error code: -22
error message:
Unable to parse metadata: Invalid UTXO set snapshot magic bytes. Please check if this is indeed a snapshot file or if you are using an outdated snapshot format.: unspecified iostream_category error

Look at the hexdump of both the formats. The V28 one has 5 magic bytes at the start whose ASCII translate to utxo..

➜  hexdump -n5 -C /tmp/27-test/regtest/utxo.dat
00000000  a2 85 aa 69 37                                    |...i7|
00000005
➜  hexdump -n5 -C /tmp/28-rc-test/regtest/utxo.dat
00000000  75 74 78 6f ff                                    |utxo.|
00000005

8. assumeutxo mainnet

If you can access the mainnet, then it would be helpful to test the assumeutxo mainnet parameters. Note: This might take some time run completely because of the size of the mainnet chain. Full testing instructions are in this comment. Quoting it below:

Downloaded the snapshot from the torrent link, verified the hash, successfully loaded the snapshot in a fresh node, verified that the snapshot chainstate was able to sync to the tip and the node was usable. Then waited until the background chainstate caught up to the snapshot and that was also successful. Restarted the node and verified the cleanup of the second chainstate. Also checked that I get the exact same dump using dumptxoutset with https://github.com/bitcoin/bitcoin/pull/29553 on a fully synced node that did not use the snapshot to sync.

Clone this wiki locally