2022-09-12 20:01:14 +00:00
|
|
|
# Getting Started
|
2023-03-25 05:44:07 +00:00
|
|
|
|
|
|
|
### Dependencies
|
2022-09-12 20:01:14 +00:00
|
|
|
|
|
|
|
##### Ubuntu
|
|
|
|
|
|
|
|
```
|
2022-10-31 16:10:13 +00:00
|
|
|
sudo apt-get install -y build-essential cmake clang-11 git curl python3-pip protobuf-compiler libssl-dev pkg-config
|
2022-09-12 20:01:14 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
### Install rustup
|
|
|
|
|
|
|
|
##### Linux
|
|
|
|
|
|
|
|
```
|
|
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
|
|
|
```
|
|
|
|
|
|
|
|
##### macOS
|
|
|
|
|
|
|
|
```
|
|
|
|
brew install rustup
|
|
|
|
```
|
|
|
|
|
|
|
|
### Install Rust
|
|
|
|
|
|
|
|
```
|
|
|
|
rustup update
|
2023-03-25 05:44:07 +00:00
|
|
|
rustup toolchain install stable
|
2023-03-31 06:34:52 +00:00
|
|
|
rustup target add wasm32-unknown-unknown
|
2022-09-12 20:01:14 +00:00
|
|
|
rustup toolchain install nightly
|
|
|
|
rustup target add wasm32-unknown-unknown --toolchain nightly
|
|
|
|
```
|
|
|
|
|
|
|
|
### Install Solidity
|
|
|
|
|
|
|
|
```
|
|
|
|
sudo pip3 install solc-select
|
|
|
|
solc-select install 0.8.16
|
|
|
|
solc-select use 0.8.16
|
|
|
|
```
|
|
|
|
|
2022-10-31 20:50:28 +00:00
|
|
|
### Install Solidity Compiler Version Manager
|
|
|
|
|
|
|
|
```
|
|
|
|
cargo install svm-rs
|
|
|
|
svm install 0.8.16
|
|
|
|
svm use 0.8.16
|
|
|
|
```
|
|
|
|
|
2022-09-12 20:01:14 +00:00
|
|
|
### Install foundry and anvil (for tests)
|
|
|
|
|
|
|
|
```
|
|
|
|
cargo install --git https://github.com/foundry-rs/foundry --profile local --locked foundry-cli anvil
|
|
|
|
```
|
|
|
|
|
|
|
|
### Clone and Build Serai
|
|
|
|
|
|
|
|
```
|
|
|
|
git clone https://github.com/serai-dex/serai
|
|
|
|
cd serai
|
2023-07-12 02:45:14 +00:00
|
|
|
cargo build --release --all-features
|
2022-09-12 20:01:14 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
### Run Tests
|
|
|
|
|
2023-03-25 05:44:07 +00:00
|
|
|
Running tests requires:
|
|
|
|
|
|
|
|
- A Bitcoin regtest node
|
|
|
|
- A Monero regtest node
|
|
|
|
- A monero-wallet-rpc instance
|
2022-09-12 20:01:14 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
cargo test --all-features
|
|
|
|
```
|
|
|
|
|
|
|
|
### Run Serai in Development Mode
|
|
|
|
|
|
|
|
```
|
|
|
|
./target/release/serai-node --dev
|
|
|
|
```
|
2022-10-31 16:32:27 +00:00
|
|
|
|
2023-03-25 05:44:07 +00:00
|
|
|
### Run Serai with Orchestration
|
2022-10-31 16:32:27 +00:00
|
|
|
|
2023-03-25 05:44:07 +00:00
|
|
|
Under `/deploy`, you can find our orchestration components for running the
|
|
|
|
entire infrastructure of Serai in a local environment using Docker Compose or
|
|
|
|
Kubernetes.
|
2022-10-31 16:32:27 +00:00
|
|
|
|
|
|
|
[Run Serai with Docker Compose](../deploy/README.md)
|
|
|
|
|
|
|
|
[Run Serai with Kubernetes](../deploy/kubernetes/README.md)
|