CYFS
CYFS is the next-generation technology to build real Web3 by upgrading the basic protocol of Web (TCP/IP+DNS+HTTP),is short for CYberFileSystem. https://www.cyfs.com/, cyfs://cyfs/index_en.html.
Install / Use
/learn @buckyos/CYFSREADME
CYFS:Next Generation Protocol Family to Build Web3
- CYFS is short for CYberFileSystem
- CYFS Website: https://www.cyfs.com/, cyfs://cyfs/index
- Discord:https://discord.gg/dXDxjXTEjT
- CYFS White Paper(Coming soon)
- Language: 中文
Introduce
CYFS is the next-generation technology to build real Web3 by upgrading the basic protocol of Web (TCP/IP+DNS+HTTP). It has a subversive architectural design that everyone brings their own OOD (Owner Online Device) to form a truly decentralized network.
We define Web3 as follows:
- Web3 allows everyone to have rights to save data on the Internet, publish data, and get income from data.
- Web3's Internet applications are completely decentralized, developers have the right to publish and update applications, and users have the right to use them permanently.
- Web3's data has been determined ownership when generated, and use Trust Link to link together to form the 'data-ownership network', which is the future semantic web that allows data to show its true value.
After 6 years of research and development, we have achieved the above goals on the CYFS testnet. For the detailed design of the theory and practice of CYFS, please refer to the relevant documents. Open source of CYFS is an important milestone for CYFS, marking that its design has been basically stable and has entered an open community-driven R&D stage. We look forward to having more people join us. We need your passion and strength. Let’s build Web3 that belongs to ourselves together.
This is the repository of the CYFS protocol stack on Github. Although we have built a decentralized GitHub (CodeDAO) on the CYFS testnet to realize the decentralized bootstrapping of CYFS. But before the CYFS mainnet online, we still decided to stay a little longer in WEB2.0 and use this repository as the main community-driven R&D base. After the CYFS mainnet goes online, the entire Repo will move to CodeDAO.
This repository only contains the implementation of the CYFS core system. It does not include the important basic software of the CYFS ecosystem: CyberChat and CYFS Browser, nor does it include SDK implementations for developers of different languages. The following is a list of other important open source projects in the CYFS ecosystem (continuously updated)
- cyfs-ts-sdk: cyfs-sdk based on typescript to help typescript developers build Web3 DEC apps.
- CYFS Transmission Lab: A system for the network lab for testing the CYFS protocol (Coming soon)
- CyberChat: CYFS wallet, manage DID, OOD, DECApp and data assets (Coming soon)
- CYFS Browser: A browser based on the Chrome kernel that supports the
cyfs://protocol (https://github.com/buckyos/cyfs-browser) - CodeDAO: Decentralized Github with CYFS (Coming soon)
Background

The above is the overall architecture diagram of CYFS, which can help to establish a macro understanding of the design of CYFS. The core design of CYFS can be decomposed into the following parts
- Design of NamedObject and double-section construction of
cyfs://o/$ownerid/$objid(Object Link). - The BDT protocol improves TCP/IP: the network protocol evolves from address-oriented to trusted identity-oriented.
- MetaChain upgrades DNS, realizes decentralized addressing, and realizes Data is Account.
- The Owner deploys its own server OOD (Owner Online Device) on the network, which supports the decentralized accessibility of cyfs://
- Design proofs of storage and proofs of service based on the
game-based consensustheory ofdispute before going on the chain, and realize the decentralized high reliability and high availability of cyfs:// - The off-chain delivery of computing resources is separated from on-chain matching, and an evolvable economic model is used to build decentralized shared cloud computing
- Data property rights analysis based on the input and results of trusted computing, to realize the evolution from on-chain smart contracts to off-chain Data Exchage Contract (DEC).
- The Service of Web3 DEC App is installed on everyone's OOD, realizing the decentralization of application services
What key problems are these designs designed to solve? (We believe that "finding the right problem is half done~") You can read "CYFS Architecture" and "CYFS Whitepaper" (coming soon), the amount of content comparison Great, you can understand it with practice~
Start your Web3 journey with “Hello CYFS”
We strongly recommend that you read the "Hello CYFS" series of articles in full to get a complete initial experience of CYFS (the whole process can be completed within 1 hour):
- "Compile and deploy DIY-OOD"
- "Create Your DID"
- "Publish File and Download"
- "Tips your friend"
- "Publish Website and View"
You can also use the following fast progress to have a first experience of "doing nothing without understand and save time"~
Advance CYFS DEC App develpe tutorial is online
"Decentralized message board development"
Quick Start
The following will build your own Web3 environment by compiling the CYFS source code, and complete the basic experience of Web3 in this environment:
- Publish a folder to the Web3 world and get a permanent address of cyfs://o/$ownerid/$dirid/index.html which can be accessed by CYFS Browser.
- Use the
cyfs getcommand to download the files in the folder you just published.
Note that this environment is normally not isolated, but can be added to the CYFS network (we have planned 3 networks: nightly, beta, relase, currently only nightly is available), so the following tutorial does not include compiling MetaChain with source code +SN part. If you plan to build a complete system in an independent environment and need to compile and deploy MetaChain super nodes, please read the document "MetaChain Construction" (Coming soon).
Compile
Prepare an idle Linux host, preferably a VPS, with more than 2G of memory. Preparation:
- Node.js 16 or above
- rustc 1.63 or above
Run the following command to compile the OOD System.
cd ${cyfs_sources_dir}/src
npm i
node ../scripts/build-standalone.js
During the compilation process of the script, the ${cyfs_root} folder needs to be created. If the current system or current user does not have permission to create this folder, you need to manually create the ${cyfs_root} folder in advance, and assign read and write permissions to the current user. (In the official environment, all components and data of the OOD System will be installed to ${cyfs_root})
${cyfs_root} path:
- Windows:
c:\cyfs - MacOS:
~/Library/cyfs - Other systems:
/cyfs
Compile successfully generates ood-installer
Install the newly compiled OOD System
Before installation, you need to prepare the depends:
- Node.js 16 and above
- MongoDB 4.4 version, configured to boot, use the default port, no authentication (using SQLite as the object storage engine can not rely on MongoDB, the subsequent installation script will support the selection of the storage engine)
- The latest version of docker-ce, configured to start at boot
Find the newly compiled ood-installer in the src directory and execute
./ood-installer --target solo
After a minintes , the installation is complete.
Activate OOD
In order to experience the process, the cli tool is used here to complete the D.I.D creation process. **D.I.D created based on the cli tool can only be used for testing purposes! **
- Install cyfs-tool: use the command line
npm i -g cyfs-tool-nightlyto install the nightly version of the cyfs-tool tool - Generating sets of identities
Use the command
cyfs desc -s <save_path>to generate a matching identity file and save it in the save_path directory. If save_path is not specified, it defaults to ~/.cyfs_profile - Bind OOD
After the identity is generated, copy the two files
<save_path>/ood.descand<save_path>/ood.secto${cyfs_root}/etc/descon the OOD machine and rename it todevice. descanddevice.sec - Bind CYFS-Runtime
After the identity is generated, copy the two files
<save_path>/runtime.descand<save_path>/runtime.secto${cyfs_runtime_root}/etc/descon the CYFS browser machine and rename them todevice.descanddevice.sec
${cyfs_runtime_root} specific path:
- Windows:
%appdata%/cyfs - Mac OS:
~/Library/Application Support/cyfs
Publish your first Web3 website
First prepare the www directory of your website, let's first experience publishing static websites to Web3, and follow-up documents for the construction of dynamic websites will be introduced.
use command
cyfs upload <dir_path> -e ood -t ood
Add the file pointed to by the local <dir_path> to the OOD.
The command execution is complete, the local www directory has been uploaded to OOD and the unique URL to the Web3.0 website has been generated (the end of the command execution).
The link is cyfs O-Link, which looks like this cyfs://o/$ownerid/$objid, where $objid is the ContentId of the directory.
