BlockTemplate Manager Tracking issue #33758

issue ismaelsadeeq opened this issue on October 31, 2025
  1. ismaelsadeeq commented at 5:55 PM on October 31, 2025: member

    What to review

    Plan

    • Introduce the Block Template Cache (Manager) #33421 Implement a cache layer. All newly created block templates should be stored along with their respective configuration options. Client requests for block templates will specify the maximum age of the template; that is, how fresh they want the template to be:
      • If a template with matching options exists in the cache and the interval has not elapsed, a cached template is returned.
      • If no template exists or the interval has elapsed, a new template is generated, stored in the cache, and returned.
      • After insertion, the oldest template is evicted if the cache exceeds its maximum size.
      • There is also an option to bypass the cache.

    The cache has a configurable maximum size (default: 10). It also subscribes to the validation interface's BlockConnected notification. It clears the cache when a new block is connected or disconnected, preventing stale templates from being served. Cache lookup requires an exact match on all BlockCreateOptions fields. Each client (mining, fee estimation, P2P sharing) builds its template once and reuses it continuously unless network conditions change (time or fees). Cross-client sharing is deferred for now, we cache N templates per client; a single shared cache for all clients can be pursued later.

    • Block template requests from node components and other block template-related operations will be handled via this cache #33421.
  2. willcl-ark added the label Mining on Nov 18, 2025
  3. willcl-ark added the label Tracking Issue on Nov 18, 2025

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-06-07 18:52 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me