Add transaction filtering support to eth_call#4613
Add transaction filtering support to eth_call#4613MishkaRogachev wants to merge 10 commits intomasterfrom
Conversation
Codecov Report❌ Patch coverage is 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 |
❌ 15 Tests Failed:
View the top 3 failed tests by shortest run time
📣 Thoughts on this report? Let Codecov know! | Powered by Codecov |
There was a problem hiding this comment.
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_callfiltering (enabled/disabled) and ensuring filtering doesn’t mutateeth_callreturn 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
txFiltererimplementation to the revisedcore.TxFilterermethod 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.
| // 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, |
There was a problem hiding this comment.
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).
Close NIT-4725
Pulls in OffchainLabs/go-ethereum#647
Add transaction filtering support to eth_call and polish TxFilterer Interface