Skip to content

Conversation

@kagren
Copy link
Contributor

@kagren kagren commented Aug 27, 2025

The current CLI does not support dumping a serialized transaction, which is a problem for stake pool operators that use multisig wallets. This PR adds a new CLI option, --dump-transaction-message-only, that will instead of sending the transaction just print the transaction to stdout.

By setting that option, it also becomes possible to pass a pubkey to the CLI arguments that normally expect a keypair for signing.

The current CLI does not support dumping a serialized transaction, which is a problem for stake pool operators that use multisig wallets. This PR adds a new CLI option, --dump-transaction-message-only, that will instead of sending the transaction just print the transaction to stdout.

By setting that option, it also becomes possible to pass a pubkey to the CLI arguments that normally expect a keypair for signing.
Copy link
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution!

The scaffolding already exists for all this in a simpler way, using the offline_args module. I think your PR took some inspiration from it, but we can add the offline_args_config() parameter, as with: https://github.com/solana-program/token-2022/blob/075f4178d752ddd4a0564f9b1cae079cbed38998/clients/cli/src/clap_app.rs#L1105

And then we just need to add sign_only / dump_transaction_message as config-level fields, as in https://github.com/solana-program/token-2022/blob/075f4178d752ddd4a0564f9b1cae079cbed38998/clients/cli/src/config.rs#L85

And then we can remove DummySigner and use NullSigner from the SDK instead, as in https://github.com/solana-program/token-2022/blob/075f4178d752ddd4a0564f9b1cae079cbed38998/clients/cli/src/config.rs#L603

And finally, rather than encoding in base58 by hand, we can use return_signers_data: https://github.com/anza-xyz/agave/blob/d2ba8b8160c209d13d1fcb630f0e856e0bd14114/cli-output/src/cli_output.rs#L2663

NOTE: return_signers_data encodes the message as base64, and not base58

How does that sound?

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