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
6a3d1e74
Unverified
Commit
6a3d1e74
authored
Jan 18, 2024
by
protolambda
Committed by
GitHub
Jan 18, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
specs,op-node: handle when Ecotone is active on L2 before L1 (#9073)
parent
9603ab0c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
4 deletions
+34
-4
ecotone_fork_test.go
op-e2e/actions/ecotone_fork_test.go
+29
-0
attributes.go
op-node/rollup/derive/attributes.go
+2
-2
exec-engine.md
specs/exec-engine.md
+3
-2
No files found.
op-e2e/actions/ecotone_fork_test.go
View file @
6a3d1e74
...
...
@@ -175,3 +175,32 @@ func TestEcotoneNetworkUpgradeTransactions(gt *testing.T) {
expectedL1Fee
=
expectedL1Fee
.
Div
(
expectedL1Fee
,
big
.
NewInt
(
16e6
))
require
.
Equal
(
t
,
expectedL1Fee
,
cost
,
"expecting cost based on regular base fee scalar alone"
)
}
// TestEcotoneBeforeL1 tests that the L2 Ecotone fork can activate before L1 Dencun does
func
TestEcotoneBeforeL1
(
gt
*
testing
.
T
)
{
t
:=
NewDefaultTesting
(
gt
)
dp
:=
e2eutils
.
MakeDeployParams
(
t
,
defaultRollupTestParams
)
offset
:=
hexutil
.
Uint64
(
0
)
farOffset
:=
hexutil
.
Uint64
(
10000
)
dp
.
DeployConfig
.
L2GenesisRegolithTimeOffset
=
&
offset
dp
.
DeployConfig
.
L1CancunTimeOffset
=
&
farOffset
// L1 Dencun will not be active at genesis
dp
.
DeployConfig
.
L2GenesisCanyonTimeOffset
=
&
offset
dp
.
DeployConfig
.
L2GenesisDeltaTimeOffset
=
&
offset
dp
.
DeployConfig
.
L2GenesisEcotoneTimeOffset
=
&
offset
sd
:=
e2eutils
.
Setup
(
t
,
dp
,
defaultAlloc
)
log
:=
testlog
.
Logger
(
t
,
log
.
LvlDebug
)
_
,
_
,
_
,
sequencer
,
engine
,
verifier
,
_
,
_
:=
setupReorgTestActors
(
t
,
dp
,
sd
,
log
)
// start op-nodes
sequencer
.
ActL2PipelineFull
(
t
)
verifier
.
ActL2PipelineFull
(
t
)
// Genesis block has ecotone properties
verifyEcotoneBlock
(
gt
,
engine
.
l2Chain
.
CurrentBlock
())
// Blocks post fork have Ecotone properties
sequencer
.
ActL2StartBlock
(
t
)
sequencer
.
ActL2EndBlock
(
t
)
verifyEcotoneBlock
(
gt
,
engine
.
l2Chain
.
CurrentBlock
())
}
op-node/rollup/derive/attributes.go
View file @
6a3d1e74
...
...
@@ -126,8 +126,8 @@ func (ba *FetchingAttributesBuilder) PreparePayloadAttributes(ctx context.Contex
var
parentBeaconRoot
*
common
.
Hash
if
ba
.
rollupCfg
.
IsEcotone
(
nextL2Time
)
{
parentBeaconRoot
=
l1Info
.
ParentBeaconRoot
()
if
parentBeaconRoot
==
nil
{
return
nil
,
NewCriticalError
(
fmt
.
Errorf
(
"cannot build Ecotone (L2 Dencun) block without L1 Dencun info, at L2 timestamp %d"
,
nextL2Time
)
)
if
parentBeaconRoot
==
nil
{
// default to zero hash if there is no beacon-block-root available
parentBeaconRoot
=
new
(
common
.
Hash
)
}
}
...
...
specs/exec-engine.md
View file @
6a3d1e74
...
...
@@ -278,8 +278,9 @@ PayloadAttributesV3: {
The requirements of this object are the same as extended
[
`PayloadAttributesV2`
][
#extended-payloadattributesv2
]
with
the addition of
`parentBeaconBlockRoot`
which is the parent beacon block root from the L1 origin block of the L2 block.
`parentBeaconBlockRoot`
must be nil for Bedrock/Canyon/Delta payloads, but must be set to the L1
origin
`parentBeaconBlockRoot`
.
The
`parentBeaconBlockRoot`
must be nil for Bedrock/Canyon/Delta payloads.
Starting at Ecotone, the
`parentBeaconBlockRoot`
must be set to the L1 origin
`parentBeaconBlockRoot`
,
or a zero
`bytes32`
if the Dencun functionality with
`parentBeaconBlockRoot`
is not active on L1.
### `engine_newPayloadV2`
...
...
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