Confederacy offers a decentralised framework for managing overlay networks on the Bitcoin network. This guide will demonstrate how to create and host your own overlay network within the Confederacy system.
What is a Bitcoin overlay network?
Prerequisites for an overlay network
Before you start, make sure you have the following:
- A web server to run your overlay network.
- A copy of the Confederacy overlay software.
- Familiarity with UTXOs (Unspent Transaction Outputs).
Ready? Let’s dive in.
Step 1: Define Your Overlay Network
The first step is to define your overlay network. In Confederacy terms, this equates to defining a topic. A topic outlines the specific type of data or transaction that your overlay network will govern. The rules for data admittance into the topic should be clearly specified.
Step 2: Setup Topic Manager
A Topic Manager allows your overlay network to facilitate the acceptance of transactions that alter your network’s state. You will need to implement custom logic that applies to incoming transactions while taking into account any spent transactions.
Step 3: Install a Confederacy Node
With the Topic Manager set in place, it’s time to implement your own Confederacy Node. This node will be responsible for tracking and enforcing the rules of the specific topic you outlined in Step 1.
Step 4: Implement Lookup Service
Confederacy Lookup Services play a crucial role in overlay networks. They make it possible for network users to locate specific UTXOs within your topic. By implementing a Lookup Service in step 4, you allow the users of your Confederacy node to make targeted search queries to find specific UTXOs within your topic.
Step 5: Establish Confederacy Host Interconnect Protocol
By step 5, your overlay network should be fully functional. The next step is to establish the Confederacy Host Interconnect Protocol to aid in finding and advertising your overlay network to other network participants. This protocol also facilitates data synchronisation with other nodes.
Step 6: Monetise Your Services
With the functionalities of your overlay network established, you can now use PacketPay, a base-layer monetisation system provided by Confederacy, to begin charging for the use of your node’s overlay lookup services.
Step 7: Test and Debug
After setting everything up, test every functionality of the overlay network you just created. Debug any issues you may encounter and verify the synchronisation across the network.
Over to maintenance mode
That’s it! You’ve successfully created and hosted an overlay network within the Confederacy system. Remember to keep reviewing your component’s logic and maintain your Confederacy node efficiently. Happy coding!