From 7b70df72f561fe1e6ab0e8bc36e75bf9a03cfa7e Mon Sep 17 00:00:00 2001 From: pgherveou Date: Wed, 28 Jan 2026 07:46:52 +0100 Subject: [PATCH 1/3] fix delegatecall callTracer addresses --- substrate/frame/revive/src/exec.rs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/substrate/frame/revive/src/exec.rs b/substrate/frame/revive/src/exec.rs index f4ec66eb3bc17..5ea5b64d8fb01 100644 --- a/substrate/frame/revive/src/exec.rs +++ b/substrate/frame/revive/src/exec.rs @@ -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, From 0a4581b4d72f9bb871f5e4e314b4e20962d8c39d Mon Sep 17 00:00:00 2001 From: "cmd[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 28 Jan 2026 09:01:13 +0000 Subject: [PATCH 2/3] Update from github-actions[bot] running command 'prdoc --audience runtime_dev --bump patch' --- prdoc/pr_10918.prdoc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 prdoc/pr_10918.prdoc diff --git a/prdoc/pr_10918.prdoc b/prdoc/pr_10918.prdoc new file mode 100644 index 0000000000000..e7f5b60cce930 --- /dev/null +++ b/prdoc/pr_10918.prdoc @@ -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 From b5106778c0216902890c94280c7969ee90034e88 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Wed, 28 Jan 2026 10:02:22 +0100 Subject: [PATCH 3/3] Update evm-test-suite to latest version Updates the evm-test-suite SHA to 72598a9f47438dd1a515775265949d64a85e4e3f --- .github/workflows/tests-evm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests-evm.yml b/.github/workflows/tests-evm.yml index 754dddbbaf805..2168775482568 100644 --- a/.github/workflows/tests-evm.yml +++ b/.github/workflows/tests-evm.yml @@ -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