-
Notifications
You must be signed in to change notification settings - Fork 214
[Flow EVM] Upgrade to Ethereum Glamsterdam hard-fork #8554
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
Open
m-Peter
wants to merge
33
commits into
master
Choose a base branch
from
mpeter/flow-evm-glamsterdam-upgrade
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
25b3432
Bump ethereum/go-ethereum dependency to v1.16.9
m-Peter 5c9f0ce
Bump ethereum/go-ethereum dependency to v1.17.0
m-Peter 1595099
Bump ethereum/go-ethereum dependency to v1.17.1
m-Peter 0afd18e
Bump ethereum/go-ethereum dependency to v1.17.2
m-Peter b8072c2
Add activation timestamps for Glamsterdam hard-fork
m-Peter a7025fa
Add E2E tests to verify correctness of EIP-7708 (log emission for ETH…
m-Peter d8c4ded
Populate EVM BlockContext with information regarding SLOTNUM opcode
m-Peter 80ec46c
Update COA deployment logic to match EVM internals
m-Peter bfdc0dc
Add more descriptive comments
m-Peter 9b74654
Set the Amsterdam hard-fork activation date to end of 2026
m-Peter 263e149
Update calculation of SlotNumber in EVM BlockProposal
m-Peter f4854b3
Update ethereum/go-ethereum dependency to v1.17.3 and fix breaking AP…
m-Peter b9d7555
Remove MaxTxGas limit cap under the Amsterdam hard-fork
m-Peter d4b1684
Record state access read in StateDB's public API
m-Peter 2458588
Bump OpenTelemetry packages to latest patched version
m-Peter d10a1fa
Test improvements and code simplifications
m-Peter 76bd1bb
Address review comments
m-Peter b02a851
Remove redundant sortedAddresses array allocation in LogsForBurnAccou…
m-Peter 39e9ae8
Add comments in all places where we track per-tx EIP-7928 state access
m-Peter 46bf1dd
Adjust SlotNumber() calculation for each network
m-Peter 8b51ead
Move SlotNumber() function to Block type from BlockProposal
m-Peter fef1e50
Address review comments
m-Peter 8ac9bc2
Proper EmptyCodeHash for special EVM system addresses
m-Peter 4dd5d44
Bump ethereum/go-ethereum dependency to v1.17.4
m-Peter a31fcdb
Implement EIP-8037 for state creation gas cost increase
m-Peter a9ebce1
Implement EIP-7928 for Block-Level Access Lists
m-Peter 0dc4bd5
Remove obsolete comment regarding usage of StateDB.Finalise()
m-Peter a56af31
Update gasLimit in VM Bridge bootstrap to 20M
m-Peter 477e33b
Run make tidy
m-Peter d735ffa
Bump golang.org/x/net dependency to v0.55.0
m-Peter 6c03274
Bump golang.org/x/crypto dependency to v0.52.0
m-Peter 91938f5
Remove else branch on BaseView.CreateAccount()
m-Peter 86509fd
Fix CI failures
m-Peter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,7 @@ import ( | |
| gethVM "github.com/ethereum/go-ethereum/core/vm" | ||
| "github.com/ethereum/go-ethereum/eth/tracers" | ||
| gethParams "github.com/ethereum/go-ethereum/params" | ||
| "github.com/holiman/uint256" | ||
|
|
||
| "github.com/onflow/flow-go/fvm/evm/types" | ||
| ) | ||
|
|
@@ -25,6 +26,10 @@ var ( | |
| PreviewnetOsakaActivation = uint64(0) // already on Osaka for PreviewNet | ||
| TestnetOsakaActivation = uint64(1763575200) // Wednesday, November 19, 2025 18:00:00 GMT+0000 | ||
| MainnetOsakaActivation = uint64(1764784800) // Wednesday, December 03, 2025 18:00:00 GMT+0000 | ||
|
|
||
| PreviewnetAmsterdamActivation = uint64(0) // already on Amsterdam for PreviewNet | ||
| TestnetAmsterdamActivation = uint64(1798740000) // Thursday, December 31, 2026 at 18:00:00 GMT+0000 | ||
| MainnetAmsterdamActivation = uint64(1798740000) // Thursday, December 31, 2026 at 18:00:00 GMT+0000 | ||
| ) | ||
|
|
||
| // Config aggregates all the configuration (chain, evm, block, tx, ...) | ||
|
|
@@ -102,22 +107,26 @@ func MakeChainConfig(chainID *big.Int) *gethParams.ChainConfig { | |
| MuirGlacierBlock: bigZero, // already on MuirGlacier | ||
|
|
||
| // Fork scheduling based on timestamps | ||
| ShanghaiTime: &zero, // already on Shanghai | ||
| CancunTime: &zero, // already on Cancun | ||
| PragueTime: nil, // this is conditionally set below | ||
| OsakaTime: nil, // this is conditionally set below | ||
| VerkleTime: nil, // not on Verkle | ||
| ShanghaiTime: &zero, // already on Shanghai | ||
| CancunTime: &zero, // already on Cancun | ||
| PragueTime: nil, // this is conditionally set below | ||
| OsakaTime: nil, // this is conditionally set below | ||
| AmsterdamTime: nil, // this is conditionally set below | ||
| UBTTime: nil, // not on Verkle (a.k.a UBT) | ||
| } | ||
|
|
||
| if chainID.Cmp(types.FlowEVMPreviewNetChainID) == 0 { | ||
| chainConfig.PragueTime = &PreviewnetPragueActivation | ||
| chainConfig.OsakaTime = &PreviewnetOsakaActivation | ||
| chainConfig.AmsterdamTime = &PreviewnetAmsterdamActivation | ||
| } else if chainID.Cmp(types.FlowEVMTestNetChainID) == 0 { | ||
| chainConfig.PragueTime = &TestnetPragueActivation | ||
| chainConfig.OsakaTime = &TestnetOsakaActivation | ||
| chainConfig.AmsterdamTime = &TestnetAmsterdamActivation | ||
| } else if chainID.Cmp(types.FlowEVMMainNetChainID) == 0 { | ||
| chainConfig.PragueTime = &MainnetPragueActivation | ||
| chainConfig.OsakaTime = &MainnetOsakaActivation | ||
| chainConfig.AmsterdamTime = &MainnetAmsterdamActivation | ||
| } | ||
|
|
||
| return chainConfig | ||
|
|
@@ -135,8 +144,7 @@ func defaultConfig() *Config { | |
| NoBaseFee: true, | ||
| }, | ||
| TxContext: &gethVM.TxContext{ | ||
| GasPrice: new(big.Int), | ||
| BlobFeeCap: new(big.Int), | ||
| GasPrice: new(uint256.Int), | ||
| }, | ||
| BlockContext: &gethVM.BlockContext{ | ||
| CanTransfer: gethCore.CanTransfer, | ||
|
|
@@ -146,6 +154,7 @@ func defaultConfig() *Config { | |
| GetHash: func(n uint64) gethCommon.Hash { | ||
| return gethCommon.Hash{} | ||
| }, | ||
| CostPerStateByte: gethParams.CostPerStateByte, | ||
| }, | ||
| PCTracker: NewCallTracker(), | ||
| } | ||
|
|
@@ -188,7 +197,7 @@ func WithOrigin(origin gethCommon.Address) Option { | |
| // WithGasPrice sets the gas price for the transaction (usually the one sets by the sender) | ||
| func WithGasPrice(gasPrice *big.Int) Option { | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| return func(c *Config) *Config { | ||
| c.TxContext.GasPrice = gasPrice | ||
| c.TxContext.GasPrice = uint256.MustFromBig(gasPrice) | ||
| return c | ||
|
m-Peter marked this conversation as resolved.
|
||
| } | ||
| } | ||
|
|
@@ -264,6 +273,14 @@ func WithRandom(rand *gethCommon.Hash) Option { | |
| } | ||
| } | ||
|
|
||
| // WithSlotNum sets the slot number in the block context | ||
| func WithSlotNum(slotNum uint64) Option { | ||
| return func(c *Config) *Config { | ||
| c.BlockContext.SlotNum = slotNum | ||
| return c | ||
| } | ||
| } | ||
|
|
||
| // WithTransactionTracer sets a transaction tracer | ||
| func WithTransactionTracer(tracer *tracers.Tracer) Option { | ||
| return func(c *Config) *Config { | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
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.
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.
TestnetAmsterdamActivation&MainnetAmsterdamActivationwill be updated accordingly when there's official activation times.