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

Improved blockhash caching #20589

Merged
merged 3 commits into from
Feb 4, 2020
Merged

Conversation

holiman
Copy link
Contributor

@holiman holiman commented Jan 23, 2020

I've realized that #19319 might never make it in. It's quite big.

So, here's a very small PR which, although not as awesome as that one, is still a lot better than the way things work currently.

@holiman holiman changed the title Mininal bhashfix Improved blockhash caching Jan 23, 2020
core/evm.go Show resolved Hide resolved
Copy link
Member

@gballet gballet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@holiman holiman added this to the 1.9.11 milestone Feb 3, 2020
core/evm.go Outdated Show resolved Hide resolved
Copy link
Member

@karalabe karalabe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:P

t.Fatalf("Expected no error, got %v", err)
}
if len(ret) != 96 {
t.Fatalf("Expected returndata to be 96 bytes, got %d", len(ret))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

casing :P

BlockNumber: new(big.Int).Set(header.Number),
})
if err != nil {
t.Fatalf("Expected no error, got %v", err)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

casing :P

@karalabe karalabe merged commit 058a4ac into ethereum:master Feb 4, 2020
enriquefynn pushed a commit to enriquefynn/go-ethereum that referenced this pull request Mar 10, 2021
* core/vm/runtime: add test for blockhash

* core/evm: less iteration in blockhash

* core/vm/runtime: nitpickfix

Co-authored-by: Péter Szilágyi <peterke@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants