Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop -> Master #3170

Merged
merged 94 commits into from Aug 4, 2022
Merged

Develop -> Master #3170

merged 94 commits into from Aug 4, 2022

Conversation

mslipper
Copy link
Collaborator

@mslipper mslipper commented Aug 4, 2022

optimisticben and others added 30 commits July 25, 2022 16:05
parameterize project

Switch to artifact registry

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Address this warning: Unknown section [default] found in foundry.toml. This notation for profiles has been deprecated and may result in the profile not being registered in future versions. Please use [profile.default] instead or run .
* op-bindings: regenerate

The build was missed someplace and is now breaking ci everywhere

* ci: build monorepo with op-bindings change
Due to a new version of the openzeppelin contracts,
the docs need to be regenerated. Each time that the
contracts are built, these files are generated.
Merging this commit will make dev on alternative things
less noisy.
The `js-builder` and `go-builder` are no longer
used, they were replaced by `ci-builder`. Their
dockerfiles have already been deleted from the
repo, this now deletes their reference in the CI
docker build pipeline.
Use only 1 initializable instead of two different initializable
imports. Using contracts with the same name will break hardhat.

The two different initializable imports were:

```solidity
import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
```

```solidity
import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol";
```

This standardizes on not using `contracts-upgradeable`.
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* contracts-bedrock: fix build

Standardize on the upgradable initializable since the contracts
are technically upgradable it is more clear. There are no real
implementation differences between the upgradable and standard
initializable implementations. `OwnableUpgradable` is `initializable`
imported from the upgradable package, and the `L2OutputOracle`
inherits from `OwnableUpgradable`. This means that the only
way to standardize on a single implementation of `Initializable`
is to use the upgradable version.

This also bumps the version of the openzeppelin contracts
dependency because they refactored the initializable implementation
and made it easier to understand.

https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/releases/tag/v4.7.0
OpenZeppelin/openzeppelin-contracts#3450

* op-bindings: regenerate
ci: remove publishing of deprecated images
The `package.json` defines the files that are included
in the `npm` package, the previous glob did not match
all of the typechain artifacts.
contracts-bedrock: update hardhat forge dep
Updates the hh forge plugin to the following:

```
"@foundry-rs/hardhat-forge": "^0.1.16"
```

Includes bugfixes for when multiple imports
of contracts with the same name happens.
Adds a helper to the makefile for deleting all of the js
deps. This is useful for when checking out a new branch
and ensuring that the deps are up to date. I find
myself doing this often manually, so adding a make command
makes sense.
contracts-bedrock: update hardhat-forge plugin
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This was being incorrectly set in the rollup json relative to the
HD path supplied to the batcher was. This resulted in L2 reorgs
on the sequencer & the inability to send L2 transactions.

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
mslipper and others added 20 commits August 1, 2022 13:18
* op-node: Add p2p utils

* Update op-node/flags/flags.go

Co-authored-by: Diederik Loerakker <proto@protolambda.com>

Co-authored-by: Diederik Loerakker <proto@protolambda.com>
Emit an additional event during `initiateWithdrawal` that includes
the withdrawal hash so that it is easy to observe changes to the
`sentMessages` mapping.
…xtension

contracts-bedrock: L2ToL1MessagePasser event extension
* contracts-bedrock: add forge contract verification support

Add etherscan contract verification for the hh/foundry
compiler toolchain. This will eventually be upstreamed,
but is implemented here to ensure that it works thoroughly
first.

To run the task:

```
export ETHERSCAN_API_KEY=$(cat api-key.txt)
$ npx hardhat forge-verify --network goerli
```

In the future, other contract verification backends
will be added to forge and this task will be updated
to support them.

Example contract that was verified: https://goerli.etherscan.io/address/0x1234662682c85fa6fb375416d14db965eba222ba#code

An individual contract can be targeted instead of all of them
with the `--contract` flag. If hardhat deploy has configured
external deployments, forge will not be able to verify them.
It may be possible to implement that in the future.

* contracts-bedrock: modularize tasks
* core-utils: add bedrock types

* sdk: implement bedrock functionality

* tests: update for bedrock

* sdk: add hardhat deposit task

* circleci: run deposit task in ci

* tsconfig: cleanup

* contracts-bedrock: make commitment interval larger

* changeset: add

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
* op-node: Add channel frame serialization

This creates a struct & serialization & deserialization methods
for it. This is to replace the current serialization code which
is embedded in more complex methods.

The reading is done with a reader API instead of a bytes API because
the frame is variable length & is originally merged together with
other frames without a clean division. The writing API uses a
writer for simplicity (but is not required).

This lays the groundwork for easily switching to fixed int sizes.

* op-node: Use channel frame deserialization

This uses the new channel frame object for deserialization. Some
of the API interaction is a little weird in the channel_bank
IngestData loop, but the code is not able to be easily tested and
upgraded.

* op-node: Use channel frame in serialization

This uses the default implementation (through a struct) rather
than the custom logic. It might make sense to use a slightly
different API for serialization than deserialization given the
inputs, but splitting out the logic into it's own function is
still an improvement.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* op-node: Derivation metrics

Adds support for the following batch derivation metrics:

- 0/1 gauge for if the derivation is idle
- Count of total pipeline resets
- Count of total unsafe payloads received
- Count of total derivation errors
- Gauge tracking the various L1/L2 safe/unsafe heads

* review updates + more metrics
This will allow us to measure opnode throughput.
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Will Cory <willcory@Wills-MacBook-Pro.local>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* style(specs): fix toc/lint in specs, update CI

style(specs): lint/toc/link fixes

style(readme): fix bedrock contracts link

chore(specs): specs lint scripts

chore(specs): update CI jobs to use new lint scripts and unsilence links linter

style(specs): fix toc, fix quotes in markdown lint script

* yarn: update linting dependencies

* specs: add minimal batch submitter spec, fix broken links

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Matthew Slipper <me@matthewslipper.com>
* proxyd: Unwrap single RPC batches

* Update backend.go
`no_output_timeout` wasn't being honored because the deposit command produced output on each poll. Instead, use the `timeout` command to kill the process from within the job itself regardless of output.
* op-node: Use unmetered L1 Attributes Transaction

This enables the IsSystemTransaction flag in the L1 Attributes
deposit & updates to the latest version of geth.

* specs updates

* Update specs/deposits.md

* feat: bedrock deposit transaction type update

* bedrock: update geth dependency

* fix(core-utils): bedrock deposit tx encode/decode typescript fixes

* feat(packages/contracts-bedrock): update UserDepositTransaction type and encoding to handle isSystemTransaction bool

* contracts-bedrock: update differential deposit tx solidity <> js fuzzing

* core-utils

* contracts-bedrock

* contracts-bedrock: fix test

* contracts-bedrock: fix differential tests

* contracts-bedrock: fix broken test

* contracts-bedrock: gas snapshot

Co-authored-by: protolambda <proto@protolambda.com>
Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
* proxyd: Add frontend rate limiting

To give us more flexibiltiy with rate limiting, proxyd now supports rate limiting of client (frontend) requests in addition to upstream (backend) requests. This PR also gives us the ability to exempt certain user agents/origins from rate limiting.

* lint
@changeset-bot
Copy link

changeset-bot bot commented Aug 4, 2022

🦋 Changeset detected

Latest commit: b6f4bfc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
Name Type
@eth-optimism/contracts-bedrock Patch
@eth-optimism/core-utils Patch
@eth-optimism/hardhat-deploy-config Patch
@eth-optimism/proxyd Minor
@eth-optimism/foundry Patch
@eth-optimism/integration-tests Patch
@eth-optimism/sdk Minor
@eth-optimism/common-ts Patch
@eth-optimism/contracts Patch
@eth-optimism/data-transport-layer Patch
@eth-optimism/drippie-mon Patch
@eth-optimism/message-relayer Patch
@eth-optimism/replica-healthcheck Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added 2-reviewers A-pkg-contracts-bedrock Area: packages/contracts-bedrock A-op-bindings Area: op-bindings A-pkg-core-utils Area: packages/core-utils A-integration Area: integration tests A-ops Area: ops A-pkg-sdk Area: packages/sdk labels Aug 4, 2022
@mslipper mslipper merged commit cb21d3f into master Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-integration Area: integration tests A-op-bindings Area: op-bindings A-ops Area: ops A-pkg-contracts-bedrock Area: packages/contracts-bedrock A-pkg-core-utils Area: packages/core-utils A-pkg-sdk Area: packages/sdk
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants