forked from taikoxyz/taiko-mono
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add relayer dockerfile and docker compose * feat: expose relayer ports * feat: add bridge ui Dockerfile and docker compose * fix: update relayer port * fix: update relayer db volume * feat: add rng-tools to prevent crypto.randomUUID() error * feat: add reverse proxy for bridge ui * fix: update nginx build context * feat: update docker compose to include nginx profile * feat: add bridge ui workflow * feat: update bridge ui adapter to node * fix: remove nginx dockerfile * fix: remove nginx depends on bridge ui and add nginx.conf to volume * fix: adjust nginx volume mount * fix: nginx redirects * fix: proxy 32002 port as well * fix: proxy 32002 to l1-rpc * fix: remove 32002 port * feat: update rpcs, relayer and block explore with proxy * fix: rpc url var * feat: add icons and update L1 blockexplore url * feat: add l2-l1 processor and indexer * feat: update rabbitmq volume * feat: add bridge software for relayer * feat: add l2-l1 bridge to bridge ui configs * debug: chain id updated to 763374 * debug: disable bridge software * debug: add confirmation for indexer * debug: update chain id for brdge ui * debug: update chain id for brdge ui chains * debug: enable bridge software * debug: update port to connect to taiko geth * debug: revert bridge and relayer back to nethermind EL * debug: add l2 relayer * debug: disable bridge and close port for processor and indexer * debug: update queue.prefetch and confirmations * debug: add surge logo to devnet * feat: prepare for devnet docs * chore: clean up configs --------- Co-authored-by: Denis Policastro <denis.policastro@gmail.com> Co-authored-by: Ahmad Bitar <33181301+smartprogrammer93@users.noreply.github.com>
- Loading branch information
1 parent
dee959e
commit a83642d
Showing
16 changed files
with
574 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: "Nethermind - Bridge UI - Docker build and push" | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [main] | ||
tags: | ||
- "bridge-ui-v*" | ||
paths: | ||
- "packages/bridge-ui/**" | ||
|
||
env: | ||
DOCKER_REGISTRY: nethermind.jfrog.io | ||
DOCKER_USERNAME: core | ||
DOCKER_REPOSITORY: core-oci-local-dev/bridge-ui | ||
|
||
jobs: | ||
build: | ||
name: Build and push docker image | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'NethermindEth/surge-taiko-mono' | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.DOCKER_REGISTRY }} | ||
username: ${{ env.DOCKER_USERNAME }} | ||
password: ${{ secrets.ARTIFACTORY_CORE_TOKEN_CONTRIBUTOR }} | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_REPOSITORY }} | ||
tags: | | ||
type=ref,event=branch | ||
type=ref,event=pr | ||
type=ref,event=tag | ||
type=sha | ||
- name: Build and push by digest | ||
id: build | ||
uses: docker/build-push-action@v5 | ||
with: | ||
platforms: linux/amd64,linux/arm64 | ||
context: packages/bridge-ui | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|
||
- name: Summary | ||
run: | | ||
echo "## Docker build completed :green_circle:" >> $GITHUB_STEP_SUMMARY | ||
echo "### Tags" >> $GITHUB_STEP_SUMMARY | ||
echo "${{ steps.meta.outputs.tags }}" | while IFS= read -r TAG; do | ||
echo "- $TAG" >> $GITHUB_STEP_SUMMARY | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
ARG PACKAGE=eventindexer | ||
ARG PACKAGE=relayer | ||
|
||
FROM golang:1.23.0 as builder | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Step 1: Build the application | ||
FROM node:20 AS builder | ||
|
||
RUN npm install -g pnpm | ||
|
||
WORKDIR /app | ||
|
||
# Install dependencies | ||
COPY package.json ./ | ||
|
||
# Install dependencies without the lock file, generating a new one | ||
RUN pnpm install | ||
|
||
# Copy the app source code and build | ||
COPY . . | ||
|
||
RUN cp .env.example .env | ||
|
||
RUN pnpm export:config | ||
RUN pnpm build | ||
|
||
# Step 2: Set up the final production environment | ||
FROM node:20 | ||
|
||
# Install pnpm globally | ||
RUN npm install -g pnpm | ||
|
||
WORKDIR /app | ||
|
||
# Copy only necessary build files | ||
COPY --from=builder /app/package.json ./ | ||
COPY --from=builder /app/pnpm-lock.yaml ./ | ||
RUN pnpm install --prod | ||
|
||
# Copy the build output | ||
COPY --from=builder /app/build ./build | ||
|
||
# Expose port | ||
EXPOSE 3000 | ||
|
||
# Start the SvelteKit app | ||
CMD ["node", "build"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"configuredBridges": [ | ||
{ | ||
"source": "3151908", | ||
"destination": "763374", | ||
"addresses": { | ||
"bridgeAddress": "0x72bCbB3f339aF622c28a26488Eed9097a2977404", | ||
"erc20VaultAddress": "0x38435Ac0E0e9Bd8737c476F8F39a24b0735e00dc", | ||
"erc721VaultAddress": "0x9ECB6f04D47FA2599449AaA523bF84476f7aD80f", | ||
"erc1155VaultAddress": "0xB29dB8A6b1C596B64f7E1dD5358d59Db73648E17", | ||
"crossChainSyncAddress": "", | ||
"signalServiceAddress": "0x00c042C4D5D913277CE16611a2ce6e9003554aD5", | ||
"quotaManagerAddress": "" | ||
} | ||
}, | ||
{ | ||
"source": "763374", | ||
"destination": "3151908", | ||
"addresses": { | ||
"bridgeAddress": "0x7633740000000000000000000000000000000001", | ||
"erc20VaultAddress": "0x7633740000000000000000000000000000000002", | ||
"erc721VaultAddress": "0x7633740000000000000000000000000000000003", | ||
"erc1155VaultAddress": "0x7633740000000000000000000000000000000004", | ||
"crossChainSyncAddress": "", | ||
"signalServiceAddress": "0x7633740000000000000000000000000000000005", | ||
"quotaManagerAddress": "" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"configuredChains": [ | ||
{ | ||
"3151908": { | ||
"name": "Kurtosis", | ||
"type": "L1", | ||
"icon": "https://cdn.worldvectorlogo.com/logos/ethereum-eth.svg", | ||
"rpcUrls": { | ||
"default": { | ||
"http": [ | ||
"https://l1-rpc/" | ||
] | ||
} | ||
}, | ||
"nativeCurrency": { | ||
"name": "ETH", | ||
"symbol": "ETH", | ||
"decimals": 18 | ||
}, | ||
"blockExplorers": { | ||
"default": { | ||
"name": "Explorer 1", | ||
"url": "" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"763374": { | ||
"name": "Taiko", | ||
"type": "L2", | ||
"icon": "https://cdn.worldvectorlogo.com/logos/ethereum-eth.svg", | ||
"rpcUrls": { | ||
"default": { | ||
"http": [ | ||
"https://l2-rpc/" | ||
] | ||
} | ||
}, | ||
"nativeCurrency": { | ||
"name": "TaikoETH", | ||
"symbol": "tETH", | ||
"decimals": 18 | ||
}, | ||
"blockExplorers": { | ||
"default": { | ||
"name": "Explorer 2", | ||
"url": "" | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[ | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"configuredEventIndexer": [ | ||
{ | ||
"chainIds": [3151908, 763374], | ||
"url": "" | ||
}, | ||
{ | ||
"chainIds": [763374, 3151908], | ||
"url": "" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"configuredRelayer": [ | ||
{ | ||
"chainIds": [3151908, 763374], | ||
"url": "https://relayer:4102" | ||
}, | ||
{ | ||
"chainIds": [763374, 3151908], | ||
"url": "https://relayer:4102" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
services: | ||
bridge-ui: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
container_name: bridge-ui | ||
ports: | ||
- "3000:3000" | ||
profiles: | ||
- bridge-ui | ||
networks: | ||
- app-network | ||
|
||
nginx: | ||
image: nginx:latest | ||
container_name: nginx | ||
ports: | ||
- "80:80" | ||
- "443:443" | ||
profiles: | ||
- nginx | ||
networks: | ||
- app-network | ||
volumes: | ||
- ./nginx/ssl:/etc/nginx/ssl:ro | ||
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf:ro | ||
|
||
networks: | ||
app-network: | ||
driver: bridge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
mkdir -p ssl | ||
openssl req -x509 -nodes -days 365 -newkey rsa:2048 \ | ||
-keyout ssl/key.pem \ | ||
-out ssl/cert.pem \ | ||
-subj "/C=US/ST=State/L=City/O=Organization/CN=localhost" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
server { | ||
listen 80; | ||
listen 443 ssl; | ||
server_name devnet.domain; | ||
|
||
ssl_certificate /etc/nginx/ssl/cert.pem; | ||
ssl_certificate_key /etc/nginx/ssl/key.pem; | ||
|
||
# L1 RPC endpoint | ||
location /l1-rpc/ { | ||
proxy_pass http://172.17.0.1:32002/; | ||
proxy_http_version 1.1; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
} | ||
|
||
# L1 RPC block explorer | ||
location /l1-blocksscout/ { | ||
proxy_pass http://172.17.0.1:35001/; | ||
proxy_http_version 1.1; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
} | ||
|
||
# L2 RPC endpoint | ||
location /l2-rpc/ { | ||
proxy_pass http://172.17.0.1:8547/; | ||
proxy_http_version 1.1; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
} | ||
|
||
# Relayer endpoint | ||
location /l1-relayer/ { | ||
proxy_pass http://172.17.0.1:4102/; | ||
proxy_http_version 1.1; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
} | ||
|
||
location /l2-relayer/ { | ||
proxy_pass http://172.17.0.1:4103/; | ||
proxy_http_version 1.1; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
} | ||
|
||
# Main application (should be last) | ||
location / { | ||
proxy_pass http://bridge-ui:3000; | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection 'upgrade'; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
proxy_cache_bypass $http_upgrade; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.