Skip to content

Commit

Permalink
Merge pull request #10 from primevprotocol/hyperlane-v3.3
Browse files Browse the repository at this point in the history
Hyperlane v3.3
  • Loading branch information
shaspitz authored Dec 19, 2023
2 parents 17ed890 + b3a6ec6 commit 7754f7e
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 35 deletions.
13 changes: 6 additions & 7 deletions geth-poa/Makefile
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
# Prod targets reg the amd agent image for this commit:
# https://github.com/hyperlane-xyz/hyperlane-monorepo/commit/69850642365251e16b9f23b87d6caf187036b3ee
up-prod:
@if [ ! -f .env ]; then echo "Error: .env file not found. Please populate the .env file before running this command."; exit 1; fi
AGENT_BASE_IMAGE=gcr.io/abacus-labs-dev/hyperlane-agent@sha256:854f92966eac6b49e5132e152cc58168ecdddc76c2d390e657b81bdaf1396af0 L2_NODE_URL=http://34.215.163.180:8545 docker compose --profile settlement --profile bridge --profile prod_agents up -d
AGENT_BASE_IMAGE=gcr.io/abacus-labs-dev/hyperlane-agent:a888cf7-20231214-180118 L2_NODE_URL=http://34.215.163.180:8545 docker compose --profile settlement --profile bridge --profile prod_agents up -d

up-prod-build:
@if [ ! -f .env ]; then echo "Error: .env file not found. Please populate the .env file before running this command."; exit 1; fi
AGENT_BASE_IMAGE=gcr.io/abacus-labs-dev/hyperlane-agent@sha256:854f92966eac6b49e5132e152cc58168ecdddc76c2d390e657b81bdaf1396af0 L2_NODE_URL=http://34.215.163.180:8545 docker compose --profile settlement --profile bridge --profile prod_agents up -d --build
AGENT_BASE_IMAGE=gcr.io/abacus-labs-dev/hyperlane-agent:a888cf7-20231214-180118 L2_NODE_URL=http://34.215.163.180:8545 docker compose --profile settlement --profile bridge --profile prod_agents up -d --build

up-prod-settlement:
@if [ ! -f .env ]; then echo "Error: .env file not found. Please populate the .env file before running this command."; exit 1; fi
AGENT_BASE_IMAGE=nil L2_NODE_URL=nil docker compose --profile settlement up -d --build

# Building agent image from source can be done from hyperlane-monorepo/rust/build.sh
up-dev:
@if [ ! -f .env ]; then echo "Error: .env file not found. Please populate the .env file before running this command."; exit 1; fi
AGENT_BASE_IMAGE=shaspitz/hyperlane-agent-mac:6985064 L2_NODE_URL=http://localhost:8545 docker compose --profile settlement --profile bridge up -d
AGENT_BASE_IMAGE=shaspitz/hyperlane-agent:v3.3-patch-mac L2_NODE_URL=http://localhost:8545 docker compose --profile settlement --profile bridge up -d

up-dev-build:
@if [ ! -f .env ]; then echo "Error: .env file not found. Please populate the .env file before running this command."; exit 1; fi
AGENT_BASE_IMAGE=shaspitz/hyperlane-agent-mac:6985064 L2_NODE_URL=http://localhost:8545 docker compose --profile settlement --profile bridge up -d --build
AGENT_BASE_IMAGE=shaspitz/hyperlane-agent:v3.3-patch-mac L2_NODE_URL=http://localhost:8545 docker compose --profile settlement --profile bridge up -d --build

up-dev-settlement:
@if [ ! -f .env ]; then echo "Error: .env file not found. Please populate the .env file before running this command."; exit 1; fi
AGENT_BASE_IMAGE=shaspitz/hyperlane-agent-mac:6985064 L2_NODE_URL=http://localhost:8545 docker compose --profile settlement up -d --build
AGENT_BASE_IMAGE=shaspitz/hyperlane-agent:v3.3-patch-mac L2_NODE_URL=http://localhost:8545 docker compose --profile settlement up -d --build

down:
AGENT_BASE_IMAGE=nil L2_NODE_URL=nil docker compose --profile settlement --profile bridge --profile prod_agents down
Expand Down
8 changes: 5 additions & 3 deletions geth-poa/hyperlane-deployer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ FROM alpine:latest
RUN apk update && apk add --no-cache git yarn expect

WORKDIR /

# Hyperlane 3.3 release w/ https://github.com/hyperlane-xyz/hyperlane-monorepo/pull/3063 cherry-picked in.
# See https://github.com/hyperlane-xyz/hyperlane-monorepo/compare/%40hyperlane-xyz/sdk%403.3.0...primevprotocol:hyperlane-monorepo:v3.3
RUN git clone https://github.com/primevprotocol/hyperlane-monorepo.git
WORKDIR /hyperlane-monorepo
# RUN git checkout v3-audit-remediations
RUN git checkout ca301c80861701e17b13b9a06454795b317696b2
# TODO: checkout stable version, seemed like v3-audit-remediations changed build process
RUN git checkout b1c4064272af7f3382391e9f7c4ce67ac1b84976

RUN yarn install
RUN yarn build

Expand Down
22 changes: 2 additions & 20 deletions geth-poa/hyperlane-deployer/chain-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,7 @@ mevcommitsettlement:
reorgPeriod: 100 # Number: Blocks before a transaction has a near-zero chance of reverting
estimateBlockTime: 1

# Partial override sepolia config for custom rpc
sepolia:
chainId: 11155111
domainId: 11155111
name: sepolia
protocol: ethereum
displayName: Sepolia
nativeToken:
name: Ether
symbol: ETH
decimals: 18
rpcUrls:
- http: https://eth-sepolia.g.alchemy.com/v2/a0wg_g1X-Wz4IeVA-0SS3PsQhbyQNjc_
blockExplorers:
- name: Etherscan
url: https://sepolia.etherscan.io
apiUrl: https://api-sepolia.etherscan.io/api
family: etherscan
blocks:
confirmations: 1
reorgPeriod: 2
estimateBlockTime: 13
isTestnet: true
- http: https://1rpc.io/sepolia
6 changes: 1 addition & 5 deletions geth-poa/hyperlane-deployer/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,8 @@ else
--out "/hyperlane-monorepo/artifacts" \
--key $CONTRACT_DEPLOYER_PRIVATE_KEY
expect {
"? Do you want use some existing contract addresses? (Y/n)" {
send -- "n\r"
exp_continue
}
"*low balance on*" {
send -- "y\r"
send -- "Y\r"
exp_continue
}
eof
Expand Down
8 changes: 8 additions & 0 deletions geth-poa/hyperlane-deployer/multisig-ism.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,11 @@ mevcommitsettlement:
validators:
- '0xd9cd8E5DE6d55f796D980B818D350C0746C25b97'
- '0x788EBABe5c3dD422Ef92Ca6714A69e2eabcE1Ee4'

# See https://github.com/primevprotocol/hyperlane-monorepo/blob/7b2ffc2fa6b5e179f8e870089b5e635b7e49acf8/typescript/sdk/src/consts/multisigIsm.ts#L267
sepolia:
threshold: 2
validators:
- '0xb22b65f202558adf86a8bb2847b76ae1036686a5'
- '0x469f0940684d147defc44f3647146cb90dd0bc8e'
- '0xd3c75dcf15056012a4d74c483a0c6ea11d8c2b83'

0 comments on commit 7754f7e

Please sign in to comment.