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

Initiating transactions on copy trading is slow #7

Open
skybl1ue opened this issue Jun 26, 2024 · 19 comments
Open

Initiating transactions on copy trading is slow #7

skybl1ue opened this issue Jun 26, 2024 · 19 comments
Labels
enhancement New feature or request

Comments

@skybl1ue
Copy link

It takes 20 seconds from detecting address transactions to completing copying transactions. How can I optimize the process to be as fast as possible?

@outsmartchad
Copy link
Owner

@skybl1ue It depends some factors, 1. the distance between the rpc provider host locations to your host locations. 2. the distance between the jito block engine host location and the ur host (if you are using jito bundles), This two could be fixed by hosting a server that is near to them. 3. Higher priority fee 4. Higher jito fee, i am using >=0.005 sol jito and 0.007 sol for priority fees when the network is congested.

@outsmartchad
Copy link
Owner

outsmartchad commented Jun 26, 2024

We might also try to build a new websocket to fetch the real-time data using Geyser-enhanced Websockets (grpc method) (https://github.com/rpcpool/yellowstone-grpc), now we are using the rpc method (onProgramAccountChange) provided by solana web3.js library

@skybl1ue
Copy link
Author

We might also try to build a new websocket to fetch the real-time data using Geyser-enhanced Websockets (grpc method) (https://github.com/rpcpool/yellowstone-grpc), now we are using the rpc method (onProgramAccountChange) provided by solana web3.js library
@outsmartchad The detection speed is fast, but the transaction processing speed has been delayed. Could it be that accessing Jito is too slow?

@outsmartchad
Copy link
Owner

outsmartchad commented Jun 26, 2024 via email

@outsmartchad
Copy link
Owner

outsmartchad commented Jun 26, 2024 via email

@skybl1ue
Copy link
Author

[image: image.png] wang chi @.> 於 2024年6月26日 週三 下午4:42寫道:

yes! it could be, study these jito block engine endpoints in this file ( https://github.com/outsmartchad/solana-memecoin-cli/blob/main/src/Transactions/jito_tips_tx_executor.js), choose one that is nearest to your location, and uncomment others and try again. skybl1ue @.
> 於 2024年6月26日 週三 下午4:40寫道: > We might also try to build a new websocket to fetch the real-time data > using Geyser-enhanced Websockets (grpc method) ( > https://github.com/rpcpool/yellowstone-grpc), now we are using the rpc > method (onProgramAccountChange) provided by solana web3.js library > @outsmartchad https://github.com/outsmartchad The detection speed is > fast, but the transaction processing speed has been delayed. Could it be > that accessing Jito is too slow? > > — > Reply to this email directly, view it on GitHub > <#7 (comment)>, > or unsubscribe > https://github.com/notifications/unsubscribe-auth/AVC7H376KMOBUHY3ATH54RTZJJ5BBAVCNFSM6AAAAABJ5JSQWOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJRGE2DEMBWGQ > . > You are receiving this because you were mentioned.Message ID: > @.***> >

I cant see this picture TnT

@outsmartchad
Copy link
Owner

[image: image.png] wang chi @.> 於 2024年6月26日 週三 下午4:42寫道:

yes! it could be, study these jito block engine endpoints in this file ( https://github.com/outsmartchad/solana-memecoin-cli/blob/main/src/Transactions/jito_tips_tx_executor.js), choose one that is nearest to your location, and uncomment others and try again. skybl1ue _
@**
._> 於 2024年6月26日 週三 下午4:40寫道: > We might also try to build a new websocket to fetch the real-time data > using Geyser-enhanced Websockets (grpc method) ( > https://github.com/rpcpool/yellowstone-grpc), now we are using the rpc > method (onProgramAccountChange) provided by solana web3.js library > @outsmartchad https://github.com/outsmartchad The detection speed is > fast, but the transaction processing speed has been delayed. Could it be > that accessing Jito is too slow? > > — > Reply to this email directly, view it on GitHub > <#7 (comment)>, > or unsubscribe > https://github.com/notifications/unsubscribe-auth/AVC7H376KMOBUHY3ATH54RTZJJ5BBAVCNFSM6AAAAABJ5JSQWOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJRGE2DEMBWGQ > . > You are receiving this because you were mentioned.Message ID: > _@_.*> >

I cant see this picture TnT

image

@outsmartchad
Copy link
Owner

outsmartchad commented Jun 26, 2024 via email

@outsmartchad
Copy link
Owner

@skybl1ue you could try to use jup swap instead, I will update two different code, 1. Swap using jup 2. Swap using raydium

@skybl1ue
Copy link
Author

您可以尝试使用 jup swap,我将更新两个不同的代码,1。使用 jup 2 进行交换。使用 raydium 进行交换

ok,thanks!:-D

@sneljeroen
Copy link

It's slow for me as well on copytrading, i get the error "TransactionExpiredBlockheightExceededError:". Any idea on how to fix? My fee is 0.005 sol, and im using the closest endpoint.

@skybl1ue
Copy link
Author

您可以尝试使用 jup swap,我将更新两个不同的代码,1。使用 jup 2 进行交换。使用 raydium 进行交换

微信截圖_20240628104150
At the red line position in the picture, the transaction experiences a delay, resulting in a 5-10 second completion time. How can this be optimized? ;(((

@outsmartchad
Copy link
Owner

5-10 seconds completion time is fast already bro, from fetching the pool, to building a swap tx, to send tx to jito block engine, the only thing could be optimized is the paid tool(RPC, hosted server's location), of course, the higher priority fee (if you willing to pay), please have a try the JUP swap api, the project have code to do it just like what we are using right now (Raydium swap)

您可以尝试使用 jup swap,我将更新两个不同的代码,1。使用 jup 2 进行交换。使用 raydium 进行交换

微信截圖_20240628104150 At the red line position in the picture, the transaction experiences a delay, resulting in a 5-10 second completion time. How can this be optimized? ;(((

@outsmartchad
Copy link
Owner

outsmartchad commented Jun 28, 2024

@skybl1ue https://github.com/outsmartchad/solana-memecoin-cli/tree/main/src/Trading/dex/jupiter/swap, the code is easy to use and have integrated jito bundles + base gas, please have a look

@outsmartchad
Copy link
Owner

It's slow for me as well on copytrading, i get the error "TransactionExpiredBlockheightExceededError:". Any idea on how to fix? My fee is 0.005 sol, and im using the closest endpoint.

let it retries

@sneljeroen
Copy link

Using the jupiter swap functions now, with 0.01 sol jito tip and 0.01 prioritization fee for Jupiter. Average copy trade transaction now takes 3-6 seconds. Which is fairly quick, Jupiter responds quickly but the confirmation from Jito takes up most of the time would this improve if i increase the jito tip to more?

New to Solana transaction with Jito tips, thanks for providing the code @outsmartchad

@skybl1ue
Copy link
Author

https://github.com/outsmartchad/solana-memecoin-cli/tree/main/src/Trading/dex/jupiter/swap,代码简单易用,并集成了jito捆绑包+基础气体,请看一下

I want to achieve very fast copy trading, just like the address in the picture. I set the same gas fees as him, but it is still much slower. I noticed that he sent multiple interactions simultaneously but only succeeded once. How is this done?
微信截圖_20240630212809

@outsmartchad
Copy link
Owner

Copy trade = you must be slower than the trader by few seconds, the way he made is sending the same request at the same time using the multi-thread, this will guarantee the tx will be land on mainnet successfully, yeah this is one of the options to make sure the tx is landing

@outsmartchad
Copy link
Owner

https://github.com/outsmartchad/solana-memecoin-cli/tree/main/src/Trading/dex/jupiter/swap,代码简单易用,并集成了jito捆绑包+基础气体,请看一下

I want to achieve very fast copy trading, just like the address in the picture. I set the same gas fees as him, but it is still much slower. I noticed that he sent multiple interactions simultaneously but only succeeded once. How is this done? 微信截圖_20240630212809

Please try every single thing you have to optimum it, if it works, you should contribute to this project. I already told you everything about how to optimize the code.

@outsmartchad outsmartchad added the enhancement New feature or request label Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants