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

Adjust mining window behaviour #1030

Merged
merged 5 commits into from
Apr 15, 2022
Merged

Adjust mining window behaviour #1030

merged 5 commits into from
Apr 15, 2022

Conversation

area
Copy link
Member

@area area commented Apr 8, 2022

This PR adjusts how the submission window and the dispute resolution window work, and who is allowed to submit when.

Before this PR, the submission window lasts an hour, and at the start of the hour no-one with stakes can submit, and at the end of the hour, everyone with stakes can submit. However, we want to ensure that even an unlucky good actor has an opportunity to submit before the window ends, and so this PR intends to change the logic to everyone being able to submit after 50 minutes. This ten minutes is captured in the newly introduced ALL_ENTRIES_ALLOWED_END_OF_WINDOW constant in the contracts.

Similarly, during the dispute process, before this PR each stage lasts ten minutes, with no-one able to defend at the start and everyone able to defend at the end. I have changed this to a twenty minute window, where from minute 10 everyone is able to defend. This has the same effect - every staker will have at least ten minutes to submit a defence for a submission. The same logic applies to all stages in the dispute - JRH confirmation, binary search, the transaction demonstrating a correct calculation, and the invalidation of submissions.

In both cases, some responses are still allowed after the ten minute free-for-all window - but crucially the 'next step' also starts becoming valid, whatever that might be.

I've also taken the opportunity to clean up some magic constant literals that were still floating about, as well as slightly improving coverage.

kronosapiens
kronosapiens previously approved these changes Apr 14, 2022
@area area merged commit b72e9eb into develop Apr 15, 2022
@area area deleted the feat/mining-window-adjustment branch April 15, 2022 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants