feat: eth_call/eth_estimateGas 跳过 sender 验证 - #6560
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #6560 +/- ##
======================================
- Coverage 22% 22% -1%
======================================
Files 790 790
Lines 83767 83795 +28
======================================
- Hits 18603 18602 -1
- Misses 62293 62323 +30
+ Partials 2871 2870 -1 🚀 New features to boost your workflow:
|
elvin-du
self-requested a review
July 25, 2026 09:33
LinZexiao
force-pushed
the
feat/eth-call-skip-sender-validation
branch
from
July 28, 2026 16:07
fd3ce90 to
4d0a0d7
Compare
- callInternal 新增 skipSenderValidation 参数 - 新增 ApplyOnStateWithGasSkipSenderValidation / CallWithGasSkipSenderValidation - isSenderValidationError 辅助函数 - EthCall fallback:sender 验证失败时自动跳过重试 - EthEstimateGas fallback:sender 验证失败时自动跳过重试
LinZexiao
force-pushed
the
feat/eth-call-skip-sender-validation
branch
from
July 28, 2026 16:29
13c8aef to
d6afedf
Compare
elvin-du
self-requested a review
July 30, 2026 01:25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
eth_call 和 eth_estimateGas 在 sender 不存在或 sender 为 EVM 合约时,会因 sender 验证失败而无法执行。此 PR 实现了 sender 验证跳过机制,当检测到 sender 验证相关错误时,自动 fallback 到跳过验证的执行路径。
Ref: lotus#13470, lotus#13724
改动
statemanger 层 (
pkg/statemanger/call.go)callInternal新增skipSenderValidation bool参数skipSenderValidation=true且 sender 不存在时,通过ApplyImplicitMessage创建 ephemeral placeholder actorApplyOnStateWithGasSkipSenderValidation、CallWithGasSkipSenderValidationskipSenderValidation=false,行为不变ETH API 层 (
app/submodule/eth/eth_api.go)isSenderValidationError辅助函数EthCall:正常执行失败且为 sender 验证错误时 fallbackEthEstimateGas:正常 gas 估算失败且为 sender 验证错误时 fallback测试
pkg/statemanger/call_test.go:接口断言、兼容性测试、错误模式验证app/submodule/eth/eth_call_fallback_test.go:错误语义验证、接口兼容性验证审查