Key a Monero RandomX worker cache by the supplied seed hash

A pool creates new candidate jobs more often than it changes the RandomX seed. Distinguishing those identities lets workers reuse expensive seed-specific state without working on an obsolete parent.

Read the seed and parent together

Capture seed_hash, prev_id, height, major_version and difficulty from the same daemon response. The seed identifies the RandomX initialization context. The parent identifies the chain tip the candidate is intended to extend. POST this example to /json_rpc on monerod.

{
  "jsonrpc": "2.0",
  "id": "guide",
  "method": "get_miner_data",
  "params": {}
}

Handle the two invalidation events

If the parent changes with the same seed, issue fresh job data while retaining compatible seed-dependent state. If the seed changes, rebuild or switch the matching RandomX context before hashing the job. This RPC supplies inputs for template builders such as P2Pool. A matching seed never establishes that a particular share is valid.

docs.getmonero.org get_miner_data