Skip to content

fix(optimized_transaction): correct v0 signer ordering with separate fee payer#178

Merged
0xIchigo merged 2 commits intohelius-labs:devfrom
pradhankukiran:fix/versioned-smart-tx-signer-order
Mar 12, 2026
Merged

fix(optimized_transaction): correct v0 signer ordering with separate fee payer#178
0xIchigo merged 2 commits intohelius-labs:devfrom
pradhankukiran:fix/versioned-smart-tx-signer-order

Conversation

@pradhankukiran
Copy link
Copy Markdown
Contributor

This fixes incorrect signer handling for versioned smart transactions when the fee payer differs from the provided signers.

Changes:

  • build a canonical full signer set including the fee payer
  • use VersionedTransaction::try_new(...) for signed v0 construction
  • use the same full signer set for CU simulation
  • add regression tests covering separate fee payer and out-of-order signer input

Root cause:

  • the previous v0 path manually wrote signatures in caller order instead of message signer order
  • CU simulation could also omit the fee payer when it was separate

Validation:

  • cargo fmt --check
  • cargo clippy -q
  • cargo test -q

…fee payer

Build a canonical full signer set including a separate fee payer, use VersionedTransaction::try_new(...) for signed v0 transaction construction and CU simulation, and add regressions for out-of-order signer input.
Copy link
Copy Markdown
Collaborator

@0xIchigo 0xIchigo left a comment

Choose a reason for hiding this comment

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

Very nice! Thank you for the contribution! 🚀

@0xIchigo 0xIchigo merged commit e8a0a01 into helius-labs:dev Mar 12, 2026
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.

2 participants