By now, you have probably heard the word “Teranode” many times; especially if you have attended or watched the last few CoinGeek conferences where Steve Shadders, the Technical Director of the Bitcoin SV Infrastructure team, gave frequent updates on Teranode infrastructure and how it will improve Bitcoin.
Until recently, many people only had a high-level understanding of Teranode, but thanks to the new “whiteboard sessions” created by Murray Distributed Technologies, we are slowly learning more about Teranode and how it works under the hood.
“This is the very time we’ve really talked seriously outside of nChain about how [Teranode] is structured and architectured internally,” said Shadders before telling Connor and Dylan Murray that he would like to break his explanation of Teranode down into a series with several parts rather than telling the audience everything about Teranode in one go.
First in a series of deep dives into how Teranode works under the hood. I'll be doing more of these, if you have questions you'd like answered on a future podcast send them to @Bitcoin_Beyond https://t.co/QONBQPOnul
— Shadders (@shadders333) December 2, 2021
Transaction validation in Teranode
Episode one in the “White Board Sessions with Steve Shadders” was primarily about how transactions are validated in Teranode as well as its architecture philosophy. To best explain how it works, Shadders breaks out his whiteboard and shows the audience diagrams and schematics to complement his explanation of the systems architecture.
“One of the key concepts in Teranode is sharding; and when I say sharding, I am not talking about the same thing Vitalik talks about when he talks about sharding and splitting the work among many untrustable parties. [Instead,] we are talking about inside the boundaries of Teranode, where everything is trusted,” said Shadders as he began to write on his whiteboard.
“A really simple sharding scheme would be to say, I’ve got two possible boxes [cluster nodes] that could handle this transaction, and we take a look at its transaction ID, and if its very first four bits are 0-7 then it gets sent to box one, if it’s first four bits are 8-15 then it gets sent to box two.
“Because we do all of this work-splitting based on a shard key, which in this example is the transaction ID, we can predict exactly which cluster node the transaction will be in. That’s an incredibly useful property because it means if I am going to search for something I always know which one of the shards it’s going to be on which maps to a particular cluster node.”
The future Teranode creates
“What new business opportunities do you see emerging from the way that the node is going to evolve into the Teranode structure?” Connor Murray asked.
To which Shadders answered: “Because it’s extensible like [I’ve explained in this episode] you could have all sorts of services on top of it. You may not even need to be the person that operates the core Teranode to add extra bits on top of it. You can have one person who’s a miner running a Teranode and they might offer you a feed of data or something or other because they have a Teranode and they’ve got it anyway, and then you can co-locate something next to them and use that to build token indexes or whatever else, serving Merkle proofs—something that is not strictly speaking a function of the core node, it probably makes economic sense for it to be that. But there might be a specialist that runs one of these block validation only nodes and uses it to build Merkle trees, Merkle paths and service those as a business model. I think there’s a whole world of possibilities there.
“Fundamentally, the framework itself is a way to plug into what happens in bitcoin, but it’s also a way to be able to do any kind of work that can be distributed and sharded like that. I’d be really happy one day to find people using the open framework for stuff that’s got nothing to do with bitcoin. That would be a win, that would mean that we’ve actually done something that’s useful in a broader context.”
Subscribe to Murray Distributed Technologies’ YouTube channel to get the latest episodes of the Whiteboard Sessions with Steve Shadders.
New to Bitcoin? Check out CoinGeek’s Bitcoin for Beginners section, the ultimate resource guide to learn more about Bitcoin—as originally envisioned by Satoshi Nakamoto—and blockchain.