Commit 2190c57d authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub

Merge branch 'develop' into cleanup/remove-final-hh-tests

parents c1464b5d 4f168994
...@@ -846,9 +846,9 @@ workflows: ...@@ -846,9 +846,9 @@ workflows:
requires: requires:
- yarn-monorepo - yarn-monorepo
- js-lint-test: - js-lint-test:
name: drippie-mon-tests name: chain-mon-tests
coverage_flag: drippie-mon-tests coverage_flag: chain-mon-tests
package_name: drippie-mon package_name: chain-mon
dependencies: "(common-ts|contracts-periphery|core-utils|sdk)" dependencies: "(common-ts|contracts-periphery|core-utils|sdk)"
requires: requires:
- yarn-monorepo - yarn-monorepo
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
/packages/contracts-periphery @ethereum-optimism/contract-reviewers /packages/contracts-periphery @ethereum-optimism/contract-reviewers
/packages/core-utils @ethereum-optimism/legacy-reviewers /packages/core-utils @ethereum-optimism/legacy-reviewers
/packages/data-transport-layer @ethereum-optimism/legacy-reviewers /packages/data-transport-layer @ethereum-optimism/legacy-reviewers
/packages/drippie-mon @smartcontracts /packages/chain-mon @smartcontracts
/packages/fault-detector @ethereum-optimism/legacy-reviewers /packages/fault-detector @ethereum-optimism/legacy-reviewers
/packages/hardhat-deploy-config @ethereum-optimism/legacy-reviewers /packages/hardhat-deploy-config @ethereum-optimism/legacy-reviewers
/packages/message-relayer @ethereum-optimism/legacy-reviewers /packages/message-relayer @ethereum-optimism/legacy-reviewers
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
"changeProcessCWD": true "changeProcessCWD": true
}, },
{ {
"directory": "packages/drippie-mon", "directory": "packages/chain-mon",
"changeProcessCWD": true "changeProcessCWD": true
}, },
{ {
...@@ -45,4 +45,4 @@ ...@@ -45,4 +45,4 @@
"eslint.format.enable": true, "eslint.format.enable": true,
"editorconfig.generateAuto": false, "editorconfig.generateAuto": false,
"files.trimTrailingWhitespace": true "files.trimTrailingWhitespace": true
} }
\ No newline at end of file
...@@ -57,7 +57,7 @@ Refer to the Directory Structure section below to understand which packages are ...@@ -57,7 +57,7 @@ Refer to the Directory Structure section below to understand which packages are
│ ├── <a href="./packages/contracts-periphery">contracts-periphery</a>: Peripheral contracts for Optimism │ ├── <a href="./packages/contracts-periphery">contracts-periphery</a>: Peripheral contracts for Optimism
│ ├── <a href="./packages/core-utils">core-utils</a>: Low-level utilities that make building Optimism easier │ ├── <a href="./packages/core-utils">core-utils</a>: Low-level utilities that make building Optimism easier
│ ├── <a href="./packages/data-transport-layer">data-transport-layer</a>: Service for indexing Optimism-related L1 data │ ├── <a href="./packages/data-transport-layer">data-transport-layer</a>: Service for indexing Optimism-related L1 data
│ ├── <a href="./packages/drippie-mon">drippie-mon</a>: Service for monitoring Drippie instances │ ├── <a href="./packages/chain-mon">chain-mon</a>: Chain monitoring services
│ ├── <a href="./packages/fault-detector">fault-detector</a>: Service for detecting Sequencer faults │ ├── <a href="./packages/fault-detector">fault-detector</a>: Service for detecting Sequencer faults
│ ├── <a href="./packages/message-relayer">message-relayer</a>: Tool for automatically relaying L1<>L2 messages in development │ ├── <a href="./packages/message-relayer">message-relayer</a>: Tool for automatically relaying L1<>L2 messages in development
│ ├── <a href="./packages/replica-healthcheck">replica-healthcheck</a>: Service for monitoring the health of a replica node │ ├── <a href="./packages/replica-healthcheck">replica-healthcheck</a>: Service for monitoring the health of a replica node
......
...@@ -37,7 +37,7 @@ flag_management: ...@@ -37,7 +37,7 @@ flag_management:
- name: actor-tests-tests - name: actor-tests-tests
- name: contracts-periphery-tests - name: contracts-periphery-tests
- name: dtl-tests - name: dtl-tests
- name: drippie-mon-tests - name: chain-mon-tests
- name: fault-detector-tests - name: fault-detector-tests
- name: message-relayer-tests - name: message-relayer-tests
- name: replica-healthcheck-tests - name: replica-healthcheck-tests
......
...@@ -46,7 +46,7 @@ COPY packages/hardhat-deploy-config/package.json ./packages/hardhat-deploy-confi ...@@ -46,7 +46,7 @@ COPY packages/hardhat-deploy-config/package.json ./packages/hardhat-deploy-confi
COPY packages/message-relayer/package.json ./packages/message-relayer/package.json COPY packages/message-relayer/package.json ./packages/message-relayer/package.json
COPY packages/fault-detector/package.json ./packages/fault-detector/package.json COPY packages/fault-detector/package.json ./packages/fault-detector/package.json
COPY packages/replica-healthcheck/package.json ./packages/replica-healthcheck/package.json COPY packages/replica-healthcheck/package.json ./packages/replica-healthcheck/package.json
COPY packages/drippie-mon/package.json ./packages/drippie-mon/package.json COPY packages/chain-mon/package.json ./packages/chain-mon/package.json
COPY packages/balance-monitor/package.json ./packages/balance-monitor/package.json COPY packages/balance-monitor/package.json ./packages/balance-monitor/package.json
COPY packages/two-step-monitor/package.json ./packages/two-step-monitor/package.json COPY packages/two-step-monitor/package.json ./packages/two-step-monitor/package.json
COPY integration-tests/package.json ./integration-tests/package.json COPY integration-tests/package.json ./integration-tests/package.json
...@@ -106,8 +106,8 @@ WORKDIR /opt/optimism/packages/replica-healthcheck ...@@ -106,8 +106,8 @@ WORKDIR /opt/optimism/packages/replica-healthcheck
ENTRYPOINT ["npm", "run", "start"] ENTRYPOINT ["npm", "run", "start"]
FROM base as drippie-mon FROM base as drippie-mon
WORKDIR /opt/optimism/packages/drippie-mon WORKDIR /opt/optimism/packages/chain-mon
ENTRYPOINT ["npm", "run", "start"] ENTRYPOINT ["npm", "run", "start:drippie-mon"]
FROM base as balance-monitor FROM base as balance-monitor
WORKDIR /opt/optimism/packages/balance-monitor WORKDIR /opt/optimism/packages/balance-monitor
......
###############################################################################
# ↓ drippie-mon ↓ #
###############################################################################
# RPC pointing to network where Drippie is deployed # RPC pointing to network where Drippie is deployed
DRIPPIE_MON__RPC= DRIPPIE_MON__RPC=
......
# @eth-optimism/drippie-mon # @eth-optimism/chain-mon
[![codecov](https://codecov.io/gh/ethereum-optimism/optimism/branch/develop/graph/badge.svg?token=0VTG7PG7YR&flag=drippie-mon-tests)](https://codecov.io/gh/ethereum-optimism/optimism) [![codecov](https://codecov.io/gh/ethereum-optimism/optimism/branch/develop/graph/badge.svg?token=0VTG7PG7YR&flag=chain-mon-tests)](https://codecov.io/gh/ethereum-optimism/optimism)
`drippie-mon` is a simple service for monitoring Drippie contracts. `chain-mon` is a collection of chain monitoring services.
## Installation ## Installation
...@@ -14,11 +14,17 @@ yarn install ...@@ -14,11 +14,17 @@ yarn install
yarn build yarn build
``` ```
## Running the service ## Running a service
Copy `.env.example` into a new file named `.env`, then set the environment variables listed there. Copy `.env.example` into a new file named `.env`, then set the environment variables listed there depending on the service you want to run.
Once your environment variables have been set, run via: Once your environment variables have been set, run via:
``` ```
yarn start yarn start:<service name>
```
For example, to run `drippie-mon`, execute:
```
yarn start:drippie-mon
``` ```
{ {
"private": true, "private": true,
"name": "@eth-optimism/drippie-mon", "name": "@eth-optimism/chain-mon",
"version": "0.4.3", "version": "0.1.0",
"description": "[Optimism] Service for monitoring Drippie instances", "description": "[Optimism] Chain monitoring services",
"main": "dist/index", "main": "dist/index",
"types": "dist/index", "types": "dist/index",
"files": [ "files": [
"dist/*" "dist/*"
], ],
"scripts": { "scripts": {
"start": "ts-node ./src/service.ts", "start:drippie-mon": "ts-node ./src/drippie-mon/service.ts",
"test:coverage": "echo 'No tests defined.'", "test:coverage": "echo 'No tests defined.'",
"build": "tsc -p ./tsconfig.json", "build": "tsc -p ./tsconfig.json",
"clean": "rimraf dist/ ./tsconfig.tsbuildinfo", "clean": "rimraf dist/ ./tsconfig.tsbuildinfo",
...@@ -21,10 +21,9 @@ ...@@ -21,10 +21,9 @@
"keywords": [ "keywords": [
"optimism", "optimism",
"ethereum", "ethereum",
"drippie",
"monitoring" "monitoring"
], ],
"homepage": "https://github.com/ethereum-optimism/optimism/tree/develop/packages/drippie-mon#readme", "homepage": "https://github.com/ethereum-optimism/optimism/tree/develop/packages/chain-mon#readme",
"license": "MIT", "license": "MIT",
"author": "Optimism PBC", "author": "Optimism PBC",
"repository": { "repository": {
......
...@@ -9,7 +9,7 @@ import { Provider } from '@ethersproject/abstract-provider' ...@@ -9,7 +9,7 @@ import { Provider } from '@ethersproject/abstract-provider'
import { ethers } from 'ethers' import { ethers } from 'ethers'
import * as DrippieArtifact from '@eth-optimism/contracts-periphery/artifacts/contracts/universal/drippie/Drippie.sol/Drippie.json' import * as DrippieArtifact from '@eth-optimism/contracts-periphery/artifacts/contracts/universal/drippie/Drippie.sol/Drippie.json'
import { version } from '../package.json' import { version } from '../../package.json'
type DrippieMonOptions = { type DrippieMonOptions = {
rpc: Provider rpc: Provider
......
export * from './drippie-mon/service'
...@@ -27,9 +27,10 @@ Our aim is to design a protocol specification that is: ...@@ -27,9 +27,10 @@ Our aim is to design a protocol specification that is:
- **Fast:** When users send transactions, they get reliable confirmations with low-latency. - **Fast:** When users send transactions, they get reliable confirmations with low-latency.
For example when swapping on Uniswap you should see that your transaction succeed in less than 2 For example when swapping on Uniswap you should see that your transaction succeed in less than 2
seconds. seconds.
- **Scalable:** It should be possible to handle an enormous number of transactions per second which - **Scalable:** It should be possible to handle an enormous number of transactions
will enable us to charge low fees. V1.0 will enable us to scale up to and even past the gas limit per second which will enable the system to charge low fees.
on L1. Later iterations will scale much further. V1.0 will enable Optimism to scale up to and even past the gas limit on L1.
Later iterations should scale much further.
- **Modular:** Our designs will use modularity to reduce complexity and enable parallel - **Modular:** Our designs will use modularity to reduce complexity and enable parallel
contributions. Coming up with good conceptual frameworks & composable atoms of software enables us contributions. Coming up with good conceptual frameworks & composable atoms of software enables us
to build extremely complex software even when any one person cannot hold that much in their brain. to build extremely complex software even when any one person cannot hold that much in their brain.
...@@ -41,8 +42,9 @@ Our aim is to design a protocol specification that is: ...@@ -41,8 +42,9 @@ Our aim is to design a protocol specification that is:
our software to avoid creating a system no one wants to use. our software to avoid creating a system no one wants to use.
- **Clear and Readable:** The specs we write are written to be read. So tight feedback loop with the - **Clear and Readable:** The specs we write are written to be read. So tight feedback loop with the
systems team consuming the spec is also key! systems team consuming the spec is also key!
- **Secure:** This is self-evident. We cannot lose money and in a system where even a bit of - **Secure:** This is self-evident.
downtime can result in loss of funds this means everything we build must be incredibly secure. User’s assets are at stake. Every component of the system must be incredibly secure.
- **Decentralizable:** Everything we build must have a clear path towards decentralization. Today - **Decentralizable:** Optimism must be designed to avail itself of the security and
Optimism relies on OptimismPBC to function, but eventually it will be managed by a DAO and even in censorship-resistant guarantees achieved by a decentralized system.
that decentralized future our system must thrive. Currently centralized components of the system should have a clear path towards decentralization.
Already decentralized components of the system should be protected and preserved.
...@@ -48,8 +48,10 @@ Deposited transactions MUST never be consumed from the transaction pool. ...@@ -48,8 +48,10 @@ Deposited transactions MUST never be consumed from the transaction pool.
## Engine API ## Engine API
<!--
*Note: the [Engine API][l1-api-spec] is in alpha, `v1.0.0-alpha.5`. *Note: the [Engine API][l1-api-spec] is in alpha, `v1.0.0-alpha.5`.
There may be subtle tweaks, beta starts in a few weeks* There may be subtle tweaks, beta starts in a few weeks*
-->
### `engine_forkchoiceUpdatedV1` ### `engine_forkchoiceUpdatedV1`
......
...@@ -91,9 +91,11 @@ At the heart of the network are users (us!). Users can: ...@@ -91,9 +91,11 @@ At the heart of the network are users (us!). Users can:
### Sequencers ### Sequencers
The sequencer is the primary block producer. There may be one sequencer **or** many using a consensus protocol. For The sequencer is the primary block producer.
1.0.0, there is just one sequencer. In general, specifications may use "the sequencer" to be a stand-in term for the There may be one sequencer **or** many using a consensus protocol.
consensus protocol operated by multiple sequencers. For 1.0.0, there is just one sequencer (currently operated under the oversight of the Optimism Foundation).
In general, specifications may use "the sequencer" to be a stand-in term
for the consensus protocol operated by multiple sequencers.
The sequencer: The sequencer:
...@@ -125,21 +127,21 @@ provide context when diving into any particular component specification. ...@@ -125,21 +127,21 @@ provide context when diving into any particular component specification.
### Depositing and Sending Transactions ### Depositing and Sending Transactions
Users will often begin their L2 journey by depositing ETH from L1. Once they have ETH to pay fees, they'll start Users will often begin their L2 journey by depositing ETH from L1.
sending transactions on L2. The following diagram demonstrates this interaction and all key Optimism Once they have ETH to pay fees, they'll start sending transactions on L2.
components which are utilized: The following diagram demonstrates this interaction and all key Optimism components which are or should be utilized:
![Diagram of Depositing and Sending Transactions](./assets/sequencer-handling-deposits-and-transactions.svg) ![Diagram of Depositing and Sending Transactions](./assets/sequencer-handling-deposits-and-transactions.svg)
Links to components mentioned in this diagram: Links to components mentioned in this diagram:
- Batch Inbox (WIP) <!-- - Batch Inbox (WIP) -->
- [Rollup Node](./rollup-node.md) - [Rollup Node](./rollup-node.md)
- [Execution Engine](./exec-engine.md) - [Execution Engine](./exec-engine.md)
- Sequencer Batch Submitter (WIP) <!-- - Sequencer Batch Submitter (WIP) -->
- [L2 Output Oracle](./proposals.md#l2-output-oracle-smart-contract) - [L2 Output Oracle](./proposals.md#l2-output-oracle-smart-contract)
- [L2 Output Submitter](./proposals.md#proposing-l2-output-commitments) - [L2 Output Submitter](./proposals.md#proposing-l2-output-commitments)
- Fault Proof VM (WIP) <!-- - Fault Proof VM (WIP) -->
### Withdrawing ### Withdrawing
......
...@@ -108,12 +108,11 @@ permissionlessly removed from the L2 supply by calling the `burn()` function. ...@@ -108,12 +108,11 @@ permissionlessly removed from the L2 supply by calling the `burn()` function.
Address: `0x4200000000000000000000000000000000000002` Address: `0x4200000000000000000000000000000000000002`
The `DeployerWhitelist` is a predeploy that was used to provide additional The `DeployerWhitelist` is a predeploy that was used to provide additional safety
safety during the initial phases of Optimism. It is owned by the during the initial phases of Optimism.
Optimism foundation and defines the accounts that are allowed to deploy contracts to the It previously defined the accounts that are allowed to deploy contracts to the network.
network.
Arbitrary contract deployment has been enabled and it is not possible to turn Arbitrary contract deployment was subsequently enabled and it is not possible to turn
off. In the legacy system, this contract was hooked into `CREATE` and off. In the legacy system, this contract was hooked into `CREATE` and
`CREATE2` to ensure that the deployer was allowlisted. `CREATE2` to ensure that the deployer was allowlisted.
...@@ -263,9 +262,9 @@ have the ability to upgrade any of the other predeploy contracts. ...@@ -263,9 +262,9 @@ have the ability to upgrade any of the other predeploy contracts.
Address: `0x4200000000000000000000000000000000000011` Address: `0x4200000000000000000000000000000000000011`
The `SequencerFeeVault` accumulates any transaction tips and is the value of The `SequencerFeeVault` accumulates any transaction priority fee and is the value of
`block.coinbase`. When enough fees accumulate in this account, they can be `block.coinbase`.
permissionlessly withdrawn to an immutable L1 address. When enough fees accumulate in this account, they can be withdrawn to an immutable L1 address.
To change the L1 address that fees are withdrawn to, the contract must be To change the L1 address that fees are withdrawn to, the contract must be
upgraded by changing its proxy's implementation key. upgraded by changing its proxy's implementation key.
...@@ -300,7 +299,7 @@ Address: `0x4200000000000000000000000000000000000019` ...@@ -300,7 +299,7 @@ Address: `0x4200000000000000000000000000000000000019`
The `BaseFeeVault` predeploy receives the basefees on L2. The basefee is not The `BaseFeeVault` predeploy receives the basefees on L2. The basefee is not
burnt on L2 like it is on L1. Once the contract has received a certain amount burnt on L2 like it is on L1. Once the contract has received a certain amount
of fees, the ETH can be permissionlessly withdrawn to an immutable address on of fees, the ETH can be withdrawn to an immutable address on
L1. L1.
## L1FeeVault ## L1FeeVault
...@@ -311,4 +310,4 @@ Address: `0x420000000000000000000000000000000000001a` ...@@ -311,4 +310,4 @@ Address: `0x420000000000000000000000000000000000001a`
The `L1FeeVault` predeploy receives the L1 portion of the transaction fees. The `L1FeeVault` predeploy receives the L1 portion of the transaction fees.
Once the contract has received a certain amount of fees, the ETH can be Once the contract has received a certain amount of fees, the ETH can be
permissionlessly withdrawn to an immutable address on L1. withdrawn to an immutable address on L1.
...@@ -26,7 +26,8 @@ proving any piece of data captured by the outputs. ...@@ -26,7 +26,8 @@ proving any piece of data captured by the outputs.
Proposers submit the output roots to L1 and can be contested with a fault proof, Proposers submit the output roots to L1 and can be contested with a fault proof,
with a bond at stake if the proof is wrong. with a bond at stake if the proof is wrong.
_Note_: Although fault proof construction and verification [is implemented in Cannon][cannon], _Note_: Fault proofs on Optimism are not fully specified at this time. Although fault proof
construction and verification [is implemented in Cannon][cannon],
the fault proof game specification and integration of a output-root challenger into the [rollup-node][g-rollup-node] the fault proof game specification and integration of a output-root challenger into the [rollup-node][g-rollup-node]
are part of later specification milestones. are part of later specification milestones.
...@@ -50,7 +51,7 @@ The proposer may also delete multiple output roots by calling the `deleteL2Outpu ...@@ -50,7 +51,7 @@ The proposer may also delete multiple output roots by calling the `deleteL2Outpu
index of the first output to delete, this will also delete all subsequent outputs. index of the first output to delete, this will also delete all subsequent outputs.
> **Note regarding future work:** In the initial version of the system, the proposer will be the same entity as the > **Note regarding future work:** In the initial version of the system, the proposer will be the same entity as the
> sequencer, which is a trusted role. In the future proposers will need to submit a bond in order to post L2 output > sequencer, which is a trusted role. In the future proposers may need to submit a bond in order to post L2 output
> roots, and some or all of this bond may be taken in the event of a faulty proposal. > roots, and some or all of this bond may be taken in the event of a faulty proposal.
## L2 Output Commitment Construction ## L2 Output Commitment Construction
......
...@@ -55,8 +55,8 @@ For a complete specification of the L2 block derivation, refer to the [L2 block ...@@ -55,8 +55,8 @@ For a complete specification of the L2 block derivation, refer to the [L2 block
## L2 Output RPC method ## L2 Output RPC method
The Rollup node has its own RPC method, `optimism_outputAtBlock` which returns the The Rollup node has its own RPC method, `optimism_outputAtBlock` which returns a 32
a 32 byte hash corresponding to the [L2 output root](./proposals.md#l2-output-commitment-construction). byte hash corresponding to the [L2 output root](./proposals.md#l2-output-commitment-construction).
[SSZ]: https://github.com/ethereum/consensus-specs/blob/dev/ssz/simple-serialize.md [SSZ]: https://github.com/ethereum/consensus-specs/blob/dev/ssz/simple-serialize.md
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment