From 6abc92fbad7a5187441f8ed8ce8265c5f8136cf5 Mon Sep 17 00:00:00 2001 From: Maciej Skrzypkowski Date: Mon, 2 Dec 2024 15:17:56 +0100 Subject: [PATCH] L1 and L2 env variables for the relayer docker compose (#35) * SRC_RPC_URL and DEST_RPC_URL for relayer docker compose * renamed to L1_RPC_URL and L2_RPC_URL * move relayer docker-compose parameters to the .default.env * corrected uls for bridge ui --- .../bridge-ui/config/configuredChains.json | 8 +-- .../bridge-ui/config/configuredRelayer.json | 4 +- packages/relayer/.default.env | 31 +++++---- packages/relayer/docker-compose.yml | 68 +++++++++---------- 4 files changed, 54 insertions(+), 57 deletions(-) diff --git a/packages/bridge-ui/config/configuredChains.json b/packages/bridge-ui/config/configuredChains.json index 5673894eb02..a30abb71a9e 100644 --- a/packages/bridge-ui/config/configuredChains.json +++ b/packages/bridge-ui/config/configuredChains.json @@ -7,9 +7,7 @@ "icon": "https://cdn.worldvectorlogo.com/logos/ethereum-eth.svg", "rpcUrls": { "default": { - "http": [ - "https://l1-rpc/" - ] + "http": ["https://host/l1-rpc/"] } }, "nativeCurrency": { @@ -32,9 +30,7 @@ "icon": "https://cdn.worldvectorlogo.com/logos/ethereum-eth.svg", "rpcUrls": { "default": { - "http": [ - "https://l2-rpc/" - ] + "http": ["https://host/l2-rpc/"] } }, "nativeCurrency": { diff --git a/packages/bridge-ui/config/configuredRelayer.json b/packages/bridge-ui/config/configuredRelayer.json index 89fb79d9159..89f63eb85fb 100644 --- a/packages/bridge-ui/config/configuredRelayer.json +++ b/packages/bridge-ui/config/configuredRelayer.json @@ -2,11 +2,11 @@ "configuredRelayer": [ { "chainIds": [3151908, 763374], - "url": "https://relayer:4102" + "url": "https://relayer/l1-relayer/" }, { "chainIds": [763374, 3151908], - "url": "https://relayer:4102" + "url": "https://relayer/l2-relayer/" } ] } diff --git a/packages/relayer/.default.env b/packages/relayer/.default.env index 28f7c92ee78..ed839eb84ec 100644 --- a/packages/relayer/.default.env +++ b/packages/relayer/.default.env @@ -8,22 +8,23 @@ MYSQL_MAX_IDLE_CONNS=50 MYSQL_MAX_OPEN_CONNS=3000 MYSQL_CONN_MAX_LIFETIME_IN_MS=100000 RELAYER_ECDSA_KEY= -L1_BRIDGE_ADDRESS=0x3612E284D763f42f5E4CB72B1602b23DAEC3cA60 -L2_BRIDGE_ADDRESS=0x1000777700000000000000000000000000000004 -L1_ERC20_VAULT_ADDRESS=0x3612E284D763f42f5E4CB72B1602b23DAEC3cA60 -L2_ERC20_VAULT_ADDRESS=0x1000777700000000000000000000000000000002 -L1_ERC721_VAULT_ADDRESS=0x3612E284D763f42f5E4CB72B1602b23DAEC3cA60 -L2_ERC721_VAULT_ADDRESS=0x1000777700000000000000000000000000000002 -L1_ERC1155_VAULT_ADDRESS=0x3612E284D763f42f5E4CB72B1602b23DAEC3cA60 -L2_ERC1155_VAULT_ADDRESS=0x1000777700000000000000000000000000000002 -L1_TAIKO_ADDRESS=0x7B3AF414448ba906f02a1CA307C56c4ADFF27ce7 -L2_TAIKO_ADDRESS=0x1000777700000000000000000000000000000001 -L1_SIGNAL_SERVICE_ADDRESS=0x403cc7802725928652a3d116Bb1781005e2e76d3 -L2_SIGNAL_SERVICE_ADDRESS=0x1000777700000000000000000000000000000007 -L1_RPC_URL=wss://l1ws.a1.taiko.xyz -L2_RPC_URL=wss://l2ws.a1.taiko.xyz +L1_BRIDGE_ADDRESS=0x72bCbB3f339aF622c28a26488Eed9097a2977404 +L2_BRIDGE_ADDRESS=0x7633740000000000000000000000000000000001 +L1_ERC20_VAULT_ADDRESS=0x38435Ac0E0e9Bd8737c476F8F39a24b0735e00dc +L2_ERC20_VAULT_ADDRESS=0x7633740000000000000000000000000000000002 +L1_ERC721_VAULT_ADDRESS=0x9ECB6f04D47FA2599449AaA523bF84476f7aD80f +L2_ERC721_VAULT_ADDRESS=0x7633740000000000000000000000000000000003 +L1_ERC1155_VAULT_ADDRESS=0xB29dB8A6b1C596B64f7E1dD5358d59Db73648E17 +L2_ERC1155_VAULT_ADDRESS=0x7633740000000000000000000000000000000004 +L1_TAIKO_ADDRESS=0xaE37C7A711bcab9B0f8655a97B738d6ccaB6560B +L2_TAIKO_ADDRESS=0x7633740000000000000000000000000000010001 +L1_SIGNAL_SERVICE_ADDRESS=0x00c042C4D5D913277CE16611a2ce6e9003554aD5 +L2_SIGNAL_SERVICE_ADDRESS=0x7633740000000000000000000000000000000005 +L1_RPC_URL=http://1.2.3.4:32002 +L2_RPC_URL=http://1.2.3.4:8547 CONFIRMATIONS_BEFORE_PROCESSING=13 CORS_ORIGINS=* NUM_GOROUTINES=100 BLOCK_BATCH_SIZE=10 -HEADER_SYNC_INTERVAL_IN_SECONDS=60 \ No newline at end of file +HEADER_SYNC_INTERVAL_IN_SECONDS=60 +PROCESSOR_PRIVATE_KEY=bcdf20249abf0ed6d944c0288fad489e33f66b3960d9e6229c1cd214ed3bbe31 \ No newline at end of file diff --git a/packages/relayer/docker-compose.yml b/packages/relayer/docker-compose.yml index 7c5350f35d5..2174a260050 100644 --- a/packages/relayer/docker-compose.yml +++ b/packages/relayer/docker-compose.yml @@ -56,14 +56,14 @@ services: - processor - --queue.prefetch=100 - --processorPrivateKey=bcdf20249abf0ed6d944c0288fad489e33f66b3960d9e6229c1cd214ed3bbe31 - - --destBridgeAddress=0x7633740000000000000000000000000000000001 - - --destERC20VaultAddress=0x7633740000000000000000000000000000000002 - - --destERC721Address=0x7633740000000000000000000000000000000003 - - --destERC1155Address=0x7633740000000000000000000000000000000004 - - --destTaikoAddress=0x7633740000000000000000000000000000010001 - - --srcSignalServiceAddress=0x00c042C4D5D913277CE16611a2ce6e9003554aD5 - - --srcRpcUrl= - - --destRpcUrl= + - --destBridgeAddress=${L2_BRIDGE_ADDRESS} + - --destERC20VaultAddress=${L2_ERC20_VAULT_ADDRESS} + - --destERC721Address=${L2_ERC721_VAULT_ADDRESS} + - --destERC1155Address=${L2_ERC1155_VAULT_ADDRESS} + - --destTaikoAddress=${L2_TAIKO_ADDRESS} + - --srcSignalServiceAddress=${L1_SIGNAL_SERVICE_ADDRESS} + - --srcRpcUrl=${L1_RPC_URL} + - --destRpcUrl=${L2_RPC_URL} - --confirmations=0 - --headerSyncInterval=2 - --profitableOnly=false @@ -97,12 +97,12 @@ services: - --db.name=relayer - --db.password=root - --db.username=root - - --srcBridgeAddress=0x72bCbB3f339aF622c28a26488Eed9097a2977404 - - --destBridgeAddress=0x7633740000000000000000000000000000000001 - - --srcTaikoAddress=0xaE37C7A711bcab9B0f8655a97B738d6ccaB6560B - - --srcSignalServiceAddress=0x00c042C4D5D913277CE16611a2ce6e9003554aD5 - - --srcRpcUrl= - - --destRpcUrl= + - --srcBridgeAddress=${L1_BRIDGE_ADDRESS} + - --destBridgeAddress=${L2_BRIDGE_ADDRESS} + - --srcTaikoAddress=${L1_TAIKO_ADDRESS} + - --srcSignalServiceAddress=${L1_SIGNAL_SERVICE_ADDRESS} + - --srcRpcUrl=${L1_RPC_URL} + - --destRpcUrl=${L2_RPC_URL} - --queue.host=rabbitmq - --queue.password=root - --queue.port=5672 @@ -132,9 +132,9 @@ services: - --db.name=relayer - --db.password=root - --db.username=root - - --srcRpcUrl= - - --destRpcUrl= - - --destTaikoAddress=0x7633740000000000000000000000000000010001 + - --srcRpcUrl=${L1_RPC_URL} + - --destRpcUrl=${L2_RPC_URL} + - --destTaikoAddress=${L2_TAIKO_ADDRESS} - --processingFeeMultiplier=1.75 networks: - rabbitmq_go_net @@ -157,9 +157,9 @@ services: - --db.name=relayer - --db.password=root - --db.username=root - - --srcRpcUrl= - - --destRpcUrl= - - --destTaikoAddress=0xaE37C7A711bcab9B0f8655a97B738d6ccaB6560B + - --srcRpcUrl=${L1_RPC_URL} + - --destRpcUrl=${L2_RPC_URL} + - --destTaikoAddress=${L1_TAIKO_ADDRESS} - --processingFeeMultiplier=1.75 networks: - rabbitmq_go_net @@ -174,15 +174,15 @@ services: command: - processor - --queue.prefetch=100 - - --processorPrivateKey=bcdf20249abf0ed6d944c0288fad489e33f66b3960d9e6229c1cd214ed3bbe31 - - --destBridgeAddress=0x72bCbB3f339aF622c28a26488Eed9097a2977404 - - --destERC20VaultAddress=0x38435Ac0E0e9Bd8737c476F8F39a24b0735e00dc - - --destERC721Address=0x9ECB6f04D47FA2599449AaA523bF84476f7aD80f - - --destERC1155Address=0xB29dB8A6b1C596B64f7E1dD5358d59Db73648E17 - - --destTaikoAddress=0xaE37C7A711bcab9B0f8655a97B738d6ccaB6560B - - --srcSignalServiceAddress=0x7633740000000000000000000000000000000005 - - --srcRpcUrl= - - --destRpcUrl= + - --processorPrivateKey=${PROCESSOR_PRIVATE_KEY} + - --destBridgeAddress=${L1_BRIDGE_ADDRESS} + - --destERC20VaultAddress=${L1_ERC20_VAULT_ADDRESS} + - --destERC721Address=${L1_ERC721_VAULT_ADDRESS} + - --destERC1155Address=${L1_ERC1155_VAULT_ADDRESS} + - --destTaikoAddress=${L1_TAIKO_ADDRESS} + - --srcSignalServiceAddress=${L2_SIGNAL_SERVICE_ADDRESS} + - --srcRpcUrl=${L1_RPC_URL} + - --destRpcUrl=${L2_RPC_URL} - --confirmations=0 - --headerSyncInterval=2 - --profitableOnly=false @@ -216,11 +216,11 @@ services: - --db.name=relayer - --db.password=root - --db.username=root - - --srcBridgeAddress=0x7633740000000000000000000000000000000001 - - --destBridgeAddress=0x72bCbB3f339aF622c28a26488Eed9097a2977404 - - --srcSignalServiceAddress=0x7633740000000000000000000000000000000005 - - --srcRpcUrl= - - --destRpcUrl= + - --srcBridgeAddress=${L2_BRIDGE_ADDRESS} + - --destBridgeAddress=${L1_BRIDGE_ADDRESS} + - --srcSignalServiceAddress=${L2_SIGNAL_SERVICE_ADDRESS} + - --srcRpcUrl=${L1_RPC_URL} + - --destRpcUrl=${L2_RPC_URL} - --queue.host=rabbitmq - --queue.password=root - --queue.port=5672