1

I'm looking to build a chrome app that queries the nxt decentralized data cloud using peerexplorers api public ip addresses here: http://www.peerexplorer.com/peerexplorer-api

The question I have is how do I tell if an IP address is an archival node? What can one query to find this out?

Let's say I wanted to aggregate all the torrent files that were ever uploaded to the nxt data cloud. How can I find archival nodes to query this?

4

There are a few ways to do this, but I'll describe the most straight forward one. Find an archival node from http://www.peerexplorer.com/api_openapi_archival.

If you pick any one of the ip addresses in that list you can then query that node to verify if it is a archival node by calling its getBlockchainStatus function, for example: http://23.94.134.161:7876/nxt?requestType=getBlockchainStatus

In the reply you will se a list of services, where 'PRUNABLE' is the one you are after. Any node that has PRUNABLE in their services list is an archival node.

On a side note, you don't need to query a archival node in order to get the actual data. Any node with open API will do, as long as you specify the retrieve=true parameter which is added to most relevant API functions. By doing that on a non archival node, it will locate the data from an archival node and return it in the query. With a bit higher latency of course, since there are multiple network calls that needs to be done.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.