gpu-compute-chain/README.md

96 lines
2.0 KiB
Markdown
Raw Normal View History

2022-09-04 15:35:35 -07:00
# Colinear Chain
![Go](https://img.shields.io/badge/go-%2300ADD8.svg?style=for-the-badge&logo=go&logoColor=white)
![Shell Script](https://img.shields.io/badge/shell_script-%23121011.svg?style=for-the-badge&logo=gnu-bash&logoColor=white)
![Docker](https://img.shields.io/badge/docker-%230db7ed.svg?style=for-the-badge&logo=docker&logoColor=white)
![Rocky Linux](https://img.shields.io/badge/-Rocky%20Linux-%2310B981?style=for-the-badge&logo=rockylinux&logoColor=white)
This repository contains the base chain implementation that Colinear's compute marketplace uses as a settlement layer.
2022-09-06 16:11:43 -07:00
## Technical Documentation
| Component | Docs Path |
| :-------- | :-------- |
| Leasing & settlement module | [x/colinearcore](./x/colinearcore/README.md) |
| In-memory bid database | [x/colinearcore/memdb](./x/colinearcore/memdb/README.md) |
2022-09-10 22:42:17 -07:00
| Hardware provider auditing | [x/colinearcore/audit](./x/colinearcore/audit/README.md) |
2022-09-06 16:11:43 -07:00
2022-09-04 16:35:22 -07:00
## Validators
### Requirements
- `docker >= 20.10.*`
## Development
2022-09-13 22:43:17 -07:00
### Build Requirements
2022-09-04 16:35:22 -07:00
- `ignite == 0.23.0` (see the [setup section](#setup))
2022-09-04 16:35:22 -07:00
- `go >= 1.18`
2022-09-13 22:43:17 -07:00
### Integration Test Requirements
2022-09-04 16:35:22 -07:00
- `bash`
2022-09-13 22:43:17 -07:00
- `bc`
2022-09-04 16:35:22 -07:00
- `jq`
### Setup
To get ignite 0.23.0:
```
curl https://get.ignite.com/cli@v0.23.0?type=script! | bash
```
...or download it from the [GitHub release page](https://github.com/ignite/cli/releases/tag/v0.23.0).
Then, move it anywhere on `$PATH`.
2022-09-04 16:35:22 -07:00
To build the chain:
2022-09-04 17:42:28 -07:00
```
ignite chain build
```
2022-09-04 16:35:22 -07:00
To serve the chain:
2022-09-04 17:42:28 -07:00
```
ignite chain serve
```
2022-09-04 16:35:22 -07:00
### Unit Tests
2022-09-04 17:42:28 -07:00
Unit tests use Go's built-in testing system. To run all unit tests:
2022-09-04 16:35:22 -07:00
2022-09-04 17:42:28 -07:00
```
make utest
```
To test any specific subpackage:
```
go test ./path/to/package
```
2022-09-04 16:35:22 -07:00
### Integration Tests
2022-09-13 22:43:17 -07:00
Integration tests use a custom-built testing framework that interacts with a running instance of the chain.
2022-09-05 20:28:23 -07:00
Before running any tests, make sure that the dev chain is running:
```
ignite chain serve
```
To run all integration tests:
2022-09-04 16:35:22 -07:00
2022-09-04 17:42:28 -07:00
```
make test
```
2022-09-04 16:35:22 -07:00
Integration tests can also be run individually:
2022-09-04 17:42:28 -07:00
```
./tests/<specific_test>.sh
```