-
Notifications
You must be signed in to change notification settings - Fork 11
Update to EVM Pectra hard-fork #805
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
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
dfcb253
to
9cb1976
Compare
856798f
to
05b1de0
Compare
8ba6066
to
c0ac69a
Compare
6714ec3
to
60ee47f
Compare
03c2691
to
8cd8f49
Compare
a2054eb
to
b2d4345
Compare
000d894
to
e6a368e
Compare
5426373
to
237faaa
Compare
// if special values (latest) we return latest executed height | ||
// | ||
// all the special values are: | ||
// EarliestBlockNumber = BlockNumber(-5) |
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.
Optional, I would suggest to use -10
instead of -5
, in case we need to define other BlockNumber.
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.
We don't define this special value, this is actually defined from Geth itself. See here: https://github.com/onflow/go-ethereum/blob/master/rpc/types.go#L66 . By using -10
we would deviate from Geth, and I want to avoid that.
api/utils.go
Outdated
var err error | ||
if blockNumber == rpc.EarliestBlockNumber { | ||
height = 0 | ||
} else if blockNumber <= rpc.PendingBlockNumber { |
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.
} else if blockNumber <= rpc.PendingBlockNumber { | |
} else if blockNumber < 0 { |
Optional, but I think this would be slightly safer.
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.
I have updated the implementation in this commit: c95ea08, to make it more explicit and readable. I want to avoid using magic values like 0
, I would prefer making comparisons with the constants defined by Geth.
e5992f3
to
c95ea08
Compare
Work towards: onflow/flow-go#7152
Description
Changes related to EVM Pectra hard-fork.
For contributor use:
master
branchFiles changed
in the Github PR explorerSummary by CodeRabbit
New Features
Bug Fixes
Dependency Updates
Tests
Chores