Update script, docker bundler and instructions for Nova
This commit is contained in:
parent
f3041b59b9
commit
45a01cf8e6
13
README.md
13
README.md
@ -13,7 +13,7 @@ _The following instructions are for Ubuntu 22.10, other operating systems may va
|
|||||||
Just run in terminal:
|
Just run in terminal:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl -s https://git.tornado.ws/tornadocash/classic-relayer/raw/branch/main-v5/install.sh | bash
|
curl -s https://git.tornado.ws/tornadocash/tornado-relayer/raw/branch/main-v5/install.sh | bash
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Configuring environments:
|
#### Configuring environments:
|
||||||
@ -21,7 +21,7 @@ curl -s https://git.tornado.ws/tornadocash/classic-relayer/raw/branch/main-v5/in
|
|||||||
1. Go to `tornado-relayer` folder on the server home directory
|
1. Go to `tornado-relayer` folder on the server home directory
|
||||||
2. Check environment files:
|
2. Check environment files:
|
||||||
|
|
||||||
By default each network is preconfigured the naming of `.env.<NETWORK>`
|
By default each network is preconfigured the naming of `.env.<NETWORK>`
|
||||||
|
|
||||||
- `.env.eth` for Ethereum Mainnet
|
- `.env.eth` for Ethereum Mainnet
|
||||||
- `.env.bsc` for Binance Smart Chain
|
- `.env.bsc` for Binance Smart Chain
|
||||||
@ -31,7 +31,7 @@ curl -s https://git.tornado.ws/tornadocash/classic-relayer/raw/branch/main-v5/in
|
|||||||
- `.env.polygon` for Polygon (matic)
|
- `.env.polygon` for Polygon (matic)
|
||||||
- `.env.avax` for Avalanche C-Chain
|
- `.env.avax` for Avalanche C-Chain
|
||||||
|
|
||||||
3. Configure (fill) environment files for those networks on which the relayer will be deployed:
|
3. Configure (fill) environment files for those networks on which the relayer will be deployed:
|
||||||
|
|
||||||
- Set `PRIVATE_KEY` to your relayer address (remove the 0x from your private key) to each environment file
|
- Set `PRIVATE_KEY` to your relayer address (remove the 0x from your private key) to each environment file
|
||||||
- _It is recommended not to reuse the same private keys for each network as a security measure_
|
- _It is recommended not to reuse the same private keys for each network as a security measure_
|
||||||
@ -42,13 +42,18 @@ curl -s https://git.tornado.ws/tornadocash/classic-relayer/raw/branch/main-v5/in
|
|||||||
- Set `RPC_URL` to a non-censoring RPC (You can [run your own](https://github.com/feshchenkod/rpc-nodes), or use a [free option](https://chainnodes.org/))
|
- Set `RPC_URL` to a non-censoring RPC (You can [run your own](https://github.com/feshchenkod/rpc-nodes), or use a [free option](https://chainnodes.org/))
|
||||||
- Set `ORACLE_RPC_URL` to an Ethereum native RPC endpoint
|
- Set `ORACLE_RPC_URL` to an Ethereum native RPC endpoint
|
||||||
|
|
||||||
|
4. Optional: if you want to run relayer for [Nova](https://nova.tornado.ws), fill `.env.nova` file by instructions in [Nova branch](https://git.tornado.ws/tornadocash/tornado-relayer/src/branch/nova), because config is very specific.
|
||||||
|
|
||||||
#### Deployment:
|
#### Deployment:
|
||||||
|
|
||||||
1. Build and deploy the docker source for the configured neworks specified via `--profile <NETWORK_SYMBOL>`, for example (if you run relayer only for Ethereum Mainnet, Binance Smart Chain and Arbitrum):
|
1. Build and deploy the docker source for the configured networks specified via `--profile <NETWORK_SYMBOL>`, for example (if you run relayer only for Ethereum Mainnet, Binance Smart Chain and Arbitrum):
|
||||||
|
|
||||||
- `docker-compose --profile eth --profile bsc --profile arb up -d`
|
- `docker-compose --profile eth --profile bsc --profile arb up -d`
|
||||||
|
|
||||||
2. Visit your domain addresses and check each `/status` endpoint to ensure there is no errors in the `status` fields
|
2. Visit your domain addresses and check each `/status` endpoint to ensure there is no errors in the `status` fields
|
||||||
|
3. Optional: if you want to run Nova relayer, just add `--profile nova` to docker-compose command
|
||||||
|
|
||||||
|
If you want to change some relayer parameters, for example, RPC url or fee percent, stop the relayer software with command `docker-compose down --remove-orphans`, change in corresponding `.env.{name}` file what you need and rerun relayer as described above.
|
||||||
|
|
||||||
Disclaimer:
|
Disclaimer:
|
||||||
|
|
||||||
|
@ -450,6 +450,18 @@ services:
|
|||||||
depends_on: [redis, goerli-server]
|
depends_on: [redis, goerli-server]
|
||||||
# -------------------------------------------------- #
|
# -------------------------------------------------- #
|
||||||
|
|
||||||
|
# ---------------------- Tornado Nova (Gnosis Chain) ----------------------- #
|
||||||
|
server:
|
||||||
|
image: tornadocash/relayer:nova
|
||||||
|
profiles: ["nova"]
|
||||||
|
restart: always
|
||||||
|
command: start:prod
|
||||||
|
env_file: .env.nova
|
||||||
|
environment:
|
||||||
|
REDIS_URL: redis://redis/8
|
||||||
|
nginx_proxy_read_timeout: 600
|
||||||
|
depends_on: [redis]
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
conf:
|
conf:
|
||||||
vhost:
|
vhost:
|
||||||
|
@ -5,13 +5,14 @@ if [ "$EUID" -ne 0 ];
|
|||||||
exit 1;
|
exit 1;
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
relayer_soft_git_repo="https://git.tornado.ws/tornadocash/classic-relayer";
|
relayer_soft_git_repo="https://git.tornado.ws/tornadocash/tornado-relayer";
|
||||||
|
|
||||||
user_home_dir=$(eval echo ~$USER);
|
user_home_dir=$(eval echo ~$USER);
|
||||||
relayer_folder="$user_home_dir/tornado-relayer";
|
relayer_folder="$user_home_dir/tornado-relayer";
|
||||||
relayer_mainnet_soft_source_folder="$relayer_folder/mainnet-soft-source";
|
relayer_mainnet_soft_source_folder="$relayer_folder/mainnet-soft-source";
|
||||||
relayer_sidechains_soft_source_folder="$relayer_folder/sidechains-soft-source";
|
relayer_sidechains_soft_source_folder="$relayer_folder/sidechains-soft-source";
|
||||||
script_log_file="/tmp/tornado-classic-relayer-installation.log"
|
nova_relayer_soft_source_folder="$relayer_folder/nova-soft-source";
|
||||||
|
script_log_file="/tmp/tornado-relayer-installation.log"
|
||||||
if [ -f $script_log_file ]; then rm $script_log_file; fi;
|
if [ -f $script_log_file ]; then rm $script_log_file; fi;
|
||||||
|
|
||||||
function echo_log_err(){
|
function echo_log_err(){
|
||||||
@ -59,6 +60,7 @@ function install_repositories(){
|
|||||||
git clone $relayer_soft_git_repo -b main-v5 $relayer_folder
|
git clone $relayer_soft_git_repo -b main-v5 $relayer_folder
|
||||||
git clone $relayer_soft_git_repo -b mainnet-v5 $relayer_mainnet_soft_source_folder;
|
git clone $relayer_soft_git_repo -b mainnet-v5 $relayer_mainnet_soft_source_folder;
|
||||||
git clone $relayer_soft_git_repo -b sidechain-v5 $relayer_sidechains_soft_source_folder;
|
git clone $relayer_soft_git_repo -b sidechain-v5 $relayer_sidechains_soft_source_folder;
|
||||||
|
git clone $relayer_soft_git_repo -b nova $nova_relayer_soft_source_folder;
|
||||||
}
|
}
|
||||||
|
|
||||||
function install_docker_utilities(){
|
function install_docker_utilities(){
|
||||||
@ -93,10 +95,12 @@ function configure_nginx_reverse_proxy(){
|
|||||||
function build_relayer_docker_containers(){
|
function build_relayer_docker_containers(){
|
||||||
cd $relayer_mainnet_soft_source_folder && npm run build;
|
cd $relayer_mainnet_soft_source_folder && npm run build;
|
||||||
cd $relayer_sidechains_soft_source_folder && npm run build;
|
cd $relayer_sidechains_soft_source_folder && npm run build;
|
||||||
|
cd $nova_relayer_soft_source_folder && npm run build:docker;
|
||||||
}
|
}
|
||||||
|
|
||||||
function prepare_environments(){
|
function prepare_environments(){
|
||||||
cp $relayer_mainnet_soft_source_folder/.env.example $relayer_folder/.env.eth;
|
cp $relayer_mainnet_soft_source_folder/.env.example $relayer_folder/.env.eth;
|
||||||
|
cp $nova_relayer_soft_source_folder/.env.example $relayer_folder/.env.nova;
|
||||||
tee $relayer_folder/.env.bsc $relayer_folder/.env.arb $relayer_folder/.env.goerli $relayer_folder/.env.polygon $relayer_folder/.env.op \
|
tee $relayer_folder/.env.bsc $relayer_folder/.env.arb $relayer_folder/.env.goerli $relayer_folder/.env.polygon $relayer_folder/.env.op \
|
||||||
$relayer_folder/.env.avax $relayer_folder/.env.gnosis < $relayer_sidechains_soft_source_folder/.env.example > /dev/null;
|
$relayer_folder/.env.avax $relayer_folder/.env.gnosis < $relayer_sidechains_soft_source_folder/.env.example > /dev/null;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user