-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated legacy account type to Klaytn account type #1154
Conversation
snapshot/generate.go
Outdated
contractAcc, ok := acc.(*account.SmartContractAccount) | ||
if !ok { | ||
accMarker = nil | ||
return nil | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we need to call wipeKeyRange
for EOA?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aidan-kwon Can you check this again?
@KimKyungup @ehnuje PTAL this Snapshot PR. We need one more approve |
if bytes.Equal(acc.CodeHash, emptyCode[:]) { | ||
dataLen -= 32 | ||
} | ||
if acc.Root == emptyRoot { | ||
dataLen -= 32 | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you remove this logic? Is it unnecessary in Klaytn?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hqjang-pepper This is for approximate data size. So, Etheruem uses slim account in order to save the space. It reduces dataLen
since nil
is stored instead of emptyRootHash
or emptyCodeHash
.
Proposed changes
SlimAccount
type which substituteemptyHash
andemptyCodeHash
tonil
value. In this PR, theSlimAccount
concept is deleted since we have two different types of Account.account.Account
type.Types of changes
Please put an x in the boxes related to your change.
Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.
$ make test
)