Skip to content

Revert "[Flow EVM] Upgrade to Ethereum Glamsterdam hard-fork"#976

Closed
vishalchangrani wants to merge 1 commit into
mainfrom
revert-962-mpeter/flow-evm-glamsterdam-upgrade
Closed

Revert "[Flow EVM] Upgrade to Ethereum Glamsterdam hard-fork"#976
vishalchangrani wants to merge 1 commit into
mainfrom
revert-962-mpeter/flow-evm-glamsterdam-upgrade

Conversation

@vishalchangrani

@vishalchangrani vishalchangrani commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Reverts #962

Hey folks - I merged in the glamsterdam update PR not realizing that it would enable Glamsterdam on the EVM GW rightaway. I had assumed it would only be activated at a particulate date and time - my bad.

Unfortunately, the update breaks several test since Glamsterdam changes how fees are charged by the network for certain transactions. Also, we don't want those fee changes now but later when we want to take glamsterdam live on the network. This PR reverts the merge and restores main to what it was before the merge.

Summary by CodeRabbit

  • Bug Fixes

    • Updated gas estimation and transaction validation so fee calculations and limit checks better match current network behavior.
    • Simplified block responses by removing outdated legacy block fields from API output.
    • Improved block and transaction handling across ingestion and event processing.
  • Tests

    • Refreshed end-to-end and Web3 test expectations to align with updated gas usage, receipts, traces, and filter results.
    • Added coverage for multicall3 interactions and adjusted several transaction flow scenarios.

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This PR removes Amsterdam-hardfork-specific block fields (SlotNumber, BlockAccessListHash) from API, types, and model layers, removes chainID/chainConfig wiring from the ingestion engine in favor of a simplified ReplayBlock flow, adjusts gas estimation logic in the requester (Osaka cap check, success/failure branching, access-list/authorization-list gas allowances), updates Go module dependencies, and extensively updates gas limits and expected values across Go and JS tests.

Changes

Amsterdam field removal and gas estimation

Layer / File(s) Summary
Block type/model field removal
eth/types/types.go, models/block.go, models/events.go, models/events_test.go
Block struct loses SlotNumber/BlockAccessListHash JSON fields and models' AccessListHash field; related event decode logic and test helpers updated.
API block response cleanup
api/api.go
prepareBlockResponse no longer instantiates emulator config or sets Amsterdam-specific fields.
Ingestion engine refactor
services/ingestion/engine.go, services/ingestion/engine_test.go, bootstrap/bootstrap.go
NewEventIngestionEngine drops chainID/chainConfig params; replay switches to ReplayBlock/StorageRegisterUpdates, removing Amsterdam access-list-hash computation; call sites and tests updated.
Gas estimation logic
services/requester/requester.go
Osaka cap check simplified, success/failure branching switched to Failed(), and access-list/authorization-list gas allowances added to final gas limit.
Transaction validation test updates
models/transaction_test.go
Gas-limit-cap and init-code-size test expectations updated to reflect removed Amsterdam-specific limits.
E2E/integration gas limit updates
tests/e2e_web3js_test.go, tests/integration_test.go, tests/key_store_release_test.go, tests/tx_batching_test.go, tests/web3js/*
Gas limits reduced and expected values updated across Go and JS tests; new multicall3 e2e subtest added; Amsterdam hard-fork override removed.
JS RPC/trace test expectations
tests/web3js/debug_traces_test.js, tests/web3js/eth_*_test.js
Debug trace, receipt, filter, and fee-history expectations updated; slotNumber checks removed; logsBloom validation simplified.
Dependency updates
go.mod, tests/go.mod
Multiple direct/indirect Go module versions bumped or replaced.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

Suggested labels: Bugfix, Compatibility

Suggested reviewers: janezpodhostnik, peterargue, zhangchiqing

Poem

A rabbit hopped through Amsterdam's fields,
Trimming the hashes that hardforks concealed 🐇
Gas limits shrank, tests learned new tricks,
Dependencies bumped with a few careful clicks,
Now blocks replay clean, no extra weight to yield!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the PR as a revert of the Glamsterdam hard-fork upgrade, which matches the summarized rollback changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch revert-962-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.

@vishalchangrani

Copy link
Copy Markdown
Contributor Author

The original branch mpeter/flow-evm-glamsterdam-upgrade has been restored and I will create a PR for it against main after this PR has been merged in. That PR will stay open until we are ready for Glamsterdam.

@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: 5

🧹 Nitpick comments (2)
tests/web3js/eth_deploy_contract_and_interact_test.js (1)

103-106: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Simplified logsBloom check loses per-log validation.

The prior check validated that the bloom filter actually contained each expected log/topic; this now only checks block-level logsBloom equals receipt logsBloom. Since the block bloom is an aggregate of its receipts, this passes trivially and no longer proves the bloom's correctness relative to actual events, reducing test coverage.

🤖 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 `@tests/web3js/eth_deploy_contract_and_interact_test.js` around lines 103 -
106, The current `logsBloom` assertion in
`eth_deploy_contract_and_interact_test` only compares the block bloom to the
receipt bloom, which is a trivial aggregate match and no longer validates
event-level correctness. Update the test to use the existing receipt/log data
from the deploy-and-interact flow and assert that the bloom filter contains each
expected log/topic again, keeping the check tied to the actual emitted events
rather than only `web3.eth.getBlock` and `res.receipt`.
models/transaction_test.go (1)

372-373: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Derive expected messages from the go-ethereum params.

These assertions are tied to params.MaxTxGas and params.MaxInitCodeSize; keep the expected strings constant-derived to avoid stale magic numbers on future dependency updates.

Suggested refactor
-			errMsg: "transaction gas limit too high (cap: 16777216, tx: 16777316)",
+			errMsg: fmt.Sprintf(
+				"transaction gas limit too high (cap: %d, tx: %d)",
+				params.MaxTxGas,
+				params.MaxTxGas+100,
+			),
...
-		dataLen := params.MaxInitCodeSize + 5_000
+		dataLen := params.MaxInitCodeSize + 5_000
...
-			"max initcode size exceeded: code size 54152, limit 49152",
+			fmt.Sprintf(
+				"max initcode size exceeded: code size %d, limit %d",
+				dataLen,
+				params.MaxInitCodeSize,
+			),

Also applies to: 568-568, 596-596

🤖 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 `@models/transaction_test.go` around lines 372 - 373, The transaction
validation tests are hardcoding expected error strings with stale gas/code size
numbers. Update the assertions in transaction_test.go to build the expected
messages from the current go-ethereum params constants, especially around the
transaction gas limit checks and init code size checks, so the tests stay
aligned with params.MaxTxGas and params.MaxInitCodeSize. Use the existing test
case helpers/fields in the transaction validation table to derive the strings
instead of embedding numeric literals.
🤖 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 `@go.mod`:
- Around line 203-208: Update the OpenTelemetry dependency set in go.mod so all
go.opentelemetry.io/otel*, including otlptracegrpc, are aligned to the same
patched release series rather than mixing v1.39.0 and v1.31.0. Use the existing
dependency entries around the otel, otel/sdk, otel/trace, and otlp exporter
declarations to bump them together to v1.42.0 or later, and keep tests/go.mod in
sync if it mirrors these versions.

In `@services/ingestion/engine.go`:
- Around line 261-263: The register-store write path in e.registerStore.Store
currently loses the underlying failure because the returned error from the store
call is not included in the fmt.Errorf created in this block. Update the error
handling around registerEntriesFromKeyValue and e.registerStore.Store so the
failure from Store is wrapped/preserved and can still be unwrapped by callers,
while keeping the existing block-height context in the message.

In `@services/requester/requester.go`:
- Around line 360-362: The Osaka gas cap in requester.go is applied too early in
the gas estimation flow, so the later access-list/authorization-list surcharge
can push the final value above gethParams.MaxTxGas. Update the logic around
chainConfig.IsOsaka and passingGasLimit so the surcharge is included before
capping, or clamp the final gas estimate again right before returning from
EstimateGas. Keep the fix localized to the gas calculation path that uses
gethParams.MaxTxGas and the surcharge adjustment.

In `@tests/web3js/eth_streaming_filters_test.js`:
- Around line 123-127: The streaming filter test is using an unfiltered
subscription via rawSubscribe({}), which can pick up unrelated logs and make
assertFilterLogs flaky. Update the test to keep the subscription scoped to the
specific contract filter used by the two under-test contracts, so the helper
only receives the expected events. Use the rawSubscribe and assertFilterLogs
calls in tests/web3js/eth_streaming_filters_test.js to locate the change.

In `@tests/web3js/eth_transaction_type_fees_test.js`:
- Around line 107-125: The negative-path check in the signAndSend test is
incomplete because it only asserts inside the catch block, so a successful call
would skip validation. Update the test around helpers.signAndSend to explicitly
assert that an error is thrown for the insufficient gas price case, and keep the
existing e.message check for the min-gas-price rejection. Use the signAndSend
call and the surrounding try/catch in eth_transaction_type_fees_test.js as the
place to add the missing failure assertion.

---

Nitpick comments:
In `@models/transaction_test.go`:
- Around line 372-373: The transaction validation tests are hardcoding expected
error strings with stale gas/code size numbers. Update the assertions in
transaction_test.go to build the expected messages from the current go-ethereum
params constants, especially around the transaction gas limit checks and init
code size checks, so the tests stay aligned with params.MaxTxGas and
params.MaxInitCodeSize. Use the existing test case helpers/fields in the
transaction validation table to derive the strings instead of embedding numeric
literals.

In `@tests/web3js/eth_deploy_contract_and_interact_test.js`:
- Around line 103-106: The current `logsBloom` assertion in
`eth_deploy_contract_and_interact_test` only compares the block bloom to the
receipt bloom, which is a trivial aggregate match and no longer validates
event-level correctness. Update the test to use the existing receipt/log data
from the deploy-and-interact flow and assert that the bloom filter contains each
expected log/topic again, keeping the check tied to the actual emitted events
rather than only `web3.eth.getBlock` and `res.receipt`.
🪄 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: 5f6f6e56-7d56-4fa8-a7db-d2f8acc33d37

📥 Commits

Reviewing files that changed from the base of the PR and between d887303 and 4380cb9.

⛔ Files ignored due to path filters (2)
  • go.sum is excluded by !**/*.sum
  • tests/go.sum is excluded by !**/*.sum
📒 Files selected for processing (28)
  • api/api.go
  • bootstrap/bootstrap.go
  • eth/types/types.go
  • go.mod
  • models/block.go
  • models/events.go
  • models/events_test.go
  • models/transaction_test.go
  • services/ingestion/engine.go
  • services/ingestion/engine_test.go
  • services/requester/requester.go
  • tests/e2e_web3js_test.go
  • tests/go.mod
  • tests/integration_test.go
  • tests/key_store_release_test.go
  • tests/tx_batching_test.go
  • tests/web3js/blockchain_test.js
  • tests/web3js/build_evm_state_test.js
  • tests/web3js/debug_traces_test.js
  • tests/web3js/eth_deploy_contract_and_interact_test.js
  • tests/web3js/eth_eip_7702_sending_transactions_test.js
  • tests/web3js/eth_failure_handling_test.js
  • tests/web3js/eth_filter_endpoints_test.js
  • tests/web3js/eth_multicall3_contract_test.js
  • tests/web3js/eth_non_interactive_test.js
  • tests/web3js/eth_streaming_filters_test.js
  • tests/web3js/eth_transaction_type_fees_test.js
  • tests/web3js/eth_transfer_between_eoa_accounts_test.js
💤 Files with no reviewable changes (7)
  • bootstrap/bootstrap.go
  • models/events.go
  • models/block.go
  • models/events_test.go
  • api/api.go
  • eth/types/types.go
  • services/ingestion/engine_test.go

Comment thread go.mod
Comment on lines +203 to +208
go.opentelemetry.io/otel v1.39.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.39.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.31.0 // indirect
go.opentelemetry.io/otel/metric v1.39.0 // indirect
go.opentelemetry.io/otel/sdk v1.39.0 // indirect
go.opentelemetry.io/otel/trace v1.39.0 // indirect

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.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check otel usage for baggage and subprocess spawning
rg -n "baggage|kenv|PATH" --type=go -g '!**/vendor/**' || echo "No direct baggage/PATH usage found"

Repository: onflow/flow-evm-gateway

Length of output: 196


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== go.mod otel entries =="
nl -ba go.mod | sed -n '195,215p'

echo
echo "== tests/go.mod otel entries =="
if [ -f tests/go.mod ]; then
  nl -ba tests/go.mod | sed -n '1,120p'
else
  echo "tests/go.mod not found"
fi

echo
echo "== all otel version references =="
rg -n "go\.opentelemetry\.io/otel" go.mod tests/go.mod

Repository: onflow/flow-evm-gateway

Length of output: 227


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== go.mod otel entries =="
nl -ba go.mod | sed -n '200,210p'

echo
echo "== tests/go.mod otel entries =="
if [ -f tests/go.mod ]; then
  rg -n "go\.opentelemetry\.io/otel" tests/go.mod
else
  echo "tests/go.mod not found"
fi

Repository: onflow/flow-evm-gateway

Length of output: 227


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== go.mod otel entries =="
sed -n '200,210p' go.mod

echo
echo "== tests/go.mod otel entries =="
if [ -f tests/go.mod ]; then
  grep -n "go.opentelemetry.io/otel" tests/go.mod || true
else
  echo "tests/go.mod not found"
fi

echo
echo "== root go.mod otel references =="
grep -n "go.opentelemetry.io/otel" go.mod || true

Repository: onflow/flow-evm-gateway

Length of output: 1696


Bump the OpenTelemetry deps in go.mod:203-208
go.mod still pins go.opentelemetry.io/otel* to v1.39.0/v1.31.0. tests/go.mod only upgrades part of that set, so align the shared OpenTelemetry versions to a patched line (v1.42.0+) to pick up the CVE fixes consistently.

🧰 Tools
🪛 OSV Scanner (2.4.0)

[HIGH] 203-203: go.opentelemetry.io/otel 1.39.0: OpenTelemetry-Go: multi-value baggage header extraction causes excessive allocations (remote dos amplification)

(GHSA-mh2q-q3fh-2475)


[HIGH] 207-207: go.opentelemetry.io/otel/sdk 1.39.0: OpenTelemetry Go SDK Vulnerable to Arbitrary Code Execution via PATH Hijacking in go.opentelemetry.io/otel/sdk

(GO-2026-4394)


[HIGH] 207-207: go.opentelemetry.io/otel/sdk 1.39.0: OpenTelemetry Go SDK Vulnerable to Arbitrary Code Execution via PATH Hijacking

(GHSA-9h8m-3fm2-qjrq)


[HIGH] 207-207: go.opentelemetry.io/otel/sdk 1.39.0: opentelemetry-go: BSD kenv command not using absolute path enables PATH hijacking

(GHSA-hfvc-g4fc-pqhx)

🤖 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 `@go.mod` around lines 203 - 208, Update the OpenTelemetry dependency set in
go.mod so all go.opentelemetry.io/otel*, including otlptracegrpc, are aligned to
the same patched release series rather than mixing v1.39.0 and v1.31.0. Use the
existing dependency entries around the otel, otel/sdk, otel/trace, and otlp
exporter declarations to bump them together to v1.42.0 or later, and keep
tests/go.mod in sync if it mirrors these versions.

Comment on lines +261 to +263
err = e.registerStore.Store(registerEntriesFromKeyValue(res.StorageRegisterUpdates()), blockEvents.Height, batch)
if err != nil {
return fmt.Errorf("failed to store state changes on block: %d", block.Height)
return fmt.Errorf("failed to store state changes on block: %d", events.Block().Height)

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.

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Preserve the register-store failure cause.

Line 263 drops err, so storage failures lose their root cause and cannot be unwrapped by callers.

Suggested fix
 	err = e.registerStore.Store(registerEntriesFromKeyValue(res.StorageRegisterUpdates()), blockEvents.Height, batch)
 	if err != nil {
-		return fmt.Errorf("failed to store state changes on block: %d", events.Block().Height)
+		return fmt.Errorf("failed to store state changes on block: %d: %w", events.Block().Height, err)
 	}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
err = e.registerStore.Store(registerEntriesFromKeyValue(res.StorageRegisterUpdates()), blockEvents.Height, batch)
if err != nil {
return fmt.Errorf("failed to store state changes on block: %d", block.Height)
return fmt.Errorf("failed to store state changes on block: %d", events.Block().Height)
err = e.registerStore.Store(registerEntriesFromKeyValue(res.StorageRegisterUpdates()), blockEvents.Height, batch)
if err != nil {
return fmt.Errorf("failed to store state changes on block: %d: %w", events.Block().Height, err)
}
🤖 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 `@services/ingestion/engine.go` around lines 261 - 263, The register-store
write path in e.registerStore.Store currently loses the underlying failure
because the returned error from the store call is not included in the fmt.Errorf
created in this block. Update the error handling around
registerEntriesFromKeyValue and e.registerStore.Store so the failure from Store
is wrapped/preserved and can still be unwrapped by callers, while keeping the
existing block-height context in the message.

Comment on lines +360 to 362
if chainConfig.IsOsaka(blockNumber, blockTime) {
passingGasLimit = gethParams.MaxTxGas
}

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.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Inspect cap and post-search allowance handling.
rg -n "MaxTxGas|TxAccessListAddressGas|TxAccessListStorageKeyGas|CallNewAccountGas|AuthorizationList|AccessList" services/requester/requester.go

Repository: onflow/flow-evm-gateway

Length of output: 657


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show the EstimateGas implementation around the cap, binary search, and post-search additions.
sed -n '300,470p' services/requester/requester.go | cat -n

Repository: onflow/flow-evm-gateway

Length of output: 7310


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Check how TransactionArgs.ToTransaction handles access-list and authorization-list fields.
rg -n "func \(.*ToTransaction|AccessList|AuthorizationList|TxAccessListAddressGas|CallNewAccountGas" -g '!vendor' .

Repository: onflow/flow-evm-gateway

Length of output: 4260


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Read the transaction conversion logic and any Osaka gas-limit validation references.
sed -n '100,240p' eth/types/types.go | cat -n
printf '\n----\n'
rg -n "MaxTxGas|IsOsaka|EIP-7825|gas limit" eth services models -g '!vendor'

Repository: onflow/flow-evm-gateway

Length of output: 6797


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Find where estimated gas is consumed and whether any later clamp/validation can absorb an over-cap estimate.
rg -n "EstimateGas\(|gas limit too high|MaxTxGas|TxGas|Validate.*Gas|gas limit" services models api eth -g '!vendor'

Repository: onflow/flow-evm-gateway

Length of output: 2275


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the public API EstimateGas path and any gas-limit validation around submission.
sed -n '700,790p' api/api.go | cat -n
printf '\n----\n'
sed -n '340,430p' models/transaction_test.go | cat -n
printf '\n----\n'
rg -n "MaxTxGas|transaction gas limit too high|exceeds block gas limit|gas limit too high" api models services -g '!vendor'

Repository: onflow/flow-evm-gateway

Length of output: 6645


Preserve the Osaka cap after surcharge adjustments

passingGasLimit is capped before the access-list/authorization-list surcharge is added, so EstimateGas can still return a value above gethParams.MaxTxGas. Fold the surcharge into the capped ceiling or clamp the final result before returning.

🤖 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 `@services/requester/requester.go` around lines 360 - 362, The Osaka gas cap in
requester.go is applied too early in the gas estimation flow, so the later
access-list/authorization-list surcharge can push the final value above
gethParams.MaxTxGas. Update the logic around chainConfig.IsOsaka and
passingGasLimit so the surcharge is included before capping, or clamp the final
gas estimate again right before returning from EstimateGas. Keep the fix
localized to the gas calculation path that uses gethParams.MaxTxGas and the
surcharge adjustment.

Comment on lines +123 to 127
// stream all events by any contract, we have two same contracts, so we duplicate expected values and in order
assertFilterLogs(
await rawSubscribe({ address: [contractAddress, contractAddress2] }),
await rawSubscribe({}),
testValues.concat(testValues)
),

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.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Unfiltered subscription may cause flaky test failures.

Switching to rawSubscribe({}) subscribes to logs from every contract on the network, not just the two under test. assertFilterLogs waits for allLogs.length === expectedLogs.length before resolving; any unrelated log emitted by concurrently-running tests/contracts during this window will be pushed into allLogs, causing the length check to never match (hanging test) or the deep-equal comparisons to fail against unexpected entries.

Suggested fix: keep contract-scoped filter
-            await rawSubscribe({}),
+            await rawSubscribe({ address: [contractAddress, contractAddress2] }),
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// stream all events by any contract, we have two same contracts, so we duplicate expected values and in order
assertFilterLogs(
await rawSubscribe({ address: [contractAddress, contractAddress2] }),
await rawSubscribe({}),
testValues.concat(testValues)
),
// stream all events by any contract, we have two same contracts, so we duplicate expected values and in order
assertFilterLogs(
await rawSubscribe({ address: [contractAddress, contractAddress2] }),
testValues.concat(testValues)
),
🤖 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 `@tests/web3js/eth_streaming_filters_test.js` around lines 123 - 127, The
streaming filter test is using an unfiltered subscription via rawSubscribe({}),
which can pick up unrelated logs and make assertFilterLogs flaky. Update the
test to keep the subscription scoped to the specific contract filter used by the
two under-test contracts, so the helper only receives the expected events. Use
the rawSubscribe and assertFilterLogs calls in
tests/web3js/eth_streaming_filters_test.js to locate the change.

Comment on lines +107 to +125
// with insufficient gas price
try {
res = await helpers.signAndSend({
from: conf.eoa.address,
to: contractAddress,
data: storeCallData,
value: '0',
gasPrice: conf.minGasPrice - 50n,
accessList: [
{
address: contractAddress,
storageKeys: [],
},
]
})
} catch (e) {
assert.include(e.message, "the minimum accepted gas price for transactions is: 150")
}

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Negative-path test doesn't fail if no error is thrown.

If signAndSend unexpectedly succeeds, the catch block never runs and the expected-failure assertion is silently skipped — the test would pass without verifying the min-gas-price rejection.

🐛 Proposed fix to ensure the negative case is asserted
     // with insufficient gas price
     try {
         res = await helpers.signAndSend({
             from: conf.eoa.address,
             to: contractAddress,
             data: storeCallData,
             value: '0',
             gasPrice: conf.minGasPrice - 50n,
             accessList: [
                 {
                     address: contractAddress,
                     storageKeys: [],
                 },
             ]
         })
+        assert.fail("expected transaction to be rejected due to insufficient gas price")
     } catch (e) {
         assert.include(e.message, "the minimum accepted gas price for transactions is: 150")
     }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// with insufficient gas price
try {
res = await helpers.signAndSend({
from: conf.eoa.address,
to: contractAddress,
data: storeCallData,
value: '0',
gasPrice: conf.minGasPrice - 50n,
accessList: [
{
address: contractAddress,
storageKeys: [],
},
]
})
} catch (e) {
assert.include(e.message, "the minimum accepted gas price for transactions is: 150")
}
// with insufficient gas price
try {
res = await helpers.signAndSend({
from: conf.eoa.address,
to: contractAddress,
data: storeCallData,
value: '0',
gasPrice: conf.minGasPrice - 50n,
accessList: [
{
address: contractAddress,
storageKeys: [],
},
]
})
assert.fail("expected transaction to be rejected due to insufficient gas price")
} catch (e) {
assert.include(e.message, "the minimum accepted gas price for transactions is: 150")
}
🤖 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 `@tests/web3js/eth_transaction_type_fees_test.js` around lines 107 - 125, The
negative-path check in the signAndSend test is incomplete because it only
asserts inside the catch block, so a successful call would skip validation.
Update the test around helpers.signAndSend to explicitly assert that an error is
thrown for the insufficient gas price case, and keep the existing e.message
check for the min-gas-price rejection. Use the signAndSend call and the
surrounding try/catch in eth_transaction_type_fees_test.js as the place to add
the missing failure assertion.

@m-Peter

m-Peter commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

The Glamsterdam hard-fork is only enabled by default on Emulator/PreviewNet environments, as this is necessary for CI/testing etc. For testnet/mainnet, the activation is behind a timestamp, which is currently set for December 31st. So I think there's no need to revert the PR with the Glamsterdam changes.

@github-project-automation github-project-automation Bot moved this from 👀 In Review to ✅ Done in 🌊 Flow 4D Jul 1, 2026
@vishalchangrani vishalchangrani deleted the revert-962-mpeter/flow-evm-glamsterdam-upgrade branch July 1, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants