-
Notifications
You must be signed in to change notification settings - Fork 367
flamenco, runtime, vm: clean up bounds on the number of instruction accounts #7553
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
base: main
Are you sure you want to change the base?
flamenco, runtime, vm: clean up bounds on the number of instruction accounts #7553
Conversation
e10ece9 to
275e9ac
Compare
Performance Measurements ⏳
|
275e9ac to
b6823dc
Compare
Performance Measurements ⏳
|
263d7a5 to
526d1fd
Compare
Performance Measurements ⏳
|
526d1fd to
55c40db
Compare
Performance Measurements ⏳
|
55c40db to
132eaf9
Compare
Performance Measurements ⏳
|
132eaf9 to
981de07
Compare
Performance Measurements ⏳
|
981de07 to
a3e3d2d
Compare
Performance Measurements ⏳
|
| #define FD_RUNTIME_CPI_MAX_INSTR_DATA_LEN (10240UL) | ||
|
|
||
| /* The bpf loader's serialization footprint is bounded in the worst case | ||
| by 64 unique writable accounts which are each 10MiB in size (bounded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comments shouldn't exceed 80 chars
ripatel-fd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix looks good, but can we add a manual test passing a worst-case transaction into the runtime? This makes it easier to verify the behavior in the future without having to rely on external fuzzing infra.
Corrects the value of FD_INSTR_ACCT_MAX to a larger bound derived from the transaction MTU. Without this, it is possible to cause a conformance divergence.
Credit to @nick0ve for reporting this in https://github.com/firedancer-io/auditor-internal/issues/348.
We were also using FD_INSTR_ACCT_MAX in several places where we shouldn't have been. This PR corrects that, so that we only use this larger bound where it's actually necessary.
Thankfully, solana-foundation/solana-improvement-documents#406 fixes this by limiting the number of instruction accounts to 255 at the transaction sanitization level. Once that SIMD is implemented and activated we can use the same 255 limit everywhere.
Increases the size of
fd_runtime_tby 470KB.