Skip to content

Add transaction filtering support to eth_call#4613

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

Add transaction filtering support to eth_call#4613
MishkaRogachev wants to merge 10 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 34.70%. Comparing base (c2d3d0a) to head (1dd8d2e).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4613      +/-   ##
==========================================
+ Coverage   33.82%   34.70%   +0.88%     
==========================================
  Files         499      499              
  Lines       60170    60170              
==========================================
+ Hits        20350    20880     +530     
+ Misses      36272    35598     -674     
- Partials     3548     3692     +144     

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

❌ 15 Tests Failed:

Tests completed Failed Passed Skipped
4953 15 4938 0
View the top 3 failed tests by shortest run time
TestRedisProduceComplex/one_producer,_all_consumers_are_active
Stack Traces | 1.250s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
�[31mERROR�[0m[04-16|15:40:47.888] Error from XpendingExt in getting PEL for auto claim �[31merr�[0m="context canceled" �[31mpendingLen�[0m=0
    pubsub_test.go:203: Consume() unexpected error: reading message for consumer: "767654b4-ca66-4838-a9db-27b928020d28": NOGROUP No such key 'stream:4e273e50-440b-443f-a75c-20f44b87abe6' or consumer group 'stream:4e273e50-440b-443f-a75c-20f44b87abe6' in XREADGROUP with GROUP option
�[31mERROR�[0m[04-16|15:40:47.888] Error from XpendingExt in getting PEL for auto claim �[31merr�[0m="context canceled" �[31mpendingLen�[0m=0
    pubsub_test.go:203: Consume() unexpected error: reading message for consumer: "da7d1672-66be-4527-9890-8be0c4368a32": NOGROUP No such key 'stream:4e273e50-440b-443f-a75c-20f44b87abe6' or consumer group 'stream:4e273e50-440b-443f-a75c-20f44b87abe6' in XREADGROUP with GROUP option
�[31mERROR�[0m[04-16|15:40:47.888] Error from XpendingExt in getting PEL for auto claim �[31merr�[0m="context canceled" �[31mpendingLen�[0m=0
    pubsub_test.go:203: Consume() unexpected error: reading message for consumer: "419801bd-27e9-4387-ab3d-541af6fcbe51": NOGROUP No such key 'stream:4e273e50-440b-443f-a75c-20f44b87abe6' or consumer group 'stream:4e273e50-440b-443f-a75c-20f44b87abe6' in XREADGROUP with GROUP option
    pubsub_test.go:203: Consume() unexpected error: reading message for consumer: "d73e4f54-7652-43ce-b6d0-3623c77a6f7b": NOGROUP No such key 'stream:4e273e50-440b-443f-a75c-20f44b87abe6' or consumer group 'stream:4e273e50-440b-443f-a75c-20f44b87abe6' in XREADGROUP with GROUP option
�[31mERROR�[0m[04-16|15:40:47.888] Error from XpendingExt in getting PEL for auto claim �[31merr�[0m="context canceled" �[31mpendingLen�[0m=0
    pubsub_test.go:203: Consume() unexpected error: reading message for consumer: "d51e976c-6625-4680-9340-6d3efa58e5fa": NOGROUP No such key 'stream:4e273e50-440b-443f-a75c-20f44b87abe6' or consumer group 'stream:4e273e50-440b-443f-a75c-20f44b87abe6' in XREADGROUP with GROUP option
�[31mERROR�[0m[04-16|15:40:47.888] Error from XpendingExt in getting PEL for auto claim �[31merr�[0m="context canceled" �[31mpendingLen�[0m=0
�[31mERROR�[0m[04-16|15:40:47.888] Error from XpendingExt in getting PEL for auto claim �[31merr�[0m="context canceled" �[31mpendingLen�[0m=0
    pubsub_test.go:203: Consume() unexpected error: reading message for consumer: "8d0666a3-31a9-4e0e-9473-bafc82ad30b4": NOGROUP No such key 'stream:4e273e50-440b-443f-a75c-20f44b87abe6' or consumer group 'stream:4e273e50-440b-443f-a75c-20f44b87abe6' in XREADGROUP with GROUP option
    pubsub_test.go:203: Consume() unexpected error: reading message for consumer: "9968b6b8-e5e2-414b-845c-abd7d1b90071": NOGROUP No such key 'stream:4e273e50-440b-443f-a75c-20f44b87abe6' or consumer group 'stream:4e273e50-440b-443f-a75c-20f44b87abe6' in XREADGROUP with GROUP option
�[31mERROR�[0m[04-16|15:40:47.888] Error from XpendingExt in getting PEL for auto claim �[31merr�[0m="context canceled" �[31mpendingLen�[0m=0
�[31mERROR�[0m[04-16|15:40:47.888] Error from XpendingExt in getting PEL for auto claim �[31merr�[0m="context canceled" �[31mpendingLen�[0m=0
    pubsub_test.go:203: Consume() unexpected error: reading message for consumer: "eebc8601-ad46-404f-93a4-a5e64a455c6c": NOGROUP No such key 'stream:4e273e50-440b-443f-a75c-20f44b87abe6' or consumer group 'stream:4e273e50-440b-443f-a75c-20f44b87abe6' in XREADGROUP with GROUP option
�[31mERROR�[0m[04-16|15:40:47.888] Error from XpendingExt in getting PEL for auto claim �[31merr�[0m="context canceled" �[31mpendingLen�[0m=0
    pubsub_test.go:203: Consume() unexpected error: reading message for consumer: "b9215d7b-805a-4a8a-a002-78408f57d275": NOGROUP No such key 'stream:4e273e50-440b-443f-a75c-20f44b87abe6' or consumer group 'stream:4e273e50-440b-443f-a75c-20f44b87abe6' in XREADGROUP with GROUP option
�[31mERROR�[0m[04-16|15:40:47.889] Error from XpendingExt in getting PEL for auto claim �[31merr�[0m="context canceled" �[31mpendingLen�[0m=0
--- FAIL: TestRedisProduceComplex/one_producer,_all_consumers_are_active (1.25s)
TestAnyTrustRekey
Stack Traces | 7.530s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
        	/home/runner/work/nitro/nitro/system_tests/common_test.go:2313 +0x5d
        github.com/offchainlabs/nitro/system_tests.(*NodeBuilder).BuildL2OnL1(0xc0007ae480, 0xc000385dc0)
        	/home/runner/work/nitro/nitro/system_tests/common_test.go:1009 +0x6d3
        github.com/offchainlabs/nitro/system_tests.TestAnyTrustRekey(0xc000385dc0)
        	/home/runner/work/nitro/nitro/system_tests/anytrust_test.go:162 +0xe6e
        testing.tRunner(0xc000385dc0, 0x4254f48)
        	/opt/hostedtoolcache/go/1.25.8/x64/src/testing/testing.go:1934 +0xea
        created by testing.(*T).Run in goroutine 1
        	/opt/hostedtoolcache/go/1.25.8/x64/src/testing/testing.go:1997 +0x465
        
    common_test.go:1009: �[31;1m [failed to deploy ArbDebug] nonce too low: address 0x26E554a8acF9003b83495c7f45F06edCB803d4e3, tx: 1 state: 2 �[0;0m
TRACE[04-16|15:44:37.329] Handled RPC response                     reqid=1561 duration="2.825µs"
DEBUG[04-16|15:44:37.328] Served eth_getBlockByNumber              reqid=751  duration="88.175µs"
DEBUG[04-16|15:44:37.331] Served eth_getBlockByNumber              reqid=1641 duration="90.349µs"
TRACE[04-16|15:44:37.331] Handled RPC response                     reqid=1607 duration="2.284µs"
DEBUG[04-16|15:44:37.331] Served eth_getBlockByNumber              reqid=2320 duration="121.488µs"
DEBUG[04-16|15:44:37.331] Served eth_unsubscribe                   reqid=2321 duration="19.787µs"
DEBUG[04-16|15:44:37.331] Served eth_unsubscribe                   reqid=1565 duration="23.765µs"
TRACE[04-16|15:44:37.331] Handled RPC response                     reqid=2320 duration="3.276µs"
--- FAIL: TestAnyTrustRekey (7.53s)
TestMELMigrationFromLegacyNode
Stack Traces | 9.040s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
INFO [04-16|15:52:42.223] Updated payload                          id=0x03d1b7b0809984c5 number=51  hash=1e2709..053116 txs=1  withdrawals=0 gas=21000      fees=0.002095828306 root=205af8..13b5a4 elapsed=5.761ms
INFO [04-16|15:52:42.224] Ethereum protocol stopped
INFO [04-16|15:52:42.224] Transaction pool stopped
INFO [04-16|15:52:42.224] Chain head was updated                   number=20  hash=7feb67..d6d467 root=c36ed4..8bdc97 elapsed="631.577µs"
INFO [04-16|15:52:42.224] Persisting dirty state                   head=72  root=2bde4a..abb6cd layers=72
INFO [04-16|15:52:42.224] Stopping work on payload                 id=0x03d1b7b0809984c5 reason=delivery
INFO [04-16|15:52:42.225] Imported new potential chain segment     number=51  hash=1e2709..053116 blocks=1  txs=1  mgas=0.021  elapsed=1.339ms      mgasps=15.681   triediffs=243.84KiB  triedirty=0.00B
INFO [04-16|15:52:42.225] Chain head was updated                   number=51  hash=1e2709..053116 root=205af8..13b5a4 elapsed="83.345µs"
INFO [04-16|15:52:42.225] Submitted transaction                    hash=0x06cea1d12aa197163197a8368f930d12dc45faf423dc7a18b6bf19f8d52c2327 from=0xaF24Ca6c2831f4d4F629418b50C227DF0885613A nonce=299 recipient=0x7E23C8862920797d81916d62c274dd9217113e28 value=1
INFO [04-16|15:52:42.226] Starting work on payload                 id=0x038c98d9260a7881
INFO [04-16|15:52:42.226] Submitted contract creation              hash=0xd87e6ea62bbd5b0c55251826b64cb5247b2b1de5075c7a170c823b933965b892 from=0x57Ff0F473737a1c161bfF9efDF016F7991585088 nonce=19  contract=0x1174d3891010c0e64f57f3E47f1dEd82DC1DFA34 value=0
INFO [04-16|15:52:42.227] Starting work on payload                 id=0x03888196a15daa93
INFO [04-16|15:52:42.227] Updated payload                          id=0x038c98d9260a7881 number=329 hash=548b43..3ae3f9 txs=1  withdrawals=0 gas=21000      fees=0.0021         root=07ca44..24867e elapsed=1.203ms
INFO [04-16|15:52:42.228] Stopping work on payload                 id=0x038c98d9260a7881 reason=delivery
INFO [04-16|15:52:42.229] Persisted dirty state to disk            size=312.83KiB  elapsed=4.917ms
INFO [04-16|15:52:42.229] Blockchain stopped
INFO [04-16|15:52:42.229] Imported new potential chain segment     number=329 hash=548b43..3ae3f9 blocks=1  txs=1  mgas=0.021  elapsed=1.822ms      mgasps=11.524   triediffs=613.36KiB  triedirty=127.45KiB
INFO [04-16|15:52:42.230] Chain head was updated                   number=329 hash=548b43..3ae3f9 root=07ca44..24867e elapsed="60.603µs"
INFO [04-16|15:52:42.230] Updated payload                          id=0x03888196a15daa93 number=20  hash=4ba49c..053dfc txs=1  withdrawals=0 gas=4,884,136  fees=4.884136e-06   root=7340b5..552b0d elapsed=2.822ms
--- FAIL: TestMELMigrationFromLegacyNode (9.04s)

📣 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