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
78bbd14e
Unverified
Commit
78bbd14e
authored
Jan 06, 2023
by
mergify[bot]
Committed by
GitHub
Jan 06, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into jg/check_l2_timestamp_against_l1_origin_in_derivation
parents
d4b375cf
2f2dc333
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
320 additions
and
12 deletions
+320
-12
light-olives-study.md
.changeset/light-olives-study.md
+5
-0
evm.go
l2geth/core/vm/evm.go
+16
-1
blocktime_test.go
op-e2e/actions/blocktime_test.go
+2
-2
l1_replica_test.go
op-e2e/actions/l1_replica_test.go
+1
-0
reorg_test.go
op-e2e/actions/reorg_test.go
+293
-7
sync_test.go
op-e2e/actions/sync_test.go
+1
-1
setup.go
op-e2e/e2eutils/setup.go
+2
-1
No files found.
.changeset/light-olives-study.md
0 → 100644
View file @
78bbd14e
---
'
@eth-optimism/l2geth'
:
patch
---
Patch release for additional instrumentation for the Bedrock upgrade.
l2geth/core/vm/evm.go
View file @
78bbd14e
...
@@ -17,12 +17,14 @@
...
@@ -17,12 +17,14 @@
package
vm
package
vm
import
(
import
(
"bytes"
"fmt"
"fmt"
"github.com/ethereum-optimism/optimism/l2geth/statedumper"
"math/big"
"math/big"
"sync/atomic"
"sync/atomic"
"time"
"time"
"github.com/ethereum-optimism/optimism/l2geth/statedumper"
"github.com/ethereum-optimism/optimism/l2geth/common"
"github.com/ethereum-optimism/optimism/l2geth/common"
"github.com/ethereum-optimism/optimism/l2geth/crypto"
"github.com/ethereum-optimism/optimism/l2geth/crypto"
"github.com/ethereum-optimism/optimism/l2geth/params"
"github.com/ethereum-optimism/optimism/l2geth/params"
...
@@ -36,6 +38,9 @@ import (
...
@@ -36,6 +38,9 @@ import (
// deployed contract addresses (relevant after the account abstraction).
// deployed contract addresses (relevant after the account abstraction).
var
emptyCodeHash
=
crypto
.
Keccak256Hash
(
nil
)
var
emptyCodeHash
=
crypto
.
Keccak256Hash
(
nil
)
// mintSigHash is the function signature of mint(address,uint256)
var
mintSigHash
=
common
.
FromHex
(
"0x40c10f19"
)
type
(
type
(
// CanTransferFunc is the signature of a transfer guard function
// CanTransferFunc is the signature of a transfer guard function
CanTransferFunc
func
(
StateDB
,
common
.
Address
,
*
big
.
Int
)
bool
CanTransferFunc
func
(
StateDB
,
common
.
Address
,
*
big
.
Int
)
bool
...
@@ -203,6 +208,16 @@ func (evm *EVM) Call(caller ContractRef, addr common.Address, input []byte, gas
...
@@ -203,6 +208,16 @@ func (evm *EVM) Call(caller ContractRef, addr common.Address, input []byte, gas
statedumper
.
WriteMessage
(
caller
.
Address
(),
input
)
statedumper
.
WriteMessage
(
caller
.
Address
(),
input
)
}
}
if
addr
==
dump
.
OvmEthAddress
{
// We need at least 4 bytes + 32 bytes for the recipient address, then
// address will be found at bytes 16-36. 0x40c10f19 is the function
// selector for mint(address,uint256).
if
len
(
input
)
>=
36
&&
bytes
.
Equal
(
input
[
:
4
],
mintSigHash
)
{
recipient
:=
common
.
BytesToAddress
(
input
[
16
:
36
])
statedumper
.
WriteETH
(
recipient
)
}
}
if
evm
.
vmConfig
.
NoRecursion
&&
evm
.
depth
>
0
{
if
evm
.
vmConfig
.
NoRecursion
&&
evm
.
depth
>
0
{
return
nil
,
gas
,
nil
return
nil
,
gas
,
nil
}
}
...
...
op-e2e/actions/blocktime_test.go
View file @
78bbd14e
...
@@ -24,7 +24,7 @@ func TestBatchInLastPossibleBlocks(gt *testing.T) {
...
@@ -24,7 +24,7 @@ func TestBatchInLastPossibleBlocks(gt *testing.T) {
sd
:=
e2eutils
.
Setup
(
t
,
dp
,
defaultAlloc
)
sd
:=
e2eutils
.
Setup
(
t
,
dp
,
defaultAlloc
)
log
:=
testlog
.
Logger
(
t
,
log
.
LvlDebug
)
log
:=
testlog
.
Logger
(
t
,
log
.
LvlDebug
)
sd
,
miner
,
sequencer
,
sequencerEngine
,
_
,
_
,
batcher
:=
setupReorgTestActors
(
t
,
dp
,
sd
,
log
)
sd
,
_
,
miner
,
sequencer
,
sequencerEngine
,
_
,
_
,
batcher
:=
setupReorgTestActors
(
t
,
dp
,
sd
,
log
)
signer
:=
types
.
LatestSigner
(
sd
.
L2Cfg
.
Config
)
signer
:=
types
.
LatestSigner
(
sd
.
L2Cfg
.
Config
)
cl
:=
sequencerEngine
.
EthClient
()
cl
:=
sequencerEngine
.
EthClient
()
...
@@ -135,7 +135,7 @@ func TestLargeL1Gaps(gt *testing.T) {
...
@@ -135,7 +135,7 @@ func TestLargeL1Gaps(gt *testing.T) {
sd
:=
e2eutils
.
Setup
(
t
,
dp
,
defaultAlloc
)
sd
:=
e2eutils
.
Setup
(
t
,
dp
,
defaultAlloc
)
log
:=
testlog
.
Logger
(
t
,
log
.
LvlDebug
)
log
:=
testlog
.
Logger
(
t
,
log
.
LvlDebug
)
sd
,
miner
,
sequencer
,
sequencerEngine
,
verifier
,
_
,
batcher
:=
setupReorgTestActors
(
t
,
dp
,
sd
,
log
)
sd
,
_
,
miner
,
sequencer
,
sequencerEngine
,
verifier
,
_
,
batcher
:=
setupReorgTestActors
(
t
,
dp
,
sd
,
log
)
signer
:=
types
.
LatestSigner
(
sd
.
L2Cfg
.
Config
)
signer
:=
types
.
LatestSigner
(
sd
.
L2Cfg
.
Config
)
cl
:=
sequencerEngine
.
EthClient
()
cl
:=
sequencerEngine
.
EthClient
()
...
...
op-e2e/actions/l1_replica_test.go
View file @
78bbd14e
...
@@ -22,6 +22,7 @@ var defaultRollupTestParams = &e2eutils.TestParams{
...
@@ -22,6 +22,7 @@ var defaultRollupTestParams = &e2eutils.TestParams{
MaxSequencerDrift
:
40
,
MaxSequencerDrift
:
40
,
SequencerWindowSize
:
120
,
SequencerWindowSize
:
120
,
ChannelTimeout
:
120
,
ChannelTimeout
:
120
,
L1BlockTime
:
15
,
}
}
var
defaultAlloc
=
&
e2eutils
.
AllocParams
{
PrefundTestUsers
:
true
}
var
defaultAlloc
=
&
e2eutils
.
AllocParams
{
PrefundTestUsers
:
true
}
...
...
op-e2e/actions/reorg_test.go
View file @
78bbd14e
This diff is collapsed.
Click to expand it.
op-e2e/actions/sync_test.go
View file @
78bbd14e
...
@@ -16,7 +16,7 @@ func TestDerivationWithFlakyL1RPC(gt *testing.T) {
...
@@ -16,7 +16,7 @@ func TestDerivationWithFlakyL1RPC(gt *testing.T) {
dp
:=
e2eutils
.
MakeDeployParams
(
t
,
defaultRollupTestParams
)
dp
:=
e2eutils
.
MakeDeployParams
(
t
,
defaultRollupTestParams
)
sd
:=
e2eutils
.
Setup
(
t
,
dp
,
defaultAlloc
)
sd
:=
e2eutils
.
Setup
(
t
,
dp
,
defaultAlloc
)
log
:=
testlog
.
Logger
(
t
,
log
.
LvlError
)
// mute all the temporary derivation errors that we forcefully create
log
:=
testlog
.
Logger
(
t
,
log
.
LvlError
)
// mute all the temporary derivation errors that we forcefully create
_
,
miner
,
sequencer
,
_
,
verifier
,
_
,
batcher
:=
setupReorgTestActors
(
t
,
dp
,
sd
,
log
)
_
,
_
,
miner
,
sequencer
,
_
,
verifier
,
_
,
batcher
:=
setupReorgTestActors
(
t
,
dp
,
sd
,
log
)
rng
:=
rand
.
New
(
rand
.
NewSource
(
1234
))
rng
:=
rand
.
New
(
rand
.
NewSource
(
1234
))
sequencer
.
ActL2PipelineFull
(
t
)
sequencer
.
ActL2PipelineFull
(
t
)
...
...
op-e2e/e2eutils/setup.go
View file @
78bbd14e
...
@@ -48,6 +48,7 @@ type TestParams struct {
...
@@ -48,6 +48,7 @@ type TestParams struct {
MaxSequencerDrift
uint64
MaxSequencerDrift
uint64
SequencerWindowSize
uint64
SequencerWindowSize
uint64
ChannelTimeout
uint64
ChannelTimeout
uint64
L1BlockTime
uint64
}
}
func
MakeDeployParams
(
t
require
.
TestingT
,
tp
*
TestParams
)
*
DeployParams
{
func
MakeDeployParams
(
t
require
.
TestingT
,
tp
*
TestParams
)
*
DeployParams
{
...
@@ -74,7 +75,7 @@ func MakeDeployParams(t require.TestingT, tp *TestParams) *DeployParams {
...
@@ -74,7 +75,7 @@ func MakeDeployParams(t require.TestingT, tp *TestParams) *DeployParams {
FinalSystemOwner
:
addresses
.
SysCfgOwner
,
FinalSystemOwner
:
addresses
.
SysCfgOwner
,
L1BlockTime
:
15
,
L1BlockTime
:
tp
.
L1BlockTime
,
L1GenesisBlockNonce
:
0
,
L1GenesisBlockNonce
:
0
,
CliqueSignerAddress
:
common
.
Address
{},
// proof of stake, no clique
CliqueSignerAddress
:
common
.
Address
{},
// proof of stake, no clique
L1GenesisBlockTimestamp
:
hexutil
.
Uint64
(
time
.
Now
()
.
Unix
()),
L1GenesisBlockTimestamp
:
hexutil
.
Uint64
(
time
.
Now
()
.
Unix
()),
...
...
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