Skip to content

Commit

Permalink
feat: integrate L1 mock with services (#438)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrekucci authored Oct 30, 2024
1 parent b151c03 commit 882eeeb
Show file tree
Hide file tree
Showing 85 changed files with 5,020 additions and 3,139 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
timeout-minutes: 30
strategy:
matrix:
module: [ infrastructure/tools/keystore-generator, p2p/integrationtest/real-bidder, p2p/integrationtest/provider, bridge/standard/bridge-v1, external/geth, oracle, p2p]
module: [ infrastructure/tools/keystore-generator, p2p/integrationtest/real-bidder, p2p/integrationtest/provider, bridge/standard, external/geth, oracle, p2p]

steps:
- name: Checkout Code
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/infrastructure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ jobs:
CLUSTER_PROFILE_FLAG=$([ "${IS_MANUAL_DEPLOYMENT}" == "true" ] && echo "--profile ${{ github.event.inputs.profile }}" || echo "--profile ci")
CLUSTER_LOGS_FLAG=$([ "${{ github.event.inputs.logs }}" == "false" ] && echo "--no-logs-collection" || echo "")
CLUSTER_DATADOG_KEY_FLAG=$([ "${IS_MANUAL_DEPLOYMENT}" == "true" ] && echo "--datadog-key ${{ secrets.DATADOG_API_KEY }}" || echo "")
CLUSTER_L1_RPC_URL_FLAG="--l1-rpc-urls ${{ secrets.L1_RPC_URL }}"
CLUSTER_OTEL_COLLECTOR_ENDPOINT_URL_FLAG=$([ "${{ github.event.inputs.tracing }}" == "true" ] && echo "--otel-collector-endpoint-url grpc://${TARGET_MACHINE_IP}:4317" || echo "")
CLUSTER_DEBUG_FLAG=$([ "${{ github.event.inputs.debug }}" == "true" ] && echo "--debug" || echo "")
Expand All @@ -84,7 +83,6 @@ jobs:
echo "CLUSTER_PROFILE_FLAG=${CLUSTER_PROFILE_FLAG}" >> ${GITHUB_ENV}
echo "CLUSTER_LOGS_FLAG=${CLUSTER_LOGS_FLAG}" >> ${GITHUB_ENV}
echo "CLUSTER_DATADOG_KEY_FLAG=${CLUSTER_DATADOG_KEY_FLAG}" >> ${GITHUB_ENV}
echo "CLUSTER_L1_RPC_URL_FLAG=${CLUSTER_L1_RPC_URL_FLAG}" >> ${GITHUB_ENV}
echo "CLUSTER_OTEL_COLLECTOR_ENDPOINT_URL_FLAG=${CLUSTER_OTEL_COLLECTOR_ENDPOINT_URL_FLAG}" >> ${GITHUB_ENV}
echo "CLUSTER_DEBUG_FLAG=${CLUSTER_DEBUG_FLAG}" >> ${GITHUB_ENV}
Expand Down Expand Up @@ -215,7 +213,6 @@ jobs:
${CLUSTER_PROFILE_FLAG} \
${CLUSTER_LOGS_FLAG} \
${CLUSTER_DATADOG_KEY_FLAG} \
${CLUSTER_L1_RPC_URL_FLAG} \
${CLUSTER_OTEL_COLLECTOR_ENDPOINT_URL_FLAG} \
${CLUSTER_DEBUG_FLAG}
END_TIME="$(date +%s)"
Expand All @@ -227,14 +224,20 @@ jobs:
working-directory: testing
run: |
CONTRACTS_JSON=$(curl -s http://127.0.0.1:1010/contracts.json)
SECRETS_JSON=$(curl -s http://127.0.0.1:1111/secrets.json)
export MEV_COMMIT_TEST_L1_GATEWAY_CONTRACT_ADDR="$(echo $CONTRACTS_JSON | jq -r '.L1Gateway')"
export MEV_COMMIT_TEST_SETTLEMENT_GATEWAY_CONTRACT_ADDR="$(echo $CONTRACTS_JSON | jq -r '.SettlementGateway')"
export MEV_COMMIT_TEST_BRIDGE_KEYSTORE_JSON="$(echo $SECRETS_JSON | jq -r ".contract_deployer_keystore")"
export MEV_COMMIT_TEST_BRIDGE_KEYSTORE_NAME="$(echo $SECRETS_JSON | jq -r ".contract_deployer_keystore_filename")"
export MEV_COMMIT_TEST_BRIDGE_KEYSTORE_PASSWORD="$(echo $SECRETS_JSON | jq -r ".contract_deployer_keystore_password")"
export MEV_COMMIT_TEST_PROVIDER_REGISTRY_ADDRESS=$(echo $CONTRACTS_JSON | jq -r '.ProviderRegistry')
export MEV_COMMIT_TEST_BIDDER_REGISTRY_ADDRESS=$(echo $CONTRACTS_JSON | jq -r '.BidderRegistry')
export MEV_COMMIT_TEST_BLOCKTRACKER_CONTRACT_ADDRESS=$(echo $CONTRACTS_JSON | jq -r '.BlockTracker')
export MEV_COMMIT_TEST_PRECONF_CONTRACT_ADDRESS=$(echo $CONTRACTS_JSON | jq -r '.PreconfManager')
export MEV_COMMIT_TEST_ORACLE_CONTRACT_ADDRESS=$(echo $CONTRACTS_JSON | jq -r '.Oracle')
export MEV_COMMIT_TEST_L1_RPC_ENDPOINT="${{ secrets.L1_RPC_URL }}"
go build -ldflags="-s -w" -o mev-commit-test ./cmd/main.go
./mev-commit-test \
--l1-rpc-endpoint ws://127.0.0.1:9546 \
--settlement-rpc-endpoint ws://127.0.0.1:8546 \
--bootnode-rpc-urls 127.0.0.1:13524 \
--provider-rpc-urls 127.0.0.1:13624 \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/releaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
timeout-minutes: 60
strategy:
matrix:
module: [ bridge/standard/bridge-v1, external/geth, oracle, p2p ]
module: [ bridge/standard, external/geth, oracle, p2p ]

steps:
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
Expand Down
11 changes: 0 additions & 11 deletions bridge/README.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ builds:
ignore:
- goos: windows
goarch: arm64
dir: ./bridge/standard/bridge-v1
dir: ./bridge/standard
main: ./cmd/relayer
binary: relayer
- id: user_cli
Expand All @@ -33,9 +33,20 @@ builds:
ignore:
- goos: windows
goarch: arm64
dir: ./bridge/standard/bridge-v1
dir: ./bridge/standard
main: ./cmd/user_cli
binary: user-cli
- id: emulator
env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
- arm64
dir: ./bridge/standard
main: ./cmd/emulator
binary: emulator

archives:
- id: relayer
Expand Down Expand Up @@ -64,10 +75,6 @@ archives:
format_overrides:
- goos: windows
format: zip
files:
- src: ./bridge/standard/bridge-v1/deploy_contracts.sh
dst: ./
strip_parent: true
- id: user_cli
builds:
- user_cli
Expand All @@ -94,6 +101,29 @@ archives:
format_overrides:
- goos: windows
format: zip
- id: emulator
builds:
- emulator
format: tar.gz
name_template: >-
{{ .ProjectName }}-
{{- .Binary }}_
{{- with index .Env "RELEASE_VERSION" -}}
{{ . }}
{{- else -}}
{{- if .IsSnapshot }}{{ .ShortCommit }}
{{- else }}{{ .Version }}
{{- end }}
{{- end -}}
{{- with index .Env "DIRTY_SUFFIX" -}}
{{ . }}
{{- end -}}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}
{{- end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
checksum:
name_template: >-
Expand Down
13 changes: 0 additions & 13 deletions bridge/standard/bridge-v1/Dockerfile.emulator

This file was deleted.

15 changes: 0 additions & 15 deletions bridge/standard/bridge-v1/Dockerfile.relayer

This file was deleted.

13 changes: 0 additions & 13 deletions bridge/standard/bridge-v1/Dockerfile.user

This file was deleted.

31 changes: 0 additions & 31 deletions bridge/standard/bridge-v1/Makefile

This file was deleted.

116 changes: 0 additions & 116 deletions bridge/standard/bridge-v1/README.md

This file was deleted.

Loading

0 comments on commit 882eeeb

Please sign in to comment.