What is a preloaded blockchain?

While LiteBringer does not need any server at all, we have services to make gaming more pleasant. Here is the reason why you really want to use it.

If you have played LiteBringer you have most certainly noticed that the client is downloading a data package from time to time. We call it preloaded blockchain. That may look time-consuming but in reality, it saves you a lot of time. Here is the reason why.

Developing a game completely on a blockchain has one major problem: Every client has to know everything that is written in the blockchain up to now. But it takes very long to download the whole blockchain with all transactions and to compute the current game state. For instance, the Litecoin blockchain — on which LiteBringer is operating on — is about 34 GB. (2/25/20)

To shorten the waiting time before starting the game, we are offering two different services. We call them balance tracker and preloaded blockchain. The preloaded blockchain is a bundle that contains all relevant data to download. It includes the headers, relevant game transactions, and the precomputed game state.

Every client must have all relevant information about the game. If it wouldn’t be always up to date, it would not be possible to verify a trade offer for instance and therefore, it could happen that an offers sold twice.

Why can’t I start playing right after the download?

While the client is up to date after the download, it does not know your balance yet. So it has to search for every transaction related to your wallet.

Why does the client starts computing on the first block?

A block of the blockchain is connected to the previous block through its header. Theoretically, it is not mandatory to start from the beginning and we could start at a later state to reduce the waiting time even more.

It is only needed to compute the mined blocks since the creation of the used wallet, but we don’t know when that moment was. Theoretically, Charlie Lee, the creator of Litecoin, can join our game with his wallet that exists from the beginning.

In that case, the first few blocks would be relevant, too. Therefore, we decided to use a technically clean solution and are starting on the first block, the genesis block.

Why is the preloaded blockchain not downloaded at every login?

To save bandwidth and time of our users! We decided that we publish a package every 24-hours for now.

It depends on many factors if it is more time-efficient to compute the blocks on your own or to download the preloaded game state. If you use a slow connection to download the data package, it could be less time-consuming for a user to compute the game process on his own.

For now, we guessed that a daily download is the easiest and fastest way, but we will evaluate it later and are able to adjust it anytime.