On the March 16 – 17, 2024, the sCrypt hackathon took place at the historic Fairmont, San Francisco. Organised by Xiaohui Liu, Founder and CEO of sCrypt, the sCrypt team, Ty Everett and Project Babbage, the event served as a platform for innovators and enthusiasts to delve into the intricacies of BSV blockchain development.
The event featured a much anticipated talk about Teranode by Jake Jones, Head of Infrastructure and Business Program Manager at BSV Blockchain, titled “Teranode, Overlays, and the Blockchain Mandala”.
Jones’ presentation introduced the concept of the “blockchain mandala”, which refers to the repeating pattern of P2P interaction at each level of the blockchain network.. This concept aligns with the blockchain thesis of decentralisation and peer-to-peer interactions as outlined in the Bitcoin white paper.
Micropayments – BSV’s competitive advantage
Jones opened his talk with the question of what the competitive advantage of BSV is. He focused on micropayments as the key feature of Blockchain and the feature that BSV uniquely offers. Jones pointed out that three ingredients are necessary to ensure micropayments on a global scale – unbounded scaling, specialisation and peer-to-peer communication.
He explained how these ingredients combine to precipitate a mandala pattern and enable the core thesis of Blockchain: empowering individuals to act autonomously in the way that best suits them as superior to central planning and control. The mandala takes shape as each interaction can be viewed through this lens.
Explaining the blockchain mandala
With the introduction of Teranode, the mandala has started to take shape and will fully form and grow as overlay services and SPV wallets are introduced and leveraged.
At the moment, the blockchain mandala is only in its proto form, as Jones explained. Only two layers of the blockchain mandala are enabled by the current SV Node: nodes (mining nodes) and wallets. As a result, nodes are being used as data stores and servers and companies are their own nodes with transaction processing features turned off in order to use them in this way which is both inefficient and expensive.
By pulling out everything except for transaction timestamping and blocks (what nodes are responsible for according to section 5 of the Bitcoin white paper) using overlay services, businesses and developers no longer need to run their own node, and more importantly, they no longer need to depend on the main chain to serve their application data. Overlay services (along with SPV wallets) allow for true peer-to-peer communication and specialisation.
Thus, Jones outlined the vision for the BSV mandala network with Teranode as the starting point: a truly scalable, peer-to-peer, distributed network:
‘This is what Teranode has started. Teranode is the nucleus. It’s modular and it’s the model for pushing out into overlays and SPV wallets and applications. So we’re trying to aim for a network that’s specialised and fully peer-to-peer. And it’s highly scalable, unbounded and performant.’
Overview of Teranode
As Jones explained, Teranode’s responsibility is maintaining the blockchain by ordering and timestamping transactions into blocks and competing to add blocks to the chain. Its specialisation lies in these functions, focusing solely on blockchain maintenance. Teranode interacts with other Teranode nodes and uses a specialised P2P node service to ensure compatibility with SV nodes.
Jones outlined the architecture, starting with transactions entering through the propagation service and then being processed by the parallelised transaction validator service. Validated transactions are blessed, and only their IDs are needed going forward. These IDs are then passed to the block assembly, where they are included in a subtree and communicated to all network nodes until a block is found.
Jones provided a detailed view of the system components, including the propagation service, transaction validator, block assembly, and transaction store. While currently storing transactions is a requirement in the testing phase, in operational mode, nodes are unlikely to store transactions. In the future, this responsibility will fall on overlays and wallets with a business opportunity for a specialised archival node to provide transactions and transaction data at a premium.
Merkle subtrees
A highlight of Jones’s presentation was the concept of Merkle subtrees, which facilitate parallel processing and contribute to Teranode’s scalability. These subtrees, derived from Merkle trees, are a key feature of Teranode’s architecture, enabling nodes to process tasks continuously and efficiently.
Subtrees consist of transaction IDs and their concatenated and hashed parents, ascending from the leaf nodes to the root hash. These subtrees are communicated regularly among nodes in the network. This proactive approach allows for continuous validation over the full roughly 10 minute block discovery period so that nodes have already performed almost all transaction validation before they receive a newly found block, enabling nodes to swiftly validate very large blocks.
ARC and overlays
Jones provided an overview of ARC, highlighting its use of extended format transactions and recommending its integration for future-proofing in anticipation of Teranode’s launch. He explained ARC’s architecture and its components, including the API for transaction submission, Metamorph for transaction management, and BlockTx for receiving data from the node.
Jones also discussed the block assembly service’s architecture, emphasising its integration with validators and the use of message buses for efficient communication, particularly in production settings.
Jones then discussed overlay services, which extend the capabilities of the node network by facilitating tasks such as transaction lookup and token management. He emphasised overlay services’ role in managing various transaction types and templates. Jones presented use cases for overlay services, including fungible and non-fungible tokens, open predicates, and data storage market predicates.
He outlined the current infrastructure for using overlays and proposed future integration with IPv6 multicast for efficient communication. Finally, Jones demonstrated how ARC’s architecture could be adapted for overlay structures, emphasising the transition from node-based to overlay-based information management.