Commit 06bea643 authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub

Merge branch 'develop' into inphi/chan-in-metrics

parents 16c08152 3be8b488
---
'@eth-optimism/contracts-bedrock': patch
---
Reduce the time that the system dictator deploy scripts wait before checking the chain state.
---
'@eth-optimism/sdk': patch
---
Have SDK automatically create Standard and ETH bridges when L1StandardBridge is provided.
---
'@eth-optimism/batch-submitter-service': patch
---
Allow deposit only batches
---
'@eth-optimism/data-transport-layer': patch
---
Add better logging to DTL about shutoff block
---
'@eth-optimism/chain-mon': minor
---
Introduces the balance-mon service to chain-mon.
---
'@eth-optimism/contracts-bedrock': patch
---
Makes the Proxy contract inheritable by making functions (public virtual).
---
'@eth-optimism/contracts-bedrock': patch
---
Added a contsructor to the System Dictator
---
'@eth-optimism/hardhat-deploy-config': patch
---
Add getter for other network's deploy config
---
'@eth-optimism/batch-submitter-service': patch
---
fix flag name for MaxStateRootElements in batch-submitter
fix log package for proposer
---
'@eth-optimism/chain-mon': patch
'@eth-optimism/data-transport-layer': patch
'@eth-optimism/fault-detector': patch
'@eth-optimism/message-relayer': patch
'@eth-optimism/replica-healthcheck': patch
---
Empty patch release to re-release packages that failed to be released by a bug in the release process.
# @eth-optimism/batch-submitter-service
## 0.1.16
### Patch Changes
- 32bd79ec9: Allow deposit only batches
- da79ef441: fix flag name for MaxStateRootElements in batch-submitter
fix log package for proposer
## 0.1.15
### Patch Changes
......
{
"name": "@eth-optimism/batch-submitter-service",
"version": "0.1.15",
"version": "0.1.16",
"private": true,
"devDependencies": {}
}
......@@ -30,10 +30,10 @@
"devDependencies": {
"@babel/eslint-parser": "^7.5.4",
"@eth-optimism/contracts": "^0.5.40",
"@eth-optimism/contracts-bedrock": "0.13.1",
"@eth-optimism/contracts-bedrock": "0.13.2",
"@eth-optimism/contracts-periphery": "^1.0.7",
"@eth-optimism/core-utils": "0.12.0",
"@eth-optimism/sdk": "2.0.1",
"@eth-optimism/sdk": "2.0.2",
"@ethersproject/abstract-provider": "^5.7.0",
"@ethersproject/providers": "^5.7.0",
"@ethersproject/transactions": "^5.7.0",
......
This diff is collapsed.
......@@ -4,10 +4,14 @@ import (
"context"
"errors"
"fmt"
"io"
"os"
"time"
"github.com/ethereum-optimism/optimism/op-node/chaincfg"
"github.com/ethereum-optimism/optimism/op-node/rollup/derive"
"github.com/ethereum-optimism/optimism/op-program/config"
"github.com/ethereum-optimism/optimism/op-program/driver"
"github.com/ethereum-optimism/optimism/op-program/flags"
"github.com/ethereum-optimism/optimism/op-program/l1"
"github.com/ethereum-optimism/optimism/op-program/l2"
......@@ -96,15 +100,30 @@ func FaultProofProgram(logger log.Logger, cfg *config.Config) error {
ctx := context.Background()
logger.Info("Connecting to L1 node", "l1", cfg.L1URL)
_, err := l1.NewFetchingL1(ctx, logger, cfg)
l1Source, err := l1.NewFetchingL1(ctx, logger, cfg)
if err != nil {
return fmt.Errorf("connect l1 oracle: %w", err)
}
logger.Info("Connecting to L2 node", "l2", cfg.L2URL)
_, err = l2.NewFetchingEngine(ctx, logger, cfg)
l2Source, err := l2.NewFetchingEngine(ctx, logger, cfg)
if err != nil {
return fmt.Errorf("connect l2 oracle: %w", err)
}
d := driver.NewDriver(logger, cfg, l1Source, l2Source)
for {
if err = d.Step(ctx); errors.Is(err, io.EOF) {
break
} else if cfg.FetchingEnabled() && errors.Is(err, derive.ErrTemporary) {
// When in fetching mode, recover from temporary errors to allow us to keep fetching data
// TODO(CLI-3780) Ideally the retry would happen in the fetcher so this is not needed
logger.Warn("Temporary error in pipeline", "err", err)
time.Sleep(5 * time.Second)
} else if err != nil {
return err
}
}
logger.Info("Derivation complete", "head", d.SafeHead())
return nil
}
package driver
import (
"context"
"errors"
"fmt"
"io"
"github.com/ethereum-optimism/optimism/op-node/eth"
"github.com/ethereum-optimism/optimism/op-node/metrics"
"github.com/ethereum-optimism/optimism/op-node/rollup/derive"
"github.com/ethereum-optimism/optimism/op-program/config"
"github.com/ethereum/go-ethereum/log"
)
type Derivation interface {
Step(ctx context.Context) error
SafeL2Head() eth.L2BlockRef
}
type Driver struct {
logger log.Logger
pipeline Derivation
}
func NewDriver(logger log.Logger, cfg *config.Config, l1Source derive.L1Fetcher, l2Source derive.Engine) *Driver {
pipeline := derive.NewDerivationPipeline(logger, cfg.Rollup, l1Source, l2Source, metrics.NoopMetrics)
pipeline.Reset()
return &Driver{
logger: logger,
pipeline: pipeline,
}
}
// Step runs the next step of the derivation pipeline.
// Returns nil if there are further steps to be performed
// Returns io.EOF if the derivation completed successfully
// Returns a non-EOF error if the derivation failed
func (d *Driver) Step(ctx context.Context) error {
if err := d.pipeline.Step(ctx); errors.Is(err, io.EOF) {
return io.EOF
} else if errors.Is(err, derive.NotEnoughData) {
d.logger.Debug("Data is lacking")
return nil
} else if err != nil {
return fmt.Errorf("pipeline err: %w", err)
}
return nil
}
func (d *Driver) SafeHead() eth.L2BlockRef {
return d.pipeline.SafeL2Head()
}
package driver
import (
"context"
"errors"
"fmt"
"io"
"testing"
"github.com/ethereum-optimism/optimism/op-node/eth"
"github.com/ethereum-optimism/optimism/op-node/rollup/derive"
"github.com/ethereum-optimism/optimism/op-node/testlog"
"github.com/ethereum/go-ethereum/log"
"github.com/stretchr/testify/require"
)
func TestDerivationComplete(t *testing.T) {
driver := createDriver(t, fmt.Errorf("derivation complete: %w", io.EOF))
err := driver.Step(context.Background())
require.ErrorIs(t, err, io.EOF)
}
func TestTemporaryError(t *testing.T) {
driver := createDriver(t, fmt.Errorf("whoopsie: %w", derive.ErrTemporary))
err := driver.Step(context.Background())
require.ErrorIs(t, err, derive.ErrTemporary)
}
func TestNotEnoughDataError(t *testing.T) {
driver := createDriver(t, fmt.Errorf("idk: %w", derive.NotEnoughData))
err := driver.Step(context.Background())
require.NoError(t, err)
}
func TestGenericError(t *testing.T) {
expected := errors.New("boom")
driver := createDriver(t, expected)
err := driver.Step(context.Background())
require.ErrorIs(t, err, expected)
}
func TestNoError(t *testing.T) {
driver := createDriver(t, nil)
err := driver.Step(context.Background())
require.NoError(t, err)
}
func createDriver(t *testing.T, derivationResult error) *Driver {
derivation := &stubDerivation{nextErr: derivationResult}
return &Driver{
logger: testlog.Logger(t, log.LvlDebug),
pipeline: derivation,
}
}
type stubDerivation struct {
nextErr error
}
func (s stubDerivation) Step(ctx context.Context) error {
return s.nextErr
}
func (s stubDerivation) SafeL2Head() eth.L2BlockRef {
return eth.L2BlockRef{}
}
# @eth-optimism/actor-tests
## 0.0.24
### Patch Changes
- Updated dependencies [b16067a9f]
- Updated dependencies [be3315689]
- Updated dependencies [9a02079eb]
- Updated dependencies [98fbe9d22]
- @eth-optimism/contracts-bedrock@0.13.2
- @eth-optimism/sdk@2.0.2
## 0.0.23
### Patch Changes
......
{
"name": "@eth-optimism/actor-tests",
"version": "0.0.23",
"version": "0.0.24",
"description": "A library and suite of tests to stress test Optimism Bedrock.",
"license": "MIT",
"author": "",
......@@ -18,9 +18,9 @@
"test:coverage": "yarn test"
},
"dependencies": {
"@eth-optimism/contracts-bedrock": "0.13.1",
"@eth-optimism/contracts-bedrock": "0.13.2",
"@eth-optimism/core-utils": "^0.12.0",
"@eth-optimism/sdk": "^2.0.1",
"@eth-optimism/sdk": "^2.0.2",
"@types/chai": "^4.2.18",
"@types/chai-as-promised": "^7.1.4",
"async-mutex": "^0.3.2",
......
# @eth-optimism/drippie-mon
## 0.3.0
### Minor Changes
- 1e7897c81: Introduces the balance-mon service to chain-mon.
### Patch Changes
- dbe5eb308: Empty patch release to re-release packages that failed to be released by a bug in the release process.
- Updated dependencies [be3315689]
- @eth-optimism/sdk@2.0.2
## 0.2.1
### Patch Changes
......
{
"private": true,
"name": "@eth-optimism/chain-mon",
"version": "0.2.1",
"version": "0.3.0",
"description": "[Optimism] Chain monitoring services",
"main": "dist/index",
"types": "dist/index",
......@@ -36,7 +36,7 @@
"@eth-optimism/common-ts": "0.8.1",
"@eth-optimism/contracts-periphery": "1.0.7",
"@eth-optimism/core-utils": "0.12.0",
"@eth-optimism/sdk": "2.0.1",
"@eth-optimism/sdk": "2.0.2",
"ethers": "^5.7.0",
"@types/dateformat": "^5.0.0",
"chai-as-promised": "^7.1.1",
......
# @eth-optimism/contracts-bedrock
## 0.13.2
### Patch Changes
- b16067a9f: Reduce the time that the system dictator deploy scripts wait before checking the chain state.
- 9a02079eb: Makes the Proxy contract inheritable by making functions (public virtual).
- 98fbe9d22: Added a contsructor to the System Dictator
## 0.13.1
### Patch Changes
......
......@@ -78,8 +78,7 @@ contract OptimismPortal is Initializable, ResourceMetering, Semver {
/**
* @notice Determines if cross domain messaging is paused. When set to true,
* deposits and withdrawals are paused. This may be removed in the
* future.
* withdrawals are paused. This may be removed in the future.
*/
bool public paused;
......@@ -141,7 +140,7 @@ contract OptimismPortal is Initializable, ResourceMetering, Semver {
}
/**
* @custom:semver 1.3.0
* @custom:semver 1.3.1
*
* @param _l2Oracle Address of the L2OutputOracle contract.
* @param _guardian Address that can pause deposits and withdrawals.
......@@ -153,7 +152,7 @@ contract OptimismPortal is Initializable, ResourceMetering, Semver {
address _guardian,
bool _paused,
SystemConfig _config
) Semver(1, 3, 0) {
) Semver(1, 3, 1) {
L2_ORACLE = _l2Oracle;
GUARDIAN = _guardian;
SYSTEM_CONFIG = _config;
......
{
"name": "@eth-optimism/contracts-bedrock",
"version": "0.13.1",
"version": "0.13.2",
"description": "Contracts for Optimism Specs",
"main": "dist/index",
"types": "dist/index",
......@@ -59,7 +59,7 @@
"hardhat": "^2.9.6"
},
"devDependencies": {
"@eth-optimism/hardhat-deploy-config": "^0.2.5",
"@eth-optimism/hardhat-deploy-config": "^0.2.6",
"@ethersproject/abstract-provider": "^5.7.0",
"@ethersproject/abstract-signer": "^5.7.0",
"ethereumjs-wallet": "^1.0.2",
......
......@@ -77,7 +77,7 @@ contract PostSherlock is Script {
string constant internal L1StandardBridge_Version = "1.1.0";
string constant internal L2OutputOracle_Version = "1.2.0";
string constant internal OptimismMintableERC20Factory_Version = "1.1.0";
string constant internal OptimismPortal_Version = "1.3.0";
string constant internal OptimismPortal_Version = "1.3.1";
string constant internal SystemConfig_Version = "1.2.0";
string constant internal L1ERC721Bridge_Version = "1.1.0";
......
{
"detectors_to_exclude": "assembly-usage,block-timestamp,naming-convention,solc-version,low-level-calls",
"detectors_to_exclude": "assembly-usage,block-timestamp,naming-convention,solc-version,low-level-calls,boolean-equality",
"exclude_informational": true,
"exclude_low": true,
"exclude_medium": true,
......
......@@ -53,9 +53,9 @@
"url": "https://github.com/ethereum-optimism/optimism.git"
},
"devDependencies": {
"@eth-optimism/contracts-bedrock": "0.13.1",
"@eth-optimism/contracts-bedrock": "0.13.2",
"@eth-optimism/core-utils": "^0.12.0",
"@eth-optimism/hardhat-deploy-config": "^0.2.5",
"@eth-optimism/hardhat-deploy-config": "^0.2.6",
"@ethersproject/hardware-wallets": "^5.7.0",
"@nomiclabs/hardhat-ethers": "^2.0.2",
"@nomiclabs/hardhat-etherscan": "^3.0.3",
......
# data transport layer
## 0.5.55
### Patch Changes
- b33208a8f: Add better logging to DTL about shutoff block
- dbe5eb308: Empty patch release to re-release packages that failed to be released by a bug in the release process.
## 0.5.54
### Patch Changes
......
{
"private": true,
"name": "@eth-optimism/data-transport-layer",
"version": "0.5.54",
"version": "0.5.55",
"description": "[Optimism] Service for shuttling data from L1 into L2",
"main": "dist/index",
"types": "dist/index",
......
# @eth-optimism/fault-detector
## 0.6.3
### Patch Changes
- dbe5eb308: Empty patch release to re-release packages that failed to be released by a bug in the release process.
- Updated dependencies [be3315689]
- @eth-optimism/sdk@2.0.2
## 0.6.2
### Patch Changes
......
{
"private": true,
"name": "@eth-optimism/fault-detector",
"version": "0.6.2",
"version": "0.6.3",
"description": "[Optimism] Service for detecting faulty L2 output proposals",
"main": "dist/index",
"types": "dist/index",
......@@ -50,7 +50,7 @@
"@eth-optimism/common-ts": "^0.8.1",
"@eth-optimism/contracts": "^0.5.40",
"@eth-optimism/core-utils": "^0.12.0",
"@eth-optimism/sdk": "^2.0.1",
"@eth-optimism/sdk": "^2.0.2",
"@ethersproject/abstract-provider": "^5.7.0"
}
}
# @eth-optimism/hardhat-deploy-config
## 0.2.6
### Patch Changes
- 5cf646bab: Add getter for other network's deploy config
## 0.2.5
### Patch Changes
......
{
"name": "@eth-optimism/hardhat-deploy-config",
"version": "0.2.5",
"version": "0.2.6",
"description": "[Optimism] Hardhat deploy configuration plugin",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
......
# @eth-optimism/message-relayer
## 0.5.33
### Patch Changes
- dbe5eb308: Empty patch release to re-release packages that failed to be released by a bug in the release process.
- Updated dependencies [be3315689]
- @eth-optimism/sdk@2.0.2
## 0.5.32
### Patch Changes
......
{
"private": true,
"name": "@eth-optimism/message-relayer",
"version": "0.5.32",
"version": "0.5.33",
"description": "[Optimism] Service for automatically relaying L2 to L1 transactions",
"main": "dist/index",
"types": "dist/index",
......@@ -33,7 +33,7 @@
"dependencies": {
"@eth-optimism/common-ts": "0.8.1",
"@eth-optimism/core-utils": "0.12.0",
"@eth-optimism/sdk": "2.0.1",
"@eth-optimism/sdk": "2.0.2",
"ethers": "^5.7.0"
},
"devDependencies": {
......
# @eth-optimism/replica-healthcheck
## 1.2.4
### Patch Changes
- dbe5eb308: Empty patch release to re-release packages that failed to be released by a bug in the release process.
## 1.2.3
### Patch Changes
......
{
"private": true,
"name": "@eth-optimism/replica-healthcheck",
"version": "1.2.3",
"version": "1.2.4",
"description": "[Optimism] Service for monitoring the health of replica nodes",
"main": "dist/index",
"types": "dist/index",
......
# @eth-optimism/sdk
## 2.0.2
### Patch Changes
- be3315689: Have SDK automatically create Standard and ETH bridges when L1StandardBridge is provided.
- Updated dependencies [b16067a9f]
- Updated dependencies [9a02079eb]
- Updated dependencies [98fbe9d22]
- @eth-optimism/contracts-bedrock@0.13.2
## 2.0.1
### Patch Changes
......
{
"name": "@eth-optimism/sdk",
"version": "2.0.1",
"version": "2.0.2",
"description": "[Optimism] Tools for working with Optimism",
"main": "dist/index",
"types": "dist/index",
......@@ -50,7 +50,7 @@
"dependencies": {
"@eth-optimism/contracts": "0.5.40",
"@eth-optimism/core-utils": "0.12.0",
"@eth-optimism/contracts-bedrock": "0.13.1",
"@eth-optimism/contracts-bedrock": "0.13.2",
"lodash": "^4.17.21",
"merkletreejs": "^0.2.27",
"rlp": "^2.2.7"
......
......@@ -119,7 +119,7 @@ transactions, based on their positioning in the L2 block:
1. The first transaction MUST be a [L1 attributes deposited transaction][l1-attr-deposit], followed by
2. an array of zero-or-more [user-deposited transactions][user-deposited] submitted to the deposit
feed contract on L1. User-deposited transactions are only present in the first block of a L2 epoch.
feed contract on L1 (called `OptimismPortal`). User-deposited transactions are only present in the first block of a L2 epoch.
We only define a single new transaction type in order to minimize modifications to L1 client
software, and complexity in general.
......@@ -320,8 +320,7 @@ generated by the [L2 Chain Derivation][g-derivation] process. The content of eac
transaction are determined by the corresponding `TransactionDeposited` event emitted by the
[deposit contract][deposit-contract] on L1.
1. `from` is unchanged from the emitted value (though it may have been transformed to an alias in
the deposit feed contract).
1. `from` is unchanged from the emitted value (though it may have been transformed to an alias in `OptimismPortal`, the deposit feed contract).
2. `to` is any 20-byte address (including the zero address)
- In case of a contract creation (cf. `isCreation`), this address is set to `null`.
3. `mint` is set to the emitted value.
......
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