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

Commit

Permalink
Ethereum optimism develop (#39)
Browse files Browse the repository at this point in the history
* chore: reduce hardhat timeout to 20 seconds (ethereum-optimism#968)

* fix: force LF line endings for scripts to avoid docker problems on Windows (ethereum-optimism#974)

* fix: use correct line endings for windows

* chore: add changeset

* feat: add hardhat deploy instructions to readme (ethereum-optimism#965)

* feat: add deployment instructions to readme

* Add changeset

* fix style

* Update README.md

* feat: fees v2 (ethereum-optimism#976)

* l2 geth: new fee logic

* l2 geth: migrate to fees package

* core-utils: new fee scheme

* chore: add changeset

* l2geth: delete dead code

* integration-tests: fix typo

* integration-tests: fixes

* fees: use fee scalar

* lint: fix

* rollup: correct gas payment comparison

* fix(integration-tests): do not hardcode gas price

* core-utils: update with new scheme

* l2geth: refactor rollup oracle

* l2geth: clean up DoEstimateGas

* l2geth: implement latest scheme

* tests: fix up

* lint: fix

* l2geth: better sycn service test

* optimism: rename to TxGasLimit

* fee: fix docstring

* tests: fix

* variables: rename

* l2geth: prevent users from sending txs with too high of a fee

* integration-tests: fix import

* integration-tests: fix type

* integration-tests: fix gas limits

* lint: fix

* l2geth: log error

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* Add static analysis action (ethereum-optimism#848)

* Add static analysis github action
setup python and install slither

* Add nvmrc file for setting node to v14.17

* Update slither command run to link missing contract packages from monorepo root

* Add steps for installing dependencies

* Add yarn build step to github action

* Enable colour in github action for static analysis

* Disable certain detectors

* Ensure slither does not fail build

* Add instructions on running static analysis to monorepo readme

* build(deps): bump ws from 7.4.4 to 7.4.6 in /ops/docker/hardhat (ethereum-optimism#987)

Bumps [ws](https://github.com/websockets/ws) from 7.4.4 to 7.4.6.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](websockets/ws@7.4.4...7.4.6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build and publish latest images

* enable latest tag

* feat[message-relayer]: relay tx generator (ethereum-optimism#952)

* feat[message-relayer]: relay tx generator

* whoops, I burned our infura key

* fix minor bug

* add comments

* add more comments and clean stuff up

* add empty test descriptions

* add tests

* move smock to dev deps

* chore: add changeset

* minor cleanup to merkle tree proof function

* use bignumber math to avoid nested await

* use a better interface

* minor fixes and simplifications

* backwards compatible dtl syncing (ethereum-optimism#986)

* kovan: fix attempt

* kovan: db fix

* kovan: types are strings from db

* l2geth: parse things as strings

* chore: add changeset

* dtl: also stringify the range query

* geth: dereference

* geth: assign err

* dtl: handle null

* dtl: fix unit tests

* fix[smock]: fix broken call assertions for overloaded functions  (ethereum-optimism#996)

* fix[smock]: fix broken call assertions for overloaded functions

* chore: add changeset

* minor correction and add a test

* add a test for non-overloaded functions

* fix[message-relayer]: remove spreadsheet mode (ethereum-optimism#998)

* fix[message-relayer]: remove spreadsheet mode

* chore: add changeset

* Lower local rollup timestamp refresh (ethereum-optimism#985)

* update rollup timestamp refresh

* increase refresh time to 5s

* feat: fees v3 (ethereum-optimism#999)

* core-utils: fee impl v3

* l2geth: fees v3 impl

* integration-tests: update for fees v3

* chore: add changeset

* fix: typo

* integration-tests: fix and generalize

* fees: update fee scalar

* l2geth: check gas in the mempool behind usingovm

* tests: fix up

* l2geth: remove dead var

* truffle: fix config

* fix: remove dead coders (ethereum-optimism#1001)

* chore: delete dead coders

* chore: add changeset

* dtl: remove dead imports

* core-utils: delete dead tests

* batch-submitter: remove txtype

* chore: add changeset

* docs[message-relayer]: add a README and improve the interface for generating proofs (ethereum-optimism#1002)

* docs[message-relayer]: add basic docs and clean up an interface

* chore: add changeset

* dtl: log error stack for failed http request (ethereum-optimism#995)

* dtl: log error stack for failed http request

* chore: add changeset

* Add rpc-proxy service for whitelisting JSON RPC methods to the sequencer. (ethereum-optimism#945)

* Add healthcheck endpoint for rpc-proxy
Added ethereum-nginx-proxy source
updated README and docker image build

* Check ETH_CALLS_ALLOWED is set, clean up comments, remove old Dockerfile

* feat: deployment config for fee oracle contract (ethereum-optimism#936)

* feat[contracts]: add GasPriceOracle w/o predeploy

Based on ethereum-optimism#912

* feat[contracts]: congestion price oracle

* chore: add changeset

* contracts: gas price oracle (ethereum-optimism#917)

* contracts: gas price oracle

* tests: update

* fees: fix tests

* contracts: simplify gas price oracle

* lint: fix

* test: execution price is at the 1st storage slot

* chore: rename predeploy to GasPriceOracle

* chore: rename gas price oracle test name

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* Add an L2 deploy script for gas oracle contract

* Add a kovan deployment artifact

* Add deployment to readme

* Add extra validation & initial execution price

* Update README.md

* Fix execution price logic

* Perform new deployment with final contract

* contracts: better require in ovm gas price oracle

* Deploy L2GasPriceOracle

* Update contract to use new fee logic & rename to gas

* Deploy updated contract

* Fix lint

* gas price oracle: do not restrict gas price

* gas price oracle: new deployment

* tests: delete dead test

Co-authored-by: smartcontracts <kelvinfichter@gmail.com>
Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* ops: expose debug namespace (ethereum-optimism#1007)

Co-authored-by: Maurelian <maurelian@protonmail.ch>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>
Co-authored-by: Karl Floersch <karl@karlfloersch.com>
Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
Co-authored-by: Elena Gesheva <elena@arenabg.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kevin Ho <kevinjho1996@gmail.com>
Co-authored-by: Ben Wilson <82120899+optimisticben@users.noreply.github.com>
  • Loading branch information
10 people authored Jun 3, 2021
1 parent 1c1b03f commit 8b258f4
Show file tree
Hide file tree
Showing 69 changed files with 2,230 additions and 674 deletions.
5 changes: 5 additions & 0 deletions .changeset/cool-baboons-guess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@eth-optimism/smock': patch
---

Fixes a bug that would break call assertions for overloaded smocked functions
6 changes: 6 additions & 0 deletions .changeset/fair-maps-pretend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@eth-optimism/batch-submitter': patch
'@eth-optimism/data-transport-layer': patch
---

Remove dead imports from core-utils
5 changes: 5 additions & 0 deletions .changeset/great-shrimps-rule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@eth-optimism/message-relayer': patch
---

Adds a README and cleans up the interface for generating messages and proofs
6 changes: 6 additions & 0 deletions .changeset/nasty-dots-grow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@eth-optimism/l2geth': patch
'@eth-optimism/data-transport-layer': patch
---

Fix gasLimit overflow
5 changes: 5 additions & 0 deletions .changeset/seven-carpets-tell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@eth-optimism/contracts': patch
---

Introduces the congestion price oracle contract
5 changes: 5 additions & 0 deletions .changeset/sharp-files-knock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@eth-optimism/message-relayer': patch
---

Adds a new set of tools for generating messages to be relayed and their proofs
5 changes: 5 additions & 0 deletions .changeset/silent-masks-hunt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@eth-optimism/core-utils': patch
---

Delete dead transaction coders. These are no longer used now that RLP encoded transactions are used
5 changes: 5 additions & 0 deletions .changeset/slimy-rivers-promise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@eth-optimism/data-transport-layer': patch
---

Logs the error stacktrace for a failed HTTP request
7 changes: 7 additions & 0 deletions .changeset/smooth-ears-pay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@eth-optimism/integration-tests': patch
'@eth-optimism/l2geth': patch
'@eth-optimism/core-utils': patch
---

Implement the latest fee spec such that the L2 gas limit is scaled and the tx.gasPrice/tx.gasLimit show correctly in metamask
5 changes: 5 additions & 0 deletions .changeset/ten-spiders-boil.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@eth-optimism/message-relayer': patch
---

Removes spreadsheet mode from the message relayer
15 changes: 14 additions & 1 deletion .github/workflows/omgx-publish-develop.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
name: Publish Packages (omgx-develop)

push:

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

jobs:
develop-publish:
Expand Down Expand Up @@ -76,6 +87,8 @@ jobs:
file: ./ops/docker/Dockerfile.geth
push: true
tags: omgx/l2geth:develop
flavor: |
latest=true
# pushes the base builder image to dockerhub
builder:
Expand Down
261 changes: 261 additions & 0 deletions .github/workflows/publish-develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,261 @@
name: Publish Packages (develop)

# Triggers the workflow on push or pull request events
on: [push, pull_request]

jobs:
develop-publish:
name: Publish Packages (develop)
runs-on: ubuntu-latest
# map the step outputs to job outputs
outputs:
builder: ${{ steps.packages.outputs.builder }}
l2geth: ${{ steps.packages.outputs.l2geth }}
batch-submitter: ${{ steps.packages.outputs.batch-submitter }}
message-relayer: ${{ steps.packages.outputs.message-relayer }}
data-transport-layer: ${{ steps.packages.outputs.data-transport-layer }}
contracts: ${{ steps.packages.outputs.contracts }}

steps:
- name: Check out source code
uses: actions/checkout@v2
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: Setup Node.js 12.x
uses: actions/setup-node@master
with:
node-version: 12.x

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies
run: yarn

- name: Build
run: yarn build

- name: Setup Canary Snapshot
run: yarn changeset version --snapshot

- name: Publish To NPM
uses: changesets/action@master
id: changesets
with:
publish: yarn changeset publish --tag canary
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

# Conditional on the release being executed, we unbundle the publishedPackages to specific
# job outputs
- name: Get version tags from each published version
id: packages
run: |
node ops/scripts/ci-versions.js ${{ toJSON(steps.changesets.outputs.publishedPackages) }}
# The below code is duplicated, would be ideal if we could use a matrix with a
# key/value being dynamically generated from the `publishedPackages` output
# 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.develop-publish.outputs.l2geth }}
needs: develop-publish
if: needs.develop-publish.outputs.l2geth != ''
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Publish L2Geth
uses: docker/build-push-action@v2
with:
context: .
file: ./ops/docker/Dockerfile.geth
push: true
tags: omgx/l2geth:${{ needs.develop-publish.outputs.l2geth }}

# pushes the base builder image to dockerhub
builder:
name: Prepare the base builder image for the services
needs: develop-publish
if: needs.develop-publish.outputs.builder == 'true'
runs-on: ubuntu-latest
# we re-output the variables so that the child jobs can access them
outputs:
batch-submitter: ${{ needs.develop-publish.outputs.batch-submitter }}
message-relayer: ${{ needs.develop-publish.outputs.message-relayer }}
data-transport-layer: ${{ needs.develop-publish.outputs.data-transport-layer }}
contracts: ${{ needs.develop-publish.outputs.contracts }}
integration-tests: ${{ needs.develop-publish.outputs.integration-tests }}

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }}

- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./ops/docker/Dockerfile.monorepo
push: true
tags: omgx/builder

message-relayer:
name: Publish Message Relayer Version ${{ needs.builder.outputs.message-relayer }}
needs: builder
if: needs.builder.outputs.message-relayer != ''
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }}

- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./ops/docker/Dockerfile.message-relayer
push: true
tags: omgx/message-relayer:${{ needs.builder.outputs.message-relayer }}

batch-submitter:
name: Publish Batch Submitter Version ${{ needs.builder.outputs.batch-submitter }}
needs: builder
if: needs.builder.outputs.batch-submitter != ''
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }}

- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./ops/docker/Dockerfile.batch-submitter
push: true
tags: omgx/batch-submitter:${{ needs.builder.outputs.batch-submitter }}

data-transport-layer:
name: Publish Data Transport Layer Version ${{ needs.builder.outputs.data-transport-layer }}
needs: builder
if: needs.builder.outputs.data-transport-layer != ''
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }}

- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./ops/docker/Dockerfile.data-transport-layer
push: true
tags: omgx/data-transport-layer:${{ needs.builder.outputs.data-transport-layer }}

contracts:
name: Publish Deployer Version ${{ needs.builder.outputs.contracts }}
needs: builder
if: needs.builder.outputs.contracts != ''
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }}

- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./ops/docker/Dockerfile.deployer
push: true
tags: omgx/deployer:${{ needs.builder.outputs.contracts }}

integration_tests:
name: Publish Integration tests ${{ needs.builder.outputs.integration-tests }}
needs: builder
if: needs.builder.outputs.integration-tests != ''
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }}

- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./ops/docker/Dockerfile.integration-tests
push: true
tags: omgx/integration-tests:${{ needs.builder.outputs.integration-tests }}
8 changes: 8 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,14 @@ jobs:
push: true
tags: ethereumoptimism/l2geth:${{ needs.release.outputs.l2geth }}

- name: Publish rpc-proxy
uses: docker/build-push-action@v2
with:
context: .
file: ./ops/docker/Dockerfile.rpc-proxy
push: true
tags: ethereumoptimism/rpc-proxy:${{ needs.release.outputs.l2geth }}

# pushes the base builder image to dockerhub
builder:
name: Prepare the base builder image for the services
Expand Down
3 changes: 2 additions & 1 deletion examples/truffle/truffle-config-ovm.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ module.exports = {
host: '127.0.0.1',
port: 8545,
gasPrice: 0,
gas: 54180127,
}
},
compilers: {
Expand All @@ -31,4 +32,4 @@ module.exports = {
}
}
}
}
}
Loading

0 comments on commit 8b258f4

Please sign in to comment.