Skip to content
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

core: cache code chunk evaluations to reduce the amount of address evals #122

Merged
merged 3 commits into from
Aug 11, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix slicing error that was introduced in previous commits
  • Loading branch information
gballet committed Aug 11, 2022
commit 052a41abcac1bbcde16f9be891a308fd6afe5a59
2 changes: 1 addition & 1 deletion core/vm/instructions.go
Original file line number Diff line number Diff line change
@@ -461,7 +461,7 @@ func touchEachChunksOnReadAndChargeGas(offset, size uint64, contract *Contract,

if len(code) > 0 {
if deployment {
accesses.SetLeafValue(index[:], contract.Chunks[32*i:(i+1)*32])
accesses.SetLeafValue(index[:], nil)
} else {
accesses.SetLeafValue(index[:], contract.Chunks[32*i:(i+1)*32])
}