3

On a regtest node, I'm trying to bumpfee a transaction that have 1 sat/vB fee. I want to bump the fee to 2 sat/vB, but the wallet complains, saying:

error code: -8
error message:
Insufficient total fee 0.00000282, must be at least 0.00000846 (oldFee 0.00000141 + incrementalFee 0.00000705)

Why is this happening? The new fee pays exactly as much as is required to get this transaction into my mempool, right? I've tested on Bitcoin Core 25.0 and 26.0. The replacement transaction would be of the same size as the replaced transaction.

Here's the full context:

$ ./bitcoin-cli -regtest -rpcwallet=wallet445305173 listunspent 0
[
  {
    "txid": "33a1ec4bc9eaee66dfb2ae81fadf17bcdf29110643c3775cd462e40148e8e5f1",
    "vout": 0,
    "address": "bcrt1q0c46f338s4gnr34trjae8nu5ckhafj2l4l5nne",
    "label": "",
    "scriptPubKey": "00147e2ba4c627855131c6ab1cbb93cf94c5afd4c95f",
    "amount": 1.00000000,
    "confirmations": 1,
    "spendable": true,
    "solvable": true,
    "desc": "wpkh([c4093544/84h/1h/0h/0/0]02f32280b38e94d3028e2005a398941093c23794637734f2927a6d856e1d13ff8d)#82m64c6a",
    "parent_descs": [
      "wpkh(tpubD6NzVbkrYhZ4WMWdeCvc7DuoqY7wX6dsJEf8SZwrb7jqNUsgtHb3AkeDnYBcRRVNj6jm1RXT6J2R22X6TsKgnjJbQRWs4ZGRsbdjF65Zg9T/84h/1h/0h/0/*)#e3dfjhyk"
    ],
    "safe": true
  }
]

$ ./bitcoin-cli -regtest -rpcwallet=miner getnewaddress
bcrt1qk02jcchycn947u6e8a740yatrs8cnsxc7qa3zx

$ ./bitcoin-cli -regtest -rpcwallet=wallet445305173 sendtoaddress bcrt1qk02jcchycn947u6e8a740yatrs8cnsxc7qa3zx 0.001
9139f8b08b687b946dee4d24be88bb8cc90294629b206c01b04a34f8ce32b1ab

$ ./bitcoin-cli -regtest -rpcwallet=wallet445305173 gettransaction 9139f8b08b687b946dee4d24be88bb8cc90294629b206c01b04a34f8ce32b1ab
{
  "amount": -0.00100000,
  "fee": -0.00000141,
  "confirmations": 0,
  "trusted": true,
  "txid": "9139f8b08b687b946dee4d24be88bb8cc90294629b206c01b04a34f8ce32b1ab",
  "wtxid": "41190c475d2098d8a77863262bf117f657f9c07d6ccd1485bb5fc83de1624a72",
  "walletconflicts": [
  ],
  "time": 1702286813,
  "timereceived": 1702286813,
  "bip125-replaceable": "yes",
  "details": [
    {
      "address": "bcrt1qk02jcchycn947u6e8a740yatrs8cnsxc7qa3zx",
      "category": "send",
      "amount": -0.00100000,
      "vout": 1,
      "fee": -0.00000141,
      "abandoned": false
    }
  ],
  "hex": "02000000000101f1e5e84801e462d45c77c343061129dfbc17dffa81aeb2df66eeeac94beca1330000000000fdffffff02d359f40500000000160014b7dbc2759724bd6495735648cee0aa50e3b2f838a086010000000000160014b3d52c6
2e4c4cb5f73593f7d5793ab1c0f89c0d8024730440220652a34522866a176e6dd343fbf91ad8c002967b90a7496fdf0946c534e9695a90220140527500b84a9bd52684145dd622c49960d52f79b64fb98d93021dfc083d543012102f32280b38e94d302
8e2005a398941093c23794637734f2927a6d856e1d13ff8d59020000",
  "lastprocessedblock": {
    "hash": "44d959c6cb011430d752f16692d464dff2bdabb8a9baa5cb7e65f6675f1e42cd",
    "height": 601
  }
}

$ ./bitcoin-cli -regtest -rpcwallet=wallet445305173 bumpfee 9139f8b08b687b946dee4d24be88bb8cc90294629b206c01b04a34f8ce32b1ab '{"fee_rate": 2}'
error code: -8
error message:
Insufficient total fee 0.00000282, must be at least 0.00000846 (oldFee 0.00000141 + incrementalFee 0.00000705)

$ ./bitcoin-cli -regtest -rpcwallet=wallet445305173 bumpfee 9139f8b08b687b946dee4d24be88bb8cc90294629b206c01b04a34f8ce32b1ab '{"fee_rate": 5}'
error code: -8
error message:
Insufficient total fee 0.00000705, must be at least 0.00000846 (oldFee 0.00000141 + incrementalFee 0.00000705)

$ ./bitcoin-cli -regtest -rpcwallet=wallet445305173 bumpfee 9139f8b08b687b946dee4d24be88bb8cc90294629b206c01b04a34f8ce32b1ab '{"fee_rate": 6}'
{
  "txid": "74bcd6e58e5b7f7b364d6ebd055c9e6212a88cafeb0bf035c26545bc3a21b1a5",
  "origfee": 0.00000141,
  "fee": 0.00000846,
  "errors": [
  ]
}

$ ./bitcoin-cli -regtest getnetworkinfo
{
  "version": 260000,
  "subversion": "/Satoshi:26.0.0/",
  ...
  "relayfee": 0.00001000,
  "incrementalfee": 0.00001000,
  ...
}

bumpfee requires 6x original fee, instead of 2x original fee.

If I create a psbt of the same transaction with 2 sat/vB feerate it works fine. E.g. createpsbt, walletprocesspsbt, finalizepsbt, sendrawtransaction.

4
  • Maybe bumpfee is simply creating a 705 vbytes replacement transaction? But idk why, since walletprocesspsbt doesn't.. Dec 11, 2023 at 10:21
  • I have only one UTXO in the wallet, so I don't see how it could create anything bigger than 141 vB. The output from my bumpfee command stated that I try to set a fee of 282 sats, which indicates that the new tx is in fact 141 vB. Dec 11, 2023 at 10:24
  • Hmm. In this case the 705 incremental fee indicates it's using 5sat/vb as incremental feerate. Dec 11, 2023 at 10:47
  • 2
    Which.. Is exactly the default used by the wallet! Mystery solved. Can't wait for the next episode of "Kalle and Antoine explore the behaviour of Bitcoin Core's bumpfee". Dec 11, 2023 at 10:48

2 Answers 2

4

The bumpfee command uses a fixed 5sat/vb incremental feerate when creating replacement transactions. This is why it's saying the fee should be at least 846 sats for bumping your 141 vbytes transaction. It's accounting for the original 141 sats fee, plus 5 * 141 sats for the incremental fee.

As Kalle points out in the comments the documentation for bumpfee is misleading. It states:

At a minimum, the new fee rate must be high enough to pay an additional new relay fee (incrementalfee returned by getnetworkinfo) to enter the node's mempool.

But the feerate needs to be 5 times that for the command to succeed.

6
  • From the bumpfee doc: "At a minimum, the new fee rate must be high enough to pay an additional new relay fee (incrementalfee returned by getnetworkinfo) to enter the node's mempool.". This seems to contradict what you say, see the output of getnetworkinfo in my question. Dec 11, 2023 at 10:59
  • Yes, the doc is wrong. The incremental fee used by the wallet is (5 times) higher than the one used by the mempool. Dec 11, 2023 at 11:02
  • Gah! Thanks for the answer. Maybe update the answer to mention the incorrect documentation. Dec 11, 2023 at 11:05
  • Hmm i was editing my answer but since it says "at a minimum" it's only misleading not technically wrong right? Dec 11, 2023 at 11:06
  • 1
2

The 1sat/vB is indeed what you need to enter the mempool. The wallet's 5sat/vB increase is not always necessary or sufficient to meet Rule 4. Sounds like in this situation, the wallet's incremental feerate is much higher than necessary.

For "why are there 2 different incremental feerates?" Since Rule 4 is applied using the size of the replacement transaction, and we don't know that before we're finished building it, AFAIK the approach for the wallet is "eh just shoot 5sat/vB higher and we should probably meet Rule 4." It's much easier to target a feerate than to target a fee that depends on the size of your resulting tx.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.