Program that enables the creation and execution of transactions larger than 1232 through a buffer-based approach. This program provides functionality for creating, managing, and executing transactions with support for ephemeral signers and address lookup tables.
Hefty amount of code has been lifted from Squads V4
Tests were performed using SystemProgram transfers, but theoretically, your limit is 63 instructions/cpi_calls.
The instructions silently fail so that jito bundles go through.
Excuse me for the untidy code, this was written this morning.
The Super Transaction program allows users to:
- Create and manage transaction buffers for larger transactions
- Create super transactions either directly or from completed buffers
- Execute transactions with support for ephemeral signers
- Handle complex transactions that require multiple signers or lookup tables (Versioned Transactions)
- A handful of edits have been done to make jito bundles go land.
txn_buffer_create
: Creates a new transaction buffer accounttxn_buffer_close
: Closes a transaction buffer and reclaims renttxn_buffer_extend
: Extends an existing transaction buffer with additional datasuper_transaction_create
: Creates a new super transaction directlysuper_transaction_create_from_buffer
: Creates a super transaction from a completed buffersuper_transaction_execute
: Executes an approved super transactionsuper_transaction_accounts_close
: Closes super transaction accounts
- Stores transaction data during buffer
- Maintains size limits and hash validation
- Tracked by creator and buffer index
- Contains executable transaction message
- Manages ephemeral signer information
- Handles execution authorization
mainnet: None
localnet: C5tcDT7wb5PGNy6owoze5KofLN4XQw4CmFAGuba7a5My
You can compile the code with Anchor v0.29.0.
anchor build
To run the tests, first install the node modules for the repository.
yarn
or
npm install
And run these tests with this command:
cd sdk/super_txn && yarn build
anchor test
- Transaction buffers must be properly sized before creation
- Final buffer hash must match for transaction creation from buffer
- Proper account ordering is required in remaining accounts for execution
- Only transaction creator can perform operations
- Ephemeral signers are automatically derived and managed
Audit on this program has not been done. Code is provided as is, please do not expect any support.
Follows the license of Squads V4 and it is the AGPL-3.0 license, see LICENSE.