This repository has been archived by the owner on Nov 6, 2020. It is now read-only.
Trace returns inconsistent values for CALLCODE #9878
Labels
F3-annoyance 💩
The client behaves within expectations, however this “expected behaviour” itself is at issue.
Milestone
In issue #7166 it was reported that the trace API was reporting incorrect to/from address for delegatecall. In this issue it seemed that the to/from addresses were set to the address of the context (storage etc.) and not the address of the code. For a callType of "call" this made sense as those two are always the same, but in "delegatecall" it meant that address of the calling/called code were not reported but the contexts of execution, and in fact the trace did not report which code was being delegatecalled to at all.
It was commented in that issue that this was not the expected behaviour and it should report the parameters of the call. A patch was applied in f1eb26d which changed this behaviour (matching that of go-ethereum).
This patch only applied to delegatecall (it added added
match
that only changed behaviour on delegatecall). callcode still reports the contexts rather than the address of the code we are calling. In the case of callcode this means that the to and from addresses are always the same.https://etherscan.io/vmtrace?txhash=0xb87b345fa76a1bcf44769115058dcc07f3acf96e2f47bd4bea960ad94cf5b433&type=parity#decoded is an example of callcode in a trace (example provided in the #7166 thread).
The text was updated successfully, but these errors were encountered: