Blocknet makes Sia Storage available on the Internet of Blockchains
Blocknet has successfully connected the Sia blockchain and their storage services onto its decentralized network protocol. Utilizing custom plugins called XCloud services, Sia API’s are now accessible via Blocknet’s network, essentially connecting Sia with any other blockchain being supported by the Blocknet Protocol, (currently over 100) enabling developers to build any dApp they wish.
Various projects are already using Sia’s storage capabilities such as PixelDrain, FileBase and Goobox but that is just the tip of the iceberg. Now that Sia is interoperable with other blockchains and a part of the internet of blockchains, the possibilities are almost endless. For example, if creating a dApp on Ethereum, storage functionality may be required. Ethereum doesn’t intrinsically handle file storage very efficiently. In this scenario, XCloud and XRouter can now be used to interact with Sia to utilize its storage functionality.
How XRouter and XCloud Work
XRouter works in a similar manner to the internet, utilizing the TCP/IP network to transfer data freely between blockchains. Since all blockchains are not the same, custom plugins can be created that can be deployed to XCloud. XCloud is a decentralized microservice cloud network powered by XRouter that allows for interaction with microservices, blockchains and APIs.These can range from standard RPC API calls to Dockerized containers. URL API endpoints are in development. One of the key components to the protocol are the Blocknet Service Nodes. Service Node’s host and maintain full nodes of various blockchains on servers located all around the world (currently around 500 nodes). Each operator is responsible for the upkeep of the blockchains they are hosting and services they are providing. Because this is only the initial connection of Sia, only 1 Service Node is currently hosting the full Sia chain. Basic plugins and scripts were created to connect Sia blockchain information and storage services with the Blocknet network. You can view XCloud API’s here.
Sia API’s
Currently there are blockchain, renter and host Sia API’s available on Blocknet but any API available on Sia can be enabled. Sia XCloud services begin with Sia’s ticker SC
which is then followed by the corresponding Sia API, for example renterupload
= SCrenterupload
. Sia’s XCloud download service supports Pixel Drain or AWS S3 as a download option for SCrenterdownload
. The S3 url when entered into a web browser will automatically download your file. Please see this forum entry for more information.
API’s currently available: (click on each API for more information)
- Blockchain information — consensus, consensusblock
- Renter services — renterupload, renterdownload, renterfile, renterfiles, renterrename, renterdelete
- Host information — hostdbactive, hostdbpubkey
The current Sia API’s only represent the first phase of XRouter integration. (The Blocknet wallet currently does not contain the functionality that Sia has to upload/download files directly. For the time being users can only upload files via a URL file link and retrieve their files off Sia via PixelDrain or AWS S3.)
Examples & Guide
With XRouter currently in Beta, users are required to download the Blocknet client and sync the blockchain (official bootstrap is available). Because the Sia XCloud services being provided are free, users won’t need any SC or BLOCK to try out the services. Once the wallet is fully synced and XRouter is enabled as: xrouter=1
via the ‘blocknetdx.conf’ file, users can begin storing information on Sia’s blockchain cloud storage. Head to the Blocknet console or CLI and begin by ensuring the host’s node is fully synced. This is done by typing in xrService SCconsensus
. If the host’s node is synced users can then proceed with trying out other available API’s. Users can access these API’s by using this structure:xrService [service_name] [parameter1] [parameter2]
. If at any point a timed out response occurs (empty response), head to our forum for more info on SCrenterupload
& SCrenterdownload
.
Alternatively, you can watch a video of this process here:
- Upload Example: (more info)
Uploading a file to Sia cloud storage requires one API call with set parameters:
xrService SCrenterupload [file_url] [user_subfolder(s)] [file_name]
Example:
xrService SCrenterupload https://i.imgur.com/emBm6jvg.jpg John_D/pictures landscape,jpg
The above example call will upload the file contained in the link to John_D’s picture subfolder with the filename landscape.jpg to Sia’s cloud storage.
- Managing Files:
Manage your files and subfolders with the use of SCrenterfile
,SCrenterfiles
, SCrenterdelete
,SCrenterrename
.
- Download Example: (more info)
To retrieve a stored file on Sia’s cloud storage requires one API call with set parameters:
xrService SCrenterdownload [user_subfolder(s)] [file_name] [url_download]
Example:
xrService SCrenterdownload John_d/pictures landscape.jpg pixeldrain
The above example call will output a PixelDrain link where you can download the file. Change ‘pixeldrain’ to ‘s3’ to download via AWS S3.
The Future
As development continues, one major milestone will be the creation of XRouter c++ and Golang libraries. Developers will be able to utilize these libraries without having the Blocknet client. To learn more about XRouter, Block DX, and Blocknet, check out Blocknet’s website, API, documentation, Discord, and whitepaper.
— — — —
Website / Documentation Portal / API Docs / Discord / Twitter / Medium / Telegram / Reddit / Newsletter / Blocknet Facebook / Block DX Facebook / YouTube / DTube / Instagram / Minds / BitcoinTalk / Proposal Forum / Block Node Info / Blockdx.co