Cronos POS Chain⛓: Croeseid Testnet and beyond development
Table of Contents
- 1. Nix- 6. Start a local Development Network and Node
- 7. Send Your First Transaction
- 8. Testing
- 9. Pystarport Quick Start
1. Description
Cronos POS Chain is a blockchain application built using Cosmos SDK and Tendermint, intended as a backbone for some of the existing and future Cronos ecosystem.
2. Contributing
Please abide by the Code of Conduct in all interactions, and the contributing guidelines when submitting code.
3. License
4. Documentation
Technical documentation can be found in this Github repository (you can read it in this hosted version).
5. Build full node
# COSMOSBUILDOPTIONS=rocksdb make build
make build
By default, the command will build a binary with Mainnet configurations.
To build with different network, provided NETWORK variable to make command
NETWORK=testnet make build
1. Nix
Nix is a (cross-language) package manager for reproducible builds. On Linux and macOS, you can install it as follows (on Windows 10, you can possibly use the Windows Subsystem for Linux):
$ curl -L https://nixos.org/nix/install | sh
If you're using a recent Mac with a T2 chip, you might need to check nix macos installation when the command above is not working in your environment.
You can then run:
$ make chaindImage
Which will build a docker image that contains the full node binary.
Optionally, you can also use a binary cache to speed up the build process:
$ nix-env -iA cachix -f https://cachix.org/api/v1/install
$ cachix use crypto-org-chain
6. Start a local Development Network and Node
Please follow this documentation to run a local devnet.
7. Send Your First Transaction
After setting the local devnet, you may interact with your local blockchain by following this documentation.
8. Testing
There are different tests that can be executed in the following ways:
- unit tests:
make test - simulations:
make test-sim-*(e.g.make test-sim-nondeterminism) - integration tests:
make nix-integration-test(see more details in their documentation)
9. Pystarport Quick Start
you can install pystarport to manage nodes for development.
install latest python (for linux)
python version should be 3.8 or above. you can install python like this.
git clone git@github.com:python/cpython.git
cd cpython
git checkout tags/v3.9.5
./configure
make
sudo make install
set path (for linux or for mac)
in some cases, if there are multiple python versions, pystarport cannot be found. then adjust python path. also$HOME/.local/bin should be included to the PATH.
export PATH=/usr/local/bin:$HOME/.local/bin:$PATH
install pystarport
python3 -m pip install pystarport
quick start
run two nodes devnet
pystarport serve --data=./data --config=./integration_tests/configs/default.yaml
get status
pystarport supervisorctl status
stop all
pystarport supervisorctl stop all
10. Compile with RocksDB
Install rocksDB
nix profile install -f ./nix rocksdb
Set in path
export PKGCONFIGPATH=$HOME/.nix-profile/lib/pkgconfig
export CGOCFLAGS="$(pkg-config --cflags rocksdb)" CGOLDFLAGS="$(pkg-config --libs rocksdb)"
Enable rocksdb in compilation option
export COSMOSBUILDOPTIONS=rocksdb
11. Useful links
- Project Website
- Technical Documentation
- Community chatrooms (non-technical): Discord, Telegram
- Developer community channel (technical):