Skip to content

Commit

Permalink
docs: dev tools require docker + cmds don't work..
Browse files Browse the repository at this point in the history
  • Loading branch information
gluax committed Nov 27, 2023
1 parent 023444c commit 83545ee
Showing 1 changed file with 51 additions and 21 deletions.
72 changes: 51 additions & 21 deletions DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand All @@ -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.

<!-- It actually uses docker to run protobuf commmands... this should be fixed -->
### [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


<!-- TODO this needs to be tested more -->
### [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
Expand All @@ -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

<!-- @gluax add clang-format as a dep -->
<!-- @gluax this cmd doesn't work... -->
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
To test the node so far we only have unit tests:
```bash
make test-unit
```

0 comments on commit 83545ee

Please sign in to comment.