Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.