From 5b071e535a83496e305edf919486b2aa714649b2 Mon Sep 17 00:00:00 2001 From: Peter Zhang Date: Thu, 2 Oct 2025 08:42:33 +0800 Subject: [PATCH] fix context error --- node/miner/src/watcher.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/node/miner/src/watcher.rs b/node/miner/src/watcher.rs index 8ba7bc7..09c41b8 100644 --- a/node/miner/src/watcher.rs +++ b/node/miner/src/watcher.rs @@ -139,6 +139,12 @@ impl MineContextWatcher { } let miner_id = self.miner_id.0; + + // Use eth_call with specific caller address for read-only access + let compute_caller: Address = "0x000000000000000000000000000000000000000A" + .parse() + .map_err(|e| format!("Invalid compute caller address: {:?}", e))?; + let WorkerContext { context, pora_target, @@ -147,6 +153,7 @@ impl MineContextWatcher { } = self .mine_contract .compute_worker_context(miner_id) + .from(compute_caller) .call() .await .map_err(|e| format!("Failed to query mining context: {:?}", e))?;