mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-01 09:33:46 +00:00
rm bridge. WIP?
This commit is contained in:
parent
99c407efbc
commit
539381a37f
10 changed files with 1 additions and 345 deletions
|
|
@ -215,118 +215,7 @@ services:
|
|||
profiles:
|
||||
- local_l1
|
||||
|
||||
hyperlane-deployer:
|
||||
build:
|
||||
context: ./hyperlane-deployer
|
||||
dockerfile: Dockerfile
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "test -f /hyperlane-monorepo/artifacts/done-warp-route || exit 1"]
|
||||
interval: 5s
|
||||
retries: 100
|
||||
environment:
|
||||
- HYPERLANE_DEPLOYER_PRIVATE_KEY=${HYPERLANE_DEPLOYER_PRIVATE_KEY}
|
||||
networks:
|
||||
primev_net:
|
||||
ipv4_address: '172.29.0.50'
|
||||
volumes:
|
||||
- hyperlane-deploy-artifacts:/hyperlane-monorepo/artifacts
|
||||
profiles:
|
||||
- bridge
|
||||
|
||||
hyperlane-validator1:
|
||||
build:
|
||||
context: ./hyperlane-validator
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
# Image can be built for arm64 with https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/rust/build.sh
|
||||
- AGENT_BASE_IMAGE=${AGENT_BASE_IMAGE}
|
||||
- SETTLEMENT_RPC_URL=${SETTLEMENT_RPC_URL}
|
||||
# Reuse geth private key for validator
|
||||
command: ./validator --validator.key ${NODE1_PRIVATE_KEY} --chains.mevcommitsettlement.signer.key ${NODE1_PRIVATE_KEY} --checkpointSyncer.path /val1-sigs
|
||||
# TODO: evaluate why container needs to run as root
|
||||
user: "0:0"
|
||||
depends_on:
|
||||
hyperlane-deployer:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
primev_net:
|
||||
ipv4_address: '172.29.0.75'
|
||||
volumes:
|
||||
- hyperlane-deploy-artifacts:/deploy-artifacts
|
||||
- hyperlane-validator1-sigs:/val1-sigs
|
||||
- hyperlane-validator1-db:/val-db
|
||||
profiles:
|
||||
- bridge
|
||||
|
||||
hyperlane-validator2:
|
||||
build:
|
||||
context: ./hyperlane-validator
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
- AGENT_BASE_IMAGE=${AGENT_BASE_IMAGE}
|
||||
- SETTLEMENT_RPC_URL=${SETTLEMENT_RPC_URL}
|
||||
# Reuse geth private key for validator
|
||||
command: ./validator --validator.key ${NODE2_PRIVATE_KEY} --chains.mevcommitsettlement.signer.key ${NODE2_PRIVATE_KEY} --checkpointSyncer.path /val2-sigs
|
||||
# TODO: evaluate why container needs to run as root
|
||||
user: "0:0"
|
||||
depends_on:
|
||||
hyperlane-deployer:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
primev_net:
|
||||
ipv4_address: '172.29.0.76'
|
||||
volumes:
|
||||
- hyperlane-deploy-artifacts:/deploy-artifacts
|
||||
- hyperlane-validator2-sigs:/val2-sigs
|
||||
- hyperlane-validator2-db:/val-db
|
||||
profiles:
|
||||
- bridge
|
||||
|
||||
hyperlane-relayer:
|
||||
build:
|
||||
context: ./hyperlane-relayer
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
- AGENT_BASE_IMAGE=${AGENT_BASE_IMAGE}
|
||||
user: "0:0"
|
||||
depends_on:
|
||||
hyperlane-deployer:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- RELAYER_PRIVATE_KEY=${RELAYER_PRIVATE_KEY}
|
||||
networks:
|
||||
primev_net:
|
||||
ipv4_address: '172.29.0.77'
|
||||
volumes:
|
||||
- hyperlane-deploy-artifacts:/deploy-artifacts
|
||||
- hyperlane-validator1-sigs:/val1-sigs
|
||||
- hyperlane-validator2-sigs:/val2-sigs
|
||||
- hyperlane-relayer-db:/relayer-db
|
||||
profiles:
|
||||
- bridge
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: ./frontend
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
- NEXT_PUBLIC_WALLET_CONNECT_ID=${NEXT_PUBLIC_WALLET_CONNECT_ID}
|
||||
depends_on:
|
||||
hyperlane-deployer:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- NEXT_PUBLIC_WALLET_CONNECT_ID=${NEXT_PUBLIC_WALLET_CONNECT_ID}
|
||||
- SETTLEMENT_RPC_URL=${SETTLEMENT_RPC_URL}
|
||||
- PUBLIC_SETTLEMENT_RPC_URL=${PUBLIC_SETTLEMENT_RPC_URL}
|
||||
networks:
|
||||
primev_net:
|
||||
ipv4_address: '172.29.0.90'
|
||||
ports:
|
||||
- 80:3000
|
||||
volumes:
|
||||
- hyperlane-deploy-artifacts:/deploy-artifacts
|
||||
profiles:
|
||||
- bridge
|
||||
|
||||
|
||||
datadog-agent:
|
||||
image: gcr.io/datadoghq/agent:latest
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
FROM alpine:latest
|
||||
|
||||
RUN apk add --no-cache git yarn jq
|
||||
|
||||
RUN git clone https://github.com/primevprotocol/hyperlane-ui.git
|
||||
WORKDIR /hyperlane-ui
|
||||
RUN git checkout ff1586ed9cad6eeddba2cebc5f9b7828c74f25d1
|
||||
|
||||
RUN yarn
|
||||
|
||||
ARG NEXT_PUBLIC_WALLET_CONNECT_ID
|
||||
|
||||
RUN yarn build
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
ENTRYPOINT [ "/entrypoint.sh" ]
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
#!/bin/sh
|
||||
set -exu
|
||||
|
||||
# Update src tokens.ts file with hypNativeAddress value from deploy config
|
||||
ARTIFACT_PATH="/deploy-artifacts/warp-ui-token-config.json"
|
||||
SRC_TOKENS_PATH="/hyperlane-ui/src/consts/tokens.ts"
|
||||
HYP_NATIVE_ADDR=$(jq -r '.hypNativeAddress' $ARTIFACT_PATH)
|
||||
sed -i "/hypNativeAddress/c\ hypNativeAddress: \"$HYP_NATIVE_ADDR\"," $SRC_TOKENS_PATH
|
||||
|
||||
# Check if PUBLIC_SETTLEMENT_RPC_URL is set and non-empty, otherwise use SETTLEMENT_RPC_URL
|
||||
if [ -n "${PUBLIC_SETTLEMENT_RPC_URL+x}" ] && [ -n "$PUBLIC_SETTLEMENT_RPC_URL" ]; then
|
||||
RPC_URL="$PUBLIC_SETTLEMENT_RPC_URL"
|
||||
else
|
||||
RPC_URL="$SETTLEMENT_RPC_URL"
|
||||
fi
|
||||
# Update src chains.ts file with L2 node url depending on dev vs prod
|
||||
SRC_CHAINS_PATH="/hyperlane-ui/src/consts/chains.ts"
|
||||
sed -i "s|http: 'http://[^']*'|http: '$RPC_URL'|g" "$SRC_CHAINS_PATH"
|
||||
|
||||
exec yarn dev
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
FROM alpine:latest
|
||||
|
||||
RUN apk update && apk add --no-cache git yarn expect
|
||||
|
||||
WORKDIR /
|
||||
|
||||
RUN git clone https://github.com/primevprotocol/hyperlane-monorepo.git
|
||||
WORKDIR /hyperlane-monorepo
|
||||
# Hyperlane 3.5 release w/ merged primev changes
|
||||
# https://github.com/primevprotocol/hyperlane-monorepo/commit/1c8cdc9e57389024274242d28e032a2de535c2c7
|
||||
RUN git checkout 1c8cdc9e57389024274242d28e032a2de535c2c7
|
||||
|
||||
RUN yarn install
|
||||
RUN yarn build
|
||||
|
||||
RUN ln -s /hyperlane-monorepo/typescript/cli/dist/cli.js /usr/local/bin/hyperlane
|
||||
RUN chmod +x /usr/local/bin/hyperlane
|
||||
|
||||
COPY chain-config.yml /chain-config.yml
|
||||
COPY multisig-ism.yml /multisig-ism.yml
|
||||
COPY warp-tokens.yml /warp-tokens.yml
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
ENTRYPOINT [ "/entrypoint.sh" ]
|
||||
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
---
|
||||
mevcommitsettlement:
|
||||
chainId: 17864
|
||||
domainId: 17864
|
||||
name: mevcommitsettlement
|
||||
protocol: ethereum
|
||||
rpcUrls:
|
||||
# This RPC URL is specific to a local geth POA setup
|
||||
- http: http://172.29.0.98:8545
|
||||
pagination:
|
||||
maxBlockRange: 1000
|
||||
maxBlockAge: 1000
|
||||
minBlockNumber: 1000
|
||||
retry:
|
||||
maxRequests: 5
|
||||
baseRetryMs: 1000
|
||||
isTestnet: true
|
||||
# blockExplorers: # Array: List of BlockExplorer configs
|
||||
# # Required fields:
|
||||
# - name: My Chain Explorer # String: Human-readable name for the explorer
|
||||
# url: https://mychain.com/explorer # String: Base URL for the explorer
|
||||
# apiUrl: https://mychain.com/api # String: Base URL for the explorer API
|
||||
# # Optional fields:
|
||||
# apiKey: myapikey # String: API key for the explorer (optional)
|
||||
# family: etherscan # ExplorerFamily: See ExplorerFamily for valid values
|
||||
nativeToken:
|
||||
name: cETH # String
|
||||
symbol: cETH # String
|
||||
decimals: 18 # Number
|
||||
displayName: MEV Commit Settlement
|
||||
displayNameShort: MEV Commit Settlement
|
||||
logoURI: https://mychain.com/logo.png
|
||||
blocks:
|
||||
confirmations: 12 # Number: Blocks to wait before considering a transaction confirmed
|
||||
reorgPeriod: 100 # Number: Blocks before a transaction has a near-zero chance of reverting
|
||||
estimateBlockTime: 1
|
||||
|
||||
# Partial override sepolia config for custom rpc
|
||||
sepolia:
|
||||
rpcUrls:
|
||||
- http: https://eth-sepolia.g.alchemy.com/v2/a0wg_g1X-Wz4IeVA-0SS3PsQhbyQNjc_
|
||||
|
|
@ -1,77 +0,0 @@
|
|||
#!/bin/sh
|
||||
set -exu
|
||||
|
||||
# Sleep to ensure chain is up
|
||||
sleep 10
|
||||
|
||||
if test -f /hyperlane-monorepo/artifacts/done; then
|
||||
echo "Deploy artifacts already exist. Skipping deployment."
|
||||
else
|
||||
echo "Deploying core contracts"
|
||||
# Define the expect script inline
|
||||
/usr/bin/expect <<EOF
|
||||
set timeout -1
|
||||
spawn hyperlane deploy core \
|
||||
--yes \
|
||||
--targets sepolia,mevcommitsettlement \
|
||||
--chains /chain-config.yml \
|
||||
--ism /multisig-ism.yml \
|
||||
--out "/hyperlane-monorepo/artifacts" \
|
||||
--key $HYPERLANE_DEPLOYER_PRIVATE_KEY
|
||||
expect {
|
||||
"*low balance on*" {
|
||||
send -- "Y\r"
|
||||
exp_continue
|
||||
}
|
||||
eof
|
||||
}
|
||||
EOF
|
||||
|
||||
# Standardize artifact names
|
||||
for file in /hyperlane-monorepo/artifacts/agent-config-*.json; do
|
||||
mv "$file" "/hyperlane-monorepo/artifacts/agent-config.json"
|
||||
done
|
||||
for file in /hyperlane-monorepo/artifacts/core-deployment-*.json; do
|
||||
mv "$file" "/hyperlane-monorepo/artifacts/core-deployment.json"
|
||||
done
|
||||
|
||||
# Signal done
|
||||
touch /hyperlane-monorepo/artifacts/done
|
||||
fi
|
||||
|
||||
if test -f artifacts/done-warp-route; then
|
||||
echo "Warp route already deployed. Skipping."
|
||||
else
|
||||
echo "Deploying warp route"
|
||||
# Define the expect script inline
|
||||
/usr/bin/expect <<EOF
|
||||
set timeout -1
|
||||
spawn hyperlane deploy warp \
|
||||
--yes \
|
||||
--key $HYPERLANE_DEPLOYER_PRIVATE_KEY \
|
||||
--chains /chain-config.yml \
|
||||
--config /warp-tokens.yml \
|
||||
--core /hyperlane-monorepo/artifacts/core-deployment.json
|
||||
expect {
|
||||
"*low balance on*" {
|
||||
send -- "Y\r"
|
||||
exp_continue
|
||||
}
|
||||
eof
|
||||
}
|
||||
EOF
|
||||
|
||||
# Standardize artifact names
|
||||
for file in /hyperlane-monorepo/artifacts/warp-deployment-*.json; do
|
||||
mv "$file" "/hyperlane-monorepo/artifacts/warp-deployment.json"
|
||||
done
|
||||
for file in /hyperlane-monorepo/artifacts/warp-ui-token-config-*.json; do
|
||||
mv "$file" "/hyperlane-monorepo/artifacts/warp-ui-token-config.json"
|
||||
done
|
||||
|
||||
# Signal done
|
||||
touch artifacts/done-warp-route
|
||||
fi
|
||||
|
||||
# Sleep to allow deployer health check (polled every 5sec) to pass
|
||||
sleep 10
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
---
|
||||
mevcommitsettlement:
|
||||
threshold: 2
|
||||
validators:
|
||||
- '0xd9cd8E5DE6d55f796D980B818D350C0746C25b97'
|
||||
- '0x788EBABe5c3dD422Ef92Ca6714A69e2eabcE1Ee4'
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
base:
|
||||
chainName: sepolia
|
||||
type: native
|
||||
synthetics:
|
||||
- chainName: mevcommitsettlement
|
||||
# name: "Commit ETH"
|
||||
# symbol: "cETH"
|
||||
# totalSupply: 10000000
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
ARG AGENT_BASE_IMAGE
|
||||
ARG SETTLEMENT_RPC_URL
|
||||
FROM ${AGENT_BASE_IMAGE}
|
||||
|
||||
# Relayer config, see:
|
||||
# - https://docs.hyperlane.xyz/docs/operators/relayers/setup
|
||||
# - https://docs.hyperlane.xyz/docs/operators/agent-configuration#config-layers
|
||||
|
||||
ENV CONFIG_FILES="/deploy-artifacts/agent-config.json"
|
||||
|
||||
# TODO: enforce minimum gas payment in prod
|
||||
|
||||
CMD ./relayer \
|
||||
--relayChains mevcommitsettlement,sepolia \
|
||||
--chains.mevcommitsettlement.connection.url ${SETTLEMENT_RPC_URL} \
|
||||
--chains.sepolia.connection.url "https://eth-sepolia.g.alchemy.com/v2/a0wg_g1X-Wz4IeVA-0SS3PsQhbyQNjc_" \
|
||||
--db /relayer-db \
|
||||
--defaultSigner.key $RELAYER_PRIVATE_KEY \
|
||||
--allowLocalCheckpointSyncers true \
|
||||
--gasPaymentEnforcement '[{"type": "none"}]'
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
ARG AGENT_BASE_IMAGE
|
||||
ARG SETTLEMENT_RPC_URL
|
||||
FROM ${AGENT_BASE_IMAGE}
|
||||
|
||||
# Validator config, see:
|
||||
# - https://docs.hyperlane.xyz/docs/operators/validators/setup
|
||||
# - https://docs.hyperlane.xyz/docs/operators/agent-configuration#config-layers
|
||||
|
||||
ENV CONFIG_FILES="/deploy-artifacts/agent-config.json"
|
||||
|
||||
ENV HYP_BASE_REORGPERIOD=20
|
||||
ENV HYP_BASE_ORIGINCHAINNAME="mevcommitsettlement"
|
||||
ENV HYP_BASE_CHAINS_MEVCOMMITSETTLEMENT_CONNECTION_URL=${SETTLEMENT_RPC_URL}
|
||||
ENV HYP_BASE_DB="/val-db"
|
||||
ENV HYP_CHECKPOINTSYNCER_TYPE="localStorage"
|
||||
ENV HYP_ORIGINCHAINNAME="mevcommitsettlement"
|
||||
Loading…
Reference in a new issue