Work Generation¶
Every Kakitu block requires a valid Proof-of-Work (PoW) value before it can be broadcast. Work is a spam-prevention mechanism — it doesn't affect consensus or add fees, but it requires computational effort to produce.
Overview¶
Work generation uses the Blake2b hash function. A valid work value satisfies:
For the first block in an account (open block):
Difficulty Thresholds (Epoch v2)¶
| Block Type | Threshold |
|---|---|
| Send / Change | fffffff800000000 |
| Receive / Open / Epoch | fffffe0000000000 |
Send/change blocks require higher difficulty because they can be used for spam; receive blocks are less costly to generate work for.
Hardware Recommendations¶
| Hardware | Work/second (approx.) |
|---|---|
| Nvidia RTX 3080 | ~60 work/s |
| Nvidia RTX 2080 Ti | ~47 work/s |
| AMD RX 6700 XT | ~40 work/s |
| AMD Ryzen 5 3600 (CPU) | ~0.6 work/s |
GPUs are strongly preferred. CPU work generation is acceptable for low-volume operations but will cause RPC delays under load.
Recommended Configurations¶
High-Volume Node (Exchange / Service)¶
- Dedicated machine with GPU running the Kakitu Work Server
- Configure as a
work_peerin the node's config - Disable local CPU work:
node.work_threads = 0
Low-Volume Node (Personal / Small Integration)¶
- Run the Kakitu Work Server on the same machine as the node
- Use GPU acceleration (
--gpu 0:0) - Set
node.work_threads = 0
Kakitu Work Server¶
The Kakitu Work Server is the preferred work generation tool. It runs independently of the node and can service multiple nodes simultaneously.
Install¶
# Download from releases
wget https://github.com/kakitucurrency/kakitu-work-server/releases/latest/download/kakitu_work_server_linux_x86_64
chmod +x kakitu_work_server_linux_x86_64
sudo mv kakitu_work_server_linux_x86_64 /usr/local/bin/kakitu_work_server
Run with GPU¶
Run with CPU only¶
Configure as a work peer¶
In config-node.toml:
Enabling OpenCL (GPU) in the Node Directly¶
If you prefer to use OpenCL directly in the node rather than the work server:
List available OpenCL devices:
Work Generation via RPC¶
Generate work manually:
curl -s -d '{
"action": "work_generate",
"hash": "PREVIOUS_BLOCK_HASH_OR_PUBLIC_KEY",
"difficulty": "fffffff800000000"
}' http://localhost:7076
{
"work": "2bf29ef00786a6bc",
"difficulty": "ffffffff8ba4a60c",
"multiplier": "8.00",
"hash": "PREVIOUS_BLOCK_HASH_OR_PUBLIC_KEY"
}
Note
work_generate requires enable_control = true in config-rpc.toml.
Work Validation via RPC¶
curl -s -d '{
"action": "work_validate",
"work": "2bf29ef00786a6bc",
"hash": "PREVIOUS_BLOCK_HASH_OR_PUBLIC_KEY",
"difficulty": "fffffff800000000"
}' http://localhost:7076
Pre-caching Work¶
For optimal latency, generate work for the next block immediately after each confirmed transaction — before the next send is needed.
After a block is confirmed:
- Store the block hash
- Immediately submit a
work_generaterequest using that hash - Cache the result
- When the next block is needed, use the cached work
For wallets where the next block type is unknown, generate at the higher send/change difficulty threshold to ensure the work is valid for any block type.
Work Cancellation¶
Cancel an in-progress work generation: