Module zebrad::components::miner

source ·
Expand description

Internal mining in Zebra.

§TODO

Constants§

Functions§

  • Generates block templates using rpc, and sends them to mining threads using template_sender.
  • Initialize the miner based on its config.
  • Mines one or more blocks based on template. Calculates equihash solutions, checks difficulty, and returns as soon as it has at least one block. Uses a different nonce range for each solver_id.
  • Runs a single mining thread that gets blocks from the template_receiver, calculates equihash solutions with nonces based on solver_id, and submits valid blocks to Zebra’s block validator.
  • Initialize the miner based on its config, and spawn a task for it.