Skip to content

Commit 9555d07

Browse files
Sentinel-AutonomybuilderSentinel-Autonomybuilder
authored andcommitted
chore(sdk): bump blue-js-sdk to 2.7.2, drop runtime RPC patch
SDK 2.7.2 ships an audited 12-endpoint RPC pool (rpc.sentinel.co excluded, all the alternates we were injecting are now first-class). Plan Manager's runtime patch in lib/chain.js (removeRpcEndpoint/addRpcEndpoint at module load) is now redundant and removed. Refresh signing-RPC list in lib/constants.js to match the in-sync set. Verified: import('blue-js-sdk') → 401 exports clean; live rpcQueryBalance through the default pool reaches a real Sentinel node. PR upstream: Sentinel-Bluebuilder/blue-js-sdk#31
1 parent b71dec9 commit 9555d07

4 files changed

Lines changed: 23 additions & 12 deletions

File tree

lib/chain.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { TxRaw, TxBody } from 'cosmjs-types/cosmos/tx/v1beta1/tx';
99
import { Int53 } from '@cosmjs/math';
1010
import { LCD_ENDPOINTS, RPC, GAS_PRICE_STR, CHAIN_ID } from './constants.js';
1111
// SDK: P2P price (CoinGecko) + RPC query functions (protobuf transport, ~912x faster than LCD REST)
12+
// SDK 2.7.2 ships a consensus-audited RPC pool — no runtime patching needed.
1213
import {
1314
getDvpnPrice as _sdkGetDvpnPrice,
1415
createRpcQueryClientWithFallback,
@@ -30,6 +31,7 @@ import {
3031
rpcQueryFeeGrantsIssued,
3132
rpcQueryProvider,
3233
} from 'blue-js-sdk';
34+
3335
import { createRegistry } from './protobuf.js';
3436
import { isSequenceError, extractExpectedSeq } from './errors.js';
3537
import { cacheInvalidate } from 'blue-js-sdk';

lib/constants.js

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,34 @@ export const CHAIN_ID = 'sentinelhub-2';
99

1010
// ─── Signing RPC Failover ────────────────────────────────────────────────────
1111
// Order matters — the signing client tries them top-down and caches the first
12-
// reachable one. These are the public RPC endpoints currently observed up
13-
// in `plans rpc-providers` scans; if all fail we fall back to RPC_PROVIDERS.
12+
// reachable one. Verified in-sync at chain tip and serving correct balances
13+
// on 2026-04-30 against sent1uav3z70yynp4jnt39c6pg3d6ujw78m52v2h7gs (10k P2P).
14+
// rpc.sentinel.co is intentionally absent — it was lagging ~22k blocks and
15+
// causing wallet endpoints to return stale 0 balances.
1416
export const SIGNING_RPC_URLS = [
1517
'https://sentinel-rpc.publicnode.com:443',
1618
'https://rpc-sentinel.busurnode.com:443',
17-
'https://sentinel-rpc.polkachu.com:443',
19+
'https://rpc.sentinel.suchnode.net:443',
1820
'https://rpc.sentinel.quokkastake.io:443',
19-
'https://rpc.sentinel.co:443',
20-
'https://sentinel-rpc.lavenderfive.com:443',
21-
'https://rpc.mathnodes.com:443',
22-
'https://sentinel-rpc.badgerbite.io:443',
21+
'https://rpc.sentinel.chaintools.tech:443',
22+
'https://rpc.sentinel.validatus.com:443',
23+
'https://rpc.sentineldao.com:443',
24+
'https://rpc-sentinel.chainvibes.com:443',
25+
'https://rpc.trinitystake.io:443',
26+
'https://rpc.dvpn.roomit.xyz:443',
2327
];
2428
export const SIGNING_RPC_CONNECT_TIMEOUT_MS = 5000;
2529

2630
// ─── LCD Failover Endpoints ──────────────────────────────────────────────────
31+
// Order: in-sync providers first. lcd.sentinel.co was returning stale data on
32+
// 2026-04-30 (0 balance for a funded address) so it sits last as a courtesy.
2733
export const LCD_ENDPOINTS = [
28-
'https://lcd.sentinel.co',
34+
'https://api-sentinel.busurnode.com',
35+
'https://api.sentinel.suchnode.net',
2936
'https://api.sentinel.quokkastake.io',
3037
'https://sentinel-api.polkachu.com',
3138
'https://sentinel.api.trivium.network:1317',
39+
'https://lcd.sentinel.co',
3240
];
3341

3442
// ─── V3 Protobuf Type URLs ──────────────────────────────────────────────────

package-lock.json

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"@privy-io/server-auth": "^1.32.5",
5454
"@scure/bip32": "^2.0.1",
5555
"@scure/bip39": "^2.0.1",
56-
"blue-js-sdk": "^2.7.0",
56+
"blue-js-sdk": "^2.7.2",
5757
"dotenv": "^17.4.2",
5858
"express": "^4.18.2",
5959
"qrcode": "^1.5.4"

0 commit comments

Comments
 (0)