Skip to content

Add transaction filtering support to eth_call#4613

Open
MishkaRogachev wants to merge 11 commits intomasterfrom
add-transaction-filtering-support-to-eth_call
Open

Add transaction filtering support to eth_call#4613
MishkaRogachev wants to merge 11 commits intomasterfrom
add-transaction-filtering-support-to-eth_call

Conversation

@MishkaRogachev
Copy link
Copy Markdown
Contributor

@MishkaRogachev MishkaRogachev commented Apr 8, 2026

Close NIT-4725
Pulls in OffchainLabs/go-ethereum#647

Add transaction filtering support to eth_call and polish TxFilterer Interface

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 8, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 33.84%. Comparing base (7a40184) to head (4c752ed).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4613      +/-   ##
==========================================
+ Coverage   33.75%   33.84%   +0.09%     
==========================================
  Files         501      501              
  Lines       60225    60225              
==========================================
+ Hits        20326    20384      +58     
+ Misses      36336    36280      -56     
+ Partials     3563     3561       -2     

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 8, 2026

❌ 8 Tests Failed:

Tests completed Failed Passed Skipped
4950 8 4942 0
View the top 3 failed tests by shortest run time
TestRedisProduceComplex/two_producers,_some_consumers_killed,_others_should_take_over_their_work,_unequal_number_of_requests_from_producers
Stack Traces | 2.040s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
�[36mDEBUG�[0m[04-17|15:37:26.066] checkResponses                           �[36mresponded�[0m=0   �[36merrored�[0m=0 �[36mchecked�[0m=0
�[36mDEBUG�[0m[04-17|15:37:26.069] redis producer: check responses starting
�[36mDEBUG�[0m[04-17|15:37:26.069] checkResponses                           �[36mresponded�[0m=0   �[36merrored�[0m=0 �[36mchecked�[0m=4
�[36mDEBUG�[0m[04-17|15:37:26.072] redis producer: check responses starting
�[36mDEBUG�[0m[04-17|15:37:26.072] checkResponses                           �[36mresponded�[0m=0   �[36merrored�[0m=0 �[36mchecked�[0m=0
�[36mDEBUG�[0m[04-17|15:37:26.074] redis producer: check responses starting
�[36mDEBUG�[0m[04-17|15:37:26.075] checkResponses                           �[36mresponded�[0m=0   �[36merrored�[0m=0 �[36mchecked�[0m=4
�[36mDEBUG�[0m[04-17|15:37:26.078] redis producer: check responses starting
�[36mDEBUG�[0m[04-17|15:37:26.078] checkResponses                           �[36mresponded�[0m=0   �[36merrored�[0m=0 �[36mchecked�[0m=0
�[36mDEBUG�[0m[04-17|15:37:26.080] redis producer: check responses starting
�[36mDEBUG�[0m[04-17|15:37:26.081] request timed out waiting for response   �[36mmsgId�[0m=1776440244078-12 �[36mallowedOldestId�[0m=1776440244080-0
�[36mDEBUG�[0m[04-17|15:37:26.081] request timed out waiting for response   �[36mmsgId�[0m=1776440244078-15 �[36mallowedOldestId�[0m=1776440244080-0
�[36mDEBUG�[0m[04-17|15:37:26.081] request timed out waiting for response   �[36mmsgId�[0m=1776440244078-13 �[36mallowedOldestId�[0m=1776440244080-0
�[36mDEBUG�[0m[04-17|15:37:26.081] request timed out waiting for response   �[36mmsgId�[0m=1776440244078-14 �[36mallowedOldestId�[0m=1776440244080-0
�[36mDEBUG�[0m[04-17|15:37:26.081] checkResponses                           �[36mresponded�[0m=0   �[36merrored�[0m=4 �[36mchecked�[0m=4
    pubsub_test.go:385: Unexpected error while awaiting responses, producer: 1, response: 104, err: error getting response, request has been waiting for too long
    pubsub_test.go:385: Unexpected error while awaiting responses, producer: 1, response: 105, err: error getting response, request has been waiting for too long
    pubsub_test.go:385: Unexpected error while awaiting responses, producer: 1, response: 106, err: error getting response, request has been waiting for too long
    pubsub_test.go:385: Unexpected error while awaiting responses, producer: 1, response: 107, err: error getting response, request has been waiting for too long
--- FAIL: TestRedisProduceComplex/two_producers,_some_consumers_killed,_others_should_take_over_their_work,_unequal_number_of_requests_from_producers (2.04s)
TestRedisProduceComplex
Stack Traces | 21.320s run time
=== RUN   TestRedisProduceComplex
=== PAUSE TestRedisProduceComplex
=== CONT  TestRedisProduceComplex
--- FAIL: TestRedisProduceComplex (21.32s)
TestParentChainEthConfigForkTransition
Stack Traces | 35.590s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
INFO [04-17|15:47:41.097] Persisted dirty state to disk            size=76.91KiB  elapsed=1.812ms
INFO [04-17|15:47:41.098] 
INFO [04-17|15:47:41.098] ---------------------------------------------------------------------------------------------------------------------------------------------------------
INFO [04-17|15:47:41.099] Updated parent chain config from eth_config currentTarget=6 currentMax=9 hasNext=false
INFO [04-17|15:47:41.099] Blockchain stopped
INFO [04-17|15:47:41.099] Starting work on payload                 id=0x035b93e0571a467b
INFO [04-17|15:47:41.099] Updated payload                          id=0x03c76d8895be349d number=6   hash=0bcf54..3c3758 txs=1   withdrawals=0 gas=4,765,394  fees=4.765394e-06   root=b2c3c5..c7fb5d elapsed=2.747ms
INFO [04-17|15:47:41.100] Updated payload                          id=0x039edf2ef55d9fca number=15  hash=b4b2ea..6114f6 txs=2   withdrawals=0 gas=4,112,790  fees=4.11279e-06    root=cc229b..f01908 elapsed=1.389ms
INFO [04-17|15:47:41.100] Stopping work on payload                 id=0x039edf2ef55d9fca reason=delivery
INFO [04-17|15:47:41.101] Submitted transaction                    hash=0xa2b2a2146bbb092f3eeec8abe65ca820d4b7661bd4e2bdaffc98f2f587f58812 from=0xaF24Ca6c2831f4d4F629418b50C227DF0885613A nonce=13  recipient=0xaF24Ca6c2831f4d4F629418b50C227DF0885613A value=1,000,000,000,000
INFO [04-17|15:47:41.101] Updated payload                          id=0x035b93e0571a467b number=18  hash=b1c914..ee18f3 txs=1   withdrawals=0 gas=3,035,067  fees=3.035067e-06   root=1a0742..02958c elapsed=2.197ms
INFO [04-17|15:47:41.101] Starting work on payload                 id=0x0342720c4de93415
INFO [04-17|15:47:41.103] Starting work on payload                 id=0x036f809d8966f3d0
INFO [04-17|15:47:41.104] Updated payload                          id=0x036f809d8966f3d0 number=50  hash=8a24d7..f7fed8 txs=1   withdrawals=0 gas=21000      fees=0.002095299701 root=530eda..a5b9d1 elapsed=1.005ms
INFO [04-17|15:47:41.098] Starting work on payload                 id=0x034fb6a8daf17e33
INFO [04-17|15:47:41.106] Stopping work on payload                 id=0x035b93e0571a467b reason=delivery
INFO [04-17|15:47:41.108] Submitted contract creation              hash=0x76e92da4a2c2cad5bf73659a0d9189d91247ce4186d25bacd0dfd61d92a5170a from=0x57Ff0F473737a1c161bfF9efDF016F7991585088 nonce=16  contract=0xffd0c2C95214aa9980D7419bd87c260C80Ce2546 value=0
INFO [04-17|15:47:41.108] Deploying ospEntry
--- FAIL: TestParentChainEthConfigForkTransition (35.59s)
INFO [04-17|15:47:41.108] Updated parent chain config from eth_config currentTarget=6 currentMax=9 hasNext=false

📣 Thoughts on this report? Let Codecov know! | Powered by Codecov

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds system-level coverage and backend wiring needed to support address-based transaction filtering in eth_call, aligning it with existing eth_estimateGas filtering behavior (NIT-4725; pulls in OffchainLabs/go-ethereum#647).

Changes:

  • Adds new system tests validating eth_call filtering (enabled/disabled) and ensuring filtering doesn’t mutate eth_call return values when scheduled txes (retryable redeems) execute.
  • Consolidates prior estimate-gas filtering tests into a new combined RPC filtering test file (and removes the old dedicated estimate-gas test file).
  • Updates the geth execution txFilterer implementation to the revised core.TxFilterer method set (split touch logic and post-execution filtering check), and adds a changelog entry.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

File Description
system_tests/rpc_filter_test.go New consolidated system tests for eth_estimateGas + eth_call filtering, including scheduled-tx (retryable) eth_call result stability.
system_tests/estimate_gas_filter_test.go Removes the old estimate-gas-only filtering tests (superseded by rpc_filter_test.go).
execution/gethexec/tx_filterer.go Updates txFilterer method names/signatures to match the updated TxFilterer interface and separates direct from/to touching vs scheduled-tx touching.
changelog/mrogachev-nit-4725.md Documents the internal change adding eth_call address filtering support.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +244 to +254
// Craft eth_call data: ArbRetryableTx.redeem(ticketId)
arbRetryableABI, err := precompilesgen.ArbRetryableTxMetaData.GetAbi()
Require(t, err)
redeemData, err := arbRetryableABI.Pack("redeem", ticketId)
Require(t, err)
arbRetryableAddr := common.HexToAddress("0x6e")

callMsg := ethereum.CallMsg{
From: userAddr,
To: &arbRetryableAddr,
Data: redeemData,
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

Prefer using the canonical ArbRetryableTx precompile address constant (e.g., types.ArbRetryableTxAddress) instead of hard-coding 0x6e. This avoids magic numbers and stays correct if the address is ever refactored/centralized differently (several system tests already use the constant).

Copilot uses AI. Check for mistakes.
Comment thread system_tests/rpc_filter_test.go Outdated
Comment thread system_tests/rpc_filter_test.go
Comment thread system_tests/rpc_filter_test.go
@diegoximenes diegoximenes assigned tsahee and unassigned diegoximenes Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants