-
Notifications
You must be signed in to change notification settings - Fork 17
feat: support QuickNode RPC provider #1345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 8 commits
cec78b0
2045271
29eb3e6
66d4b6f
5cc2b45
1b7161c
596c155
80f4426
9343945
1489d4a
1806fcd
8aa7b09
b470803
6173349
c53cd2b
030f445
5bf5dfa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| "ensapi": minor | ||
| "ensindexer": minor | ||
| --- | ||
|
|
||
| Enable QuickNode RPC provider support with `QUICKNODE_API_KEY` and `QUICKNODE_ENDPOINT_NAME` environment variables. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@ensnode/ensnode-sdk": minor | ||
| --- | ||
|
|
||
| Add QuickNode RPC provider support for auto-generated chain RPC URLs. |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -36,17 +36,25 @@ DATABASE_URL=postgresql://dbuser:abcd1234@localhost:5432/my_database | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # The following environment variables are supported: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm concerned about gaps between our docs here for RPC-related environment variables and the actual use of RPCs within ENSApi. It's important to note how ENSApi has fundamentally different RPC logic than ENSIndexer.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looking at the current state of ENSApi and RPC configurations. From what I can see, ENSApi allows passing multiple RPC URLs for a single chain to be managed by Viem's transport fallback. ensnode/apps/ensapi/src/lib/rpc/public-client.ts Lines 7 to 18 in abbd193
Also, there's been a case where our protocol for Forward Resolution allows calls to chains other than the Root chain. ensnode/apps/ensapi/src/lib/resolution/forward-resolution.ts Lines 262 to 284 in abbd193
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tk-o Really appreciate your investigation here 👍 Based on what you found I think it's best for now that we:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # - ALCHEMY_API_KEY — if set, an Alchemy RPC URL will be provided for each of the chains it supports | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # - DRPC_API_KEY — if set, an DRPC RPC URL will be provided for each of the chains it supports | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # - QUICKNODE_API_KEY & QUICKNODE_ENDPOINT_NAME — if both set, an QuickNode RPC URL will be provided | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # for each of the chains it supports. Please note that: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # - Only multi-chain QuickNode endpoints are supported. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # https://www.quicknode.com/guides/quicknode-products/how-to-use-multichain-endpoint | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # - QuickNode platform does not support Linea Sepolia RPC (as of 2025-12-03). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # https://www.quicknode.com/docs/linea | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # - RPC_URL_${chainId} — specific, per-chain RPC settings (see below). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # If RPC_URL_${chainId} is specified, it will take precedence over the automatic RPC URLs from | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Alchemy or DRPC. It must be a comma-separated list of HTTP/HTTPS RPC endpoints. If multiple | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Alchemy, DRPC, or QuickNode. It must be a comma-separated list of HTTP/HTTPS RPC endpoints. If multiple | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # HTTP RPC endpoints are provided for a single chain, they will be used in order, falling back if | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # RPC errors are encountered. If multiple automatic RPC environment variables are specified, they | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # will be used in the following order: Alchemy > DRPC. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # will be used in the following order: Alchemy > DRPC > QuickNode. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please see other comments on ordering. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
lightwalker-eth marked this conversation as resolved.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Automatic: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # ALCHEMY_API_KEY=xyz | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # DRPC_API_KEY=xyz | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # QUICKNODE_API_KEY=your-api-key | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # QUICKNODE_ENDPOINT_NAME=your-endpoint-name | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Chain-Specific: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # RPC_URL_1=https://eth-mainnet.g.alchemy.com/v2/YOUR_API_KEY | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -22,11 +22,24 @@ | |||||
| # The following environment variables are supported: | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| # - ALCHEMY_API_KEY — if set, Alchemy RPC URLs (HTTP & WS) will be provided for each of the chains it supports | ||||||
| # - DRPC_API_KEY — if set, an DRPC RPC URL (HTTP) will be provided for each of the chains it supports | ||||||
| # - QUICKNODE_API_KEY & QUICKNODE_ENDPOINT_NAME — if both set, an QuickNode RPC URL will be provided | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's not clear here how to interpret both of these environment variables. Suggest to give an example of the string pattern of a full multichain Quicknode endpoint URL and then how components of that string map into these environment variable names.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please make it explicit what happens if only one of these is set (not both). A quick suggestion is to reject the config and terminate as it's probably a situation where it's better to fail loud to help the operator avoid a situation where they accidentally made a mistake.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. QuickNode docs call it exactly this way, should we still aim to change that terminology: I believe we should follow the terms from the official QuickNode docs.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok cool. I find their terminology confusing but agree that we should align with it 👍 |
||||||
| # for each of the chains it supports. Please note that: | ||||||
| # - Only multi-chain QuickNode endpoints are supported. | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please make this more clear. What exactly makes a QuickNode endpoint multichain or not? Is there a distinct format to the full URL pattern? |
||||||
| # https://www.quicknode.com/guides/quicknode-products/how-to-use-multichain-endpoint | ||||||
| # - QuickNode platform does not support Linea Sepolia RPC (as of 2025-12-03). | ||||||
| # https://www.quicknode.com/docs/linea | ||||||
| # - RPC_URL_${chainId} — specific, per-chain RPC settings (see below). | ||||||
| # | ||||||
| # If RPC_URL_${chainId} is specified, that value will take precedence over the automatic RPC URLs | ||||||
| # from Alchemy or DRPC. If both Alchemy and DRPC API Keys are specified, ENSIndexer will provide | ||||||
| # both to Ponder, which will balance requests between them (see below). | ||||||
| # from Alchemy, DRPC, or QuickNode. ENSIndexer will provide all available | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please update our ordering logic. QuickNode should always come before dRPC. Please also ensure we always write it as dRPC and not DRPC (outside of contexts where of course it should be in all caps such as an environment variable name). |
||||||
| # RPC URLs across configured RPC providers to Ponder, which will balance | ||||||
| # requests between them (see below). | ||||||
|
|
||||||
| # Automatic: | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| # ALCHEMY_API_KEY=xyz | ||||||
| # DRPC_API_KEY=xyz | ||||||
| # QUICKNODE_API_KEY=your-api-key | ||||||
| # QUICKNODE_ENDPOINT_NAME=your-endpoint-name | ||||||
| # | ||||||
| # For chain-specific RPC configuration, use the RPC_URL_{chainId} environment variable. | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| # Its value is a comma-separated list of one or more HTTP RPC URLs and at most one WebSocket RPC URL. | ||||||
|
|
@@ -56,64 +69,64 @@ | |||||
| # Ethereum Mainnet | ||||||
| # - required if the configured namespace is mainnet | ||||||
| # - required by plugins: subgraph, protocol-acceleration, registrars, tokenscope | ||||||
| RPC_URL_1= | ||||||
| # RPC_URL_1= | ||||||
|
|
||||||
| # Optimism Mainnet | ||||||
| # - required by plugins: threedns, protocol-acceleration, tokenscope | ||||||
| RPC_URL_10= | ||||||
| # RPC_URL_10= | ||||||
|
|
||||||
| # Base Mainnet | ||||||
| # - required by plugins: basenames, threedns, protocol-acceleration, registrars, tokenscope | ||||||
| RPC_URL_8453= | ||||||
| # RPC_URL_8453= | ||||||
|
|
||||||
| # Arbitrum Mainnet | ||||||
| # - required by plugins: protocol-acceleration | ||||||
| RPC_URL_42161= | ||||||
| # RPC_URL_42161= | ||||||
|
|
||||||
| # Linea Mainnet | ||||||
| # - required by plugins: lineanames, protocol-acceleration, registrars, tokenscope | ||||||
| RPC_URL_59144= | ||||||
| # RPC_URL_59144= | ||||||
|
|
||||||
| # Scroll Mainnet | ||||||
| # - required by plugins: protocol-acceleration | ||||||
| RPC_URL_534352= | ||||||
| # RPC_URL_534352= | ||||||
|
|
||||||
| # === ENS Namespace: Sepolia === | ||||||
| # Ethereum Sepolia (public testnet) | ||||||
| # - required if the configured namespace is sepolia | ||||||
| # - required by plugins: subgraph, protocol-acceleration, registrars, tokenscope | ||||||
| RPC_URL_11155111= | ||||||
| # RPC_URL_11155111= | ||||||
|
|
||||||
| # Base Sepolia (public testnet) | ||||||
| # - required by plugins: basenames, protocol-acceleration, registrars, tokenscope | ||||||
| RPC_URL_84532= | ||||||
| # RPC_URL_84532= | ||||||
|
|
||||||
| # Linea Sepolia (public testnet) | ||||||
| # - required by plugins: lineanames, protocol-acceleration, registrars, tokenscope | ||||||
| RPC_URL_59141= | ||||||
| # RPC_URL_59141= | ||||||
|
|
||||||
| # Optimism Sepolia (public testnet) | ||||||
| # - required by plugins: protocol-acceleration, tokenscope | ||||||
| RPC_URL_11155420= | ||||||
| # RPC_URL_11155420= | ||||||
|
|
||||||
| # Arbitrum Sepolia (public testnet) | ||||||
| # - required by plugins: protocol-acceleration | ||||||
| RPC_URL_421614= | ||||||
| # RPC_URL_421614= | ||||||
|
|
||||||
| # Scroll Sepolia (public testnet) | ||||||
| # - required by plugins: protocol-acceleration | ||||||
| RPC_URL_534351= | ||||||
| # RPC_URL_534351= | ||||||
|
|
||||||
| # === ENS Namespace: Holesky === | ||||||
| # Ethereum Holesky (public testnet) | ||||||
| # - required if the configured namespace is holesky | ||||||
| # - required by plugins: subgraph, protocol-acceleration, tokenscope | ||||||
| RPC_URL_17000= | ||||||
| # RPC_URL_17000= | ||||||
|
|
||||||
| # === ENS Namespace: ens-test-env === | ||||||
| # ens-test-env (local testnet) | ||||||
| # - required if the configured namespace is ens-test-env | ||||||
| RPC_URL_1337= | ||||||
| # RPC_URL_1337= | ||||||
|
|
||||||
| # Database configuration | ||||||
| # Required. This is a namespace for the tables that the indexer will create to store indexed data. | ||||||
|
|
||||||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.