Skip to content

Allow any fee config #1476

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tomt1664
Copy link
Member

Extension of #1333

HasValidFee (called from CheckInputs) is a consensus check for each tx that

  1. any fee output does not exceed MAX_MONEY
  2. any fee output is not 0 value
  3. the total fees for a tx do not exceed MAX_MONEY

Another check in CheckInputs checks that the total fees for a block do not exceed MAX_MONEY

To enable both zero fee outputs and for total block and tx fee outputs (and total fee outputs) to exceed MAX_MONEY (fee outputs can be issued assets in addition to pegged asset, which total supply can exceed MAX_MONEY) and new chain config option is added: -con_allow_any_fee

@tomt1664 tomt1664 requested a review from delta1 July 18, 2025 14:55
@jsarenik
Copy link

I would just like to note here that a zero fee raw tx worked for me fine on the unofficial liquidtestnet4 already some time ago. Not tested with any other assets back then.

See https://kitchen.anyone.eu.org/lt4/zero.txt - the tx is present in current lt4 blockchain. Confidential. No fee (Liquid "fee" structure empty).

@tomt1664
Copy link
Member Author

I would just like to note here that a zero fee raw tx worked for me fine on the unofficial liquidtestnet4 already some time ago. Not tested with any other assets back then.

See https://kitchen.anyone.eu.org/lt4/zero.txt - the tx is present in current lt4 blockchain. Confidential. No fee (Liquid "fee" structure empty).

A transaction can have a zero fee if there is no fee output (e.g. this lt4 tx) - that is consensus valid. But it cannot include an explicit fee output that has zero value (gets checked here:

if (fee == 0 || !MoneyRange(fee))
).

@tomt1664 tomt1664 marked this pull request as draft July 21, 2025 16:10
@tomt1664
Copy link
Member Author

I've updated #1333 so the wallet does not add a fee output if the fee is zero - this is valid in current consensus rules.

The PR - enabling any fee value - is relevant to using issued assets as fees. I'll leave it open in draft - it is unlikely to be useful before issuance beyond MAX_MONEY is also enabled.

@tomt1664 tomt1664 self-assigned this Jul 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants