@@ -175,7 +175,7 @@ const RPC_PROVIDERS = [
175175 rateLimitWindow : 10000 // 100 reqs per 10s, 40 per method
176176 } ,
177177
178- // HIGH-QUALITY FREE PUBLIC RPCs
178+ // HIGH-QUALITY FREE PUBLIC RPCs (only keeping consistently working ones)
179179 {
180180 getUrl : ( ) => "https://solana-rpc.publicnode.com" ,
181181 weight : 20 ,
@@ -184,22 +184,6 @@ const RPC_PROVIDERS = [
184184 rateLimit : 50 ,
185185 rateLimitWindow : 10000
186186 } ,
187- {
188- getUrl : ( ) => "https://solana.api.onfinality.io/public" ,
189- weight : 18 ,
190- name : "OnFinality" ,
191- tier : "fallback" as const ,
192- rateLimit : 30 ,
193- rateLimitWindow : 10000
194- } ,
195- {
196- getUrl : ( ) => "https://rpc.1rpc.io/solana" ,
197- weight : 18 ,
198- name : "1RPC" ,
199- tier : "fallback" as const ,
200- rateLimit : 25 ,
201- rateLimitWindow : 10000
202- } ,
203187 {
204188 getUrl : ( ) => "https://solana-mainnet.g.alchemy.com/v2/demo" ,
205189 weight : 15 ,
@@ -208,36 +192,6 @@ const RPC_PROVIDERS = [
208192 rateLimit : 25 ,
209193 rateLimitWindow : 60000
210194 } ,
211-
212- // COMMUNITY & VALIDATOR RPCs
213- {
214- getUrl : ( ) => "https://solana-api.projectserum.com" ,
215- weight : 15 ,
216- name : "Serum" ,
217- tier : "fallback" as const ,
218- rateLimit : 25 ,
219- rateLimitWindow : 10000
220- } ,
221- // Helius-Public and Extrnode removed - now require API keys
222- {
223- getUrl : ( ) => "https://api.solana.com" ,
224- weight : 10 ,
225- name : "Solana-Mirror" ,
226- tier : "fallback" as const ,
227- rateLimit : 30 ,
228- rateLimitWindow : 10000
229- } ,
230-
231- // GEO-DISTRIBUTED PUBLIC RPCs
232- {
233- getUrl : ( ) => "https://solana-rpc.kjnodes.com" ,
234- weight : 12 ,
235- name : "KJNodes" ,
236- tier : "fallback" as const ,
237- rateLimit : 20 ,
238- rateLimitWindow : 10000
239- } ,
240- // RPCPool-Free removed - returns 403 Forbidden
241195 {
242196 getUrl : ( ) => "https://solana.drpc.org" ,
243197 weight : 12 ,
@@ -246,84 +200,22 @@ const RPC_PROVIDERS = [
246200 rateLimit : 20 ,
247201 rateLimitWindow : 10000
248202 } ,
249- {
250- getUrl : ( ) => "https://rpc.solana.gateway.fm" ,
251- weight : 10 ,
252- name : "Gateway-FM" ,
253- tier : "fallback" as const ,
254- rateLimit : 15 ,
255- rateLimitWindow : 10000
256- } ,
257-
258- // BACKUP PUBLIC RPCs (lower priority)
259203 {
260204 getUrl : ( ) => "https://solana-mainnet.phantom.app/YBPpkkN4g91xDiAnTE9r0RcMkjg0sKUIWvAfoFVJ" ,
261- weight : 8 ,
205+ weight : 10 ,
262206 name : "Phantom-Public" ,
263207 tier : "fallback" as const ,
264208 rateLimit : 15 ,
265209 rateLimitWindow : 10000
266210 } ,
267- // RPCPool-Main removed - returns 403 Forbidden
268- {
269- getUrl : ( ) => "https://ssc-dao.genesysgo.net" ,
270- weight : 8 ,
271- name : "GenesysGo" ,
272- tier : "fallback" as const ,
273- rateLimit : 15 ,
274- rateLimitWindow : 10000
275- } ,
276- {
277- getUrl : ( ) => "https://solana.public-rpc.com" ,
278- weight : 7 ,
279- name : "Public-RPC" ,
280- tier : "fallback" as const ,
281- rateLimit : 15 ,
282- rateLimitWindow : 10000
283- } ,
284- // HelloMoon and Syndica removed - return 403/401
285- {
286- getUrl : ( ) => "https://mainnet.solana.api.triton.one" ,
287- weight : 6 ,
288- name : "Triton" ,
289- tier : "fallback" as const ,
290- rateLimit : 10 ,
291- rateLimitWindow : 10000
292- } ,
211+ // Removed dead endpoints: OnFinality, 1RPC, Serum, Solana-Mirror, KJNodes, Gateway-FM, GenesysGo, Public-RPC, Triton, Grove, TheIndex, AllThatNode
293212 {
294213 getUrl : ( ) => "https://solana-rpc.debridge.finance" ,
295214 weight : 5 ,
296215 name : "DeBridge" ,
297216 tier : "fallback" as const ,
298217 rateLimit : 10 ,
299218 rateLimitWindow : 10000
300- } ,
301-
302- // ADDITIONAL FREE ENDPOINTS (lower weight for load distribution)
303- // RPCPool-API removed - returns 403 Forbidden
304- {
305- getUrl : ( ) => "https://solana-mainnet.rpc.grove.city/v1/mainnet-beta" ,
306- weight : 5 ,
307- name : "Grove" ,
308- tier : "fallback" as const ,
309- rateLimit : 10 ,
310- rateLimitWindow : 10000
311- } ,
312- {
313- getUrl : ( ) => "https://rpc.theindex.io/mainnet-beta" ,
314- weight : 4 ,
315- name : "TheIndex" ,
316- tier : "fallback" as const ,
317- rateLimit : 10 ,
318- rateLimitWindow : 10000
319- } ,
320- {
321- getUrl : ( ) => "https://solana-mainnet-rpc.allthatnode.com" ,
322- weight : 4 ,
323- name : "AllThatNode" ,
324- tier : "fallback" as const ,
325- rateLimit : 10 ,
326- rateLimitWindow : 10000
327219 }
328220] ;
329221
@@ -774,23 +666,23 @@ const performHealthChecks = async () => {
774666 }
775667 } ) ;
776668
777- // Run health checks in batches of 5 to avoid 429 rate limits
778- const batchSize = 5 ;
669+ // Run health checks in batches of 3 to avoid 429 rate limits (reduced from 5)
670+ const batchSize = 3 ;
779671 for ( let i = 0 ; i < healthChecks . length ; i += batchSize ) {
780672 const batch = healthChecks . slice ( i , i + batchSize ) ;
781673 await Promise . allSettled ( batch ) ;
782- // Add delay between batches to avoid rate limits
674+ // Add 1 second delay between batches to avoid rate limits (increased from 500ms)
783675 if ( i + batchSize < healthChecks . length ) {
784- await new Promise ( resolve => setTimeout ( resolve , 500 ) ) ;
676+ await new Promise ( resolve => setTimeout ( resolve , 1000 ) ) ;
785677 }
786678 }
787679
788680 const healthyCount = rpcBalancer . providers . filter ( p => p . score > 70 ) . length ;
789681 console . log ( `[RPC Health] ${ healthyCount } /${ rpcBalancer . providers . length } providers healthy` ) ;
790682} ;
791683
792- // Run health checks every 60 seconds (reduced from 20s to lower rate limit pressure)
793- setInterval ( performHealthChecks , 60000 ) ;
684+ // Run health checks every 2 minutes (reduced frequency to lower rate limit pressure)
685+ setInterval ( performHealthChecks , 120000 ) ;
794686
795- // Initial health check after 5 seconds (increased from 2s to let server stabilize)
796- setTimeout ( performHealthChecks , 5000 ) ;
687+ // Initial health check after 10 seconds (increased to let server fully stabilize)
688+ setTimeout ( performHealthChecks , 10000 ) ;
0 commit comments