diff --git a/DEVELOPING.md b/DEVELOPING.md index 0a76462a..c8225737 100644 --- a/DEVELOPING.md +++ b/DEVELOPING.md @@ -4,6 +4,8 @@ For setting up your environment to develop `seda-chain`. Shows how to build, run format, and clean the code base. To learn how to contribute please read [here](CONTRIBUTING.md). +**NOTE**: Windows is not supported at this time. + ## Dev-Container If you are using [VSCode](https://code.visualstudio.com/) and @@ -13,7 +15,10 @@ Otherwise please see the [dev dependencies](#dev-dependencies). ## Dev Dependencies +### [clang-format]() + ### [Golang](https://go.dev/) +We use Golang as the language to develop `seda-chaind` as it has the [CosmosSDK](https://v1.cosmos.network/sdk). - [Golang](https://go.dev/dl/): you can download it from the linked page or: - Linux: Use your distribution's packagae manager. @@ -27,33 +32,55 @@ echo "export PATH=\$PATH:\$GOPATH/bin" >> ~/.zprofile echo "export GO111MODULE=on" >> ~/.zprofile source ~/.zprofile ``` - -### [Ignite (Optional)](https://docs.ignite.com/) +### [make](https://www.gnu.org/software/make/) + +We use GNU Make to help us built, lint, fmt, and etc for our project. + +- Linux: + - Your distro likely already comes with this. You can check by running `which make`. + - Otherwise please see your distro specific installation tool(i.e `apt`) and use that to install it. +- Macos: + - You can check if it's already installed by `which make`. + - Otherwise use [brew](https://brew.sh/) or [macports](https://www.macports.org/) to install it. + + +### [Protobuf](https://protobuf.dev/) -- Windows - - Unfortunately ignite does not work for windows -- Mac & Linux: - - Run the following command: `curl https://get.ignite.com/cli! | bash` +- Linux: + - Please see your distro specific installation tool(i.e `apt`) and use that to install it. +- Macos: + - Using [brew](https://brew.sh/): `brew install protobuf` + - Using [macports](https://www.macports.org/): `sudo port install protobuf-cpp` +#### Protobuf Sub-Deps + + + ### [WasmVM](https://github.com/CosmWasm/wasmvm) - `git clone https://github.com/CosmWasm/wasmvm` - `make build-go` - `make test` -- Make sure you put the shared library in your path by moving it to an appropiate location or adding it to your path. +- Make sure you put the shared library in your path by moving it to an appropriate location or adding it to your path. - **NOTE**: This is currently not working on Windows. ## Building using Make +To build the protobuf(only necessary if you change the protobuf) you will need to run,: +```bash +make proto-update-deps +make proto-gen +``` + To build, run: ```bash -$ make build +make build ``` To install (builds and moves the executable to `$GOPATH/bin`, which should be in `$PATH`), run: ```bash -$ make install +make install ``` ## Running a Single-node Local Testnet @@ -74,34 +101,37 @@ $BIN collect-gentxs $BIN start ``` -## Building Using Ignite - -**NOTE**: you must have the enviornment variable `CGO_ENABLED` set to `1`. This is becuase we use CosmWASM. - -- `ignite chain build` will build and install the binary for you. -- `ignite chain serve` will build and run the chain without installing it. - ## Linting + + +To lint the protobuf(only necessary if you mess with protobuf): +```bash +make proto-lint +``` + If you have not install a Go linters runner, install it first: ```bash -$ make lint-install +make lint-install ``` Run linters with auto-fix ```bash -$ make lint-fix +make lint-fix ``` or without auto-fix: ```bash -$ make lint +make lint ``` ## Running -TODO +After running the `make install` command you should be able to use `seda-chaind --help`. ## Testing -TODO \ No newline at end of file +To test the node so far we only have unit tests: +```bash +make test-unit +``` \ No newline at end of file