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
c673d9f8
Commit
c673d9f8
authored
Jun 02, 2023
by
Sebastian Stammler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-chain-ops: Add additional logging to legacy balances migration
parent
95978376
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletion
+21
-1
migrate.go
op-chain-ops/ether/migrate.go
+21
-1
No files found.
op-chain-ops/ether/migrate.go
View file @
c673d9f8
...
...
@@ -109,6 +109,7 @@ func doMigration(mutableDB *state.StateDB, dbFactory util.DBFactory, addresses [
// Kick off a background process to collect
// values from the channel and add them to the map.
var
count
int
var
dups
int
progress
:=
util
.
ProgressLogger
(
1000
,
"Migrated OVM_ETH storage slot"
)
go
func
()
{
defer
func
()
{
doneCh
<-
struct
{}{}
}()
...
...
@@ -120,6 +121,7 @@ func doMigration(mutableDB *state.StateDB, dbFactory util.DBFactory, addresses [
// why we may have to filter out duplicates.
if
seenAccounts
[
account
.
address
]
{
log
.
Info
(
"skipping duplicate account during iteration"
,
"addr"
,
account
.
address
)
dups
++
continue
}
...
...
@@ -198,7 +200,25 @@ func doMigration(mutableDB *state.StateDB, dbFactory util.DBFactory, addresses [
<-
doneCh
// Log how many slots were iterated over.
log
.
Info
(
"Iterated legacy balances"
,
"count"
,
count
)
log
.
Info
(
"Iterated legacy balances"
,
"count"
,
count
,
"dups"
,
dups
,
"total"
,
count
+
dups
)
log
.
Info
(
"Comparison to input list of legacy accounts"
,
"total_input"
,
len
(
addresses
),
"diff_count"
,
len
(
addresses
)
-
count
,
"diff_total"
,
len
(
addresses
)
-
(
count
+
dups
),
)
// Print first 10 accounts without balance
aleft
:=
10
log
.
Info
(
"Listing first %d accounts without balance"
,
aleft
)
for
i
,
a
:=
range
addresses
{
if
!
seenAccounts
[
a
]
{
log
.
Info
(
"Account[%d] without balance"
,
i
,
"addr"
,
a
)
aleft
--
}
if
aleft
==
0
{
break
}
}
// Verify the supply delta. Recorded total supply in the LegacyERC20ETH contract may be higher
// than the actual migrated amount because self-destructs will remove ETH supply in a way that
...
...
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