Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HELP] - Always getting a versioned Transaction Too large error #173

Open
atulsriv opened this issue Feb 14, 2024 · 0 comments
Open

[HELP] - Always getting a versioned Transaction Too large error #173

atulsriv opened this issue Feb 14, 2024 · 0 comments

Comments

@atulsriv
Copy link

atulsriv commented Feb 14, 2024

panic: failed to send transaction to rpc clients. Error: base64 encoded solana_sdk::transaction::versioned::VersionedTransaction too large: 1964 bytes (max: encoded/raw 1644/1232)

Considering I am able to do this swap via the 3rd party's UI, I think this is something wrong with how I am building my transaction. Particularly, how I am passing in TransactionAddressLookupTables into the transaction builder. Anyone have an example of how to do this?

This is the function
func TransactionAddressTables(tables map[PublicKey]PublicKeySlice) TransactionOption { return transactionOptionFunc(func(opts *transactionOptions) { opts.addressTables = tables }) }

I am trying to construct a solana transaction based on jupiter's swap-instructions endpoint (https://station.jup.ag/docs/apis/swap-api).

Essentially, they return a list of addresses that can be used to create address lookup tables. I am a bit confused/in the middle of figuring out how to do this. In their typescript example, they call GetAccountInfo and then deserialize the Data field into something of AddressLookupTable type (see the deserialize function here: https://solana-labs.github.io/solana-web3.js/classes/AddressLookupTableAccount.html).

  type AccountInfo struct {
	  Lamports   uint64
	  Owner      common.PublicKey
	  Executable bool
	  RentEpoch  uint64
	  Data       []byte
  }
  

I am assuming the format is [addressLookupTable pub key] -> [all of the pubkeys to lookup addresses by], but even this confused me, because the [addressLookupTable pub key] should be constant. Any help is greatly appreciated!!

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

No branches or pull requests

1 participant