May 07, 2020

By Cayle Sharrock

Mempool bug fixes and dynamic DB sizing errors in Windows 10

Several changes and improvements have been implemented in the last few days, including two big mempool bugs and dynamic DB sizing in Windows 10 (no more “insufficient disk space” errors).

These fixes will roll out in the next binary release on Monday 11 May, but if you want to run the bleeding edge, they are already merged into the development branch of the tari repository (https://github.com/tari-project/tari).

Here’s what new since v0.2.1-23677a7:

  • The get-mining-state command has been added to the CLI. You can now see what your miner is doing with:
    >> get-mining-state
    Mining is ON
    Mining hash rate is: 0.712515 MH/s
  • Lots of improvements to the OSX and Windows installers.
  • The LMDB database size is now dynamically managed. This fixes all the “Insufficient disk space” errors Windows 10 users were experiencing.
  • Rudimentary gRPC support for the base node has been implemented. This will be super handy for things like block explorers and future versions of the wallet to extract information about the blockchain with a simple API.
  • Both participants of a ping-pong request share chain metadata (chain height, difficulty etc) now. Previously, only the pong message contained metadata. This makes a BIG difference in letting nodes know if they’ve fallen behind the main chain.
  • Explicitly configure base nodes as Archival nodes. Pruning mode is in development (so all nodes are currently archival nodes) and the pruning horizon parameter was causing some confusion. If this means nothing to you then don’t worry about it 🙂
  • Better logging around why blocks and transactions are rejected.
  • Fixed a bug causing error: failed to run custom build command for ‘prost-build v0.6.1’ errors for some people.
  • Reset failed connection attempts after joining then network. A peer’s offline state would be removed when receiving a discovery/join. However, it’s failed connection attempt count was not making it possible for a single failed connection attempt to mark the peer as offline.
  • A change to how neighbours are determined in the DHT was implemented to try and reduce clustering and spontaneous partitions in the network. Also see below.
  • Fix a bug where the mempool was permitting double-spend transactions to be submitted in candidate blocks.
  • Added an event stream to the mempool that the miner can listen to. This allows better synchronisation between the mempool and miner. There was an issue where the miner was requesting new blocks before the mempool had processed all state changes resulting from a new block; meaning the miner was receiving stale data leading to the mining of invalid blocks.

Despite these fixes, the network is still experiencing spontaneous partitions. The neighbour calculation change implemented recently will help, but there are two proposals that will likely fix this problem once and for all. Several contributors are looking in to this at the moment and will hopefully land in the May 18 release. For those interested in what’s happening, I refer you to #tari-dev on Freenode IRC.