Skip counting delegatecalls in expectCall tracker#491
Skip counting delegatecalls in expectCall tracker#491filip-parity wants to merge 2 commits intomasterfrom
Conversation
| input: &[u8], | ||
| _gas: Weight, | ||
| ) { | ||
| if is_delegate_call { |
There was a problem hiding this comment.
Checking now with the updated polkadot-sdk
can you provide a repro for this? |
|
The root issue (pallet-revive tracing providing insufficient context) has been fixed in #467 by making is_delegate_call carry the actual target address. The current implementation correctly uses this address for call matching. |
The pallet-revive tracing API only provides target addresses, not execution context, so delegatecalls appear as separate calls to different addresses. This caused
expectCall(addr, data, 1)to fail when called through proxies because it saw 2 calls instead of 1:- Call to proxy address
- Delegatecall to implementation address
Skip counting delegatecalls entirely in the call tracer, treating them as internal proxy implementation details.