Update to EVM Pectra hard-fork#805
Merged
Merged
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
janezpodhostnik
approved these changes
May 7, 2025
peterargue
approved these changes
May 7, 2025
zhangchiqing
approved these changes
May 7, 2025
| // if special values (latest) we return latest executed height | ||
| // | ||
| // all the special values are: | ||
| // EarliestBlockNumber = BlockNumber(-5) |
Member
There was a problem hiding this comment.
Optional, I would suggest to use -10 instead of -5, in case we need to define other BlockNumber.
Collaborator
Author
There was a problem hiding this comment.
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.
| var err error | ||
| if blockNumber == rpc.EarliestBlockNumber { | ||
| height = 0 | ||
| } else if blockNumber <= rpc.PendingBlockNumber { |
Member
There was a problem hiding this comment.
Suggested change
| } else if blockNumber <= rpc.PendingBlockNumber { | |
| } else if blockNumber < 0 { |
Optional, but I think this would be slightly safer.
Collaborator
Author
There was a problem hiding this comment.
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
6 tasks
6 tasks
6 tasks
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Work towards: onflow/flow-go#7152
Description
Changes related to EVM Pectra hard-fork.
For contributor use:
masterbranchFiles changedin the Github PR explorerSummary by CodeRabbit
New Features
Bug Fixes
Dependency Updates
Tests
Chores