This repository contains several Node packages, located under the
subdirectory. See each individual package for details:
- colossus - the main colossus app.
- storage - abstraction over the storage backend.
- runtime-api - convenience wrappers for the runtime API.
- crypto - cryptographic utility functions.
- util - general utility functions.
This project uses yarn as Node package manager. It also uses some node packages with native components, so make sure to install your system's basic build tools.
On Debian-based systems:
$ apt install build-essential
On Mac OS (using homebrew):
$ brew install libtool automake autoconf
$ yarn install
The command will install dependencies, and make a
colossus executable available:
$ yarn run colossus --help
Running tests from the repository root will run tests from all packages:
$ yarn run test
Storage Provider Staking
Staking for the storage provider role happens in a few simple steps:
- Using the app, create an account and make
it a member. Make sure to save the JSON file. Not only is this account your
identity, the file is also needed for the signup process. Make sure the account
has some currency.
- You need some currency to become a member.
- You need to stake some currency to become a storage provider.
- There's a transaction fee for applying as a storage provider.
- Using the
colossuscli, run the signup process:
$ colossus signup MEMBER_ADDRESS.json Enter passphrase for MEMBER_ADDRESS: asdf Account is working for staking, proceeding. Generated ROLE_ADDRESS - this is going to be exported to a JSON file. You can provide an empty passphrase to make starting the server easier, but you must keep the file very safe, then. Enter passphrase for ROLE_ADDRESS: Identity stored in ROLE_ADDRESS.json Funds transferred. Role application sent.
- The newly created account is also saved to a JSON file. This is the account you use for running the storage node. Funds will be transferred from the member account to the role account, and an application to stake for the role will be created.
- Navigate to the
Rolesmenu entry of the app. If you're currently the member account, you should see the role application under the
- Stake for the role.
- Back with the CLI, run the server:
$ colossus --key-file ROLE_ADDRESS.json
Note that the JSON files contain the full key pair of either account. It's best
to protect them with a passphrase. If you want to run the
more easily, you can also provide an empty passphrase when the JSON file is
created - but be aware that you must then take extra care to secure this file!