Skip to content
This repository has been archived by the owner on Dec 5, 2021. It is now read-only.

Commit

Permalink
Merge conflics resolve (#110)
Browse files Browse the repository at this point in the history
* wip

* gethl2

* wip

* batch submitter

* core utils

* DTL

* message relayer

* contracts

* wip

* Update service.ts

* DTL

* messaage-relayer

* Update yarn.lock

* final 5 files
  • Loading branch information
CAPtheorem committed Jun 23, 2021
1 parent 4844ee6 commit 71f64d0
Show file tree
Hide file tree
Showing 48 changed files with 1,866 additions and 1,222 deletions.
72 changes: 36 additions & 36 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,18 @@ jobs:
run: docker-compose run integration_tests

# Examples Tests
- name: Test & deploy hardhat-example on Ethereum (regression)
working-directory: ./examples/hardhat
run: |
yarn
yarn deploy
yarn test:integration
- name: Test & deploy hardhat-example on Optimistic Ethereum
working-directory: ./examples/hardhat
run: |
yarn deploy:ovm
yarn test:integration:ovm
# - name: Test & deploy hardhat-example on Ethereum (regression)
# working-directory: ./examples/hardhat
# run: |
# yarn
# yarn deploy
# yarn test:integration

# - name: Test & deploy hardhat-example on Optimistic Ethereum
# working-directory: ./examples/hardhat
# run: |
# yarn deploy:ovm
# yarn test:integration:ovm

- name: Test & deploy waffle-example on Ethereum (regression)
working-directory: ./examples/waffle
Expand Down Expand Up @@ -86,28 +86,28 @@ jobs:
yarn test:integration:ovm
yarn deploy:ovm
- name: Test l1-l2-deposit-withdrawal example on Optimistic Ethereum with cross-domain message passing
working-directory: ./examples/l1-l2-deposit-withdrawal
run: |
yarn
yarn compile
yarn compile:ovm
yarn test:integration:ovm
# - name: Test l1-l2-deposit-withdrawal example on Optimistic Ethereum with cross-domain message passing
# working-directory: ./examples/l1-l2-deposit-withdrawal
# run: |
# yarn
# yarn compile
# yarn compile:ovm
# yarn test:integration:ovm

- name: Collect docker logs on failure
if: failure()
uses: jwalton/gh-docker-logs@v1
with:
images: 'ethereumoptimism/builder,ethereumoptimism/hardhat,ethereumoptimism/deployer,ethereumoptimism/data-transport-layer,ethereumoptimism/l2geth,ethereumoptimism/message-relayer,ethereumoptimism/batch-submitter,ethereumoptimism/l2geth,ethereumoptimism/integration-tests'
dest: './logs'

# - name: Collect docker logs on failure
# if: failure()
# uses: jwalton/gh-docker-logs@v1
# with:
# images: 'ethereumoptimism/builder,ethereumoptimism/hardhat,ethereumoptimism/deployer,ethereumoptimism/data-transport-layer,ethereumoptimism/l2geth,ethereumoptimism/message-relayer,ethereumoptimism/batch-submitter,ethereumoptimism/l2geth,ethereumoptimism/integration-tests'
# dest: './logs'

# - name: Tar logs
# if: failure()
# run: tar cvzf ./logs.tgz ./logs

# - name: Upload logs to GitHub
# if: failure()
# uses: actions/upload-artifact@master
# with:
# name: logs.tgz
# path: ./logs.tgz
- name: Tar logs
if: failure()
run: tar cvzf ./logs.tgz ./logs

- name: Upload logs to GitHub
if: failure()
uses: actions/upload-artifact@master
with:
name: logs.tgz
path: ./logs.tgz
29 changes: 16 additions & 13 deletions .github/workflows/publish-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
message-relayer: ${{ steps.packages.outputs.message-relayer }}
data-transport-layer: ${{ steps.packages.outputs.data-transport-layer }}
contracts: ${{ steps.packages.outputs.contracts }}
canary-docker-tag: ${{ steps.docker-image-name.outputs.canary-docker-tag }}

steps:
- name: Check out source code
Expand Down Expand Up @@ -72,9 +73,9 @@ jobs:
node ops/scripts/ci-versions.js ${{ toJSON(steps.changesets.outputs.publishedPackages) }}
- name: Docker Image Name
id: docker_image_name
id: docker-image-name
run: |
if [ -z "${CUSTOM_IMAGE_NAME}" ]
if [ ${CUSTOM_IMAGE_NAME} == '' ]
then
echo "::set-output name=canary-docker-tag::${GITHUB_SHA::8}"
else
Expand All @@ -89,7 +90,7 @@ jobs:
# while also allowing for parallelization (i.e. `l2geth` not depending on `builder`)
# and all jobs executing in parallel once `builder` is built
l2geth:
name: Publish L2Geth Version ${{ needs.canary-publish.outputs.l2geth }}
name: Publish L2Geth Version ${{ needs.canary-publish.outputs.canary-docker-tag }}
needs: canary-publish
if: needs.canary-publish.outputs.l2geth != ''
runs-on: ubuntu-latest
Expand All @@ -112,7 +113,7 @@ jobs:
context: .
file: ./ops/docker/Dockerfile.geth
push: true
tags: ethereumoptimism/l2geth:${{ steps.docker_image_name.outputs.canary-docker-tag }}
tags: ethereumoptimism/l2geth:${{ needs.canary-publish.outputs.canary-docker-tag }}

# pushes the base builder image to dockerhub
builder:
Expand All @@ -127,6 +128,8 @@ jobs:
data-transport-layer: ${{ needs.canary-publish.outputs.data-transport-layer }}
contracts: ${{ needs.canary-publish.outputs.contracts }}
integration-tests: ${{ needs.canary-publish.outputs.integration-tests }}
canary-docker-tag: ${{ needs.canary-publish.outputs.canary-docker-tag }}


steps:
- name: Checkout
Expand All @@ -149,7 +152,7 @@ jobs:
tags: ethereumoptimism/builder

message-relayer:
name: Publish Message Relayer Version ${{ needs.builder.outputs.message-relayer }}
name: Publish Message Relayer Version ${{ needs.builder.outputs.canary-docker-tag }}
needs: builder
if: needs.builder.outputs.message-relayer != ''
runs-on: ubuntu-latest
Expand All @@ -172,10 +175,10 @@ jobs:
context: .
file: ./ops/docker/Dockerfile.message-relayer
push: true
tags: ethereumoptimism/message-relayer:${{ steps.docker_image_name.outputs.canary-docker-tag }}
tags: ethereumoptimism/message-relayer:${{ needs.builder.outputs.canary-docker-tag }}

batch-submitter:
name: Publish Batch Submitter Version ${{ needs.builder.outputs.batch-submitter }}
name: Publish Batch Submitter Version ${{ needs.builder.outputs.canary-docker-tag }}
needs: builder
if: needs.builder.outputs.batch-submitter != ''
runs-on: ubuntu-latest
Expand All @@ -198,10 +201,10 @@ jobs:
context: .
file: ./ops/docker/Dockerfile.batch-submitter
push: true
tags: ethereumoptimism/batch-submitter:${{ steps.docker_image_name.outputs.canary-docker-tag }}
tags: ethereumoptimism/batch-submitter:${{ needs.builder.outputs.canary-docker-tag }}

data-transport-layer:
name: Publish Data Transport Layer Version ${{ needs.builder.outputs.data-transport-layer }}
name: Publish Data Transport Layer Version ${{ needs.builder.outputs.canary-docker-tag }}
needs: builder
if: needs.builder.outputs.data-transport-layer != ''
runs-on: ubuntu-latest
Expand All @@ -224,10 +227,10 @@ jobs:
context: .
file: ./ops/docker/Dockerfile.data-transport-layer
push: true
tags: ethereumoptimism/data-transport-layer:${{ steps.docker_image_name.outputs.canary-docker-tag }}
tags: ethereumoptimism/data-transport-layer:${{ needs.builder.outputs.canary-docker-tag }}

contracts:
name: Publish Deployer Version ${{ needs.builder.outputs.contracts }}
name: Publish Deployer Version ${{ needs.builder.outputs.canary-docker-tag }}
needs: builder
if: needs.builder.outputs.contracts != ''
runs-on: ubuntu-latest
Expand All @@ -250,7 +253,7 @@ jobs:
context: .
file: ./ops/docker/Dockerfile.deployer
push: true
tags: ethereumoptimism/deployer:${{ steps.docker_image_name.outputs.canary-docker-tag }}
tags: ethereumoptimism/deployer:${{ needs.builder.outputs.canary-docker-tag }}

integration_tests:
name: Publish Integration tests ${{ needs.builder.outputs.integration-tests }}
Expand All @@ -276,4 +279,4 @@ jobs:
context: .
file: ./ops/docker/Dockerfile.integration-tests
push: true
tags: ethereumoptimism/integration-tests:${{ steps.docker_image_name.outputs.canary-docker-tag }}
tags: ethereumoptimism/integration-tests:${{ needs.builder.outputs.canary-docker-tag }}
44 changes: 19 additions & 25 deletions .github/workflows/sync-tests.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
name: sync-tests

on:
push:
branches:
- 'master'
- 'develop'
- 'regenesis/*'
pull_request:
workflow_dispatch:
on: workflow_dispatch

jobs:
integration-sync-test:
Expand Down Expand Up @@ -41,22 +34,23 @@ jobs:
working-directory: ./integration-tests
run: |
yarn
yarn build:integration
yarn test:sync
# - name: Collect docker logs on failure
# if: failure()
# uses: jwalton/gh-docker-logs@v1
# with:
# images: 'ethereumoptimism/builder,ethereumoptimism/hardhat,ethereumoptimism/deployer,ethereumoptimism/data-transport-layer,ethereumoptimism/l2geth,ethereumoptimism/message-relayer,ethereumoptimism/batch-submitter,ethereumoptimism/l2geth'
# dest: './logs'

# - name: Tar logs
# if: failure()
# run: tar cvzf ./logs.tgz ./logs

# - name: Upload logs to GitHub
# if: failure()
# uses: actions/upload-artifact@master
# with:
# name: logs.tgz
# path: ./logs.tgz
- name: Collect docker logs on failure
if: failure()
uses: jwalton/gh-docker-logs@v1
with:
images: 'ethereumoptimism/builder,ethereumoptimism/hardhat,ethereumoptimism/deployer,ethereumoptimism/data-transport-layer,ethereumoptimism/l2geth,ethereumoptimism/message-relayer,ethereumoptimism/batch-submitter,ethereumoptimism/l2geth'
dest: './logs'

- name: Tar logs
if: failure()
run: tar cvzf ./logs.tgz ./logs

- name: Upload logs to GitHub
if: failure()
uses: actions/upload-artifact@master
with:
name: logs.tgz
path: ./logs.tgz
10 changes: 1 addition & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,8 @@ packages/contracts/hardhat*

packages/data-transport-layer/db

packages/omgx/wallet/wallet/build

# vim
*.swp

.env
env.js
env.yml
env.js

.serverless
packages/omgx/wallet/deployment/local/addresses.json
packages/omgx/wallet/wallet/src/deployment/local/addresses.json
*.log
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,49 @@ yarn build:integration
yarn test:integration
```

## Branching Model and Releases

<!-- TODO: explain about changesets + how we do npm publishing + docker publishing -->

### Active Branches

| Branch | Status |
| --------------- | -------------------------------------------------------------------------------- |
| [master](https://github.com/ethereum-optimism/optimism/tree/master/) | Accepts PRs from `develop` when we intend to deploy to mainnet. |
| [develop](https://github.com/ethereum-optimism/optimism/tree/develop/) | Accepts PRs that are compatible with `master` OR from `regenesis/X.X.X` branches. |
| regenesis/X.X.X | Accepts PRs for all changes, particularly those not backwards compatible with `develop` and `master`. |

### Overview

We generally follow [this Git branching model](https://nvie.com/posts/a-successful-git-branching-model/).
Please read the linked post if you're planning to make frequent PRs into this repository (e.g., people working at/with Optimism).

### The `master` branch

The `master` branch contains the code for our latest "stable" releases.
Updates from `master` always come from the `develop` branch.
We only ever update the `master` branch when we intend to deploy code within the `develop` to the Optimistic Ethereum mainnet.
Our update process takes the form of a PR merging the `develop` branch into the `master` branch.

### The `develop` branch

Our primary development branch is [`develop`](https://github.com/ethereum-optimism/optimism/tree/develop/).
`develop` contains the most up-to-date software that remains backwards compatible with our latest experimental [network deployments](https://community.optimism.io/docs/developers/networks.html).
If you're making a backwards compatible change, please direct your pull request towards `develop`.

**Changes to contracts within `packages/contracts/contracts/optimistic-ethereum` are usually NOT considered backwards compatible and SHOULD be made against a release candidate branch**.
Some exceptions to this rule exist for cases in which we absolutely must deploy some new contract after a release candidate branch has already been fully deployed.
If you're changing or adding a contract and you're unsure about which branch to make a PR into, default to using the latest release candidate branch.
See below for info about release candidate branches.

### Release candidate branches

Branches marked `regenesis/X.X.X` are **release candidate branches**.
Changes that are not backwards compatible and all changes to contracts within `packages/contracts/contracts/optimistic-ethereum` MUST be directed towards a release candidate branch.
Release candidates are merged into `develop` and then into `master` once they've been fully deployed.
We may sometimes have more than one active `regenesis/X.X.X` branch if we're in the middle of a deployment.
See table in the **Active Branches** section above to find the right branch to target.

## Additional Reference Material
### Running contract static analysis

Expand Down
22 changes: 22 additions & 0 deletions integration-tests/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# @eth-optimism/integration-tests

## 0.1.1

### Patch Changes

- 40b99a6e: Add new RPC endpoint `rollup_gasPrices`

## 0.1.0

### Minor Changes

- e04de624: Add support for ovmCALL with nonzero ETH value

### Patch Changes

- 25f09abd: Adds ERC1271 support to default contract account
- 5fc728da: Add a new Standard Token Bridge, to handle deposits and withdrawals of any ERC20 token.
For projects developing a custom bridge, if you were previously importing `iAbs_BaseCrossDomainMessenger`, you should now
import `iOVM_CrossDomainMessenger`.
- c43b33ec: Add WETH9 compatible deposit and withdraw functions to OVM_ETH
- e045f582: Adds new SequencerFeeVault contract to store generated fees
- b8e2d685: Add replica sync test to integration tests; handle 0 L2 blocks in DTL

## 0.0.7

### Patch Changes
Expand Down
6 changes: 3 additions & 3 deletions integration-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eth-optimism/integration-tests",
"version": "0.0.7",
"version": "0.1.1",
"description": "[Optimism] Integration Tests",
"private": true,
"author": "Optimism PBC",
Expand All @@ -17,8 +17,8 @@
"clean": "rimraf cache artifacts artifacts-ovm cache-ovm"
},
"devDependencies": {
"@eth-optimism/contracts": "^0.3.5",
"@eth-optimism/core-utils": "^0.4.5",
"@eth-optimism/contracts": "^0.4.1",
"@eth-optimism/core-utils": "^0.4.6",
"@eth-optimism/hardhat-ovm": "^0.2.2",
"@ethersproject/providers": "^5.0.24",
"@nomiclabs/hardhat-ethers": "^2.0.2",
Expand Down
Loading

0 comments on commit 71f64d0

Please sign in to comment.