By Cayle Sharrock | June 26, 2020

Tari Base node v0.4.2 release notes

🎉🎉🎉 Tari Base Node v0.4.2 is available for download now 🍾🍾🍾

This release has some breaking peer-to-peer changes, so you are strongly encouraged to upgrade as soon as possible so that your node’s performance stays in tip-top shape.

Older nodes (from v0.2.4 and up) will still synchronise the block chain, but they won’t understand the new block propagation improvements and so will always be lagging behind their peers.

Now let’s lift the hood and peer at some of the highlights:

Block propagation improvements

As of v0.4.2 nodes propagate a block hash (33 bytes) instead of the full block. This will significantly reduce network bandwidth usage for block propagation (For math nerds, full block messages drop from 𝒪(n²) to 𝒪(n)). If every node is propagating to 10 peers on average, that’s roughly a 90% bandwidth reduction.

On receipt of a block hash a node checks if it has the block. If so, it simply ignores the message. Otherwise, it requests the full block from the peer that sent the hash.

Resolve peer DNS addresses with Tor if it is available

This is a privacy enhancing change that applies to nodes running in TCP mode with Tor support. Previously, connecting to a peer’s DNS address would use the system’s DNS resolution and that can be exploited to de-anonymise users.

New emoji set support 😀👍🏽🤣!

v0.4.2 brings the new emoji set into the base node CLI. This will resolve any issues you have copying and pasting emoji ids from Aurora v0.2.0 and up into the node CLI.

There’s more detail on the emoji set changes in a previous dev update.

gRPC support for base nodes

The base nodes now support gRPC. This will allow us to decouple the wallet and base node executables. To see the gRPC interface in action, you can peruse the Block Explorer Source Code, which makes heavy use of gRPC.

Initial Mempool sync

On startup, a node will now try and sync its mempool with a peer. Previously, mempools only filled up organically via transaction propagation. This is fine for most nodes, but if you’re a miner, you really want to know about existing transactions when you start up so that you can mine full blocks.

get-block now has a format specifier

get-block adds a format specifier which allows the user to print blocks in text or json format. The latter is useful in testing.

Example:

>> get-block 1 text // OR get-block 1

----------------- Block -----------------
--- Header ---
Version: 1
Block height: 1
Previous block hash:
4a5af9e5dd60c2ab012ef8d75a465c6864b0e59c258f3ea76ea45ae93a332fac
Timestamp: Sun, 26 Apr 2020 07:15:47 +0000
Merkle roots:
Outputs:
2d15a802253ee980a841130cae89dd4b1536a8ab4b9f218337bb097936df48c9
Range proofs:
d6122998802c2f47de31a21e5912656f4b9744d88584c680e2412f588e4fca18
Kernels:
a455d1c3574c7283eeef45905897b8013edd36121ab4a00c6589ed58218013f4
Total offset:
0000000000000000000000000000000000000000000000000000000000000000
Nonce: 11608557920783722845
Proof of work:
Mining algorithm: Blake, Target difficulty: 60000000
Total accumulated difficulty:
Monero=1, Blake=2
Pow data:

---  Body  ---
--- Transaction Kernels ---
Kernel 0:
Fee: 0 µT
Lock height: 0
Features: COINBASE_KERNEL
Excess: 9cef94920fefc544e181c296150acad6171f141ef2c68a1eb290a009d0e22909
Excess signature:
{"public_nonce":"0842cd1d3ed1171c880157f2316df8ca0ed84cd6628259b3548d368ca4f79313","signature":"fe4bd3b639a47dd24aa4408ee4fbfc02ec0a17558dde15b2d392a82a56697503"}
Meta_info: None
Linked_kernel: None

--- Inputs (0) ---
--- Outputs (1) ---
68367c184428a77feadfc2c64caab4ca3997ab18bdcea12250ac174fa8018329
[OutputFeatures { flags: COINBASE_OUTPUT, maturity: 61 }] Proof:
f0be62d27d39d09a..89a81a0901399805

>> get-block 1 JSON

{
  "header": {
    "version": 1,
    "height": 1,
    "prev_hash": "4a5af9e5dd60c2ab012ef8d75a465c6864b0e59c258f3ea76ea45ae93a332fac",
    "timestamp": 1587885347,
    "output_mr": "2d15a802253ee980a841130cae89dd4b1536a8ab4b9f218337bb097936df48c9",
    "range_proof_mr": "d6122998802c2f47de31a21e5912656f4b9744d88584c680e2412f588e4fca18",
    "kernel_mr": "a455d1c3574c7283eeef45905897b8013edd36121ab4a00c6589ed58218013f4",
    "total_kernel_offset": "0000000000000000000000000000000000000000000000000000000000000000",
    "nonce": 11608557920783722845,
    "pow": {
      "accumulated_monero_difficulty": 1,
      "accumulated_blake_difficulty": 2,
      "target_difficulty": 60000000,
      "pow_algo": "Blake",
      "pow_data": []
    }
  },
  "body": {
    "sorted": true,
    "inputs": [],
    "outputs": [
      {
        "features": {
          "flags": {
            "bits": 1
          },
          "maturity": 61
        },
        "commitment": "68367c184428a77feadfc2c64caab4ca3997ab18bdcea12250ac174fa8018329",
        "proof": "f0be62d27d39d09a9f528..<SNIP>..a0901399805"
      }
    ],
    "kernels": [
      {
        "features": {
          "bits": 1
        },
        "fee": 0,
        "lock_height": 0,
        "meta_info": null,
        "linked_kernel": null,
        "excess": "9cef94920fefc544e181c296150acad6171f141ef2c68a1eb290a009d0e22909",
        "excess_sig": {
          "public_nonce": "0842cd1d3ed1171c880157f2316df8ca0ed84cd6628259b3548d368ca4f79313",
          "signature": "fe4bd3b639a47dd24aa4408ee4fbfc02ec0a17558dde15b2d392a82a56697503"
        }
      }
    ]
  }
}   

And lots more

The full release notes are on GitHub.