Skip to content

SIMD-0160: Static Instruction Limit#160

Merged
jacobcreech merged 4 commits into
solana-foundation:mainfrom
apfitzge:static_instruction_limit
Jul 21, 2025
Merged

SIMD-0160: Static Instruction Limit#160
jacobcreech merged 4 commits into
solana-foundation:mainfrom
apfitzge:static_instruction_limit

Conversation

@apfitzge
Copy link
Copy Markdown
Contributor

No description provided.

@apfitzge apfitzge changed the title SIMD-XXXX: Static Instruction Limit SIMD-0160: Static Instruction Limit Jul 25, 2024
@apfitzge apfitzge marked this pull request as ready for review July 25, 2024 12:19
Copy link
Copy Markdown
Contributor

@ptaffet-jump ptaffet-jump left a comment

Choose a reason for hiding this comment

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

Fantastic, thanks! You always say "more than 64," so I think it should be pretty clear, but it might be worth calling out explicitly that exactly 64 is fine. The inequality is strict.


## Alternatives Considered

Do nothing.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why not allow them to be included but limit processing to fee payer validation? So before we load the program cache, we check the instruction count and fail the transaction immediately if it exceeds the limit but still allow fee collection?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I view it similarly to having the number of signatures not match the required signatures field in the header; its' a basic sanitization check that can be checked extremely cheaply.

checking it does not scale with any aspects of the transaction such as number of instructions, number of account lookup tables, etc.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So long as we do it really early then I'm fine with prohibiting such transactions from being included. Can you write up a brief summary of this comment thread in the alternatives section?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@apfitzge
Copy link
Copy Markdown
Contributor Author

@Benhawkins18 can we merge this? we have approval from both FD and Anza teams

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants