You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Is there a way to specify the absolute fee of a transaction? #41
I think a straightforward approach is to set a target feerate of 0 and add the fee amount to the output value_sum. The effect is to raise the cost of meeting the target by the amount of the target fee.
Yes, we can add the absolute_fee field to SelectorParams, and from the target_outputs we can add the absolute fee to the value_sum, then we can set the target_feerate to ZERO
I’m curious, @ValuedMammal, what is the underlying use case where you would want to do that? Since you don’t know how many inputs your transaction will use in advance, and your transaction is competing on basis of feerate, wanting to set the absolute fee instead seems inefficient to me.
what is the underlying use case where you would want to do that? Since you don’t know how many inputs your transaction will use in advance, and your transaction is competing on basis of feerate, wanting to set the absolute fee instead seems inefficient to me.
For the sake of discussion maybe you want to make a payment with a round number of sats and don't particularly care about the rate. For CPFP, maybe you know the inputs and want to know the child fee needed to bump the package to a target feerate. Maybe you need to satisfy two constraints simultaneously for some other reason. I hear your point about the case where the input selection is unknown though.
(Not on-topic, but if it’s of interest: we added bump fee calculation to Bitcoin Core, so when a user is trying to send a CPFP, it’ll add the necessary fees to the child to make its ancestor package have the requested effective feerate.)
Activity
aagbotemi commentedon Oct 28, 2025
Yes, we can add the
absolute_feefield toSelectorParams, and from thetarget_outputswe can add the absolute fee to thevalue_sum, then we can set the target_feerate to ZEROValuedMammal commentedon Feb 23, 2026
There's probably a less hacky way by providing the appropriate API using the Target type.
murchandamus commentedon Feb 23, 2026
I’m curious, @ValuedMammal, what is the underlying use case where you would want to do that? Since you don’t know how many inputs your transaction will use in advance, and your transaction is competing on basis of feerate, wanting to set the absolute fee instead seems inefficient to me.
ValuedMammal commentedon Feb 24, 2026
For the sake of discussion maybe you want to make a payment with a round number of sats and don't particularly care about the rate. For CPFP, maybe you know the inputs and want to know the child fee needed to bump the package to a target feerate. Maybe you need to satisfy two constraints simultaneously for some other reason. I hear your point about the case where the input selection is unknown though.
murchandamus commentedon Feb 25, 2026
Thanks for satisfying my curiosity.
(Not on-topic, but if it’s of interest: we added bump fee calculation to Bitcoin Core, so when a user is trying to send a CPFP, it’ll add the necessary fees to the child to make its ancestor package have the requested effective feerate.)
evanlinjin commentedon Aug 11, 2026
Implemented in #44