From 8396932e475f93484820cf74031ff4814c6eb435 Mon Sep 17 00:00:00 2001 From: Kristin Kirkov Date: Thu, 10 Oct 2024 16:41:04 +0300 Subject: [PATCH] doc(relay): Add a doc explaining how to run the relay --- relay/RUNNING-RELAY.md | 60 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 relay/RUNNING-RELAY.md diff --git a/relay/RUNNING-RELAY.md b/relay/RUNNING-RELAY.md new file mode 100644 index 000000000..6459ab993 --- /dev/null +++ b/relay/RUNNING-RELAY.md @@ -0,0 +1,60 @@ +# Steps to run the relay + +### 1 Check your .env you need the following set up: + +#### 1.1 Must have + +PROVER_SERVER_HOST
+PROVER_SERVER_PORT
+SLOTS_JUMP
+ +and files with keys at:
+USER_PRIVATE_KEY_FILE=/.secrets/user_private_key
+INFURA_API_KEY_FILE=/.secrets/infura_api_key
+ +#### 1.2 Not necessary + +REDIS_HOST(if not given, will use default - localhost)
+REDIS_PORT(if not given, will use default - 6379)
+ +#### 1.3 Good to have + +To run the relay you need `light_client.zkey` and `light_client.dat` files, if you dont have them we have provided
+LIGHT_CLIENT_ZKEY_DOWNLOAD_LOCATION
+LIGHT_CLIENT_DAT_DOWNLOAD_LOCATION + +#### 1.4 Network/contract setup + +you need at least one contract address
+example:
+ +LC_SEPOLIA=contractAddress
+This is the address of the light client contract(deployed on Sepolia)
+ +SEPOLIA_HASHI=contractAddress
+This is the address of the hashi contract(deployed on Sepolia)
+ +FOLLOW_NETWORK_SEPOLIA=chiado
+This is the network whose API, our contracts above use to update themselves
+ +BEACON_REST_API_CHIADO=chiadoAPI
+ +### 2 in a new terminal run `yarn redis-commander` + +### 3 `nix develop .#light-client` + +### 4 `export LODESTAR_PRESET=gnosis`(if running on Sepolia) + +### 5 `process-compose` + +If you dont get updates on chain for 15+ min -> flush the redis(redis-cli FLUSHALL) and rerun the relay(or restart pollUpdateWorker task).
+ +After any changes in .env(or running direnv reload) you will need to run `nix develop .#light-client` again before starting the relay. + +### Prometheus ports + +pollUpdatesWorker - 2999
+proofGenerationWorker - 3000
+Sepolia - 3004
+Chiado - 3010
+Lukso - 3015