flamenco, vote: fix signer checks for transactions with large number of instruction accounts#8073
Merged
topointon-jump merged 2 commits intoFeb 2, 2026
Conversation
38a3d90 to
935c227
Compare
mjain-jump
reviewed
Jan 29, 2026
935c227 to
a2ab1d1
Compare
…of instruction accounts
a2ab1d1 to
89f55bc
Compare
7929939 to
91db0c7
Compare
| int | ||
| fd_exec_instr_ctx_get_signers( fd_exec_instr_ctx_t const * ctx, | ||
| fd_pubkey_t const * signers[static FD_TXN_SIG_MAX] ) { | ||
| fd_pubkey_t const * signers[static FD_TXN_SIG_MAX], |
Contributor
There was a problem hiding this comment.
why not just bump up the FD_TXN_SIG_MAX bound here instead of doing duplicate checking
Contributor
Author
There was a problem hiding this comment.
that was my original change. either approach works.
after chatting with @mjain-jump we decided to go with the de-duplication for a couple reasons:
- less change surface area and slightly less stack pressure
- more closely matches agave (they use a hashset)
- we'd need to introduce a different constant for the transaction parser limit, which needs to stay at
FD_TXN_SIG_MAX
I am ok with either approach
| } | ||
|
|
||
| /* This should never be possible */ | ||
| if( FD_UNLIKELY( j>=FD_TXN_SIG_MAX ) ) { |
Contributor
There was a problem hiding this comment.
is this true? i thought you could have an instruction that references the same signer 128 times
Contributor
Author
There was a problem hiding this comment.
you can (which is what this pr addresses), but j is the number of unique signer pubkeys, which can never be more than FD_TXN_SIG_MAX
mjain-jump
reviewed
Jan 30, 2026
mjain-jump
reviewed
Jan 30, 2026
mjain-jump
reviewed
Jan 30, 2026
91db0c7 to
7e1e56a
Compare
mjain-jump
approved these changes
Feb 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We need to de-dup the signers array otherwise we run into issues with large numbers of instruction accounts