Direct-to-node (getblocktemplate) mining source: a TabConf vibe #60
Replies: 3 comments 1 reply
-
|
For home miners, I think the ability to build work locally directly from a node can be very useful. In the early days this is how all mining was done. Only after ASIC farms started scaling up into massive industrial warehouses did the Stratum layer become necessary, mostly as a way to avoid slamming a single node with millions of getblocktemplate requests. In early 2012 Luke Dash submitted BIP 22 for getblocktemplate as an initial scaling step, and used this in his Elegius pool. Later in September 2012 Stratum V1 was created to scale this up even further to very large pools. For solo miners with a few machines, the Stratum server is just an extra layer that adds complexity and vulnerabilities. In testing the same concept on an ESP32 to build work on a Bitaxe, I measured a 7.4 second delay each time it needed to download a whole new template, which is a noticable hit, and is one major disadvantage of this method. Streaming several megabytes of transactions is what took the longest, much longer than just sending the header via Stratum. There are probably ways to improve this, such as by caching transactions locally. |
Beta Was this translation helpful? Give feedback.
-
|
@pool2win, would love your thoughts on this one. |
Beta Was this translation helpful? Give feedback.
-
|
On the 2026-06-01 dev call, @johnny9 suggested looking at Bitcoin Core's new Unix-socket IPC, which may be an easier integration than the JSON-RPC this prototype currently uses. Noting it here for whoever takes it further. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
At a TabConf hackathon held just before Bitcoin Las Vegas, I spent an afternoon vibe coding a new job source for Mujina. The whole hackathon was about demonstrating using AI to quickly hack something into your own project, so that's what I did. Instead of pointing at a Stratum pool, this source mines directly against your own Bitcoin Core node: it pulls block templates over JSON-RPC (
getblocktemplate), builds the coinbase locally, and submits any network-target shares it finds withsubmitblock. It also exposes block-in-progress stats through the API.It is very much a vibe, not a polished contribution. It lives on my fork at https://github.com/rkuester/mujina/tree/feat-gbt, and you can see the whole thing as a series of commits and a single diff here: main...rkuester:feat-gbt. I'm sharing it here so anyone curious can look it over, play with it against their own node, and, if the vibe is right, massage it into an actual PR someday.
Beta Was this translation helpful? Give feedback.
All reactions