Developing on Saito

Rust Implementation

We are currently working on a Rust Implementation of Saito Consensus that will form the backbone of our next testnet(s). This codebase will be highly performant,but also flexible enough to support variations of the consensus algorithm which we can test on multiple testnets.

The code can be found in the saito-rust repo on github. We also have a kanban board where we do sprint planning. Anyone who wishes to contribute should check there to see what are current priorities are, although we also welcome contributions that aren’t part of the short-term roadmap. We also have dev channels on Discord and Telegram where we are always happy to answer technical questions.

From a high level we are planning for this project in the Project Management board on Trello.

If you are a developer interested in working on an elegant, high-performance blockchain, don’t hesitate to reach out. This code-base is going to form the backbone of an entire Web3-type ecosystem that is both simple and functional. It’s an exciting time to be working on Saito and we’re eager to help anyone from the community who wants to get involved.


Saito-Lite

Saito-Lite represents the team’s first attempt at a full-feature blockchain that is also easy for DAPP developers to write applications on top of. Everything you see on Saito.io, the wallet, chat, and all the games, are running on this framework. Every move in every game is broadcast on the testnet being run by this codebase.

It is possible to build Saito-Lite applications without installing anything, but debugging is easier with a local node. Saito-Lite requires 4GB RAM and a recent version of NodeJS (14). You can then download and compile Saito as follows:

git clone https://github.com/saitotech/saito-lite
cd saito-lite
npm install
npm run init

The final initialization script will ask if you wish to join the public network (saito.io) or setup a private node for testing and development. Whichever option you choose, the script will auto-configure your server. You may then start your node by running:

npm start

Congratulations! Saito should be running on your machine. You can test that everything is working by visiting http://localhost:12101/wallet and checking the application loads. For information on changing your default host/port/protocol as well as the other configuration options, please see our page on Customizing your Saito Installation: Advanced Server Configuration Options.

If you run into problems during the development and setup process, please write us at info@saito.tech or send us message us on Saito Telegram. Our goal is to make it as easy to join the network as possible.


Protocol and Documentation

Saito consists of several layers:

  • Layer 1 – core blockchain
  • Layer 2 – applications / modules
  • Layer 3 – in-application widgets

At the lowest layer we have the code which runs the underlying blockchain. This code be found in the /lib/saito directory in your Saito-Lite release. It controls how blocks are produced, how consensus works, and how transactions are sent between peers. A quick reference to the base layer objects and functions applications can access is here.

Applications run atop the blockchain and in-the-browser. They can communicate on-chain over the blockchain and off-chain through peer-to-peer messaging channels. Most applications inherit from a class in the /lib/templates directory that provides most of the default functionality. This makes building on Saito a lot like building on Ruby-on-Rails: most of the work is already done for you. If you are interested in application development, we recommend starting with our tutorial series. Documentation of how applications work and are structured can be found here.

On the highest level, individual applications like the Saito Forum, Saito Arcade and Saito Wallet allow other modules / applications to add controls and widgets to their interface. You can also write an application that other developers can extend. This is the least documented layer in Saito because modules are developing so quickly and the standards for inter-module communications are improving rapidly. The best documentation for individual modules is their module source code. If you want to do something specific and are having trouble getting started, please reach out to our development team.