You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Chainlink Keeper未执行performUpkeep但checkUpkeep返回true问题求助

I get that it's frustrating when your Chainlink Keeper's performUpkeep function won't fire even though all the conditions from checkUpkeep are clearly met. You've already tried a few solid fixes, so let's walk through other potential causes and solutions to get this working:

Potential Issues & Troubleshooting Steps

1. Double-Check Gas Limit Configuration

Even though you spun up a new Upkeep with a higher gas limit, make sure the actual gas needed to run performUpkeep falls within that limit.

  • Simulate a performUpkeep call in Remix to get the exact gas consumption, then set your Upkeep's gas limit to a value higher than that (add a buffer—chain gas prices can fluctuate unexpectedly).

2. Validate Keeper Node & Upkeep Basics

Chainlink Keeper nodes have a few non-negotiable requirements to trigger upkeeps:

  • Check Upkeep LINK Balance: If your Upkeep doesn't have enough LINK to cover gas fees and node rewards, the node will stop triggering it. Head to your Upkeep dashboard to confirm the balance is sufficient.
  • Allow Time for Node Check Cycles: On Kovan testnet, Keeper nodes typically check upkeeps every few minutes to 10+ minutes. If your shouldHarvest condition just became true, give it some time before assuming it's broken.

3. Verify shouldHarvest Logic Against Real On-Chain State

While Remix says checkUpkeep returns true, make sure the live on-chain state matches your simulation:

  • Directly call the MasterChef contract's pendingBall method with your contract address and pool ID to confirm the pending amount is actually above harvestThreshold.
  • Double-check your contract's paused() status on-chain—sometimes admin functions might toggle this setting without you noticing.

4. Re-Register Upkeep with Clean Parameters

Even though your code doesn't use checkData, a malformed value during Upkeep registration could throw off the node's logic. Try re-registering the Upkeep with an empty checkData field to eliminate this possibility.

5. Add Event Logging to Debug Execution

Add an event to your performUpkeep function to confirm if it's being called (and potentially failing silently):

event HarvestInitiated();

function performUpkeep(bytes calldata performData) external override {
    emit HarvestInitiated();
    harvest();
    // Silence unused variable warning
    performData;
}

You can then monitor Etherscan for this event—if it shows up, the problem is likely inside your harvest() function (e.g., internal logic causing a revert), not the Keeper trigger itself.


内容的提问来源于stack exchange,提问作者Moonster

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.30 02:57:36