Overview
SKALE Filestorage is available on each SKALE Chain. This feature lets developers leverage specialized storage resources on the nodes that operate a SKALE Chain nodes to store data in a validated and secure manner that’s in addition to the on-chain data within the SKALE Chain.
To get started, checkout the Filestorage JS NPM Library.
Architecture
SKALE Filestorage consists of several layers:
FileStorage.js
is a simple npm package allows users to integrate SKALE Filestorage into their decentralized applications with just a few lines of code. This package is an interface to Filestorage.sol
which calls a precompiled smart contract (Precompiled.cpp
) which has access to the node’s native filesystem. Each of these layers serves an integral part to the process of uploading, downloading, and deleting of files with the EVM.
Upgradeability
SKALE Filestorage leverages a specialized contract to write chunks of data directly into the SKALE Chain and into the storage space. This contract can be upgraded on a per chain basis to suit any variety of functions for SKALE Chain owners.
And of course, it’s built with OpenZeppelin Upgradeability technology.
Read about how to perform filestorage upgrades.
Web3 File Server
What good are your files if you can’t show them to the world? Here, the SKALE Network provides the answer. SKALE Nodes contain an NGINX server that allows your Web3 files to be served to the world.
Check out how this Web3 File Server works.
FAQ
How long will data be stored on SKALE Chain filestorage?
Data will be available as long as the SKALE Chain lifetime. Users or the SKALE Chain owner can extend the life of a SKALE Chain through SKL deposits.
Can I use SKALE Filestorage with NFTs?
Absolutely! You can perform NFT mint operations all on a SKALE Chain, and store URI assets on the same SKALE Chain. Assets are then distributed across 16 nodes and persist through the lifetime of the SKALE Chain. And those URIs can be served through the Web3 webserver.
Are there any size restrictions for stored NFTs?
Currently the maximum single file size is 100 MB, and are uploaded in chunks of 1MB. SKALE Chains can store GBs of data depending on the chain size. For example, medium chains can store up to 60 GBs of data.
Can I run and execute programs from SKALE Filestorage?
No, filestorage is suitable for static content only, like files, photos, videos. You can host a static website from SKALE Filestorage, which may include client-side scripts.
Dynamic websites rely on server-side processing, and currently SKALE filestorage does not support server-side scripting.
Other Features
Want to see another feature listed here? Submit an idea to the SKALE Community roadmap!