-
Notifications
You must be signed in to change notification settings - Fork 328
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
[evm] Upgrade to Shanghai at SumatraHeight #3963
Conversation
split it into multiple prs |
205c05f
to
42a4767
Compare
5e31408
to
3319fc2
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #3963 +/- ##
==========================================
+ Coverage 75.38% 76.26% +0.88%
==========================================
Files 303 330 +27
Lines 25923 28270 +2347
==========================================
+ Hits 19541 21559 +2018
- Misses 5360 5609 +249
- Partials 1022 1102 +80 ☔ View full report in Codecov by Sentry. |
now := time.Now() | ||
getBlockTime := func(height uint64) (time.Time, error) { | ||
return now.Add(time.Duration(height) * time.Second * 5), 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.
these 2 lines can move to in front of if
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.
which if?
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 mean, for
at L257
// Random opcode (EIP-4399) is not supported on IoTeX | ||
zeroHash := common.BytesToHash(nil) | ||
context.Random = &zeroHash | ||
} |
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 recall we now have value = 50? think we can remove this, no need to complicate things with this change. We make change in the future when we are ready to support
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.
If keep context.Random
as nil
, evm will panic when execute op prevrandom
. Do you mean Random
should be set as 50
instead of 0
?
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.
context.Random = &common.Hash{}
will do
8473a17
to
488c8f3
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Description
Upgrade evm from Bellatrix to Shanghai at SumatraHeight. The main changes include:
Merge
andShanghai
at Sumatra height.PrepareAccessList
and usingPrepare
instead. For background, refer to [evm] Add methods for StatedbAdapter #3964.Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration:
Checklist: