Comments (7)
@mattsse @ZzPoLariszZ I think bluealloy/revm#1746 will fix the first issue. I found the refund and value missing only happened in transactions which were before the cancun upgrade, the old ones were correct, eg 0x9aac76c9ed191da631b5e70c8824f2ad106a0f5147d57c611ed64653734dd85f
And for the second issue:
The from field is also incorrect, which should be same as
I think this may be another issue, maybe related to the delegatecall, will dig into it later.
from reth.
Reason
The tracers
field of inspector
after this line: https://github.com/paradigmxyz/reth/blob/main/crates/rpc/rpc/src/debug.rs#L701
did not update the selfdestruct_refund_target
and selfdestruct_transferred_value
fields after the EVM executions.
traces: CallTraceArena {
arena: [
CallTraceNode {
parent: None,
children: [],
idx: 0,
trace: CallTrace {
depth: 0,
success: true,
caller: 0xd9046c5d48ac38926978fc6193ae481e39c19810,
address: 0x44d139f02b5819b4a12777a89706b33065311dbd,
maybe_precompile: None,
selfdestruct_refund_target: None,
selfdestruct_transferred_value: None,
kind: Call,
value: 0,
data: 0x83197ef0,
output: 0x,
gas_used: 5195,
gas_limit: 8936,
status: SelfDestruct,
steps: [],
decoded: DecodedCallTrace {
label: None,
return_data: None,
call_data: None,
},
},
logs: [],
ordering: [],
},
],
},
May need to modify revm
🤔
from reth.
hmm, this is odd,
it looks like this is never called?
https://github.com/paradigmxyz/evm-inspectors/blob/2c49c7cd81ee78faa5d58d5a6eac77cb8b05bb2b/src/tracing/mod.rs#L658-L661
I wonder if this has something to do with this being the root call or something else is wrong here:
from reth.
I think this call is never called.
hmm, this is odd,
it looks like this is never called? https://github.com/paradigmxyz/evm-inspectors/blob/2c49c7cd81ee78faa5d58d5a6eac77cb8b05bb2b/src/tracing/mod.rs#L658-L661
Dealing with root call should be correct since it can correctly process its derived selfdestruct
call like pushing into calls and handling the from
address. I still believe that it is the inspector
and revm
problem, selfdestruct_refund_target
and selfdestruct_transferred_value
fields are not correctely updated (still None
) after the EVM executions. Therefore, when root call deals with to
and value
fields in its derived selfdestruct
call, two fields are missing.
I wonder if this has something to do with this being the root call or something else is wrong here:
from reth.
This problem also happens when the SELFDESTRUCT
can be derived from a DELEGATECALL
Example to Reproduce
curl http://localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
--data '{"method":"debug_traceTransaction","params":["0xece7c7e45ff6a500a272676969cbdf6c4d5095484b7ea6d211eb3c4fb9f4544f", {"tracer": "callTracer"}], "id":1,"jsonrpc":"2.0"}'
From Reth
-- skip --
{'calls': [{'calls': [{'from': '0x0a252663dbcc0b073063d6420a40319e438cfa59',
'gas': '0x0',
'gasUsed': '0x0',
'input': '0x',
'type': 'SELFDESTRUCT'}],
'from': '0xf0ef973bb461c54a4fd452c598da4ec5f696b9c2',
'gas': '0x29422',
'gasUsed': '0x14a8',
'input': '0x928dd2a7',
'to': '0x0a252663dbcc0b073063d6420a40319e438cfa59',
'type': 'DELEGATECALL',
'value': '0x0'}],
'from': '0x0a252663dbcc0b073063d6420a40319e438cfa59',
'gas': '0x29f1e',
'gasUsed': '0x154b',
'input': '0x928dd2a7',
'to': '0xf0ef973bb461c54a4fd452c598da4ec5f696b9c2',
'type': 'CALL',
'value': '0x0'}],
-- skip --
From Etherscan and QuickNode
-- skip --
{'calls': [{'calls': [{'from': '0xf0ef973bb461c54a4fd452c598da4ec5f696b9c2',
'gas': '0x0',
'gasUsed': '0x0',
'input': '0x',
'to': '0x0000000000000000000000000000000000000000',
'type': 'SELFDESTRUCT',
'value': '0x0'}],
'from': '0xf0ef973bb461c54a4fd452c598da4ec5f696b9c2',
'gas': '0x29422',
'gasUsed': '0x14a8',
'input': '0x928dd2a7',
'to': '0x0a252663dbcc0b073063d6420a40319e438cfa59',
'type': 'DELEGATECALL',
'value': '0x0'}],
'from': '0x0a252663dbcc0b073063d6420a40319e438cfa59',
'gas': '0x29f1e',
'gasUsed': '0x154b',
'input': '0x928dd2a7',
'to': '0xf0ef973bb461c54a4fd452c598da4ec5f696b9c2',
'type': 'CALL',
'value': '0x0'}],
-- skip --
The to
and value
fields are missing in the SELFDESTRUCT
call frame.
The from
field is also incorrect, which should be same as
- the
from
field in the parentDELEGATECALL
call frame, or - the
to
field in the parentCALL
call frame.
from reth.
For the DELEGATECALL
related, should we open another issue or just keep this issue open? @rakita
from reth.
For the
DELEGATECALL
related, should we open another issue or just keep this issue open? @rakita
Can you test if delegatecall is fixed with selfdestruct fix. Not saying it is, but maybe they are related.
from reth.
Related Issues (20)
- Make ConfigureEvm independent of chainspec argument
- Tracking issue primitive types abstraction
- Introduce Block trait HOT 2
- Make ConfigureEvm Independent of consensus types
- Make txpool independent of consensus types
- reth-primitives crate import audit HOT 2
- use alloy `Signature` type HOT 1
- Transition to generic ChainSpec type
- delegate trace's to_address incorrect when including a suicide trace
- debug_execution_witness bug
- Remove receipts fn in BuiltPayload
- Promote Rpc to a node component HOT 1
- op: use `OpChainSpec` in `OpExecutorProvider`
- Incorrect balance and refundAddress for contract suicide HOT 4
- prune_config no longer returns an optional value HOT 1
- Move BlobAndProofV1 to alloy_eips HOT 3
- Create guide on how to add and update grafana panels HOT 2
- Avoid using concrete `ProviderFactory`
- `SenderRecovery` does not fail if the `recover_range` task dies
- Hi there what is the main different between OP-Reth and Reth? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reth.