1

I have been doing some testing using various RPC's

I can see that some bots on the network are managing to get their transactions inside the same block / next block of their target transactions and from my testing i am struggling to understand how they are managing this so I am looking for some clarification on a few things before i go down a rabbit hole.

  • priority transactions: I have added compute budgets with the priority fee in microlamports in test transactions - I can get the execution speed down to around 2/3 seconds which isn't good enough - even if i set a ridiculously high fee (100m+) - am I missing something here?

my test transactions without priority fee take over 1 minute to land ( if they land at all ) With fee - they all land but can take anywhere between 5s and 1 minute to land.

I have read about a "tpu client" that a method of sending transactions directly to validator leaders - to my understanding the nodejs version is not currently working because of some network update with solana but the rust tpu client is? There is not much information on this so if someone could clarify its purpose and functionality that would be good.

What do I need to be focusing on - am I missing something?

Thank you in advance..

3
  • how are you creating and sending your transactions? what is your transaction commitment level set to?
    – nickfrosty
    Commented Jan 19 at 14:52
  • can you clarify what you mean by land the transaction? are you trying to get it finalized by the blockchain or just send it to the rpc and get a success response from them?
    – nickfrosty
    Commented Jan 19 at 14:52
  • by land the transaction i mean appear on the blockchain (appear on solscan - im using their timestamp for the tx) - im setting up the rpc connection with 'processed' as i would assume that this is the faster option as the blocks / transactions dont need to wait to be confirmed / finalised. But i could be wrong im new to solana :)
    – MHCH
    Commented Jan 19 at 16:07

2 Answers 2

1

Sending directly to the leader TPU is a way to get your transaction to the validators faster, but it likely won't allow you to beat most bots and is currently quite resource intensive, so I personally wouldn't recommend this to achieve your goal. Nonetheless, if this is something you're after, you'd either need to spin up a full-node or checkout Mango's lite-rpc. If you're interested in learning more about sending directly to the leader's TPU and how it all works under the hood, I can highly recommend 0x19's awesome article on the subject.

Now why would this still likely not allow you to beat most bots? Because most bots on Solana today are arbitrage bots, and they actually have a second tool to get their transactions included even faster: Jito bundles. These allow them to specify so-called validator tips (different from priority fees!) to "bribe" validators to include their transaction even sooner. Note however that these can get quite a bit more expensive than priority fees. You can learn more about how to use these in the Jito docs.

5
  • Also would like to point you to this question which is about transaction failures, but could include some stuff that might be helpful/interesting to your problem too: solana.stackexchange.com/questions/9285/…
    – Ahri
    Commented Jan 21 at 14:16
  • Thank you for your answer it helps a lot! Im just wondering if you could clarify something about the lite-rpc you mentioned - is this a stand alone "lite rpc node" then or is it something that runs on top of a full node? I wasn't aware there was a lite node. Coming from eth chains, I build relay programs to just interact with the p2p network layer in order to broadcast tx's from mulitple locations for low cost. Would it be comparable to that sort of setup?
    – MHCH
    Commented Jan 22 at 12:41
  • Lite-rpc is a separate thing, it runs just the logic of identifying the current leader & sending transaction directly to their TPU without the overhead of running a full node.
    – Ahri
    Commented Jan 22 at 12:43
  • I see, what network will it use to do that then do you provide it with a paid rpc endpoint or ?
    – MHCH
    Commented Jan 22 at 12:45
  • I don't know this off the top of my head as I haven't used lite-rpc before, however it seems to be decently well documented so I'm sure you can find out :)
    – Ahri
    Commented Jan 22 at 13:22
0

If you are trying to send transactions using a tpu client, I recommend using rust and the official solana-client crate.

Or you can make it yourself by referencing the code written in rust

1
  • Thank you, i will look into that
    – MHCH
    Commented Jan 22 at 12:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.