Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests-evm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
repository: paritytech/evm-test-suite
ref: f3a2e98620adfc233166728230247d479a159e76
ref: 72598a9f47438dd1a515775265949d64a85e4e3f
path: evm-test-suite

- uses: denoland/setup-deno@v2
Expand Down
16 changes: 16 additions & 0 deletions prdoc/pr_10918.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
title: Fix delegatecall callTracer addresses
doc:
- audience: Runtime Dev
description: |-
## Summary
- Fix address tracking in delegatecall operations for callTracer

## Changes
- Update callTracer to correctly track addresses during delegatecall operations

## Test plan
- Existing tests should pass
- Verify callTracer correctly reports addresses for delegatecall operations
crates:
- name: pallet-revive
bump: patch
17 changes: 15 additions & 2 deletions substrate/frame/revive/src/exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1232,9 +1232,22 @@ where
let is_pvm = executable.is_pvm();

if_tracing(|tracer| {
// For DELEGATECALL, `from` is the contract making the delegatecall and
// `to` is the target contract whose code is being executed.
let (from, to) = match frame.delegate.as_ref() {
Some(delegate) =>
(T::AddressMapper::to_address(&frame.account_id), delegate.callee),
None => (
self.caller()
.account_id()
.map(T::AddressMapper::to_address)
.unwrap_or_default(),
T::AddressMapper::to_address(&frame.account_id),
),
};
tracer.enter_child_span(
self.caller().account_id().map(T::AddressMapper::to_address).unwrap_or_default(),
T::AddressMapper::to_address(&frame.account_id),
from,
to,
frame.delegate.as_ref().map(|delegate| delegate.callee),
frame.read_only,
frame.value_transferred,
Expand Down
Loading