-
Notifications
You must be signed in to change notification settings - Fork 138
Require native-asset fee notes when fees are enabled #2564
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
Merged
Mirko-von-Leipzig
merged 8 commits into
mirko/deny-fee-eaters
from
mirko/require-fee-notes
Sep 21, 2026
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
4fd0def
fix(rpc): require fee notes for all transactions
Mirko-von-Leipzig f613f75
test: preserve fee-note admission coverage with protocol 0.17
Mirko-von-Leipzig bc05d97
test: supply protocol fee conversion arguments in RPC fixtures
Mirko-von-Leipzig 468bb65
test: enable standards for fee-paying proof fixtures
Mirko-von-Leipzig 3c45823
test: use complete proofs for account admission fixtures
Mirko-von-Leipzig 8d6213f
fix(rpc): exempt user batches from fee-note requirements
Mirko-von-Leipzig 6a8d340
fix(rpc): restrict transaction fees to the native asset
Mirko-von-Leipzig b0d9322
Allow transactions without fee notes when fees are zero
Mirko-von-Leipzig File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's technically possible to create a valid fee note that has the assets, but with a quantity of 0. If so, wonder if we should check that the amount is at least
> 0(but maybe it'd be even better to have a minimum amount that a minimal transaction would cost to compare against). cc @PhilippGackstatter @mmagician to confirmThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually want to allow zero so that this same flow works on networks with a zero fee.
This technically doesn't work at the moment because some protocol procedures explicitly emit no note when fees set to zero.
It's an.. open question at the moment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think none of the standard auth components emit fee notes when fees are zero. I think the main motivation was avoiding touching most protocol tests that would now output fee notes and change the assertions. Certainly something we could revisit, but for now the node may be better off skipping the fee requirement when fees are zero.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in bb18069. Both standalone transaction endpoints now allow a missing fee note when the transaction reference block has a zero verification base fee. Any fee notes that are emitted must still contain only the native asset; user batches remain exempt. The batch-building PR (#2647) also skips the collector transaction when there are no fee notes, since a deployed collector cannot execute without input notes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But should transactions that create a fee note with 0 assets (or a small enough amount of tokens which you know won't cover the tx) for networks that require fees even be allowed? Technically yes because at the batch level fees may still be enough to include the transaction? I understand standards pay fees correctly but a user could decide to pay whatever amount of fees they wanted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The batch builder can decide, in theory, to sponsor or accept whatever transactions it wants.
I wanted this to be a flat:
but we can' really do that