Skip to content

Support multiple fee receiver accounts - #100

Open
janezpodhostnik wants to merge 2 commits into
janezp/localnet-test-fixesfrom
janezp/fee-receivers
Open

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

Conversation

@janezpodhostnik

@janezpodhostnik janezpodhostnik commented Jul 23, 2026

Copy link
Copy Markdown

Testnet distributes transaction fee deposits across multiple receiver accounts
since the FlowFees concurrent fee collection upgrade (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, documented in the README.
  • Add the three testnet fee receivers to testnet.json, verified against the
    on-chain FlowFees.getFeeReceiverAddresses() getter.
  • Add a startup check (validateFeeReceivers) that fetches the on-chain
    receiver list 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, since they may be needed to
    classify fees in historical blocks.
  • Upgrade flow-go to pull in flow-core-contracts v1.10.4, whose
    getFeeReceiverAddresses() getter the script uses.

Notes

  • Mainnet has no child fee accounts yet, so mainnet.json is unchanged and
    behavior there is identical. Once the upgrade rolls out there, the startup
    check will flag the new receivers and mainnet.json just needs a
    fee_receivers entry.
  • go.mod currently pins the head commit of Upgrade flow-core-contracts to v1.10.4 flow-go#8632, which is not
    yet merged. Do not merge this PR until it lands and the pin is updated to a
    master commit.

Related: onflow/flow-core-contracts#575, onflow/flow-core-contracts#615, onflow/flow-go#8632

@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: 3cffa57e-4db2-470e-89c1-4c2d4a406bea

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