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

[3.2] Add 3-strike rule to speculative blocks #151

Merged
merged 1 commit into from
Sep 15, 2022
Merged

Conversation

heifner
Copy link
Member

@heifner heifner commented Sep 13, 2022

The 3-strike rule (which is configurable via subjective-account-max-failures from the default of 3) is now applied to speculative block transactions. The 3-strike rule has been applied to BP signed blocks for a long time, this PR applies the same rule to transactions speculatively executed into speculative blocks.

  • 3-strike rule
    • Applying the 3-strike rule to speculative blocks means that an account is only allowed 3 failures per speculative block, approximately 3 failures every 500ms. It is not exactly over 500ms as speculative blocks can be shorter or longer than 500ms as new speculative blocks are only started when a BP signed block is received or a block CPU/NET limit is exhausted. Any transaction processed into a speculative block after the first 3 failures is immediately failed with a transaction exceeded CPU usage exception without any attempt to execute it.
    • The 3-strike rule is enabled by disable-subjective-billing=false and configured by subjective-account-max-failures. It is not applied to disable-subjective-account-billing accounts.

Resolves #149

@heifner heifner added the OCI Work exclusive to OCI team label Sep 13, 2022
Base automatically changed from GH-119-more-logging to main September 15, 2022 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCI Work exclusive to OCI team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Honor subjective-account-max-failures for speculative blocks
2 participants