In this article, Keenethics developers present our Research & Development findings. The object of the study is Sia technology, a network platform used for file storage.
It was our first experience of R&D at Keenethics. Everything started when one of our clients decided to integrate Sia into his project. Our task was to investigate Sia technology and decide whether such a decision will help our client to reach his project’s goals. We decided to investigate how Sia works. We launched a development process using this new blockchain technology and decentralized Internet. But before we dive into the results we managed to obtain, let’s review what Sia technology is.
Some Background on Sia
Sia is a cloud-based decentralized storage platform. In January 2021, v 1.5.4 of Sia was released. The idea behind Sia is to ensure undeniable access to data owners. No one, including state organizations, governments, or developers, can deny access to user data. It increases users’ flexibility and freedom. In the future, Sia is expected to become the backbone of online storage.
Source: https://blog.sia.tech/
The target audience of Sia are people looking for file storage space. Sia connects them with the hosts worldwide. To run this technology, you do not need any servers, third-party services, or signups. Due to the power of blockchain, Sia protects user data and reduces maintenance costs. As Sia’s creators indicate, smart contracts make Sia reliable, affordable, and secure.
Characteristics of Sia
Here are some of the main features of this technology as presented on Sia’s official website:
- Segment encryption
Traditional cloud-based storage providers do not encrypt data. In Sia, files kept on a renter’s hardware are encrypted before they leave a computer. This technology uses the Threefish encryption standard. With Threefish encryption, hosts store only encrypted data segments.
- Siacoin
Sia technology operates under Siacoin cryptocurrency. Siacoin was built on the technology’s blockchain. Renters use this cryptocurrency to purchase storage capacity. Meanwhile, hosts use Siacoin to take payments from renters and pay collateral.
- Smart contracts
Sia allows for smart contracts between renters and hosts. Smart contracts define pricing, set commitment deadlines, and regulate the relationship between the two parties. Smart contracts are stored on Sia blockchain servers. The average duration of a smart contract is 90 days.
- File division
Before a file is uploaded, it is divided into 30 segments. These segments are distributed to hosting servers across the globe. File distribution in Sia is possible due to erasure coding. Such technology allows for redundant file distribution meaning 10 of 30 file segments can recover the rest of the renter’s files.
- Storage proofs
Storage proof allows renters to make sure that hosts store their data. Each file contract presupposes that a host has to prove that renter’s data is stored. Within the defined time, storage proof should appear on the Sia blockchain. In case it appears on the blockchain, the host is paid. Storage proofs are small and convenient in terms of storage.
Sia’s Benefits
Sia technology opens new opportunities for secure online storage of data. This technology is believed to give the following advantages:
- Decentralized approach
The drawback of a centralized structure is that there should be a central actor responsible for data storage. That is, when the security level of the central storage is weak, the renter’s data is unsafe, too. In contrast to such a scenario, the decentralized structure of Sia allows for data security. Sia’s blockchain presupposes that files are encrypted across a decentralized ecosystem, which enhances protection.
- Affordability
Storing data in Sia is more affordable than incumbent cloud data storage. Users pay 1-2$ monthly for storing 1TB of data. Sia is also efficient in terms of transactions. Sia can cut costs for businesses that need to store big volumes of data. Using such technology, you also reduce manual data management tasks associated with auditing and reporting.
- Innovation
Sia is an open-source technology that earns the respect of contributors across the globe. Leading software developers commit to facilitating this technology and increasing its capabilities. Meanwhile, users who store data on Sia reduce the possibility of failure. Sia is highly redundant and ensures better uptime than other providers.
R&D Process
To start our research, we found the code and checked how the system works. Skynet, an open protocol for decentralized Internet, provides API in different languages, including Node and JS. We chose JS and prepared the list of Sia’s aspects to be studied. We did not measure the performance but tested Sia’s capacity to store key-value. Below, you can check out our findings.
Our Findings
As we found out, Sia is useful in two cases. Firstly, when we build a fault tolerance system distributed among several computers. Secondly, when we need to securely save the history of files. For a more detailed discussion, we subdivided our findings into several categories. Let’s review them one by one.
Authentication and Per-Role Access to DB
We aimed to study how Sia handles authentication. We found out that the database in Sia is stored as a key-value. Physically, it consists of the set of files pushed in the repository. The access to the data is realized via a secret phrase. Authentication works based on the following principle: the longer key you generate, the more protected your data is. This authentication method is not reliable enough because you cannot hash long phrases chosen as keys. Moreover, you have to store your long key somewhere. It increases the risks of a data breach.
Meanwhile, Sia allows for setting up node development environments. You can use this space to proceed with the configuration. In this case, node functions as a separate authentication service. You get access to a separate grid. The decision to create an extra authentication service can be an alternative to insecure Sia authentication. The new service will not be overloaded and will work only when a user logs in.
Static Resources Performance
The Sia technology can be used for sharing static files. With its help, you can host static websites. Yet, Sia is a third-party technology. Users have no tools for performance optimization, which results in poor performance. Although hosting heavy content is possible with Sia, it performs slower than CDN. The use of blockchain-based databases can be the subject of the next RND.
DB: Performing Complex Queries
We found out that Sia cannot perform complex queries. But there are alternative databases that can be used for complex operations. On the one hand, using alternative databases will slow down the processing. On the other hand, Sia itself has no functionality for complex queries performance so it is one of the wayouts.
Sia DNS Google SEO and Compatibility with Crowler
Our R&D shows that Sia technology can be used for building regular websites. A regular website is compatible with Google DNS. However, it is vulnerable to blocking. Theoretically, Sia allows you to circumvent it. But to do so, your users have to add the DNS server of Sia. Otherwise, you can also make it accessible, but the risks are that it will be blocked. So, Sia gives you protection from simple blocking. But for more complex blocking cases, you have to use another technology.
Wrap Up
As a database, Sia stores key-value and works well. It can be set up easily by those who do not need a more secure authorization. Yet, in terms of significance, Sia technology is similar to Redis, an open-source data store used for caching and data management facilitation.
At the end of our experiment, we decided to look for analogs of Sia. As we found out, there are many similar technologies on the market. Many of them provide distributed storage. Blockchain-based databases are a separate class of such technologies. They have a more complex structure and give more functional opportunities.
Learn more about how we create AI-powered algorithms and where we use them. Our dedicated developers will gladly assist you with chatbot or machine learning development.