feat(test-node): emit MIDEN-funded genesis wallets when fees are enabled - #2466
Open
WiktorStarczewski wants to merge 5 commits into
Open
feat(test-node): emit MIDEN-funded genesis wallets when fees are enabled#2466WiktorStarczewski wants to merge 5 commits into
WiktorStarczewski wants to merge 5 commits into
Conversation
WiktorStarczewski
marked this pull request as ready for review
August 30, 2026 00:47
WiktorStarczewski
marked this pull request as draft
August 30, 2026 11:43
WiktorStarczewski
marked this pull request as ready for review
August 30, 2026 23:28
WiktorStarczewski
force-pushed
the
wiktor/test-node-genesis-fee-funders
branch
from
August 30, 2026 23:33
cc19afa to
a308ee1
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The test node can now bring up a fee-charging chain that accounts can actually transact on.
MIDEN_TEST_NODE_VERIFICATION_BASE_FEEsetsverification_base_feein the generated genesis config. Unset (the default) is0, so every existing test keeps its exact balances and behaviour.Why funders are needed at all, and why two
Since protocol 0.16 the fee is paid inside the account's auth procedure, which withdraws the native asset from the account's own vault before the rest of the transaction runs. An account with an empty vault therefore cannot transact at all, including to deploy itself. The escape is that a note's credit lands in the vault before
pay_feewithdraws — so consuming a funding note is a transaction that settles its own fee. That only works if something can send the note, hence a funded genesis account.They are public so their state is readable by a client that did not create them, which is what makes them usable as shared funders. Two, so a test needing a funder and a recipient does not have to serialise on one account's state; the amount is far above any plausible per-transaction fee so a long run cannot drain them.
Reviewers: the env-var-vs-config-field choice is the part worth your time — an env var keeps the default path byte-identical, but a genesis config field would be more discoverable.