Skip to content

[Flow EVM] Upgrade to Ethereum Glamsterdam hard-fork#8554

Open
m-Peter wants to merge 24 commits into
masterfrom
mpeter/flow-evm-glamsterdam-upgrade
Open

[Flow EVM] Upgrade to Ethereum Glamsterdam hard-fork#8554
m-Peter wants to merge 24 commits into
masterfrom
mpeter/flow-evm-glamsterdam-upgrade

Conversation

@m-Peter

@m-Peter m-Peter commented May 9, 2026

Copy link
Copy Markdown
Collaborator

Work Towards: #8553

Description

Upgrade Flow EVM with the upcoming changes included in the Ethereum Glamsterdam hard-fork.
Updated return value of GenesisTimestamp() for Emulator & Previenet networks, to 2024-01-01 so that we have a deterministic value for the SLOTNUM opcode.

See description in #8553, for more details regarding the upgrade changes involved.

Summary by CodeRabbit

  • New Features

    • Amsterdam-era activation per network and per-transaction state-access tracking; slot number added to block context
  • Bug Fixes

    • Safer gas-price/fee handling and gas-limit validation; improved numeric overflow checks
    • Corrected self-destruct/finalization to produce ETH burn logs; more robust deploy/dry-run and code-size/gas accounting
  • Tests

    • Added/updated tests for burn-log emission, deployments, gas-limit and deposit/withdraw scenarios
  • Chores

    • Bumped core dependencies (including Go-Ethereum and OpenTelemetry)

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 9, 2026

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds Amsterdam fork activation and slot-number support, migrates EVM numeric fields to holiman/uint256, implements per-transaction state-access tracking and burn logs, refactors deployment/run paths, updates error mappings and tests, and bumps go-ethereum and related dependencies.

Changes

Glamsterdam Hard-fork Integration

Layer / File(s) Summary
Dependency Updates & Type Infrastructure
go.mod, insecure/go.mod, integration/go.mod, fvm/evm/types/emulator.go, fvm/evm/emulator/config.go
Bumps ethereum/go-ethereum and related modules; adds holiman/uint256 import and BlockContext.SlotNum.
Block Context, Slot Number, and Fork Activation
fvm/evm/types/block.go, fvm/evm/types/block_test.go, fvm/evm/emulator/config.go, fvm/evm/handler/handler.go
Adds GenesisTimestamp case for Emulator/Previewnet, BlockProposal.SlotNumber, Amsterdam activation timestamps, WithSlotNum option, and handler wiring to set SlotNum.
Transaction Message & Gas Handling
fvm/evm/types/call.go, fvm/evm/emulator/emulator.go
Converts message numeric fields to uint256, refactors DryRunTransaction to build gethCore.Message with explicit overflow checks and effective gas-price computation, and adjusts EIP‑7825 gas-limit validation for Amsterdam rules.
State Access Tracking & EIP-7928 Implementation
fvm/evm/emulator/state/stateDB.go
Adds stateReadList for per-transaction access tracking when Amsterdam is active, recordStateAccess, Touch, LogsForBurnAccounts, changes Finalise to return the access list, records access across state APIs, and makes SelfDestruct void/conditional.
Deployment & Contract Initialization Refactoring
fvm/evm/emulator/emulator.go
Refactors deployAt and procedure.run: caller funds/nonce checks, conditional account creation, CreateContract usage, gas budget/init execution, create-data gas accounting, max init-code checks, and conditional code storage; updates gas-pool usage.
Error Code Mappings for Init Code Size
fvm/evm/types/codeFinder.go
Maps ValidationErrCodeMaxInitCodeSizeExceeded to gethVM.ErrMaxInitCodeSizeExceeded consistently.
Test Contracts & Solidity Updates
fvm/evm/testutils/contracts/factory.sol, fvm/evm/testutils/contracts/factory_abi.json, fvm/evm/testutils/contracts/factory_bytes.hex, fvm/evm/testutils/contract.go
Adds depositDeployAndDestroyWithBurn test path, updates ABI/bytecode, and funds test contract deployments with non-zero value.
Emulator & StateDB Unit Tests
fvm/evm/emulator/emulator_test.go, fvm/evm/emulator/state/stateDB_test.go
Updates tests for ABI numeric boundaries, Finalise return expectations, SelfDestruct renames/semantics, and burn-log assertions.
EVM Integration Tests for Glamsterdam Features
fvm/evm/evm_test.go
Revises integration tests: Amsterdam gas-limit behavior, COA deposit/transfer/deploy validations with RLP-decoded ETH logs and topic/data checks, file-system contract gas updates, batch-run messaging, and adds TestEthLogEmissionWithSelfDestruct.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related issues

Possibly related PRs

Suggested labels

Breaking Change, dependencies

Suggested reviewers

  • peterargue
  • turbolent
  • zhangchiqing

"I hopped through code and time so bright,
Amsterdam woke slots into the night,
uint256 counted every tiny fee,
state reads logged what used to be free,
contracts bloom, then vanish—rabbit cheers for the light."

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 29.63% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely identifies the main change: upgrading Flow EVM to the Ethereum Glamsterdam hard-fork. It is specific and directly reflects the primary objective of this changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch mpeter/flow-evm-glamsterdam-upgrade

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@codecov-commenter

codecov-commenter commented May 9, 2026

Copy link
Copy Markdown

@github-actions

This comment was marked as outdated.

@@ -188,7 +196,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 {

@m-Peter m-Peter May 11, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

WithGasPrice seems to be not used in flow-go or flow-evm-gateway. Seems like a relic that we could remove entirely.

Comment thread fvm/evm/emulator/emulator.go Outdated
// if the block gas limit is set to anything than max
// we need to update this code.
gasPool := (*gethCore.GasPool)(&proc.config.BlockContext.GasLimit)
gasPool := gethCore.NewGasPool(proc.config.BlockContext.GasLimit)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure why the gasPool used to receive the maximum value as the available gas:

DefaultBlockLevelGasLimit = uint64(math.MaxUint64)

but given that we apply only a single EVM message, per gasPool instance, it might be safer to do what Geth does:

// Do not panic if the gas pool is nil. This is allowed when executing
// a single message via RPC invocation.
if gp == nil {
	gp = NewGasPool(msg.GasLimit)
}

and use as a sane default the GasLimit from the given EVM message.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good catch. I don't know. I think its because we already checked that there is sufficient gas. Lets leave this as is for this PR but maybe lets revisit it in a separate PR.

@github-actions

This comment was marked as outdated.

3 similar comments
@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@m-Peter m-Peter force-pushed the mpeter/flow-evm-glamsterdam-upgrade branch from a2d3b10 to 9c45c56 Compare May 12, 2026 17:19
@github-actions

This comment was marked as outdated.

2 similar comments
@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@m-Peter m-Peter force-pushed the mpeter/flow-evm-glamsterdam-upgrade branch from 2f6db64 to 99db4ec Compare May 14, 2026 09:23
@github-actions

This comment was marked as outdated.

Comment thread fvm/evm/types/block.go Outdated
// as slot duration we can use the block production rate, which is about 0.8
// seconds on mainnet.
genesisTimestamp := GenesisBlock(chainID).Timestamp
return ((b.Timestamp - genesisTimestamp) * 5) / 4

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

We can differentiate the slot duration for testnet, as I recall that it has a different block production rate, compared to mainnet. Does anyone know what that value is?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

testnet is running at 2 block / sec.
mainnet is running at 1.25 block / sec.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

maybe mention these number in the comments ^

@zhangchiqing zhangchiqing May 19, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we want to store this in a slot and read from it to be configable? but that would involve a storage read.

Currently the block rate is configured by smart contract:

import FlowEpoch from 0x8624b52f9ddcd04a

access(all) fun main(): {String: UInt64} {
    let config = FlowEpoch.getConfigMetadata()
    let timing = FlowEpoch.getEpochTimingConfig()

    return {
        "numViewsInEpoch": config.numViewsInEpoch,
        "epochDurationSeconds": timing.duration
    }
}

For mainnet this returns

Result: {"numViewsInEpoch": 756000, "epochDurationSeconds": 604800}
  • 756,000 views per epoch
  • 604,800 seconds (1 week) per epoch
  • so targetViewTime = 604800 / 756000 = 0.8 seconds/block = 800ms/block or 1.25 blocks / sec

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Nice, much thanks 🙌

maybe mention these number in the comments ^

I will update the comments and the calculation accordingly.

Do we want to store this in a slot and read from it to be configable? but that would involve a storage read.

In Ethereum, the slot duration is hard-coded to 12 seconds, on the consensus layer, regardless of whether the block proposer managed to build a block during a given slot. For Flow EVM, I think we can base the slot number calculation on the block production rate for each network. As long as we feed the SLOTNUM opcode a deterministic value, I think we are compatible and good-to-go. I wouldn't go so far to store this in a slot and add 1 more storage read. Note that adding fields in models such as BlockProposal adds a bit more complexity, due to using RLP encoding/decoding for storage.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Added comments and updated the calculation per network in 8a3ce81 .

}

// convert tx into message
msg, err := gethCore.TransactionToMessage(

@m-Peter m-Peter May 14, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

We can no longer use gethCore.TransactionToMessage, as it returns a nil Message when no valid signature is provided (see https://github.com/ethereum/go-ethereum/blob/v1.17.3/core/state_transition.go#L240-L244). For EVM.dryRun we do not have such signature values, so we have to reconstruct the Message ourselves.

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

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

TestnetAmsterdamActivation & MainnetAmsterdamActivation will be updated accordingly when there's official activation times.

Comment thread fvm/evm/evm_test.go
if i%2 == 0 {
// fail with too low gas limit
gas = 22_000
gas = 23_500

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Change due to EIP-7976: Increase Calldata Floor Cost

Comment thread fvm/evm/evm_test.go
),
big.NewInt(0),
uint64(2_132_171),
uint64(3_375_890),

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Change due to EIP-7976: Increase Calldata Floor Cost

Comment thread fvm/evm/evm_test.go
//
require.NotEmpty(t, blockEventPayload.Hash)
require.Equal(t, uint64(2_132_170), blockEventPayload.TotalGasUsed)
require.Equal(t, uint64(3_396_880), blockEventPayload.TotalGasUsed)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Change due to EIP-7976: Increase Calldata Floor Cost

Comment thread fvm/evm/evm_test.go
require.Equal(t, types.ValidationErrCodeMisc, res.ErrorCode)
require.Equal(
t,
"transaction gas limit too high (cap: 16777216, tx: 16777226)",

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Change due to EIP-8037: State Creation Gas Cost Increase

Comment thread fvm/evm/evm_test.go
let res = EVM.run(tx: tx, coinbase: coinbase)
assert(res.status == EVM.Status.invalid, message: "unexpected status")
assert(res.errorCode == 100, message: "unexpected error code: \(res.errorCode)")
assert(res.errorMessage == "transaction gas limit too high (cap: 16777216, tx: 16777220)")

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Change due to EIP-8037: State Creation Gas Cost Increase

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@fvm/evm/emulator/emulator.go`:
- Around line 336-350: When constructing the gethCore.Message for dry-run in
emulator.go (the msg literal), populate the blob-specific fields so validation
matches normal execution: set BlobGasFeeCap to tx.BlobGasFeeCap() and BlobHashes
to tx.BlobHashes() (alongside the existing GasTipCap/GasFeeCap fields) so blob
gas fee and blob hash validation are enforced during dry-run.

In `@fvm/evm/emulator/state/stateDB.go`:
- Around line 663-665: Finalise currently returns the live pointer
db.stateReadList which allows subsequent Commit and its access-recording getters
(HasSelfDestructed, GetBalance, GetNonce, GetCode, GetCodeHash, GetState) to
mutate the returned list; change Finalise to return a snapshot copy of
stateReadList (e.g. allocate a new slice/map and copy entries) so callers
receive an immutable snapshot of the EIP-2929 access footprint, or alternatively
disable access recording during the Commit walk invoked after Finalise; update
the Finalise function to perform the copy and return that copy instead of
db.stateReadList.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4eb8059c-ecbd-49d6-9b49-55535271d3f9

📥 Commits

Reviewing files that changed from the base of the PR and between b79f49f and 8a3ce81.

⛔ Files ignored due to path filters (3)
  • go.sum is excluded by !**/*.sum
  • insecure/go.sum is excluded by !**/*.sum
  • integration/go.sum is excluded by !**/*.sum
📒 Files selected for processing (19)
  • fvm/evm/emulator/config.go
  • fvm/evm/emulator/emulator.go
  • fvm/evm/emulator/emulator_test.go
  • fvm/evm/emulator/state/stateDB.go
  • fvm/evm/emulator/state/stateDB_test.go
  • fvm/evm/evm_test.go
  • fvm/evm/handler/handler.go
  • fvm/evm/testutils/contract.go
  • fvm/evm/testutils/contracts/factory.sol
  • fvm/evm/testutils/contracts/factory_abi.json
  • fvm/evm/testutils/contracts/factory_bytes.hex
  • fvm/evm/types/block.go
  • fvm/evm/types/block_test.go
  • fvm/evm/types/call.go
  • fvm/evm/types/codeFinder.go
  • fvm/evm/types/emulator.go
  • go.mod
  • insecure/go.mod
  • integration/go.mod
✅ Files skipped from review due to trivial changes (1)
  • fvm/evm/types/emulator.go

Comment thread fvm/evm/emulator/emulator.go
Comment thread fvm/evm/emulator/state/stateDB.go
Comment thread fvm/evm/types/block.go Outdated
return 0
}

switch chainID {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@m-Peter what is the reasoning behind having slot numbers to be dependent on the block time?

Is there anything stopping us from just saying that the slot size is 1s or 2s or 10s?

What does the slot length affect?

@m-Peter m-Peter May 20, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Some context from the Ethereum docs:

In Ethereum, a slot number is a specific unit of time in the proof-of-stake consensus clock. Each slot is exactly 12 seconds long and acts as an opportunity for a randomly selected validator to propose a new block. If no block is proposed, the slot is recorded as missed.

The "Ticker" of the Blockchain: The Beacon Chain uses slot numbers to keep time. Because slots happen precisely every 12 seconds, you can calculate the exact slot number from the current block timestamp, and vice versa.

Regarding your questions:

Is there anything stopping us from just saying that the slot size is 1s or 2s or 10s?

I guess no, since we don't use Ethereum's PoS consensus mechanism. I used the block production rate of TN/MN, to base the calculation on a unit of time that resembles the notion of slot duration in Ethereum.

What does the slot length affect?

Not entirely sure about the planned use-cases, but there will be a SLOTNUM opcode, that will basically allow for retrieving the current slot number on-chain (in Solidity smart contracts).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the explanation. Yeah, I think lets leave it as you have it then.

Comment thread fvm/evm/types/block.go
Comment thread fvm/evm/emulator/emulator.go Outdated
// if the block gas limit is set to anything than max
// we need to update this code.
gasPool := (*gethCore.GasPool)(&proc.config.BlockContext.GasLimit)
gasPool := gethCore.NewGasPool(proc.config.BlockContext.GasLimit)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good catch. I don't know. I think its because we already checked that there is sufficient gas. Lets leave this as is for this PR but maybe lets revisit it in a separate PR.

Comment thread fvm/evm/emulator/emulator.go
Comment thread fvm/evm/emulator/emulator.go
@m-Peter m-Peter force-pushed the mpeter/flow-evm-glamsterdam-upgrade branch from 8a3ce81 to 93ab927 Compare May 21, 2026 08:31

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
fvm/evm/types/call.go (1)

171-176: ⚡ Quick win

Add table-driven tests for the new Osaka/Amsterdam gas-cap branch.

This fork-transition branch is protocol-critical, and current patch coverage for fvm/evm/types/call.go is reported as 0%, so regressions can slip in unnoticed. Please add explicit cases for: skip-check enabled, Osaka && !Amsterdam over-cap (invalid), Osaka && Amsterdam over-cap (valid), and pre-Osaka (valid).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@fvm/evm/types/call.go` around lines 171 - 176, Add table-driven tests that
exercise the Osaka/Amsterdam gas-cap branch in the call validation logic (the
code that checks dc.GasLimit against gethParams.MaxTxGas and uses rules.IsOsaka
and rules.IsAmsterdam). Create cases for: skip-check enabled (should bypass the
cap), Osaka && !Amsterdam with GasLimit > MaxTxGas (should be invalid), Osaka &&
Amsterdam with GasLimit > MaxTxGas (should be valid), and pre-Osaka with
GasLimit > MaxTxGas (should be valid). In each case construct a minimal Call
(dc) and Rules state (setting rules.IsOsaka / rules.IsAmsterdam) and assert the
boolean result from the validation function that contains the dc.GasLimit >
gethParams.MaxTxGas check.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@fvm/evm/emulator/emulator.go`:
- Around line 735-738: Batch-level gas is not enforced because run always
creates a fresh gas pool from proc.config.BlockContext.GasLimit; change run to
account for gas already consumed by the batch (BatchRunTransactions'
BlockTotalGasUsedSoFar) by computing remainingGas :=
proc.config.BlockContext.GasLimit - proc.BlockTotalGasUsedSoFar (clamp to zero)
and passing remainingGas into gethCore.NewGasPool instead of the full
BlockContext.GasLimit, so later transactions cannot use gas already spent in the
batch.
- Around line 314-333: The overflow branches in emulator.go (calls to
uint256.FromBig for tx.Value, tx.GasPrice, tx.GasFeeCap, tx.GasTipCap) currently
return hard Go errors which abort EVM.dryRun; instead construct an invalid
dry-run result and return it: call types.NewInvalidResult(...) (or the existing
result builder used by RunTransaction), set the validation error via
result.SetValidationError(...) with a descriptive error (include the offending
field and bit length or original error context such as
gethCore.ErrFeeCapVeryHigh / gethCore.ErrTipVeryHigh), and return result, nil;
replace each fmt.Errorf return in those overflow branches with this pattern so
dryRun returns an invalid EVM result rather than raising an error.

---

Nitpick comments:
In `@fvm/evm/types/call.go`:
- Around line 171-176: Add table-driven tests that exercise the Osaka/Amsterdam
gas-cap branch in the call validation logic (the code that checks dc.GasLimit
against gethParams.MaxTxGas and uses rules.IsOsaka and rules.IsAmsterdam).
Create cases for: skip-check enabled (should bypass the cap), Osaka &&
!Amsterdam with GasLimit > MaxTxGas (should be invalid), Osaka && Amsterdam with
GasLimit > MaxTxGas (should be valid), and pre-Osaka with GasLimit > MaxTxGas
(should be valid). In each case construct a minimal Call (dc) and Rules state
(setting rules.IsOsaka / rules.IsAmsterdam) and assert the boolean result from
the validation function that contains the dc.GasLimit > gethParams.MaxTxGas
check.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 552b5c1a-ee2b-4ea1-9c19-5c4c7c203727

📥 Commits

Reviewing files that changed from the base of the PR and between 8a3ce81 and 93ab927.

⛔ Files ignored due to path filters (3)
  • go.sum is excluded by !**/*.sum
  • insecure/go.sum is excluded by !**/*.sum
  • integration/go.sum is excluded by !**/*.sum
📒 Files selected for processing (19)
  • fvm/evm/emulator/config.go
  • fvm/evm/emulator/emulator.go
  • fvm/evm/emulator/emulator_test.go
  • fvm/evm/emulator/state/stateDB.go
  • fvm/evm/emulator/state/stateDB_test.go
  • fvm/evm/evm_test.go
  • fvm/evm/handler/handler.go
  • fvm/evm/testutils/contract.go
  • fvm/evm/testutils/contracts/factory.sol
  • fvm/evm/testutils/contracts/factory_abi.json
  • fvm/evm/testutils/contracts/factory_bytes.hex
  • fvm/evm/types/block.go
  • fvm/evm/types/block_test.go
  • fvm/evm/types/call.go
  • fvm/evm/types/codeFinder.go
  • fvm/evm/types/emulator.go
  • go.mod
  • insecure/go.mod
  • integration/go.mod

Comment thread fvm/evm/emulator/emulator.go Outdated
Comment thread fvm/evm/emulator/emulator.go Outdated
@blacksmith-sh

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants