Breaking change coming to Flow Epoch Smart Contracts for Automatic Rewards

The Flow team has tentative plans to enable automatic staking rewards payments on mainnet on April 27th after the next network spork on Wednesday, April 26, 2023. This will not break any smart contracts, but any software that is monitoring events for rewards payments will be affected and will need to update their software to remain compatible. More information is below.

Expected dates to get the changes in effect is as follows:

  • CanaryNet: Wednesday, April 5th
  • Testnet: Thursday, April 6th

And assuming that the upgrades on the canary and testnet go well,

  • Mainnet: Thursday, April 27th

This will hopefully give node operators and anyone else who is monitoring the chain plenty of time to upgrade their software.

The changes to FlowEpoch and FlowIDTableStaking code that will be used for the upgrade can be found in this pull request

Note - We are open to changing the timeline if the community provides feedback on the suggested change.

Why This Change is Happening

  • Until now, rewards payments have been done manually by the Flow governance committee As part of Flow’s decentralization process, all epoch processes need to be performed automatically by the protocol, and this enables this for rewards payments.
  • The upgrade also includes an update to take bonus tokens into account in the calculation of rewards for each upcoming epoch. More information about this change is described in the PR description.

Action Required

  • After the upgrade, rewards payments will happen automatically after the end of the epoch, instead of a few hours before and without the need of an explicit transaction being submitted by the service account. Users and developers should prepare themselves for this new schedule change.
  • The rewards transaction will be initiated by the system chunk, an automated part of the protocol. System chunk transactions are different from regular transactions, and need to be queried differently. Instructions for how to query system chunk events are here.

If you have any questions regarding these changes, please ask in the PR comments, on Discord in the #developers channel, or reply here.

2 Likes

FlowEpoch has been upgraded on canary to f8d6e0586b0a20c7

1 Like

Hi Josh, what is the bonusToken in the github commit diff? I see this param also needs admin to get it set.

1 Like

@dryrunner They are tokens from genesis that are not meant to be calculated in the inflation calculation. You can see more information in the PR description: https://github.com/onflow/flow-core-contracts/pull/352#issue-1593997903

1 Like

The FlowEpoch contract is now upgraded on testnet at 0x9eca2b38b18b5dfe

Due to some last minute testing that is required for the mainnet upgrade, we decided to push the upgrade back to May 3rd. We’ll post here when we do the upgrade

2 Likes

FlowEpoch contract 8624b52f9ddcd04a has been upgraded on mainnet and rewards will now be paid out automatically.

1 Like

Where can we get & check system transactions and events emitted in those system tx?

1 Like

I have updated this page with the new way to check the events for rewards payout.

1 Like

Love the article’s

1 Like