Skip to content

flamenco, vote: fix signer checks for transactions with large number of instruction accounts#8073

Merged
topointon-jump merged 2 commits into
firedancer-io:mainfrom
topointon-jump:firedancer-fuzz_sol_prog-3
Feb 2, 2026
Merged

flamenco, vote: fix signer checks for transactions with large number of instruction accounts#8073
topointon-jump merged 2 commits into
firedancer-io:mainfrom
topointon-jump:firedancer-fuzz_sol_prog-3

Conversation

@topointon-jump
Copy link
Copy Markdown
Contributor

@topointon-jump topointon-jump commented Jan 28, 2026

We need to de-dup the signers array otherwise we run into issues with large numbers of instruction accounts

@topointon-jump topointon-jump force-pushed the firedancer-fuzz_sol_prog-3 branch 3 times, most recently from 38a3d90 to 935c227 Compare January 29, 2026 00:11
Comment thread src/flamenco/runtime/context/fd_exec_instr_ctx.c
@topointon-jump topointon-jump force-pushed the firedancer-fuzz_sol_prog-3 branch from 935c227 to a2ab1d1 Compare January 29, 2026 00:12
@topointon-jump topointon-jump force-pushed the firedancer-fuzz_sol_prog-3 branch from a2ab1d1 to 89f55bc Compare January 29, 2026 00:22
@topointon-jump topointon-jump enabled auto-merge (squash) January 29, 2026 04:57
@topointon-jump topointon-jump force-pushed the firedancer-fuzz_sol_prog-3 branch 2 times, most recently from 7929939 to 91db0c7 Compare January 29, 2026 18:50
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],
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 just bump up the FD_TXN_SIG_MAX bound here instead of doing duplicate checking

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.

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 ) ) {
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.

is this true? i thought you could have an instruction that references the same signer 128 times

Copy link
Copy Markdown
Contributor Author

@topointon-jump topointon-jump Jan 30, 2026

Choose a reason for hiding this comment

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

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

Comment thread src/flamenco/runtime/context/fd_exec_instr_ctx.c Outdated
Comment thread src/flamenco/runtime/program/fd_vote_program.c Outdated
Comment thread src/flamenco/runtime/program/fd_vote_program.c
@topointon-jump topointon-jump force-pushed the firedancer-fuzz_sol_prog-3 branch from 91db0c7 to 7e1e56a Compare January 30, 2026 19:50
@topointon-jump topointon-jump merged commit 68da41e into firedancer-io:main Feb 2, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants