Motivation
Currently, the DATUM Gateway only works with a single active block template at a time.
For miners, especially on slower hardware or with higher latency, it would be useful to prebuild and cache multiple templates ahead of time.
This would reduce delays when:
- A new block is found
- Transactions are added to the mempool
- Work needs to be regenerated quickly
Proposed Feature
- Add a configuration option
prebuild_templates
- Allow specifying how many templates to keep in cache (e.g. 5–10)
- Support different strategies, such as:
empty (no txns, fastest propagation)
mempool (full/minimal txns, higher fees)
- When a new block arrives, rotate the templates, drop stale ones, and generate new ones in the background.
Benefits
- Miners can switch instantly to fresh work without waiting for GBT roundtrips
- Reduces the risk of idle ASICs between block updates
- Aligns with the decentralization goals of DATUM by giving miners more flexibility in block construction
References
- Similar caching ideas exist in mining software (e.g., Stratum job queues, extranonce handling)
- Bitcoin Knots already supports fine-grained block template policies, which could complement this feature
Motivation
Currently, the DATUM Gateway only works with a single active block template at a time.
For miners, especially on slower hardware or with higher latency, it would be useful to prebuild and cache multiple templates ahead of time.
This would reduce delays when:
Proposed Feature
prebuild_templatesempty(no txns, fastest propagation)mempool(full/minimal txns, higher fees)Benefits
References