Skip to content

Commit

Permalink
Update firehose endpoints (#85)
Browse files Browse the repository at this point in the history
* cleanup validation

* add more firehose endpoints

* bump up version
  • Loading branch information
YaroShkvorets authored Feb 21, 2025
1 parent e4ae457 commit b6e8972
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 26 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.6.40",
"version": "0.6.41",
"private": true,
"type": "module",
"scripts": {
Expand Down
3 changes: 1 addition & 2 deletions registry/eip155/apechain.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
"explorerUrls": ["https://apescan.io"],
"rpcUrls": ["https://rpc.apechain.com"],
"apiUrls": [
{ "url": "https://api.apescan.io/api", "kind": "etherscan" },
{ "url": "https://apechain.abi.pinax.network/api", "kind": "etherscan" }
{ "url": "https://api.apescan.io/api", "kind": "etherscan" }
],
"services": { "subgraphs": ["https://api.studio.thegraph.com/deploy"] },
"networkType": "mainnet",
Expand Down
6 changes: 5 additions & 1 deletion registry/eip155/berachain.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
"rpcUrls": ["https://rpc.berachain.com"],
"explorerUrls": ["https://berascan.com"],
"apiUrls": [{ "url": "https://api.berascan.com/api", "kind": "etherscan" }],
"services": { "subgraphs": ["https://api.studio.thegraph.com/deploy"] },
"services": {
"subgraphs": ["https://api.studio.thegraph.com/deploy"],
"firehose": ["bera.firehose.pinax.network:443"],
"substreams": ["bera.substreams.pinax.network:443"]
},
"networkType": "mainnet",
"issuanceRewards": false,
"nativeToken": "BERA",
Expand Down
6 changes: 5 additions & 1 deletion registry/eip155/chiliz-testnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@
],
"networkType": "testnet",
"relations": [{ "kind": "testnetOf", "network": "chiliz" }],
"services": { "subgraphs": ["https://api.studio.thegraph.com/deploy"] },
"services": {
"subgraphs": ["https://api.studio.thegraph.com/deploy"],
"firehose": ["spicy.firehose.pinax.network:443"],
"substreams": ["spicy.substreams.pinax.network:443"]
},
"issuanceRewards": false,
"nativeToken": "CHZ",
"docsUrl": "https://docs.chiliz.com",
Expand Down
6 changes: 5 additions & 1 deletion registry/eip155/linea-sepolia.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@
"kind": "blockscout"
}
],
"services": { "subgraphs": ["https://api.studio.thegraph.com/deploy"] },
"services": {
"subgraphs": ["https://api.studio.thegraph.com/deploy"],
"firehose": ["lineasepolia.firehose.pinax.network:443"],
"substreams": ["lineasepolia.substreams.pinax.network:443"]
},
"networkType": "testnet",
"relations": [
{ "kind": "testnetOf", "network": "linea" },
Expand Down
6 changes: 5 additions & 1 deletion registry/eip155/soneium.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
{ "url": "https://soneium.blockscout.com/api", "kind": "etherscan" }
],
"relations": [{ "kind": "l2Of", "network": "mainnet" }],
"services": { "subgraphs": ["https://api.studio.thegraph.com/deploy"] },
"services": {
"subgraphs": ["https://api.studio.thegraph.com/deploy"],
"firehose": ["soneium.firehose.pinax.network:443"],
"substreams": ["soneium.substreams.pinax.network:443"]
},
"networkType": "mainnet",
"issuanceRewards": false,
"nativeToken": "ETH",
Expand Down
6 changes: 5 additions & 1 deletion registry/eip155/xlayer-sepolia.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
"explorerUrls": ["https://www.oklink.com/xlayer-test"],
"rpcUrls": ["https://testrpc.xlayer.tech"],
"apiUrls": [],
"services": { "subgraphs": ["https://api.studio.thegraph.com/deploy"] },
"services": {
"subgraphs": ["https://api.studio.thegraph.com/deploy"],
"firehose": ["xlayertest.firehose.pinax.network:443"],
"substreams": ["xlayertest.substreams.pinax.network:443"]
},
"networkType": "testnet",
"relations": [
{ "kind": "l2Of", "network": "sepolia" },
Expand Down
5 changes: 2 additions & 3 deletions registry/starknet/starknet-mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@
"subgraphs": ["https://api.studio.thegraph.com/deploy"],
"sps": ["https://api.studio.thegraph.com/deploy"],
"firehose": [
"mainnet.starknet.streamingfast.io:443",
"starknet.firehose.pinax.network:443"
],
"substreams": [
"mainnet.starknet.streamingfast.io:443",
"starknet.substreams.pinax.network:443"
"starknet.substreams.pinax.network:443",
"mainnet.starknet.streamingfast.io:443"
]
},
"issuanceRewards": false,
Expand Down
5 changes: 4 additions & 1 deletion registry/starknet/starknet-testnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
"networkType": "testnet",
"services": {
"firehose": ["starksepolia.firehose.pinax.network:443"],
"substreams": ["starksepolia.substreams.pinax.network:443"]
"substreams": [
"starksepolia.substreams.pinax.network:443",
"testnet.starknet.streamingfast.io:443"
]
},
"issuanceRewards": false,
"nativeToken": "STRK",
Expand Down
13 changes: 6 additions & 7 deletions src/validate_firehose.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,13 @@ async function validateSingleEndpoint(
console.error(err);
}
} catch (error) {
if (error instanceof Error) {
if (error.message.includes("Unimplemented")) {
return;
}
if (error instanceof Error && error.message.includes("Unimplemented")) {
WARNINGS.push(
`\`${network.id}\` - endpoint ${endpoint} does not expose firehose RPC`,
);
return;
}
ERRORS.push(
`\`${network.id}\` - endpoint ${endpoint} error: ${JSON.stringify(error)}`,
);
WARNINGS.push(`\`${network.id}\` - endpoint ${endpoint} is not accessible`);
}
}

Expand Down
7 changes: 0 additions & 7 deletions src/validate_logic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,6 @@ function validateServices(networks: Network[]) {
}
}
});

// Validate that firehose and substreams services are paired by provider
const firehoseUrls = services.firehose ?? [];
const substreamsUrls = services.substreams ?? [];
if (firehoseUrls.length !== substreamsUrls.length) {
WARNINGS.push(`\`${network.id}\` - no matching substreams/firehose pair`);
}
}

process.stdout.write("done\n");
Expand Down

0 comments on commit b6e8972

Please sign in to comment.