The DATUM Gateway is free and open source software released under the terms of the MIT license. The DATUM Gateway enables truly solo Bitcoin mining using decentralised block templates, and facilitates communication with a DATUM-supporting pool if miners wish to pool rewards.
About DATUM Gateway
DATUM stands for Decentralised Alternative Templates for Universal Mining. The DATUM Gateway works by obtaining block templates from a local Bitcoin node, then generating and distributing work for the mining hardware. Once the blocks are solved, they are directly submitted to the network. If a miner is working with a DATUM-supporting pool, the pool will coordinate the block reward split but will not be involved in creating the work for the miner.
It is highly recommended to use Bitcoin Knots as it offers fine-grained control over block template construction. The DATUM Gateway supports communication with mining hardware using Stratum V1, and communicates with the Bitcoin node via RPC, which must support GBT (“getblocktemplate"). Communication with the pool is via the DATUM protocol.
DATUM Protocol
The DATUM Protocol is a custom-designed protocol used for communication between the DATUM Gateway (client) and DATUM Prime (pool side). The protocol has the following core concepts:
- Encrypted communication between the Gateway and pool
- Obfuscated communication to hinder analysis by malicious third parties
- Retrieval of generation transaction payout splits from the pool
- Submission of work to the pool with enough data to validate the work and assign rewards
- Communication of minimum requirements for a valid template to earn pooled rewards
The current version of the protocol allows the pool to perform block validation after coordinating with the miner. This is to ensure that invalid blocks are not created during the testing phase of DATUM. A future version will not require the pool to perform this function.
Requirements
The requirements for using the DATUM Gateway are as follows:
- 64-bit AMD or Intel system
- Linux-based operating system
- Fully synced Bitcoin full node (Bitcoin Knots is recommended)
- Fast storage for Bitcoin node
- Stable internet connection
- CPU capable of running the Bitcoin node
- 1GB RAM plus 1GB RAM per 1000 Stratum clients plus RAM required for the Bitcoin node.
- Bitcoin mining hardware
Node Configuration
The Bitcoin node must be configured to construct blocks according to your preferences. Bitcoin Knots offers a wide range of configuration options and is the recommended choice.
Block Space Reservation: You will need to reserve some block space for the pool's generation transaction using these recommended settings:
blockmaxsize=3985000 blockmaxweight=3985000
Note: This will not be required in future versions of DATUM Gateway for Bitcoin Knots users (version 27.1 or later).
Blocknotify Setting: Configure a "blocknotify" setting to notify the gateway of new blocks.
RPC Access: The Gateway will need RPC access to your node via an RPC user configured for this purpose.
Additional Recommendations:
maxmempool=1000 blockreconstructionextratxn=1000000
These settings will ensure that your mempool has as many valid transactions as possible.
Installation
Steps:
- Install and fully sync a Bitcoin full node.
- Configure the node to create block templates, ensuring space is reserved for the generation transaction.
- Install the required libraries: cmake, jansson, libmicrohttpd, libsodium, and libcurl.
- Compile DATUM using the following command:
- Run the datum_gateway executable with the -? flag to view configuration details.
- Create a configuration file (defaults to "datum_gateway_config.json") and set your coinbase tags. In pooled mining, the primary tag is unused, but the secondary tag may be displayed on block explorers.
- To prevent mining stale work, ensure the DATUM Gateway is receiving new block notifications from your node. This can be done by running the DATUM Gateway as the same user as your full node and using the following configuration line in your bitcoin.conf:
- Note: Ensure "killall" ( psmisc package on Debian-like OSs) is installed. If the node and Gateway are on different systems, you may need to use the "NOTIFY" endpoint on the Gateway's dashboard/API.
Template/Share Requirements for Pooled Mining
- Must be a valid block adhering to current Bitcoin consensus rules.
- Submitted work must be for the current block height, valid time, etc..
- Must include generation transaction outputs in the order provided by the pool.
- Must include the primary coinbase tag provided by the pool.
- Must include the unique identifier provided by the pool.
- Work must include the work target and meet/exceed it.
- Any additional requirements specified in the pool documentation.
Notes/Known Issues/Limitations
- If the connection to the pool is lost and cannot be re-established, the Gateway will disconnect all stratum clients by default. This enables miners to switch to non-DATUM mining or an alternate Gateway via their built-in failover mechanism.
- The accepted/rejected share counts on mining hardware may not match the pool perfectly due to factors such as latency and the two-stage validation process (local node and then pool).
Important: DATUM Gateway is currently in public BETA. While efforts have been made to ensure stability, issues may still arise. Rapid development and revisions are expected until a stable v1.0 release. This may include changes that require upgrading to the latest version to continue using the software with a DATUM pool.
Best Practice: When mining on a DATUM pool, set your miner's failover to use the pool's Stratum endpoint