Skip to content

Support multiple fee receiver accounts#100

Open
janezpodhostnik wants to merge 1 commit into
janezp/localnet-test-fixesfrom
janezp/fee-receivers
Open

Support multiple fee receiver accounts#100
janezpodhostnik wants to merge 1 commit into
janezp/localnet-test-fixesfrom
janezp/fee-receivers

Conversation

@janezpodhostnik

Copy link
Copy Markdown

Summary

Testnet distributes transaction fee deposits across multiple receiver accounts since the FlowFees concurrent-fee-collection upgrade (onflow/flow-core-contracts#575, rolled out in tx be210889dd26a320f530595bd369093e866e26c3941bf7a3d01f861db3eeda81). Rosetta only recognized deposits to the FlowFees contract account as fees, so deposits to the child fee accounts were misclassified as ordinary transfers.

Changes

  • Replace the single feeAddr with a set of fee addresses (Contracts.FeeAddresses()): the FlowFees account plus a new .contracts.fee_receivers config list.
  • Add the three testnet fee receivers to testnet.json (canonical list: flow-go's systemcontracts.FlowFeesReceivers).
  • Add a startup check (validateFeeReceivers) that reads the on-chain receiver list from /storage/ChildFeeAccounts via a new get-fee-receivers script and exits with a fatal error if any on-chain receiver is missing from the config — so future receiver additions fail loudly instead of silently misclassifying fees. Extra configured addresses are allowed (needed to classify fees in historical blocks).

Mainnet & future cleanup

Mainnet has no child fee accounts yet, so mainnet.json is unchanged and behavior there is identical — but the upgrade is expected to roll out there soon, at which point the startup check will flag the new receivers and mainnet.json just needs a fee_receivers entry. Separately, once onflow/flow-core-contracts#614 lands, the entitlement-sensitive storage read in get-fee-receivers.cdc can be replaced with a stable getFeeReceiverAddresses() call.

@janezpodhostnik
janezpodhostnik requested a review from a team as a code owner July 23, 2026 14:13
@janezpodhostnik janezpodhostnik self-assigned this Jul 23, 2026
@janezpodhostnik janezpodhostnik changed the title support multiple fee receiver accounts Support multiple fee receiver accounts Jul 23, 2026
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b4c739b7-d012-45c7-bbab-5561535c82c7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch janezp/fee-receivers

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant