Can a new offline subtangle be created without referencing any existing transactions? Or does the offline node which is running this offline tangle need to start out with some global history and pick something to start building off of?
2 Answers
If you want to start a subtangle, you always have to reference existing transactions that don't conflict with the "main" tangle. Otherwise your transactions will never get confirmed. More on that here: What happens to Sub Tangle if it attaches to an invalid transaction?
This is our main tangle:
When you start a subtangle you are going offline. You no longer know which new transactions other people/devices make and other people/devices no longer know which new transactions you make. But the tangle you stored when you still were online will remain in your memory.
You should start your subtangle at a transaction that has already been validated by a lot of transactions or today, with the COO, at a milestone or transaction validated by a milestone.
Then you just stay offline and make some transactions. (You don't need to be the only node. It also works if e.g. 3 nodes are connected to each other but disconnected from the rest of the network)
The proof of work is done when you attach the transaction to your subtangle.
When you want to reconnect, you broadcast all transactions in the subtangle to the network.
If you have been offline for a long time, it is very unlikely that your transaction will be confirmed because the tip selection algorithm favours new transactions. Your transactions, regardless of when you made them, "look" very old to the algorithm because the connection to the main tangle is very old.
So if you want your subtangle to be confirmed, you have to promote it, just like unconfirmed transactions with the wallet.
Eventually one of the transactions referencing your subtangle will be confirmed by the majority of new transactions or a milestone.
I created the tangles with the yEd Graph Editor. Source files can be found here.
-
1These pictures were great, is there any way to embed them differently? They aren't showing up due to "Over Quota: This application is temporarily over its serving quota. Please try again later."– MattCommented Feb 16, 2018 at 4:33
When your intention is to later merge the subtangle with the main tangle without doing the POW for all transactions again, your subtangle will already have to start at an existing transaction (preferrably a confirmed one since you do not know whether an unconfirmed transaction might become inconsistent before you are getting online again), or more precisely two of them.
-
Does this imply that I can start an offline subtangle which has it's own "genesis" transaction that everything builds off of; and it wouldn't require PoW to build that?– MattCommented Feb 14, 2018 at 21:04
-
1Basically a testnet? yes. But you can't merge it with the existing.– Tobi MZCommented Feb 15, 2018 at 18:34