Skip to content

Commit 52b79aa

Browse files
feat: replace broken RPC providers (SubQuery, Serum, GenesysGo) with Grove and Shyft
1 parent a7d067e commit 52b79aa

1 file changed

Lines changed: 17 additions & 19 deletions

File tree

server/services/rpc-balancer.ts

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,23 @@ const RPC_PROVIDERS = [
3737
rateLimitWindow: 60000
3838
},
3939
{
40-
getUrl: () => "https://solana.subquery.network/rpc",
40+
getUrl: () => `https://rpc.ankr.com/solana/${process.env.ANKR_KEY || ""}`,
4141
weight: 20,
42-
name: "SubQuery",
42+
name: "Ankr",
4343
tier: "premium",
44-
rateLimit: 80,
44+
requiresKey: true,
45+
hasKey: () => !!process.env.ANKR_KEY,
46+
rateLimit: 500, // 500M requests/month on free tier
4547
rateLimitWindow: 60000
4648
},
4749
{
48-
getUrl: () => "https://rpc.ankr.com/solana",
49-
weight: 15,
50-
name: "Ankr",
50+
getUrl: () => `https://solana-mainnet.rpc.grove.city/v1/${process.env.GROVE_KEY || ""}`,
51+
weight: 20,
52+
name: "Grove",
5153
tier: "premium",
52-
rateLimit: 300, // 300 requests per day / spread across minutes
54+
requiresKey: true,
55+
hasKey: () => !!process.env.GROVE_KEY,
56+
rateLimit: 250,
5357
rateLimitWindow: 60000
5458
},
5559
// API key providers (premium with keys)
@@ -83,19 +87,13 @@ const RPC_PROVIDERS = [
8387
rateLimitWindow: 60000
8488
},
8589
{
86-
getUrl: () => "https://solana-api.projectserum.com",
87-
weight: 8,
88-
name: "Serum",
89-
tier: "fallback",
90-
rateLimit: 50,
91-
rateLimitWindow: 60000
92-
},
93-
{
94-
getUrl: () => "https://ssc-dao.genesysgo.net",
95-
weight: 5,
96-
name: "GenesysGo",
90+
getUrl: () => `https://rpc.shyft.to/?api_key=${process.env.SHYFT_KEY || ""}`,
91+
weight: 15,
92+
name: "Shyft",
9793
tier: "fallback",
98-
rateLimit: 30,
94+
requiresKey: true,
95+
hasKey: () => !!process.env.SHYFT_KEY,
96+
rateLimit: 100,
9997
rateLimitWindow: 60000
10098
}
10199
];

0 commit comments

Comments
 (0)