Skip to content

Update to and enable EVM Pectra hard-fork #7328

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

Merged
merged 8 commits into from
May 7, 2025
Merged

Conversation

m-Peter
Copy link
Collaborator

@m-Peter m-Peter commented Apr 22, 2025

Closes: #7152
Closes: #7227

@m-Peter m-Peter self-assigned this Apr 22, 2025
func (db *StateDB) SetNonce(
addr gethCommon.Address,
nonce uint64,
reason gethTracing.NonceChangeReason,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For some reason, the Geth folks introduced this gethTracing.NonceChangeReason function parameter, but it's not used anywhere within the method's body.
See: https://github.com/ethereum/go-ethereum/blob/v1.15.8/core/state/statedb.go#L435-L440

// This is a no-op for our custom implementation of the StateDB interface,
// since Commit() already handles finalization and deletion of empty
// objects.
func (db *StateDB) Finalise(deleteEmptyObjects bool) {}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is a no-op in our case, because our custom implementation of StateDB, already handles the finalization and deletion of empty objects as part of Commit .

castedValue,
call.GasLimit)
call.GasLimit,
nil,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For the deployment of COAs, we pass nil for the jumpDests argument, as it is not exposed through the EVM object. See also:

@codecov-commenter
Copy link

codecov-commenter commented Apr 22, 2025

Codecov Report

Attention: Patch coverage is 69.56522% with 28 lines in your changes missing coverage. Please review.

Project coverage is 41.05%. Comparing base (b06c18e) to head (d15fb9b).

Files with missing lines Patch % Lines
fvm/evm/emulator/state/stateDB.go 58.33% 15 Missing ⚠️
fvm/evm/types/call.go 0.00% 8 Missing ⚠️
fvm/evm/emulator/emulator.go 90.00% 3 Missing ⚠️
fvm/evm/emulator/state/delta.go 60.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7328   +/-   ##
=======================================
  Coverage   41.05%   41.05%           
=======================================
  Files        2203     2203           
  Lines      192973   193023   +50     
=======================================
+ Hits        79224    79247   +23     
- Misses     107145   107173   +28     
+ Partials     6604     6603    -1     
Flag Coverage Δ
unittests 41.05% <69.56%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@@ -17,6 +17,12 @@ var (
bigZero = big.NewInt(0)
)

var (
PreviewnetPragueActivation = uint64(0) // already on Prague for PreviewNet
TestnetPragueActivation = uint64(1746039600) // Wednesday, April 30, 2025 7:00:00 PM GMT
Copy link
Collaborator Author

@m-Peter m-Peter Apr 29, 2025

Choose a reason for hiding this comment

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

TODO(m-Peter): Update this once we decide on the time for the Pectra upgrade on Testnet.

Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I would put them far into the future until we know the exact time. So that if this accidentally merged we wont have problems.

var (
PreviewnetPragueActivation = uint64(0) // already on Prague for PreviewNet
TestnetPragueActivation = uint64(1746039600) // Wednesday, April 30, 2025 7:00:00 PM GMT
MainnetPragueActivation = uint64(1746612311) // Wed May 07 10:05:11 2025 UTC
Copy link
Collaborator Author

@m-Peter m-Peter Apr 29, 2025

Choose a reason for hiding this comment

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

TODO(m-Peter): Update this once we decide on the time for the Pectra upgrade on Mainnet.

@@ -17,6 +17,12 @@ var (
bigZero = big.NewInt(0)
)

var (
PreviewnetPragueActivation = uint64(0) // already on Prague for PreviewNet
TestnetPragueActivation = uint64(1746039600) // Wednesday, April 30, 2025 7:00:00 PM GMT
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I would put them far into the future until we know the exact time. So that if this accidentally merged we wont have problems.

@m-Peter m-Peter force-pushed the mpeter/pectra-upgrade branch from 911d156 to 59bc9e3 Compare May 2, 2025 07:02
@j1010001 j1010001 added this pull request to the merge queue May 7, 2025
Merged via the queue into master with commit 375bc63 May 7, 2025
58 checks passed
@j1010001 j1010001 deleted the mpeter/pectra-upgrade branch May 7, 2025 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update EVM transaction replay logic for EVM heights prior to Pectra upgrade [EVM] Integrate relevant Ethereum Pectra upgrade changes to Flow EVM Core
5 participants