Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Trace returns inconsistent values for CALLCODE #9878

Closed
JakeOShannessy opened this issue Nov 7, 2018 · 1 comment
Closed

Trace returns inconsistent values for CALLCODE #9878

JakeOShannessy opened this issue Nov 7, 2018 · 1 comment
Labels
F3-annoyance 💩 The client behaves within expectations, however this “expected behaviour” itself is at issue.
Milestone

Comments

@JakeOShannessy
Copy link

  • Parity Ethereum version: 2.1.4
  • Operating system: Windows
  • Installation: executable
  • Fully synchronized: no
  • Network: ethereum and dev test net

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).

@jam10o-new jam10o-new added Z1-question 🙋‍♀️ Issue is a question. Closer should answer. F3-annoyance 💩 The client behaves within expectations, however this “expected behaviour” itself is at issue. and removed Z1-question 🙋‍♀️ Issue is a question. Closer should answer. labels Nov 7, 2018
@JakeOShannessy
Copy link
Author

I tested a patch of my own almost identical #9881 and it had the behaviour I expected.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
F3-annoyance 💩 The client behaves within expectations, however this “expected behaviour” itself is at issue.
Projects
None yet
Development

No branches or pull requests

2 participants