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

v1.18: fix: set allocation size to 0 for transactions known to fail (backport of #2966) #2988

Merged
merged 2 commits into from
Sep 27, 2024

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Sep 26, 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 #


This is an automatic backport of pull request #2966 done by [Mergify](https://mergify.com).

(cherry picked from commit 443246d)

# Conflicts:
#	cost-model/src/cost_model.rs
@mergify mergify bot requested a review from a team as a code owner September 26, 2024 00:45
@mergify mergify bot added the conflicts label Sep 26, 2024
Copy link
Author

mergify bot commented Sep 26, 2024

Cherry-pick of 443246d has failed:

On branch mergify/bp/v1.18/pr-2966
Your branch is up to date with 'origin/v1.18'.

You are currently cherry-picking commit 443246dee0.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   cost-model/src/cost_model.rs

no changes added to commit (use "git add" and/or "git commit -a")

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

Copy link

@bw-solana bw-solana left a comment

Choose a reason for hiding this comment

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

LGTM

@jstarry jstarry merged commit 7ba2a0e into v1.18 Sep 27, 2024
35 checks passed
@jstarry jstarry deleted the mergify/bp/v1.18/pr-2966 branch September 27, 2024 06:20
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.

4 participants