What the balance tracker is and how it works
With the help of our service tool the “preloaded blockchain” we have now been able to accelerate the syncing with the game database and the download speed of the blockchain itself. Nevertheless, the calculation of a player’s balance is still very time consuming. Unfortunately, there is no way to use the existing service to speed up this process.
Our vision was to speed up the syncing of wallets as much as possible. Until recently it had always been necessary to parse the whole blockchain starting with the genesis block, to find out if there were unspent outputs for transactions. This used to be done by each client for the specific address in use.
In our update 5.0 we introduced our service called “balance tracker”. It utilizes a block explorer to reduce the waiting time as the client does not have to compute the balance on its own.
A block explorer creates a separate database, is able to extend it with data from the full node if requested and keeps itself updated constantly. To do so it is connected with a full node in which all transactions are included.
Please note that we did not just add a block explorer to our game. Firstly, it would not deliver the exact data which would be needed to initialize the tracker in our client. Receiving the balance of an address is not a problem. However, it does not receive the corresponding UTXOs which are needed, so we have to get those separately for every single transaction.
Secondly, the service eliminates potential errors if the explorer changes its output or if we decide that another block explorer suits our needs better. For instance, we can update it anytime without releasing a new game version.
So we have decided to enable our client to communicate with our service. The service is in contact with the block explorer which gets its data from a full node.
It was quite hard to find a suitable explorer. The widely used NBXplorer, for instance, is just a minimalistic UTXO tracker whose main use is to track addresses — and only those addresses which were actively registered. We tried to expand the explorer but it turned out that tracking a huge amount of addresses is simply not possible within a reasonable implementation time.
Other explorers were unusable because their technology did not match our needs. After all, we operate on CentOS 7 which only uses stable components. Most modern explorers were not an option because CentOS 7 does not use Python 3.7 and they require a later version. Therefore, we decided to use the ElectrumX server.
To communicate with the explorer the client sends a script hash. With the UTXO the block explorer searches for all corresponding transactions. When the data is collected, it is sent to our game client which computes the available funds.
This information is transferred to the client in a small data package which can be downloaded in a very short time. So your waiting time to parse the blockchain was reduced from several hours, when doing it by yourself, to just a few seconds!
Nevertheless, this will not replace our preloaded blockchain service because the two services take care of different things: While the preloaded blockchain service accelerates collecting game data the balance tracker is responsible for a speedy calculation of your funds.
Of course, you do not have to use any of our services! As a true blockchain game, we want to give our players maximum freedom. You can turn them off at anytime in the settings. Please note, the waiting time for starting up will be considerably longer if you do not use our services.
Who we are
LiteBringer is the first true blockchain game, giving you full control over your assets and enables you to earn real money through trading. It is developed by CipSoft an independent developer and operator of online games for various platforms. We are the maker of the MMORPG Tibia which ranks among Europe’s most successful online games since 1997.
Chat with us at Discord
Get the latest news on Twitter
Get the most valuable content with our Newsletter