gRPC testing possibilities
First that's really appreciated what updates have been made with refactored/main-v2 branch! It may not be the proper place for posting this message, because it mostly request for information rather than issue report. And if you find that it is not right place just close this ticket.
So based on my tests the usual RPC in many cases delivers messages in about 15 seconds compared to the timestamp of the received message, in very rare cases it is delivered in the same or next second, regardless what is set for commitment level. So one can't construct any trading strategy with such latencies. And I am still in searches for more reliable solution and I found the gRPC implementation in refactored branch. I want to test that but I don't know how to do that without paying enormous price just for gRPC testing.
I tried to research any provider that supports Geyser in the free / trial plan, but all offers I have found for gRPC support start from $500 /month. Based on Chainstack documentation "Geyser is available as a separate paid add-on starting from the Growth plan". And I looked the price for Geyser add-on, it's $449/month, so $49/mo (Growth Plan) + $449/mo (Geyser Add-on) which is also around $500/mo.
So the question is is there any possible way to test the gRPC interface and it's efficiency before paying $500?
Thanks, Ruben
P.S. I noticed all listener testing scripts and compare_listeners under the "tests" folder, I have written one myself but surely without Geyser testing possibility, so looking forward to do your compare_listeners test but don't know what to use for gRPC.
Hey @AuOuDev
So based on my tests the usual RPC in many cases delivers messages in about 15 seconds compared to the timestamp of the received message
From my experience, this shouldn't be the case with refactored/main-v2. It should be much faster. We'll merge this branch into main possibly this week, but just to be sure can you check and confirm:
- which branch you are using
- what script or with what parameters you tested (e.g., learning examples, main with --yolo etc)
- what node provider you are using. And if you are using Chainstack, what plan are you one? Also have a look at Limits
So the question is is there any possible way to test the gRPC interface and it's efficiency before paying $500?
I don't think we have one or there might be one with some sort of commitment and talks to our Sales guys. Let me double-check with our guys and get back to you.
Hey @akegaviar,
Thanks for your reply. Sorry I have used my other account when made initial post, now replying from my main account.
I have done some other tests during the day today. And I should tell that the problem with 15 seconds delay has been not noticed anymore. Although in some cases I have had 4-5 sec delay with BlockListener, but that was probably because of my network. Overall the messages are delivered within 0.5-2 seconds.
I have found some Geyser endpoint that I have used in my tests, but it doesn't look stable and looks I should not judge about Geyser efficiency from this tests.
For wss I have used endpoint from my ChainStack free account. The tests have been done from my physical location, and I am likely at a relatively comparable distance from all servers.
So what I did I used compare_listeners.py from the tests in refactored branch, I have added listener for PumpPortal too, which is using Geyser interface from some other provider (don't know it is allowed to mention the name here). Also added Block Time from blockSubscribe events to show the difference from block time. And this is the picture of one test which more or less is the case with other tests too:
2025-04-29 01:51:54,805 - INFO - Test completed in 40.00 seconds
2025-04-29 01:51:54,806 - INFO - BlockListener detected 13 tokens
2025-04-29 01:51:54,806 - INFO - LogsListener detected 12 tokens
2025-04-29 01:51:54,806 - INFO - PumpPortalListner detected 18 tokens
2025-04-29 01:51:54,806 - INFO - GeyserListener detected 9 tokens
2025-04-29 01:51:54,806 - INFO -
Analyzing token detection across listeners:
2025-04-29 01:51:54,806 - INFO - Tokens detected by all listeners: 8
2025-04-29 01:51:54,807 - INFO - Tokens detected by both BlockListener and LogsListener: 10
2025-04-29 01:51:54,807 - INFO - Tokens unique to BlockListener: 3
2025-04-29 01:51:54,807 - INFO - Tokens unique to LogsListener: 2
2025-04-29 01:51:54,807 - INFO - Tokens detected by both BlockListener and PumpPortalListner: 13
2025-04-29 01:51:54,807 - INFO - Tokens unique to BlockListener: 0
2025-04-29 01:51:54,807 - INFO - Tokens unique to PumpPortalListner: 5
2025-04-29 01:51:54,807 - INFO - Tokens detected by both BlockListener and GeyserListener: 8
2025-04-29 01:51:54,807 - INFO - Tokens unique to BlockListener: 5
2025-04-29 01:51:54,807 - INFO - Tokens unique to GeyserListener: 1
2025-04-29 01:51:54,807 - INFO - Tokens detected by both LogsListener and PumpPortalListner: 12
2025-04-29 01:51:54,807 - INFO - Tokens unique to LogsListener: 0
2025-04-29 01:51:54,807 - INFO - Tokens unique to PumpPortalListner: 6
2025-04-29 01:51:54,807 - INFO - Tokens detected by both LogsListener and GeyserListener: 9
2025-04-29 01:51:54,807 - INFO - Tokens unique to LogsListener: 3
2025-04-29 01:51:54,807 - INFO - Tokens unique to GeyserListener: 0
2025-04-29 01:51:54,807 - INFO - Tokens detected by both PumpPortalListner and GeyserListener: 9
2025-04-29 01:51:54,808 - INFO - Tokens unique to PumpPortalListner: 9
2025-04-29 01:51:54,808 - INFO - Tokens unique to GeyserListener: 0
2025-04-29 01:51:54,808 - INFO - Total unique tokens detected by any listener: 18
| Token | BlockTime | BlockListener | LogsListener | PumpPortalListner | GeyserListener | Fastest |
|---|---|---|---|---|---|---|
| iLCVaLFvCX... | 1745877097 | 1745877099.526 | 1745877097.893 | 1745877097.585 | 1745877098.137 | PumpPortalListner |
| 2bLRMRPat8... | N/A | N/A | 1745877087.634 | 1745877087.053 | N/A | PumpPortalListner |
| EoJzoGc4r5... | 1745877087 | 1745877091.535 | 1745877089.154 | 1745877088.809 | N/A | PumpPortalListner |
| HmAg17rzsw... | 1745877087 | 1745877090.140 | 1745877087.633 | 1745877087.042 | N/A | PumpPortalListner |
| GqXoRdGDP6... | 1745877089 | 1745877092.881 | 1745877091.039 | 1745877090.606 | 1745877090.544 | GeyserListener |
| 7yL2tVbU9n... | 1745877100 | 1745877102.149 | 1745877101.174 | 1745877100.740 | 1745877101.047 | PumpPortalListner |
| 6ZNy3vGkgk... | 1745877081 | 1745877086.635 | N/A | 1745877082.767 | N/A | PumpPortalListner |
| 4uju237FkF... | 1745877081 | 1745877086.089 | N/A | 1745877082.113 | N/A | PumpPortalListner |
| GQPb8VinFJ... | N/A | N/A | 1745877091.247 | 1745877091.092 | 1745877090.996 | GeyserListener |
| 9c2eEA6H7a... | 1745877098 | 1745877100.673 | 1745877099.048 | 1745877098.676 | 1745877099.155 | PumpPortalListner |
| Fg8Vf196ro... | 1745877083 | 1745877087.690 | N/A | 1745877084.381 | N/A | PumpPortalListner |
| BL6Z9u5uxb... | 1745877102 | 1745877103.374 | 1745877102.968 | 1745877102.695 | 1745877102.842 | PumpPortalListner |
| 9wNXaEcvHC... | 1745877103 | 1745877104.470 | 1745877104.179 | 1745877103.792 | 1745877103.835 | PumpPortalListner |
| hss5Qy4A8D... | 1745877090 | 1745877093.289 | 1745877091.245 | 1745877091.028 | 1745877090.927 | GeyserListener |
| GKzK84YGBT... | 1745877093 | 1745877095.747 | 1745877094.034 | 1745877093.575 | 1745877094.082 | PumpPortalListner |
As you can see results are occasionally missing for BlockListner and LogsListner. And in some cases with BlockListner the difference from BlockTime reaches to 3-4 sec, which is significant in case of some trade strategies I am testing.
The missing GeyserListener results shows that endpoint that I used is probably not reliable and most probably that should not be the case with payed service. In most cases PumpPortal results win, which should probably mean that normal and stable Geyser streaming should have better results.
Quite frequently I was getting "Skipping non-Create instruction with discriminator" errors from LogsListner with different discriminator values, and some of the events were skipped because of that.
In case of GeyserListner and LogsListner the commitment levels were set to Processed, but for BlockListener it was set to Confirmed as setting to Processed I was getting nothing, probably it is not supported in ChainStack free plan.
The final takeaways from these tests:
- logsSubscribe and blockSubscribe don't look as reliable to be used for stable trading experience
- This Geyser test can't be taken as final and this doesn't show true picture of gRPC streaming
- Still need to find a way to test real gRPC connection
The problem with delayed messages of LogsSubscribe and BlockSubscribe on Chainstack periodically happens. Just noticed some delay and made another comparison test:
2025-05-03 19:58:57,064 - INFO - Test completed in 40.00 seconds 2025-05-03 19:58:57,064 - INFO - BlockListener detected 12 tokens 2025-05-03 19:58:57,064 - INFO - LogsListener detected 17 tokens 2025-05-03 19:58:57,064 - INFO - PumpPortalListner detected 20 tokens 2025-05-03 19:58:57,064 - INFO - GeyserListener detected 20 tokens 2025-05-03 19:58:57,065 - INFO - Analyzing token detection across listeners: 2025-05-03 19:58:57,065 - INFO - Tokens detected by all listeners: 12 2025-05-03 19:58:57,065 - INFO - Tokens detected by both BlockListener and LogsListener: 12 2025-05-03 19:58:57,065 - INFO - Tokens unique to BlockListener: 0 2025-05-03 19:58:57,065 - INFO - Tokens unique to LogsListener: 5 2025-05-03 19:58:57,065 - INFO - Tokens detected by both BlockListener and PumpPortalListner: 12 2025-05-03 19:58:57,065 - INFO - Tokens unique to BlockListener: 0 2025-05-03 19:58:57,065 - INFO - Tokens unique to PumpPortalListner: 8 2025-05-03 19:58:57,065 - INFO - Tokens detected by both BlockListener and GeyserListener: 12 2025-05-03 19:58:57,065 - INFO - Tokens unique to BlockListener: 0 2025-05-03 19:58:57,065 - INFO - Tokens unique to GeyserListener: 8 2025-05-03 19:58:57,065 - INFO - Tokens detected by both LogsListener and PumpPortalListner: 14 2025-05-03 19:58:57,065 - INFO - Tokens unique to LogsListener: 3 2025-05-03 19:58:57,066 - INFO - Tokens unique to PumpPortalListner: 6 2025-05-03 19:58:57,066 - INFO - Tokens detected by both LogsListener and GeyserListener: 14 2025-05-03 19:58:57,066 - INFO - Tokens unique to LogsListener: 3 2025-05-03 19:58:57,066 - INFO - Tokens unique to GeyserListener: 6 2025-05-03 19:58:57,066 - INFO - Tokens detected by both PumpPortalListner and GeyserListener: 20 2025-05-03 19:58:57,066 - INFO - Tokens unique to PumpPortalListner: 0 2025-05-03 19:58:57,066 - INFO - Tokens unique to GeyserListener: 0 2025-05-03 19:58:57,066 - INFO - Total unique tokens detected by any listener: 23 2025-05-03 19:58:57,066 - INFO - Detection speed comparison:
| Token | Block Time | BlockListener | LogsListener | PumpPortalListner | GeyserListener | Fastest |
|---|---|---|---|---|---|---|
| DwMJCbbzeF... | 1746287904 | 1746287916.605 | 1746287914.466 | 1746287905.087 | 1746287905.076 | GeyserListener |
| 8zY323mutW... | N/A | N/A | 1746287913.628 | 1746287904.572 | 1746287904.722 | PumpPortalListner |
| 4KkLDzU8hc... | 1746287913 | 1746287922.602 | 1746287922.252 | 1746287913.975 | 1746287914.950 | PumpPortalListner |
| CTysbYiab3... | N/A | N/A | N/A | 1746287918.893 | 1746287919.568 | PumpPortalListner |
| 5UDTdvF9jG... | 1746287897 | 1746287912.010 | 1746287909.535 | 1746287898.164 | 1746287898.635 | PumpPortalListner |
| 8tLJXwj1Yn... | 1746287897 | 1746287911.349 | 1746287908.767 | 1746287898.001 | 1746287898.452 | PumpPortalListner |
| AFfNHEvfQ9... | 1746287907 | 1746287919.151 | 1746287918.188 | 1746287907.988 | 1746287907.933 | GeyserListener |
| 3ohNNXZFQU... | 1746287901 | 1746287914.890 | 1746287911.739 | 1746287901.635 | 1746287902.216 | PumpPortalListner |
| DxKuWe6nF7... | 1746287913 | 1746287922.212 | 1746287921.848 | 1746287913.748 | 1746287914.560 | PumpPortalListner |
| n8HeDdeAY8... | 1746287910 | 1746287920.600 | 1746287920.080 | 1746287910.984 | 1746287911.556 | PumpPortalListner |
| 9cry7VaiNG... | N/A | N/A | 1746287913.688 | 1746287904.691 | 1746287904.831 | PumpPortalListner |
| B9E9Rri85k... | 1746287916 | 1746287926.320 | 1746287926.006 | 1746287917.050 | 1746287917.949 | PumpPortalListner |
| 4Do5DbxHbt... | 1746287899 | 1746287914.261 | 1746287911.465 | 1746287900.271 | 1746287901.066 | PumpPortalListner |
| Gx7gHAUAp5... | N/A | N/A | N/A | 1746287922.708 | 1746287923.979 | PumpPortalListner |
| 6eUYkaGWoM... | 1746287905 | 1746287917.623 | 1746287915.609 | 1746287906.068 | 1746287906.037 | GeyserListener |
| A42UdS5Ne5... | N/A | N/A | N/A | 1746287920.798 | 1746287921.654 | PumpPortalListner |
| C82bkxKH4n... | N/A | N/A | N/A | 1746287919.178 | 1746287919.750 | PumpPortalListner |
| FUhqyUq3yP... | N/A | N/A | N/A | 1746287924.366 | 1746287925.477 | PumpPortalListner |
| 7ubD9uppG7... | N/A | N/A | N/A | 1746287917.817 | 1746287918.687 | PumpPortalListner |
| 3n6PK93Myp... | 1746287904 | 1746287916.333 | 1746287913.627 | 1746287904.506 | 1746287904.717 | PumpPortalListner |
There is 5-15 sec delays, in case when PumpPortal and Geyser messages looks same as other day tests.
Btw, I also noticed that PumpPortal is pretty fast. I guess it'd be nice to have a few listeners in parallel then.
P.S. I've added a script to learning examples which performs comparison of listeners for new tokens. Feel free to submit your version as well.
@smypmsa Hey Anton, thanks for the update. What’s the best detection speed we can realistically expect for new tokens? And do we really need Geyser if we want to snipe on block 0?
@creosmart Hi! I think Geyser is the fastest available way for getting updates from the chain (except for shreds). So, yes, it's definitely a must-have if you're aiming at 0 slot.