Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
0a4b1115
Unverified
Commit
0a4b1115
authored
Apr 11, 2023
by
mergify[bot]
Committed by
GitHub
Apr 11, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into sc/core-test-folder-structure
parents
adfa5f56
5b7d62a7
Changes
76
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
76 changed files
with
451 additions
and
141 deletions
+451
-141
clever-jokes-notice.md
.changeset/clever-jokes-notice.md
+0
-5
cuddly-turkeys-burn.md
.changeset/cuddly-turkeys-burn.md
+0
-5
fresh-pots-move.md
.changeset/fresh-pots-move.md
+0
-5
good-clocks-relax.md
.changeset/good-clocks-relax.md
+0
-5
ninety-schools-work.md
.changeset/ninety-schools-work.md
+0
-5
olive-students-love.md
.changeset/olive-students-love.md
+0
-5
pink-chicken-hear.md
.changeset/pink-chicken-hear.md
+0
-5
poor-carrots-walk.md
.changeset/poor-carrots-walk.md
+0
-5
sharp-islands-attend.md
.changeset/sharp-islands-attend.md
+0
-6
tricky-donkeys-lick.md
.changeset/tricky-donkeys-lick.md
+0
-9
CHANGELOG.md
batch-submitter/CHANGELOG.md
+8
-0
package.json
batch-submitter/package.json
+1
-1
package.json
integration-tests/package.json
+2
-2
optimismportal.go
op-bindings/bindings/optimismportal.go
+1
-1
l2_engine.go
op-e2e/actions/l2_engine.go
+1
-1
l2_engine_test.go
op-e2e/actions/l2_engine_test.go
+2
-2
metrics.go
op-node/metrics/metrics.go
+16
-0
channel_in_reader.go
op-node/rollup/derive/channel_in_reader.go
+7
-3
pipeline.go
op-node/rollup/derive/pipeline.go
+2
-1
driver.go
op-node/rollup/driver/driver.go
+1
-0
metrics.go
op-node/testutils/metrics.go
+14
-5
driver.go
op-program/client/driver/driver.go
+53
-0
driver_test.go
op-program/client/driver/driver_test.go
+66
-0
db.go
op-program/client/l2/db.go
+0
-0
db_test.go
op-program/client/l2/db_test.go
+0
-0
engine.go
op-program/client/l2/engine.go
+1
-1
engine_backend.go
op-program/client/l2/engine_backend.go
+1
-1
engine_backend_test.go
op-program/client/l2/engine_backend_test.go
+2
-2
engine_test.go
op-program/client/l2/engine_test.go
+0
-0
block_processor.go
op-program/client/l2/engineapi/block_processor.go
+0
-0
l2_engine_api.go
op-program/client/l2/engineapi/l2_engine_api.go
+0
-0
l2_engine_api_tests.go
op-program/client/l2/engineapi/test/l2_engine_api_tests.go
+1
-1
oracle.go
op-program/client/l2/oracle.go
+0
-0
main.go
op-program/host/cmd/main.go
+26
-7
main_test.go
op-program/host/cmd/main_test.go
+1
-1
config.go
op-program/host/config/config.go
+1
-1
config_test.go
op-program/host/config/config_test.go
+0
-0
flags.go
op-program/host/flags/flags.go
+0
-0
flags_test.go
op-program/host/flags/flags_test.go
+0
-0
l1.go
op-program/host/l1/l1.go
+1
-1
fetcher.go
op-program/host/l2/fetcher.go
+0
-0
fetcher_test.go
op-program/host/l2/fetcher_test.go
+3
-1
l2.go
op-program/host/l2/l2.go
+4
-3
version.go
op-program/host/version/version.go
+0
-0
tx_metrics.go
op-service/txmgr/metrics/tx_metrics.go
+20
-1
CHANGELOG.md
packages/actor-tests/CHANGELOG.md
+11
-0
package.json
packages/actor-tests/package.json
+3
-3
CHANGELOG.md
packages/chain-mon/CHANGELOG.md
+12
-0
package.json
packages/chain-mon/package.json
+2
-2
CHANGELOG.md
packages/contracts-bedrock/CHANGELOG.md
+8
-0
OptimismPortal.sol
packages/contracts-bedrock/contracts/L1/OptimismPortal.sol
+3
-4
local.ts
packages/contracts-bedrock/deploy-config/local.ts
+49
-0
mainnet.ts
packages/contracts-bedrock/deploy-config/mainnet.ts
+1
-1
020-SystemDictatorSteps-1.ts
...ges/contracts-bedrock/deploy/020-SystemDictatorSteps-1.ts
+7
-2
021-SystemDictatorSteps-2.ts
...ges/contracts-bedrock/deploy/021-SystemDictatorSteps-2.ts
+7
-2
hardhat.config.ts
packages/contracts-bedrock/hardhat.config.ts
+8
-0
package.json
packages/contracts-bedrock/package.json
+2
-2
PostSherlock.s.sol
...ges/contracts-bedrock/scripts/upgrades/PostSherlock.s.sol
+1
-1
slither.config.json
packages/contracts-bedrock/slither.config.json
+1
-1
deploy-utils.ts
packages/contracts-bedrock/src/deploy-utils.ts
+22
-0
package.json
packages/contracts-periphery/package.json
+2
-2
CHANGELOG.md
packages/data-transport-layer/CHANGELOG.md
+7
-0
package.json
packages/data-transport-layer/package.json
+1
-1
CHANGELOG.md
packages/fault-detector/CHANGELOG.md
+8
-0
package.json
packages/fault-detector/package.json
+2
-2
CHANGELOG.md
packages/hardhat-deploy-config/CHANGELOG.md
+6
-0
package.json
packages/hardhat-deploy-config/package.json
+1
-1
CHANGELOG.md
packages/message-relayer/CHANGELOG.md
+8
-0
package.json
packages/message-relayer/package.json
+2
-2
CHANGELOG.md
packages/replica-healthcheck/CHANGELOG.md
+6
-0
package.json
packages/replica-healthcheck/package.json
+1
-1
CHANGELOG.md
packages/sdk/CHANGELOG.md
+10
-0
package.json
packages/sdk/package.json
+2
-2
deposits.md
specs/deposits.md
+7
-6
guaranteed-gas-market.md
specs/guaranteed-gas-market.md
+11
-11
system_config.md
specs/system_config.md
+5
-4
No files found.
.changeset/clever-jokes-notice.md
deleted
100644 → 0
View file @
adfa5f56
---
'
@eth-optimism/contracts-bedrock'
:
patch
---
Reduce the time that the system dictator deploy scripts wait before checking the chain state.
.changeset/cuddly-turkeys-burn.md
deleted
100644 → 0
View file @
adfa5f56
---
'
@eth-optimism/sdk'
:
patch
---
Have SDK automatically create Standard and ETH bridges when L1StandardBridge is provided.
.changeset/fresh-pots-move.md
deleted
100644 → 0
View file @
adfa5f56
---
'
@eth-optimism/batch-submitter-service'
:
patch
---
Allow deposit only batches
.changeset/good-clocks-relax.md
deleted
100644 → 0
View file @
adfa5f56
---
'
@eth-optimism/data-transport-layer'
:
patch
---
Add better logging to DTL about shutoff block
.changeset/ninety-schools-work.md
deleted
100644 → 0
View file @
adfa5f56
---
'
@eth-optimism/chain-mon'
:
minor
---
Introduces the balance-mon service to chain-mon.
.changeset/olive-students-love.md
deleted
100644 → 0
View file @
adfa5f56
---
'
@eth-optimism/contracts-bedrock'
:
patch
---
Makes the Proxy contract inheritable by making functions (public virtual).
.changeset/pink-chicken-hear.md
deleted
100644 → 0
View file @
adfa5f56
---
'
@eth-optimism/contracts-bedrock'
:
patch
---
Added a contsructor to the System Dictator
.changeset/poor-carrots-walk.md
deleted
100644 → 0
View file @
adfa5f56
---
'
@eth-optimism/hardhat-deploy-config'
:
patch
---
Add getter for other network's deploy config
.changeset/sharp-islands-attend.md
deleted
100644 → 0
View file @
adfa5f56
---
'
@eth-optimism/batch-submitter-service'
:
patch
---
fix flag name for MaxStateRootElements in batch-submitter
fix log package for proposer
.changeset/tricky-donkeys-lick.md
deleted
100644 → 0
View file @
adfa5f56
---
'
@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.
batch-submitter/CHANGELOG.md
View file @
0a4b1115
# @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
...
...
batch-submitter/package.json
View file @
0a4b1115
{
"name"
:
"@eth-optimism/batch-submitter-service"
,
"version"
:
"0.1.1
5
"
,
"version"
:
"0.1.1
6
"
,
"private"
:
true
,
"devDependencies"
:
{}
}
integration-tests/package.json
View file @
0a4b1115
...
...
@@ -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"
,
...
...
op-bindings/bindings/optimismportal.go
View file @
0a4b1115
This diff is collapsed.
Click to expand it.
op-e2e/actions/l2_engine.go
View file @
0a4b1115
...
...
@@ -4,7 +4,7 @@ import (
"errors"
"github.com/ethereum-optimism/optimism/op-e2e/e2eutils"
"github.com/ethereum-optimism/optimism/op-program/l2/engineapi"
"github.com/ethereum-optimism/optimism/op-program/
client/
l2/engineapi"
"github.com/stretchr/testify/require"
"github.com/ethereum/go-ethereum/common"
...
...
op-e2e/actions/l2_engine_test.go
View file @
0a4b1115
...
...
@@ -4,8 +4,8 @@ import (
"math/big"
"testing"
"github.com/ethereum-optimism/optimism/op-program/l2/engineapi"
"github.com/ethereum-optimism/optimism/op-program/l2/engineapi/test"
"github.com/ethereum-optimism/optimism/op-program/
client/
l2/engineapi"
"github.com/ethereum-optimism/optimism/op-program/
client/
l2/engineapi/test"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/consensus/beacon"
"github.com/ethereum/go-ethereum/consensus/ethash"
...
...
op-node/metrics/metrics.go
View file @
0a4b1115
...
...
@@ -64,6 +64,7 @@ type Metricer interface {
RecordSequencerBuildingDiffTime
(
duration
time
.
Duration
)
RecordSequencerSealingTime
(
duration
time
.
Duration
)
Document
()
[]
metrics
.
DocumentedMetric
RecordChannelInputBytes
(
num
int
)
// P2P Metrics
SetPeerScores
(
scores
map
[
string
]
float64
)
ClientPayloadByNumberEvent
(
num
uint64
,
resultCode
byte
,
duration
time
.
Duration
)
...
...
@@ -131,6 +132,8 @@ type Metrics struct {
GossipEventsTotal
*
prometheus
.
CounterVec
BandwidthTotal
*
prometheus
.
GaugeVec
ChannelInputBytes
prometheus
.
Counter
registry
*
prometheus
.
Registry
factory
metrics
.
Factory
}
...
...
@@ -331,6 +334,12 @@ func NewMetrics(procName string) *Metrics {
"direction"
,
}),
ChannelInputBytes
:
factory
.
NewCounter
(
prometheus
.
CounterOpts
{
Namespace
:
ns
,
Name
:
"channel_input_bytes"
,
Help
:
"Number of compressed bytes added to the channel"
,
}),
P2PReqDurationSeconds
:
factory
.
NewHistogramVec
(
prometheus
.
HistogramOpts
{
Namespace
:
ns
,
Subsystem
:
"p2p"
,
...
...
@@ -635,6 +644,10 @@ func (m *Metrics) PayloadsQuarantineSize(n int) {
m
.
PayloadsQuarantineTotal
.
Set
(
float64
(
n
))
}
func
(
m
*
Metrics
)
RecordChannelInputBytes
(
inputCompressedBytes
int
)
{
m
.
ChannelInputBytes
.
Add
(
float64
(
inputCompressedBytes
))
}
type
noopMetricer
struct
{}
var
NoopMetrics
Metricer
=
new
(
noopMetricer
)
...
...
@@ -737,3 +750,6 @@ func (n *noopMetricer) ServerPayloadByNumberEvent(num uint64, resultCode byte, d
func
(
n
*
noopMetricer
)
PayloadsQuarantineSize
(
int
)
{
}
func
(
n
*
noopMetricer
)
RecordChannelInputBytes
(
int
)
{
}
op-node/rollup/derive/channel_in_reader.go
View file @
0a4b1115
...
...
@@ -21,15 +21,18 @@ type ChannelInReader struct {
nextBatchFn
func
()
(
BatchWithL1InclusionBlock
,
error
)
prev
*
ChannelBank
metrics
Metrics
}
var
_
ResetableStage
=
(
*
ChannelInReader
)(
nil
)
// NewChannelInReader creates a ChannelInReader, which should be Reset(origin) before use.
func
NewChannelInReader
(
log
log
.
Logger
,
prev
*
ChannelBank
)
*
ChannelInReader
{
func
NewChannelInReader
(
log
log
.
Logger
,
prev
*
ChannelBank
,
metrics
Metrics
)
*
ChannelInReader
{
return
&
ChannelInReader
{
log
:
log
,
prev
:
prev
,
log
:
log
,
prev
:
prev
,
metrics
:
metrics
,
}
}
...
...
@@ -41,6 +44,7 @@ func (cr *ChannelInReader) Origin() eth.L1BlockRef {
func
(
cr
*
ChannelInReader
)
WriteChannel
(
data
[]
byte
)
error
{
if
f
,
err
:=
BatchReader
(
bytes
.
NewBuffer
(
data
),
cr
.
Origin
());
err
==
nil
{
cr
.
nextBatchFn
=
f
cr
.
metrics
.
RecordChannelInputBytes
(
len
(
data
))
return
nil
}
else
{
cr
.
log
.
Error
(
"Error creating batch reader from channel data"
,
"err"
,
err
)
...
...
op-node/rollup/derive/pipeline.go
View file @
0a4b1115
...
...
@@ -15,6 +15,7 @@ type Metrics interface {
RecordL1Ref
(
name
string
,
ref
eth
.
L1BlockRef
)
RecordL2Ref
(
name
string
,
ref
eth
.
L2BlockRef
)
RecordUnsafePayloadsBuffer
(
length
uint64
,
memSize
uint64
,
next
eth
.
BlockID
)
RecordChannelInputBytes
(
inputCompresedBytes
int
)
}
type
L1Fetcher
interface
{
...
...
@@ -82,7 +83,7 @@ func NewDerivationPipeline(log log.Logger, cfg *rollup.Config, l1Fetcher L1Fetch
l1Src
:=
NewL1Retrieval
(
log
,
dataSrc
,
l1Traversal
)
frameQueue
:=
NewFrameQueue
(
log
,
l1Src
)
bank
:=
NewChannelBank
(
log
,
cfg
,
frameQueue
,
l1Fetcher
)
chInReader
:=
NewChannelInReader
(
log
,
bank
)
chInReader
:=
NewChannelInReader
(
log
,
bank
,
metrics
)
batchQueue
:=
NewBatchQueue
(
log
,
cfg
,
chInReader
)
attrBuilder
:=
NewFetchingAttributesBuilder
(
cfg
,
l1Fetcher
,
engine
)
attributesQueue
:=
NewAttributesQueue
(
log
,
cfg
,
attrBuilder
,
batchQueue
)
...
...
op-node/rollup/driver/driver.go
View file @
0a4b1115
...
...
@@ -21,6 +21,7 @@ type Metrics interface {
RecordL1Ref
(
name
string
,
ref
eth
.
L1BlockRef
)
RecordL2Ref
(
name
string
,
ref
eth
.
L2BlockRef
)
RecordChannelInputBytes
(
inputCompresedBytes
int
)
RecordUnsafePayloadsBuffer
(
length
uint64
,
memSize
uint64
,
next
eth
.
BlockID
)
...
...
op-node/testutils/metrics.go
View file @
0a4b1115
package
testutils
import
"github.com/ethereum-optimism/optimism/op-node/eth"
import
(
"github.com/ethereum-optimism/optimism/op-node/eth"
)
// TestDerivationMetrics implements the metrics used in the derivation pipeline as no-op operations.
// Optionally a test may hook into the metrics
type
TestDerivationMetrics
struct
{
FnRecordL1ReorgDepth
func
(
d
uint64
)
FnRecordL1Ref
func
(
name
string
,
ref
eth
.
L1BlockRef
)
FnRecordL2Ref
func
(
name
string
,
ref
eth
.
L2BlockRef
)
FnRecordUnsafePayloads
func
(
length
uint64
,
memSize
uint64
,
next
eth
.
BlockID
)
FnRecordL1ReorgDepth
func
(
d
uint64
)
FnRecordL1Ref
func
(
name
string
,
ref
eth
.
L1BlockRef
)
FnRecordL2Ref
func
(
name
string
,
ref
eth
.
L2BlockRef
)
FnRecordUnsafePayloads
func
(
length
uint64
,
memSize
uint64
,
next
eth
.
BlockID
)
FnRecordChannelInputBytes
func
(
inputCompresedBytes
int
)
}
func
(
t
*
TestDerivationMetrics
)
RecordL1ReorgDepth
(
d
uint64
)
{
...
...
@@ -35,6 +38,12 @@ func (t *TestDerivationMetrics) RecordUnsafePayloadsBuffer(length uint64, memSiz
}
}
func
(
t
*
TestDerivationMetrics
)
RecordChannelInputBytes
(
inputCompresedBytes
int
)
{
if
t
.
FnRecordChannelInputBytes
!=
nil
{
t
.
FnRecordChannelInputBytes
(
inputCompresedBytes
)
}
}
type
TestRPCMetrics
struct
{}
func
(
n
*
TestRPCMetrics
)
RecordRPCServerRequest
(
method
string
)
func
()
{
...
...
op-program/client/driver/driver.go
0 → 100644
View file @
0a4b1115
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"
"github.com/ethereum-optimism/optimism/op-node/rollup/derive"
"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
*
rollup
.
Config
,
l1Source
derive
.
L1Fetcher
,
l2Source
derive
.
Engine
)
*
Driver
{
pipeline
:=
derive
.
NewDerivationPipeline
(
logger
,
cfg
,
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
()
}
op-program/client/driver/driver_test.go
0 → 100644
View file @
0a4b1115
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
{}
}
op-program/l2/db.go
→
op-program/
client/
l2/db.go
View file @
0a4b1115
File moved
op-program/l2/db_test.go
→
op-program/
client/
l2/db_test.go
View file @
0a4b1115
File moved
op-program/l2/engine.go
→
op-program/
client/
l2/engine.go
View file @
0a4b1115
...
...
@@ -8,7 +8,7 @@ import (
"github.com/ethereum-optimism/optimism/op-node/eth"
"github.com/ethereum-optimism/optimism/op-node/rollup"
"github.com/ethereum-optimism/optimism/op-node/rollup/derive"
"github.com/ethereum-optimism/optimism/op-program/l2/engineapi"
"github.com/ethereum-optimism/optimism/op-program/
client/
l2/engineapi"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/log"
...
...
op-program/l2/engine_backend.go
→
op-program/
client/
l2/engine_backend.go
View file @
0a4b1115
...
...
@@ -4,7 +4,7 @@ import (
"fmt"
"math/big"
"github.com/ethereum-optimism/optimism/op-program/l2/engineapi"
"github.com/ethereum-optimism/optimism/op-program/
client/
l2/engineapi"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/consensus"
"github.com/ethereum/go-ethereum/consensus/beacon"
...
...
op-program/l2/engine_backend_test.go
→
op-program/
client/
l2/engine_backend_test.go
View file @
0a4b1115
...
...
@@ -6,8 +6,8 @@ import (
"github.com/ethereum-optimism/optimism/op-chain-ops/genesis"
"github.com/ethereum-optimism/optimism/op-node/testlog"
"github.com/ethereum-optimism/optimism/op-program/l2/engineapi"
"github.com/ethereum-optimism/optimism/op-program/l2/engineapi/test"
"github.com/ethereum-optimism/optimism/op-program/
client/
l2/engineapi"
"github.com/ethereum-optimism/optimism/op-program/
client/
l2/engineapi/test"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/consensus/beacon"
"github.com/ethereum/go-ethereum/core"
...
...
op-program/l2/engine_test.go
→
op-program/
client/
l2/engine_test.go
View file @
0a4b1115
File moved
op-program/l2/engineapi/block_processor.go
→
op-program/
client/
l2/engineapi/block_processor.go
View file @
0a4b1115
File moved
op-program/l2/engineapi/l2_engine_api.go
→
op-program/
client/
l2/engineapi/l2_engine_api.go
View file @
0a4b1115
File moved
op-program/l2/engineapi/test/l2_engine_api_tests.go
→
op-program/
client/
l2/engineapi/test/l2_engine_api_tests.go
View file @
0a4b1115
...
...
@@ -7,7 +7,7 @@ import (
"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-optimism/optimism/op-program/l2/engineapi"
"github.com/ethereum-optimism/optimism/op-program/
client/
l2/engineapi"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/log"
...
...
op-program/l2/oracle.go
→
op-program/
client/
l2/oracle.go
View file @
0a4b1115
File moved
op-program/cmd/main.go
→
op-program/
host/
cmd/main.go
View file @
0a4b1115
...
...
@@ -4,14 +4,18 @@ import (
"context"
"errors"
"fmt"
"io"
"os"
"time"
"github.com/ethereum-optimism/optimism/op-node/chaincfg"
"github.com/ethereum-optimism/optimism/op-program/config"
"github.com/ethereum-optimism/optimism/op-program/flags"
"github.com/ethereum-optimism/optimism/op-program/l1"
"github.com/ethereum-optimism/optimism/op-program/l2"
"github.com/ethereum-optimism/optimism/op-program/version"
"github.com/ethereum-optimism/optimism/op-node/rollup/derive"
cldr
"github.com/ethereum-optimism/optimism/op-program/client/driver"
"github.com/ethereum-optimism/optimism/op-program/host/config"
"github.com/ethereum-optimism/optimism/op-program/host/flags"
"github.com/ethereum-optimism/optimism/op-program/host/l1"
"github.com/ethereum-optimism/optimism/op-program/host/l2"
"github.com/ethereum-optimism/optimism/op-program/host/version"
oplog
"github.com/ethereum-optimism/optimism/op-service/log"
"github.com/ethereum/go-ethereum/log"
"github.com/urfave/cli"
...
...
@@ -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
:=
cldr
.
NewDriver
(
logger
,
cfg
.
Rollup
,
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
}
op-program/cmd/main_test.go
→
op-program/
host/
cmd/main_test.go
View file @
0a4b1115
...
...
@@ -7,7 +7,7 @@ import (
"github.com/ethereum-optimism/optimism/op-node/chaincfg"
"github.com/ethereum-optimism/optimism/op-node/sources"
"github.com/ethereum-optimism/optimism/op-program/config"
"github.com/ethereum-optimism/optimism/op-program/
host/
config"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/log"
"github.com/stretchr/testify/require"
...
...
op-program/config/config.go
→
op-program/
host/
config/config.go
View file @
0a4b1115
...
...
@@ -6,7 +6,7 @@ import (
opnode
"github.com/ethereum-optimism/optimism/op-node"
"github.com/ethereum-optimism/optimism/op-node/rollup"
"github.com/ethereum-optimism/optimism/op-node/sources"
"github.com/ethereum-optimism/optimism/op-program/flags"
"github.com/ethereum-optimism/optimism/op-program/
host/
flags"
"github.com/ethereum/go-ethereum/common"
"github.com/urfave/cli"
)
...
...
op-program/config/config_test.go
→
op-program/
host/
config/config_test.go
View file @
0a4b1115
File moved
op-program/flags/flags.go
→
op-program/
host/
flags/flags.go
View file @
0a4b1115
File moved
op-program/flags/flags_test.go
→
op-program/
host/
flags/flags_test.go
View file @
0a4b1115
File moved
op-program/l1/l1.go
→
op-program/
host/
l1/l1.go
View file @
0a4b1115
...
...
@@ -6,7 +6,7 @@ import (
"github.com/ethereum-optimism/optimism/op-node/client"
"github.com/ethereum-optimism/optimism/op-node/rollup/derive"
"github.com/ethereum-optimism/optimism/op-node/sources"
"github.com/ethereum-optimism/optimism/op-program/config"
"github.com/ethereum-optimism/optimism/op-program/
host/
config"
"github.com/ethereum/go-ethereum/log"
)
...
...
op-program/l2/fetcher.go
→
op-program/
host/
l2/fetcher.go
View file @
0a4b1115
File moved
op-program/l2/fetcher_test.go
→
op-program/
host/
l2/fetcher_test.go
View file @
0a4b1115
...
...
@@ -10,6 +10,8 @@ import (
"testing"
"github.com/ethereum-optimism/optimism/op-node/testutils"
cll2
"github.com/ethereum-optimism/optimism/op-program/client/l2"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/core/rawdb"
...
...
@@ -19,7 +21,7 @@ import (
)
// Require the fetching oracle to implement StateOracle
var
_
StateOracle
=
(
*
FetchingL2Oracle
)(
nil
)
var
_
cll2
.
StateOracle
=
(
*
FetchingL2Oracle
)(
nil
)
type
callContextRequest
struct
{
ctx
context
.
Context
...
...
op-program/l2/l2.go
→
op-program/
host/
l2/l2.go
View file @
0a4b1115
...
...
@@ -7,7 +7,8 @@ import (
"os"
"github.com/ethereum-optimism/optimism/op-node/rollup/derive"
"github.com/ethereum-optimism/optimism/op-program/config"
cll2
"github.com/ethereum-optimism/optimism/op-program/client/l2"
"github.com/ethereum-optimism/optimism/op-program/host/config"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/params"
...
...
@@ -23,11 +24,11 @@ func NewFetchingEngine(ctx context.Context, logger log.Logger, cfg *config.Confi
return
nil
,
fmt
.
Errorf
(
"connect l2 oracle: %w"
,
err
)
}
engineBackend
,
err
:=
NewOracleBackedL2Chain
(
logger
,
oracle
,
genesis
,
cfg
.
L2Head
)
engineBackend
,
err
:=
cll2
.
NewOracleBackedL2Chain
(
logger
,
oracle
,
genesis
,
cfg
.
L2Head
)
if
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"create l2 chain: %w"
,
err
)
}
return
NewOracleEngine
(
cfg
.
Rollup
,
logger
,
engineBackend
),
nil
return
cll2
.
NewOracleEngine
(
cfg
.
Rollup
,
logger
,
engineBackend
),
nil
}
func
loadL2Genesis
(
cfg
*
config
.
Config
)
(
*
params
.
ChainConfig
,
error
)
{
...
...
op-program/version/version.go
→
op-program/
host/
version/version.go
View file @
0a4b1115
File moved
op-service/txmgr/metrics/tx_metrics.go
View file @
0a4b1115
...
...
@@ -19,7 +19,9 @@ type TxMetricer interface {
type
TxMetrics
struct
{
TxL1GasFee
prometheus
.
Gauge
txFees
prometheus
.
Counter
TxGasBump
prometheus
.
Gauge
txFeeHistogram
prometheus
.
Histogram
LatencyConfirmedTx
prometheus
.
Gauge
currentNonce
prometheus
.
Gauge
txPublishError
*
prometheus
.
CounterVec
...
...
@@ -49,6 +51,19 @@ func MakeTxMetrics(ns string, factory metrics.Factory) TxMetrics {
Help
:
"L1 gas fee for transactions in GWEI"
,
Subsystem
:
"txmgr"
,
}),
txFees
:
factory
.
NewCounter
(
prometheus
.
CounterOpts
{
Namespace
:
ns
,
Name
:
"tx_fee_gwei_total"
,
Help
:
"Sum of fees spent for all transactions in GWEI"
,
Subsystem
:
"txmgr"
,
}),
txFeeHistogram
:
factory
.
NewHistogram
(
prometheus
.
HistogramOpts
{
Namespace
:
ns
,
Name
:
"tx_fee_histogram_gwei"
,
Help
:
"Tx Fee in GWEI"
,
Subsystem
:
"txmgr"
,
Buckets
:
[]
float64
{
0.5
,
1
,
2
,
5
,
10
,
20
,
40
,
60
,
80
,
100
,
200
,
400
,
800
,
1600
},
}),
TxGasBump
:
factory
.
NewGauge
(
prometheus
.
GaugeOpts
{
Namespace
:
ns
,
Name
:
"tx_gas_bump"
,
...
...
@@ -90,8 +105,12 @@ func (t *TxMetrics) RecordNonce(nonce uint64) {
// TxConfirmed records lots of information about the confirmed transaction
func
(
t
*
TxMetrics
)
TxConfirmed
(
receipt
*
types
.
Receipt
)
{
fee
:=
float64
(
receipt
.
EffectiveGasPrice
.
Uint64
()
*
receipt
.
GasUsed
/
params
.
GWei
)
t
.
confirmEvent
.
Record
(
receiptStatusString
(
receipt
))
t
.
TxL1GasFee
.
Set
(
float64
(
receipt
.
EffectiveGasPrice
.
Uint64
()
*
receipt
.
GasUsed
/
params
.
GWei
))
t
.
TxL1GasFee
.
Set
(
fee
)
t
.
txFees
.
Add
(
fee
)
t
.
txFeeHistogram
.
Observe
(
fee
)
}
func
(
t
*
TxMetrics
)
RecordGasBumpCount
(
times
int
)
{
...
...
packages/actor-tests/CHANGELOG.md
View file @
0a4b1115
# @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
...
...
packages/actor-tests/package.json
View file @
0a4b1115
{
"name"
:
"@eth-optimism/actor-tests"
,
"version"
:
"0.0.2
3
"
,
"version"
:
"0.0.2
4
"
,
"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"
,
...
...
packages/chain-mon/CHANGELOG.md
View file @
0a4b1115
# @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
...
...
packages/chain-mon/package.json
View file @
0a4b1115
{
"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"
,
...
...
packages/contracts-bedrock/CHANGELOG.md
View file @
0a4b1115
# @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
...
...
packages/contracts-bedrock/contracts/L1/OptimismPortal.sol
View file @
0a4b1115
...
...
@@ -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;
...
...
packages/contracts-bedrock/deploy-config/local.ts
0 → 100644
View file @
0a4b1115
import
{
DeployConfig
}
from
'
../src/deploy-config
'
const
config
:
DeployConfig
=
{
finalSystemOwner
:
'
0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
'
,
controller
:
'
0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
'
,
portalGuardian
:
'
0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
'
,
proxyAdminOwner
:
'
0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
'
,
l1StartingBlockTag
:
'
0x126e52a0cc0ae18948f567ee9443f4a8f0db67c437706e35baee424eb314a0d0
'
,
l1ChainID
:
1
,
l2ChainID
:
10
,
l2BlockTime
:
2
,
maxSequencerDrift
:
600
,
sequencerWindowSize
:
3600
,
channelTimeout
:
300
,
p2pSequencerAddress
:
'
0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65
'
,
batchInboxAddress
:
'
0xff00000000000000000000000000000000000010
'
,
batchSenderAddress
:
'
0x70997970C51812dc3A010C7d01b50e0d17dc79C8
'
,
l2OutputOracleSubmissionInterval
:
20
,
l2OutputOracleStartingTimestamp
:
1679069195
,
l2OutputOracleStartingBlockNumber
:
79149704
,
l2OutputOracleProposer
:
'
0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC
'
,
l2OutputOracleChallenger
:
'
0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC
'
,
finalizationPeriodSeconds
:
2
,
baseFeeVaultRecipient
:
'
0x90F79bf6EB2c4f870365E785982E1f101E93b906
'
,
l1FeeVaultRecipient
:
'
0x90F79bf6EB2c4f870365E785982E1f101E93b906
'
,
sequencerFeeVaultRecipient
:
'
0x90F79bf6EB2c4f870365E785982E1f101E93b906
'
,
governanceTokenName
:
'
Optimism
'
,
governanceTokenSymbol
:
'
OP
'
,
governanceTokenOwner
:
'
0x90F79bf6EB2c4f870365E785982E1f101E93b906
'
,
l2GenesisBlockGasLimit
:
'
0x17D7840
'
,
l2GenesisBlockCoinbase
:
'
0x4200000000000000000000000000000000000011
'
,
l2GenesisBlockBaseFeePerGas
:
'
0x3b9aca00
'
,
gasPriceOracleOverhead
:
2100
,
gasPriceOracleScalar
:
1000000
,
eip1559Denominator
:
50
,
eip1559Elasticity
:
10
,
l2GenesisRegolithTimeOffset
:
'
0x0
'
,
}
export
default
config
packages/contracts-bedrock/deploy-config/mainnet.ts
View file @
0a4b1115
...
...
@@ -7,6 +7,7 @@ const config: DeployConfig = {
finalSystemOwner
:
'
0x9BA6e03D8B90dE867373Db8cF1A58d2F7F006b3A
'
,
controller
:
'
0x78339d822c23d943e4a2d4c3dd5408f66e6d662d
'
,
portalGuardian
:
'
0x78339d822c23d943e4a2d4c3dd5408f66e6d662d
'
,
proxyAdminOwner
:
'
0x90F79bf6EB2c4f870365E785982E1f101E93b906
'
,
l1StartingBlockTag
:
'
0x126e52a0cc0ae18948f567ee9443f4a8f0db67c437706e35baee424eb314a0d0
'
,
...
...
@@ -28,7 +29,6 @@ const config: DeployConfig = {
l2OutputOracleChallenger
:
'
0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC
'
,
finalizationPeriodSeconds
:
2
,
proxyAdminOwner
:
'
0x90F79bf6EB2c4f870365E785982E1f101E93b906
'
,
baseFeeVaultRecipient
:
'
0x90F79bf6EB2c4f870365E785982E1f101E93b906
'
,
l1FeeVaultRecipient
:
'
0x90F79bf6EB2c4f870365E785982E1f101E93b906
'
,
sequencerFeeVaultRecipient
:
'
0x90F79bf6EB2c4f870365E785982E1f101E93b906
'
,
...
...
packages/contracts-bedrock/deploy/020-SystemDictatorSteps-1.ts
View file @
0a4b1115
...
...
@@ -13,6 +13,7 @@ import {
getDeploymentAddress
,
doOwnershipTransfer
,
doPhase
,
liveDeployer
,
}
from
'
../src/deploy-utils
'
const
uint128Max
=
ethers
.
BigNumber
.
from
(
'
0xffffffffffffffffffffffffffffffff
'
)
...
...
@@ -66,8 +67,12 @@ const deployFn: DeployFunction = async (hre) => {
])
// If we have the key for the controller then we don't need to wait for external txns.
const
isLiveDeployer
=
deployer
.
toLowerCase
()
===
hre
.
deployConfig
.
controller
.
toLowerCase
()
// Set the DISABLE_LIVE_DEPLOYER=true in the env to ensure the script will pause to simulate scenarios
// where the controller is not the deployer.
const
isLiveDeployer
=
await
liveDeployer
({
hre
,
disabled
:
process
.
env
.
DISABLE_LIVE_DEPLOYER
,
})
// Transfer ownership of the ProxyAdmin to the SystemDictator.
if
((
await
ProxyAdmin
.
owner
())
!==
SystemDictator
.
address
)
{
...
...
packages/contracts-bedrock/deploy/021-SystemDictatorSteps-2.ts
View file @
0a4b1115
...
...
@@ -15,6 +15,7 @@ import {
doStep
,
printTenderlySimulationLink
,
printCastCommand
,
liveDeployer
,
}
from
'
../src/deploy-utils
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
...
...
@@ -82,8 +83,12 @@ const deployFn: DeployFunction = async (hre) => {
])
// If we have the key for the controller then we don't need to wait for external txns.
const
isLiveDeployer
=
deployer
.
toLowerCase
()
===
hre
.
deployConfig
.
controller
.
toLowerCase
()
// Set the DISABLE_LIVE_DEPLOYER=true in the env to ensure the script will pause to simulate scenarios
// where the controller is not the deployer.
const
isLiveDeployer
=
await
liveDeployer
({
hre
,
disabled
:
process
.
env
.
DISABLE_LIVE_DEPLOYER
,
})
// Step 3 clears out some state from the AddressManager.
await
doStep
({
...
...
packages/contracts-bedrock/hardhat.config.ts
View file @
0a4b1115
...
...
@@ -22,6 +22,14 @@ const config: HardhatUserConfig = {
hardhat
:
{
live
:
false
,
},
local
:
{
live
:
false
,
url
:
'
http://localhost:8545
'
,
saveDeployments
:
false
,
accounts
:
[
'
ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
'
,
],
},
// NOTE: The 'mainnet' network is currently being used for mainnet rehearsals.
mainnet
:
{
url
:
process
.
env
.
L1_RPC
||
'
https://mainnet-l1-rehearsal.optimism.io
'
,
...
...
packages/contracts-bedrock/package.json
View file @
0a4b1115
{
"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"
,
...
...
packages/contracts-bedrock/scripts/upgrades/PostSherlock.s.sol
View file @
0a4b1115
...
...
@@ -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";
...
...
packages/contracts-bedrock/slither.config.json
View file @
0a4b1115
{
"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
,
...
...
packages/contracts-bedrock/src/deploy-utils.ts
View file @
0a4b1115
...
...
@@ -355,6 +355,28 @@ export const doOwnershipTransfer = async (opts: {
}
}
/**
* Check if the script should submit the transaction or wait for the deployer to do it manually.
*
* @param hre HardhatRuntimeEnvironment.
* @param ovveride Allow m
* @returns True if the current step is the target step.
*/
export
const
liveDeployer
=
async
(
opts
:
{
hre
:
HardhatRuntimeEnvironment
disabled
:
string
|
undefined
}):
Promise
<
boolean
>
=>
{
let
ret
:
boolean
if
(
!!
opts
.
disabled
)
{
ret
=
false
}
const
{
deployer
}
=
await
opts
.
hre
.
getNamedAccounts
()
ret
=
deployer
.
toLowerCase
()
===
opts
.
hre
.
deployConfig
.
controller
.
toLowerCase
()
console
.
log
(
'
Setting live deployer to
'
,
ret
)
return
ret
}
/**
* Mini helper for checking if the current step is a target step.
*
...
...
packages/contracts-periphery/package.json
View file @
0a4b1115
...
...
@@ -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"
,
...
...
packages/data-transport-layer/CHANGELOG.md
View file @
0a4b1115
# 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
...
...
packages/data-transport-layer/package.json
View file @
0a4b1115
{
"private"
:
true
,
"name"
:
"@eth-optimism/data-transport-layer"
,
"version"
:
"0.5.5
4
"
,
"version"
:
"0.5.5
5
"
,
"description"
:
"[Optimism] Service for shuttling data from L1 into L2"
,
"main"
:
"dist/index"
,
"types"
:
"dist/index"
,
...
...
packages/fault-detector/CHANGELOG.md
View file @
0a4b1115
# @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
...
...
packages/fault-detector/package.json
View file @
0a4b1115
{
"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"
}
}
packages/hardhat-deploy-config/CHANGELOG.md
View file @
0a4b1115
# @eth-optimism/hardhat-deploy-config
## 0.2.6
### Patch Changes
-
5cf646bab: Add getter for other network's deploy config
## 0.2.5
### Patch Changes
...
...
packages/hardhat-deploy-config/package.json
View file @
0a4b1115
{
"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"
,
...
...
packages/message-relayer/CHANGELOG.md
View file @
0a4b1115
# @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
...
...
packages/message-relayer/package.json
View file @
0a4b1115
{
"private"
:
true
,
"name"
:
"@eth-optimism/message-relayer"
,
"version"
:
"0.5.3
2
"
,
"version"
:
"0.5.3
3
"
,
"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"
:
{
...
...
packages/replica-healthcheck/CHANGELOG.md
View file @
0a4b1115
# @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
...
...
packages/replica-healthcheck/package.json
View file @
0a4b1115
{
"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"
,
...
...
packages/sdk/CHANGELOG.md
View file @
0a4b1115
# @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
...
...
packages/sdk/package.json
View file @
0a4b1115
{
"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"
...
...
specs/deposits.md
View file @
0a4b1115
...
...
@@ -118,8 +118,9 @@ Although we define only one new transaction type, we can distinguish between two
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.
2.
an array of zero-or-more
[
user-deposited transactions
][
user-deposited
]
submitted to the deposit 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.
...
...
@@ -288,8 +289,8 @@ The predeploy stores the following values:
and reset to 0 at the start of a new epoch.
-
System configurables tied to the L1 block, see
[
System configuration specification
](
./system_config.md
)
:
-
`batcherHash`
(
`bytes32`
): A versioned commitment to the batch-submitter(s) currently operating.
-
`
l1FeeO
verhead`
(
`uint256`
): The L1 fee overhead to apply to L1 cost computation of transactions in this L2 block.
-
`
l1FeeS
calar`
(
`uint256`
): The L1 fee scalar to apply to L1 cost computation of transactions in this L2 block.
-
`
o
verhead`
(
`uint256`
): The L1 fee overhead to apply to L1 cost computation of transactions in this L2 block.
-
`
s
calar`
(
`uint256`
): The L1 fee scalar to apply to L1 cost computation of transactions in this L2 block.
The contract implements an authorization scheme, such that it only accepts state-changing calls from
the
[
depositor account
][
depositor-account
]
.
...
...
@@ -320,8 +321,8 @@ 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.
...
...
specs/guaranteed-gas-market.md
View file @
0a4b1115
...
...
@@ -93,7 +93,7 @@ def clamp(v: i256, min: u128, max: u128) -> u128:
if
prev_num
==
now_num
:
now_basefee
=
prev_basefee
now_bought_gas
=
prev_bought_gas
+
requested_gas
elif
prev_num
!=
now_num
:
elif
prev_num
!=
now_num
:
# Width extension and conversion to signed integer math
gas_used_delta
=
int128
(
prev_bought_gas
)
-
int128
(
TARGET_RESOURCE_LIMIT
)
# Use truncating (round to 0) division - solidity's default.
...
...
@@ -101,18 +101,18 @@ elif prev_num != now_num :
base_fee_per_gas_delta
=
prev_basefee
*
gas_used_delta
/
TARGET_RESOURCE_LIMIT
/
BASE_FEE_MAX_CHANGE_DENOMINATOR
now_basefee_wide
=
prev_basefee
+
base_fee_per_gas_delta
now_basefee
=
clamp
(
now_basefee_wide
,
min
=
MINIMUM_BASEFEE
,
max
=
UINT_
64
_MAX_VALUE
)
now_basefee
=
clamp
(
now_basefee_wide
,
min
=
MINIMUM_BASEFEE
,
max
=
UINT_
128
_MAX_VALUE
)
now_bought_gas
=
requested_gas
# If we skipped multiple blocks between the previous block and now update the basefee again.
# This is not exactly the same as iterating the above function, but quite close for reasonable
# gas target values. It is also constant time wrt the number of missed blocks which is important
# for keeping gas usage stable.
if
prev_num
+
1
<
now_num
:
n
=
now_num
-
prev_num
-
1
# Apply 7/8 reduction to prev_basefee for the n empty blocks in a row.
now_basefee_wide
=
prev
_basefee
*
pow
(
1
-
(
1
/
BASE_FEE_MAX_CHANGE_DENOMINATOR
),
n
)
now_basefee
=
clamp
(
now_basefee_wide
,
min
=
MINIMUM_BASEFEE
,
max
=
UINT_64_MAX_VALUE
)
# If we skipped multiple blocks between the previous block and now update the basefee again.
# This is not exactly the same as iterating the above function, but quite close for reasonable
# gas target values. It is also constant time wrt the number of missed blocks which is important
# for keeping gas usage stable.
if
prev_num
+
1
<
now_num
:
n
=
now_num
-
prev_num
-
1
# Apply 7/8 reduction to prev_basefee for the n empty blocks in a row.
now_basefee_wide
=
now
_basefee
*
pow
(
1
-
(
1
/
BASE_FEE_MAX_CHANGE_DENOMINATOR
),
n
)
now_basefee
=
clamp
(
now_basefee_wide
,
min
=
MINIMUM_BASEFEE
,
max
=
type
(
uint128
)
.
max
)
require
(
now_bought_gas
<
MAX_RESOURCE_LIMIT
)
...
...
specs/system_config.md
View file @
0a4b1115
...
...
@@ -6,7 +6,7 @@
-
[
System config contents (version 0)
](
#system-config-contents-version-0
)
-
[
`batcherHash` (`bytes32`)
](
#batcherhash-bytes32
)
-
[
`
l1FeeOverhead` and `l1FeeScalar` (`uint256,uint256`)
](
#l1feeoverhead-and-l1fee
scalar-uint256uint256
)
-
[
`
overhead` and `scalar` (`uint256,uint256`)
](
#overhead-and-
scalar-uint256uint256
)
-
[
`gasLimit` (`uint64`)
](
#gaslimit-uint64
)
-
[
`unsafeBlockSigner` (`address`)
](
#unsafeblocksigner-address
)
-
[
Writing the system config
](
#writing-the-system-config
)
...
...
@@ -31,7 +31,7 @@ Version `0` embeds the current batch submitter ethereum address (`bytes20`) in t
In the future this versioned hash may become a commitment to a more extensive configuration,
to enable more extensive redundancy and/or rotation configurations.
### `
l1FeeOverhead` and `l1FeeS
calar` (`uint256,uint256`)
### `
overhead` and `s
calar` (`uint256,uint256`)
The L1 fee parameters, also known as Gas Price Oracle (GPO) parameters,
are updated in conjunction and apply new L1 costs to the L2 transactions.
...
...
@@ -70,7 +70,7 @@ A rollup node initializes its derivation process by finding a starting point bas
-
When started from L2 genesis, the initial system configuration is retrieved from the rollup chain configuration.
-
When started from an existing L2 chain, a previously included L1 block is determined as derivation starting point,
and the system config can thus be retrieved from the last L2 block that referenced the L1 block as L1 origin:
-
`batcherHash`
,
`
l1FeeOverhead`
and
`l1FeeS
calar`
are retrieved from the L1 block info transaction.
-
`batcherHash`
,
`
overhead`
and
`s
calar`
are retrieved from the L1 block info transaction.
-
`gasLimit`
is retrieved from the L2 block header.
-
other future variables may also be retrieved from other contents of the L2 block, such as the header.
...
...
@@ -86,8 +86,9 @@ The contained log events are filtered and processed as follows:
-
the remaining event data is opaque, encoded as ABI bytes (i.e. includes offset and length data),
and encodes the configuration update. In version
`0`
the following types are supported:
-
type
`0`
:
`batcherHash`
overwrite, as
`bytes32`
payload.
-
type
`1`
:
`
l1FeeOverhead`
and
`l1FeeS
calar`
overwrite, as two packed
`uint256`
entries.
-
type
`1`
:
`
overhead`
and
`s
calar`
overwrite, as two packed
`uint256`
entries.
-
type
`2`
:
`gasLimit`
overwrite, as
`uint64`
payload.
-
type
`3`
:
`unsafeBlockSigner`
overwrite, as
`address`
payload.
Note that individual derivation stages may be processing different L1 blocks,
and should thus maintain individual system configuration copies,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment