Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

[issue-172] Version pinned devnet allocations #175

Merged
merged 24 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
eafed1e
[epociask/issue-172-version-pinned-devnet-allocs] Version pinned .dev…
Oct 19, 2023
c0fe4cb
[epociask/issue-172-version-pinned-devnet-allocs] Update go.sum
Oct 19, 2023
2f07803
[epociask/issue-172-version-pinned-devnet-allocs] Changed submodule i…
Oct 19, 2023
b4db43d
Merge branch 'master' of https://github.com/base-org/pessimism into e…
Nov 2, 2023
eea6122
[epociask/issue-172-version-pinned-devnet-allocs] Rm unecessary files…
Nov 2, 2023
b53289b
[epociask/issue-172-version-pinned-devnet-allocs] move foundry instal…
Nov 2, 2023
20bcc40
[epociask/issue-172-version-pinned-devnet-allocs] moved job location
Nov 2, 2023
8908d1d
Merge branch 'master' of https://github.com/base-org/pessimism into e…
Nov 2, 2023
0cedb30
[epociask/issue-172-version-pinned-devnet-allocs] updated submodule cmd
Nov 2, 2023
fe234cc
[epociask/issue-172-version-pinned-devnet-allocs] Add checkout step
Nov 2, 2023
9964306
[epociask/issue-172-version-pinned-devnet-allocs] testing in CI
Nov 2, 2023
3b95002
[epociask/issue-172-version-pinned-devnet-allocs] added go setup step
Nov 2, 2023
8c7ee7a
[epociask/issue-172-version-pinned-devnet-allocs] Adding geth install…
Nov 2, 2023
f8fb01f
[epociask/issue-172-version-pinned-devnet-allocs] changed status hand…
Nov 3, 2023
6328f7b
[epociask/issue-172-version-pinned-devnet-allocs] testing alt submodu…
Nov 3, 2023
651bf7e
[epociask/issue-172-version-pinned-devnet-allocs] checkout branch vs.…
Nov 3, 2023
2fbc0ad
[epociask/issue-172-version-pinned-devnet-allocs] update allocations
Nov 3, 2023
6392556
[epociask/issue-172-version-pinned-devnet-allocs] Update generation
Nov 3, 2023
ab235a8
[epociask/issue-172-version-pinned-devnet-allocs] Update generation
Nov 3, 2023
3be7fe2
[epociask/issue-172-version-pinned-devnet-allocs] add readme.md comment
Nov 3, 2023
5b7d187
[epociask/issue-172-version-pinned-devnet-allocs] fix .devnet cmd
Nov 3, 2023
2e6d966
[epociask/issue-172-version-pinned-devnet-allocs] Add devnet generati…
Nov 3, 2023
8ef17c9
fixed untracked files
Nov 3, 2023
1b3a155
[epociask/issue-172-version-pinned-devnet-allocs] Clean up script
Nov 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .DS_Store
Binary file not shown.
28 changes: 0 additions & 28 deletions .devnet/addresses.json

This file was deleted.

466 changes: 0 additions & 466 deletions .devnet/allocs-l1.json

This file was deleted.

53 changes: 0 additions & 53 deletions .devnet/devnetL1.json

This file was deleted.

32 changes: 0 additions & 32 deletions .github/scripts/comment.js

This file was deleted.

33 changes: 4 additions & 29 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,29 +42,6 @@ jobs:
run: |
go test -v -coverprofile=coverage.out ./internal/...

# - name: Generate Coverage
# run: |
# go tool cover -func=coverage.out | grep total | awk '{print $3}' >> out.txt
# echo "::set-output name=coverage::$(cat out.txt)"

# - name: Find Coverage Comment
# uses: peter-evans/find-comment@v1
# id: fc
# with:
# issue-number: ${{ github.event.pull_request.number }}
# comment-author: 'github-actions[bot]'
# body-includes: '### Current Test Coverage'

# - name: Add Coverage Comment
# uses: actions/github-script@v6
# env:
# DATA: ${{ steps.fc.outputs.comment-id }}

# with:
# script: |
# const script = require('./.github/scripts/comment.js')
# await script({github, context, core})

e2e-test:
runs-on: larger-runner
steps:
Expand All @@ -75,13 +52,11 @@ jobs:
with:
go-version: 1.21

# - name: Install foundry
# uses: foundry-rs/foundry-toolchain@v1
- name: Install foundry
uses: foundry-rs/foundry-toolchain@v1

# - name: Setup devnet Resources
# id: devnet
# run: |
# make devnet-allocs
- name: Generate devnet allocations
run: make devnet-allocs

- name: Run E2E Integration Tests
run: make e2e-test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ config.env
/.idea
genesis.json
alert-routing.yaml
/.devnet/
packages/contracts-bedrock/deploy-config/devnetL1.json
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Unit tests can run using the following project level command(s):

Integration tests are written that leverage the existing [op-e2e](https://github.com/ethereum-optimism/optimism/tree/develop/op-e2e) testing framework for spinning up pieces of the bedrock system. Additionally, the [httptest](https://pkg.go.dev/net/http/httptest) library is used to mock downstream alerting services (e.g. Slack's webhook API). These tests live in the project's `/e2e` directory.

Running integration tests requires generating devnet allocation files for compatibility with the Optimism monorepo. The following `scripts/devnet_allocs.sh` can be run to do this generation. If successful, a new `.devnet` directory will be created in the project's root directory.
Running integration tests requires generating devnet allocation files for compatibility with the Optimism monorepo. The following `scripts/devnet_allocs.sh` can be run to do this generation. If successful, a new `.devnet` directory will be created in the project's root directory. These allocations should only be regenerated when go.mod rebases to a new monorepo release.

Integration tests can run using the following project level command(s):

Expand Down
65 changes: 0 additions & 65 deletions mocks/alert_client.go

This file was deleted.

42 changes: 28 additions & 14 deletions scripts/devnet-allocs.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,32 @@
## Download and enter the OP monorepo
echo "Downloading Optimism monorepo..."
git clone https://github.com/ethereum-optimism/optimism.git
cd optimism
git checkout develop
#!/bin/bash

VERSION=$(cat go.mod | grep ethereum-optimism/optimism | awk '{print $2}' | sed 's/\/v//g')
VERSION=$(echo ${VERSION} | sed 's/v//g')

REPO_NAME=optimism-$(echo ${VERSION} | sed 's/v//g')

echo "Downloading ${REPO_NAME} ..."
git clone --branch v${VERSION} https://github.com/ethereum-optimism/optimism.git ${REPO_NAME}
cd ${REPO_NAME}

## Generate devnet allocations and persist them all into .devnet folder
echo "Initializing monorepo..."
make install-geth
git submodule update --init --recursive
make devnet-allocs
mv .devnet ../.devnet
make install-geth &&
git submodule update --init --recursive &&
make devnet-allocs &&
cp -R .devnet ../. &&
mv packages/contracts-bedrock/deploy-config/devnetL1.json ../.devnet/devnetL1.json

## Clean up
echo "Cleaning up..."
cd ../
rm -rf optimism
STATUS=$?

## Force cleanup of monorepo
echo "${STATUS} Cleaning up ${REPO_NAME} repo ..."
cd ../ &&
rm -rf ${REPO_NAME}

if [ $? -eq 0 ] ; then
echo "Successfully cleaned up ${REPO_NAME} repo"
exit ${STATUS}
else
echo "Failed to clean up ${REPO_NAME} repo"
exit ${STATUS}
fi