Developers Forum for XinFin XDC Network

Trahwidhi
Trahwidhi

Posted on

Archive RPC

Hey everyone,

I'm currently working on a project and encountering some issues trying to query from block 1. I need an archive node, but the RPCs I've tried so far don't exactly works.

Here is what I've tested:

https://rpc.ankr.com/xdc - This throws an error whenever I query block 1 (I suspect it’s a standard full node and trims historical state).

https://arpc.xinfin.network & https://rpc.xdcrpc.com/ - These seem to have the archive data, but they block my frontend requests (http://localhost:5173) due to CORS policies.

Here is the exact error I get on the latter two:

Access to fetch at 'https://arpc.xinfin.network/' from origin 'http://localhost:5173' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Enter fullscreen mode Exit fullscreen mode

My questions:

  1. Are there any free, public Archive RPC nodes available for XDC that support frontend/CORS requests?

  2. If free options aren't available, are there any recommended paid providers that guarantee genesis block queries and allow custom origin headers?

Thanks in advance for any recommendations!

Discussion (2)

Collapse
s4njk4n profile image
s4njk4n

Hey I used the ankr one in this webpage. If you click on the instructions link at the top it will take u to the GitHub repository where u can view all the JavaScript in a single index.html file

s4njk4n.github.io/XDC_Masternode_R...

Collapse
sean_ profile image
Sean

Hello @scarzerolab

Please try with earpc.xinfin.network