On the scalability of the public Tx Mining Service
Some insights on the issues observed during the launch of Anubis and Horus NFT projects.
On September 17th, 2021, Anubis launched 10,000 NFTs; a few weeks later, Horus NFT issued another 10,000 NFTs. On both occasions, some community members had difficulty sending transactions.
There were false rumors stating that Hathor’s mainnet could not handle the number of transactions. We want to clarify that Hathor’s mainnet was working great and was far from saturating.
The difficulty presented was related to solving the Proof-of-Work (PoW) of the transactions. In both cases, the public tx mining service received many transactions at once, its queue increased, and some users faced a timeout.
Note that the issue was caused by a limitation on the public Tx Mining Service maintained by Hathor Labs. It has no relation to Hathor’s mainnet.
But why did it happen?
The explanation starts with the flow inside the wallet to send a transaction. Here it is:
- First, the wallet creates and signs a transaction. This transaction is invalid because its PoW is not solved.
- Second, the wallet sends the transaction to a tx mining service to solve its PoW.
- Then, the tx mining service finishes solving the PoW and gives the answer to the wallet.
- Finally, the wallet pushes the transaction to Hathor’s mainnet.
The difficulty faced by some community members was in step 3 because the tx mining service had a long queue of transactions to solve, and many of them timed out.
But why do transactions have PoW?
The PoW of transactions has two purposes: (i) it’s an anti-spam mechanism, and (ii) it helps to confirm previous transactions.
It works as an anti-spam mechanism because work has to be done to solve the PoW, increasing the cost of generating many transactions (even though no fee is charged). In the case of the 2 NFT events, the PoW mechanism indeed prevented a large inflow of txs, although they were valid txs and not spam.
New transactions help to confirm previous transactions because they increase the accumulated weight of prior transactions, which is used to solve conflicts by the consensus protocol.
Ok! But how do we fix it so it will not happen again?
There is more than one solution to get it fixed. Here are three possible ways to go:
- Scale the public tx mining service.
- Add support for third-party tx mining services in Hathor Wallet.
- Implement a tx solver inside Hathor Wallet.
As each solution has its pros and cons, we are preparing a design to determine which one works best for us.
About Hathor Network
Hathor Network is a PoW-based novel distributed ledger architecture using both DAG and blockchain data structures intertwined. Our network’s unique design solves significant bottlenecks built with scalability, usability, and decentralization in mind, preventing the broad adoption of the technology.
Hathor Network has been on Mainnet since January 2020, experiencing exponential growth in the number of custom tokens, active wallets, and mining hash rate.