1

I have a Regtest environment with some Lightning nodes. I need to make the fees go up a lot to do some tests on how the Lightning nodes behave with high fees.

What would be the most efficient/simple method to increase the fees? I was thinking of simply installing an ordinals wallet and generate tx of almost 1MB paying high commissions. Then I thought it might be easier to simply remove the datacarrier limit and add a lot of arbitrary text in an OP_RETURN to make very large tx.

Does anyone know of a more efficient way to do this?

1 Answer 1

1

Essentially your goal is to increase the mempool's minimum fee rate to be higher than 1 sat/vb. The way to do this is to shrink the mempool and fill it with large high fee transactions.

First, you can make the mempool much smaller by setting -maxmempool=<n>. <n> is the size in MB, and the default is 300. You can set this to, e.g. 5 to get a 5 MB mempool, and that will be much easier to fill.

Then you can make transactions by having them contain large amounts of data in OP_RETURN outputs. You have to set -datacarriersize=<n> where <n> is the number of bytes to allow in an OP_RETURN. You could set this to 100000 and be able to add a single OP_RETURN output to each transaction that's up to 100000 bytes in size. Although the maximum standard tx size rule of 100000 vbytes is still in effect, so you should leave some space for the rest of the transaction.

Bitcoin Core's test framework does both of these things with those settings in order to test mempool eviction.

6
  • As far as I know LN nodes use estimatesmartfee for fee estimation. That rpc call only uses chain data and not mempool right? If so, I think the mempool size should not have any impact here. Commented Apr 30 at 17:04
  • 1
    estimatesmartfee look at how long something was in the mempool before it got mined. So you need to both fill the mempool (maybe not all the way), and mine several blocks
    – Ava Chow
    Commented Apr 30 at 18:06
  • Okay, that's a good point. Thanks Ava! Is there any documentation on the exact behaviour and how estimatesmartfee work in detail? Commented Apr 30 at 18:12
  • 1
    I think the only real documentation is this code comment: github.com/bitcoin/bitcoin/blob/…
    – Ava Chow
    Commented Apr 30 at 18:53
  • 1
    The estimator updates per block.
    – Ava Chow
    Commented Jun 7 at 16:14

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.