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: set allocation size to 0 for transactions known to fail #2966

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

jstarry
Copy link

@jstarry jstarry commented Sep 24, 2024

Problem

Transactions with invalid system instructions are known to fail but still attempt to reserve allocation space in the cost model despite not actually persisting any new allocated accounts.

Summary of Changes

  • Set allocation size to 0 for transactions known to fail
  • Clamp total estimated allocation size to the max tx allocation limit since any allocations beyond this limit will fail

Fixes #

Copy link

@tao-stones tao-stones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great to me

@jstarry jstarry merged commit 443246d into anza-xyz:master Sep 26, 2024
40 checks passed
@jstarry jstarry deleted the fix/failed-tx-zero-alloc branch September 26, 2024 00:44
@jstarry jstarry added v1.18 v2.0 Backport to v2.0 branch labels Sep 26, 2024
Copy link

mergify bot commented Sep 26, 2024

Backports to the stable branch are to be avoided unless absolutely necessary for fixing bugs, security issues, and perf regressions. Changes intended for backport should be structured such that a minimum effective diff can be committed separately from any refactoring, plumbing, cleanup, etc that are not strictly necessary to achieve the goal. Any of the latter should go only into master and ride the normal stabilization schedule.

Copy link

mergify bot commented Sep 26, 2024

Backports to the beta branch are to be avoided unless absolutely necessary for fixing bugs, security issues, and perf regressions. Changes intended for backport should be structured such that a minimum effective diff can be committed separately from any refactoring, plumbing, cleanup, etc that are not strictly necessary to achieve the goal. Any of the latter should go only into master and ride the normal stabilization schedule. Exceptions include CI/metrics changes, CLI improvements and documentation updates on a case by case basis.

mergify bot pushed a commit that referenced this pull request Sep 26, 2024
(cherry picked from commit 443246d)

# Conflicts:
#	cost-model/src/cost_model.rs
mergify bot pushed a commit that referenced this pull request Sep 26, 2024
jstarry added a commit that referenced this pull request Sep 27, 2024
…ackport of #2966) (#2989)

fix: set allocation size to 0 for transactions known to fail (#2966)

(cherry picked from commit 443246d)

Co-authored-by: Justin Starry <justin@anza.xyz>
jstarry added a commit that referenced this pull request Sep 27, 2024
…backport of #2966) (#2988)

* fix: set allocation size to 0 for transactions known to fail (#2966)

(cherry picked from commit 443246d)

# Conflicts:
#	cost-model/src/cost_model.rs

* fix conflicts

---------

Co-authored-by: Justin Starry <justin@anza.xyz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v1.18 v2.0 Backport to v2.0 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants