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
f05c0b9f
Commit
f05c0b9f
authored
Mar 10, 2023
by
Matthew Slipper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use correct storage slots
parent
918c1d74
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
check.go
op-chain-ops/genesis/check.go
+4
-6
No files found.
op-chain-ops/genesis/check.go
View file @
f05c0b9f
...
...
@@ -31,7 +31,6 @@ const MaxSlotChecks = 1000
type
StorageCheckMap
=
map
[
common
.
Hash
]
common
.
Hash
var
(
L2XDMOwnerSlot
=
common
.
Hash
{
31
:
0x33
}
ProxyAdminOwnerSlot
=
common
.
Hash
{}
LegacyETHCheckSlots
=
map
[
common
.
Hash
]
common
.
Hash
{
...
...
@@ -53,12 +52,11 @@ var (
predeploys
.
L2CrossDomainMessengerAddr
:
{
// Slot 0x00 (0) is a combination of spacer_0_0_20, _initialized, and _initializing
common
.
Hash
{}
:
common
.
HexToHash
(
"0x0000000000000000000000010000000000000000000000000000000000000000"
),
// Slot 0x33 (51) is _owner. Requires custom check, so set to a garbage value
L2XDMOwnerSlot
:
common
.
HexToHash
(
"0xbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbad0"
),
// Slot 0x97 (151) is _status
common
.
Hash
{
31
:
0x97
}
:
common
.
HexToHash
(
"0x0000000000000000000000000000000000000000000000000000000000000001"
),
// Slot 0xcc (204) is xDomainMsgSender
common
.
Hash
{
31
:
0xcc
}
:
common
.
HexToHash
(
"0x000000000000000000000000000000000000000000000000000000000000dead"
),
// EIP-1967 storage slots
AdminSlot
:
common
.
HexToHash
(
"0x0000000000000000000000004200000000000000000000000000000000000018"
),
ImplementationSlot
:
common
.
HexToHash
(
"0x000000000000000000000000c0d3c0d3c0d3c0d3c0d3c0d3c0d3c0d3c0d30007"
),
},
predeploys
.
L2StandardBridgeAddr
:
eip1967Slots
(
predeploys
.
L2StandardBridgeAddr
),
predeploys
.
SequencerFeeVaultAddr
:
eip1967Slots
(
predeploys
.
SequencerFeeVaultAddr
),
...
...
@@ -343,7 +341,7 @@ func PostCheckPredeployStorage(db vm.StateDB, finalSystemOwner common.Address, p
for
key
,
value
:=
range
expSlots
{
// The owner slots for the L2XDM and ProxyAdmin are special cases.
// They are set to the final system owner in the config.
if
(
*
addr
==
predeploys
.
L2CrossDomainMessengerAddr
&&
key
==
L2XDMOwnerSlot
)
||
(
*
addr
==
predeploys
.
ProxyAdminAddr
&&
key
==
ProxyAdminOwnerSlot
)
{
if
*
addr
==
predeploys
.
ProxyAdminAddr
&&
key
==
ProxyAdminOwnerSlot
{
actualOwner
:=
common
.
BytesToAddress
(
slots
[
key
]
.
Bytes
())
if
actualOwner
!=
proxyAdminOwner
{
return
fmt
.
Errorf
(
"expected owner for %s to be %s but got %s"
,
name
,
proxyAdminOwner
,
actualOwner
)
...
...
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