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

Bound GetNextStakerChangeTime for ACP-77 #3411

Merged
merged 4 commits into from
Sep 25, 2024

Conversation

StephenButtolph
Copy link
Contributor

@StephenButtolph StephenButtolph commented Sep 24, 2024

Why this should be merged

For ACP-77, when checking for the maximum allowed block time, we need to search for the first time that a SoV will need to be deactivated. To perform this search efficiently, we should bound that search as much as possible. This PR introduces a maximum time to GetNextStakerChangeTime which will be used to implement this efficient search.

How this works

  • Moves the GetNextStakerChangeTime verification last in the timestamp checks.
  • Unifies the Banff block timestamp verification and the AdvanceTimeTx verification
    • This does change the verification rule for AdvanceTimeTx. However, it makes it less strict, and this transaction is no longer allowed to be issued. So this is a backwards compatible change.
  • Introduces hourly polling to the P-chain block building logic.

How this was tested

  • Added unit tests for GetNextStakerChangeTime and NextBlockTime

@StephenButtolph StephenButtolph self-assigned this Sep 24, 2024
@StephenButtolph StephenButtolph added this to the v1.11.12 milestone Sep 24, 2024
@StephenButtolph StephenButtolph marked this pull request as ready for review September 24, 2024 03:50
@StephenButtolph StephenButtolph changed the title Bound GetNextStakerTime for ACP-77 Bound GetNextStakerChangeTime for ACP-77 Sep 24, 2024
@StephenButtolph StephenButtolph added this pull request to the merge queue Sep 25, 2024
Merged via the queue into master with commit 558f32a Sep 25, 2024
22 checks passed
@StephenButtolph StephenButtolph deleted the bound-next-staker-time branch September 25, 2024 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants