smartcontractkit / smartcontractkit/chainlink

keeper sync passes nil context to on-chain RPC calls

Open Beginner friendly
#21,489 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
8.2k
Forks
2k
Avg merge
1d 23h
Merged PRs (30d)
202

Description

Was investigating slow shutdown behavior on a keeper node and noticed the syncUpkeep and newRegistryFromChain paths pass nil CallOpts to GetUpkeep and GetConfig. Both functions receive a context from their caller but never thread it into the on-chain calls.

This means these RPCs ignore context cancellation entirely - on shutdown or job stop, they block until the RPC timeout (default 30s) instead of respecting the parent context. Under normal operation it's invisible, but during graceful shutdown with multiple registries syncing it adds up.

The ctx is right there in the function signature, just not wired through.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the syncUpkeep and newRegistryFromChain functions and trace their ctx parameters to the GetUpkeep and GetConfig calls. Verify that the on-chain calls use the caller's context and that cancellation during shutdown or job stop is respected instead of waiting for the RPC timeout.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
blockchain
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
74/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.