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
2bddcd21
Commit
2bddcd21
authored
Oct 19, 2022
by
Mark Tyneway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-chain-ops: delete dead code
Now going with a different approach, this commit deletes some dead code.
parent
be1cb549
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
34 deletions
+0
-34
layer_two.go
op-chain-ops/genesis/layer_two.go
+0
-4
setters.go
op-chain-ops/genesis/setters.go
+0
-30
No files found.
op-chain-ops/genesis/layer_two.go
View file @
2bddcd21
...
...
@@ -75,9 +75,5 @@ func BuildL2Genesis(db *state.MemoryStateDB, config *DeployConfig, l1Block *type
return
nil
,
err
}
if
err
:=
MigrateDepositHashes
(
db
);
err
!=
nil
{
return
nil
,
err
}
return
db
.
Genesis
(),
nil
}
op-chain-ops/genesis/setters.go
View file @
2bddcd21
...
...
@@ -115,36 +115,6 @@ func SetImplementations(db vm.StateDB, storage state.StorageConfig, immutable im
return
nil
}
// Get the storage layout of the LegacyMessagePasser
// Iterate over the storage layout to know which storage slots to ignore
// Iterate over each storage slot, compute the migration
func
MigrateDepositHashes
(
db
vm
.
StateDB
)
error
{
layout
,
err
:=
bindings
.
GetStorageLayout
(
"LegacyMessagePasser"
)
if
err
!=
nil
{
return
err
}
// Build a list of storage slots to ignore. The values in the
// mapping are guaranteed to not be in this list because they are
// hashes.
ignore
:=
make
(
map
[
common
.
Hash
]
bool
)
for
_
,
entry
:=
range
layout
.
Storage
{
encoded
,
err
:=
state
.
EncodeUintValue
(
entry
.
Slot
,
0
)
if
err
!=
nil
{
return
err
}
ignore
[
encoded
]
=
true
}
return
db
.
ForEachStorage
(
predeploys
.
LegacyMessagePasserAddr
,
func
(
key
,
value
common
.
Hash
)
bool
{
if
_
,
ok
:=
ignore
[
key
];
ok
{
return
true
}
// TODO(tynes): Do the value migration here
return
true
})
}
// SetPrecompileBalances will set a single wei at each precompile address.
// This is an optimization to make calling them cheaper. This should only
// be used for devnets.
...
...
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