Forks in Nano's protocol can only be caused by malicious actors on their own account. Currently, however, the network overhead caused by fork resolution can affect normal users, as representatives may change their vote many times during an election. As such, SonderDev suggested an alternative method of resolving forks on Discord: Representatives observing a fork should drop their votes, stopping either block from being confirmed. After some discussion, my "Proof of Fork" fork resolution implementation is as follows:
Alice attempts a double spend:
- Alice publishes blocks A and B to the network.
- A and B propagate throughout different nodes in the network until nodes observe the fork.
- Nodes who observe the fork propagate the Proof of Fork (i.e. proof of two conflicting blocks) throughout the network.
- Representatives who receive a Proof of Fork always vote for "Fork Observed" over any blocks.
- The network reaches a consensus that Alice's account has a fork.
- All nodes will discard all normally valid blocks that Alice attempts to publish, effectively halting her account.
Alice wants her account unhalted:
- Alice publishes a "unhalt block", which would normally be discarded, but is valid while her account is in a halted state. I propose that this be a transaction with the account owner as the recepient, and with an amount of 0 raw. The work difficulty threshold can be set significantly higher for this block.
- Nodes propagate the "unhalt block".
- The "unhalt block" gains consensus, is cemented onto her chain, and her account exits the halted state.
- Alice resumes normal activity.
The "unhalt block" changes the hash of Alice's latest block, invalidating the previously valid blocks that caused the fork, preventing malicious nodes from using those blocks as a Proof of Fork to permanently halt Alice's account.