Skip to content
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

Fix params.EpochDays to params.NextEpochDays #96

Closed
3 of 7 tasks
dongsam opened this issue Sep 3, 2021 · 1 comment · Fixed by #103
Closed
3 of 7 tasks

Fix params.EpochDays to params.NextEpochDays #96

dongsam opened this issue Sep 3, 2021 · 1 comment · Fixed by #103
Assignees
Labels
bug Something isn't working

Comments

@dongsam
Copy link
Contributor

dongsam commented Sep 3, 2021

Problem Definition

Currently, end-of-epoch uses params.EpochDays directly when allocating farming rewards. However, if params.EpochDays are changed by Parameter ChangeProposal in the middle of the epoch, the already started epoch will perform farming allocation based on the changed params.EpochDays. Therefore, even if Epoch Days is changed in the middle of the epoch, it is necessary to ensure that the changed Epoch Days can be used in the next epoch without affecting the farming reward allocation of the epoch.

Proposal

To this end, CurrentEpochDays(global state) need to be added to check the current Epoch Days, and the existing params.EpochDays is renamed and repurposed to params.NextEpochDays, so if CurrentEpochDays and params.NextEpochDays are different at the start of the new epoch, then update CurrentEpochDays to params.NextEpochDays

Tasks

  • Add CurrentEpochDays or EpochEra
  • Rename and fix logics for params.EpochDays to params.NextEpochDays
  • Update spec and description

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@dongsam dongsam added this to the v1 milestone Sep 3, 2021
@minkyraccoon minkyraccoon added the bug Something isn't working label Sep 9, 2021
@jaybxyz
Copy link
Contributor

jaybxyz commented Sep 10, 2021

Ref: #89

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants