What’s Cooking With Tari 🍳🥓💻
The Latest and Greatest Updates With Tari
Tari contributors have been keeping busy pushing meaningful updates to the new Tari Stibbons Testnet. The effort to improve the testnet with a focus on reliability, stability, and usability continues. Some of the major updates include using Cucumber.js for Behavior Driven Development (BDD), the long-anticipated standalone console wallet, most recent base node releases featuring the stand alone SHA3 miner among other things. Let’s go over some of the these recent updates with Tari, get comfy - there’s quite a lot.
Can’t wait to have these updates delivered to your inbox? Keep up to date with the latest updates on the Tari telegram and the updates page.
Tari Is Going Green
No, Tari is not switching to Proof of Stake. (not like that would make a difference)
But Tari is now using Cucumber for Behavior Driven Development (BDD). You may have noticed a lot of PR’s and commits with the word “cucumber” in them. Tari uses Cucumber, and specifically Cucumber.js to easily specify test scenarios in plain text. The tests can be found under the integration_tests/features folder. The tests spin up base nodes, merge mining proxies and miners in a local, low difficulty network and interact with them via GRPC, simulating various scenarios that might happen on testnet.
The plain text method of specifying tests makes it easy to read, write, and verify correctness of the tests.
Here’s a simple example that tests submitting blocks:
Scenario: Mining example
Given I have 3 seed nodes
And I have a base node NODE_A connected to all seed nodes
When I mine 20 blocks on NODE_A
Then all nodes are at height 20In Cucumber tests, each line is a step, and will start with one of Given, When, or Then. And can also be used to make the test easier to read, in which case it uses the keyword from the previous step. The Given keyword is used to set up the scenario, When is used to describe an action being performed, and Then is used to test whether what we expected to happen, happened. (Learn more about Gherkin syntax)
Instructions on running the tests are available in the README in the integration_tests folder.
The tests verify many scenarios, including transaction propagation, re-orgs, block propagation and syncing, and even sending thousands of transactions.
To read full details on Cucumber tests, check out the update here. Cucumber is a really simple entry point to contribute to Tari. If you get stuck, pop into the #tari-dev IRC on freenode and ask a question.
Tari Console Wallet
Until very recently, there was a wallet to hold your testnet tXTR packaged into the Tari base node. This built-in wallet was useful for early testing, but interacting with it only through CLI was limited. There’s also the much prettier mobile app wallet, Aurora, where the design is aimed at simplifying the process of sending funds. The standalone console based tari_console_wallet allows users more insight and advanced features, it also allows Tari contributors to implement features quicker.
Apart from the standard wallet functions, here are some other features in the tari_console_wallet:
GRPC Interface
The tari_console_wallet exposes a gRPC interface for other applications, like mining pools, to interact. The two mining applications, tari_mining_node and tari_merge_mining_proxy call onto this interface to generate coinbase transactions when assembling blocks. You can also initiate transactions and query the balance or transactions via this interface.
The wallet can also be run in the background with no interface by starting it with --daemon-mode, or just -d.
Command Mode
The tari_console_wallet can be used to run scripted commands using the --command command line argument. This allows a user to get-balance or send-tari. The development community often pushes a lot of transactions onto the network for stress testing using the coin-split and make-it-rain commands.
WalletNotify
The console wallet has also implemented WalletNotify functionality. This enables you to specify a script or program to be called when specific transaction events occur. For example, you could send a slack notification when a new transaction is received, or send an API request when a transaction is confirmed.
This setting can be configured in the config.toml file with a notify key in the [wallet] section, which should be a string pointing to the script path. This script will be triggered with relevant arguments whenever these transaction events are detected:
a new transaction is received
a received transaction is mined, but still below the confirmation threshold
a received transaction has been mined and reached the configured number of confirmations
a transaction has been cancelled
a new transaction is sent
You can see an example notify script in the Tari github repository.
Base Node v0.8.8 Release
Tari contributors have released a new update in the latest version of the Tari base node (v0.8.8), and it’s available for download now. It’s recommended that all users running nodes upgrade to the latest version.
Check out the updates since version 0.8.7 from Tari contributors.
Base Node v0.8.8
This is a minor release, but includes a fix that should prevent network splits due to blocks being overwritten in the LMDB database by competing threads. The development community noticed that base nodes would calculate the target difficulty incorrectly when there was a large number of transactions in blocks. This increased the time taken to propagate blocks and resulted in a number of small one block reorgs. It was also possible to start mining on a base node while it was syncing, causing an unpredictable state in the database. These issues have been fixed in this release.
Base Node
Always output message when base node exits with an error PR
Add rpc sessions to base node status line PR
Wallet
Fix console wallet menu spacing PR
Improve wallet recovery resiliency PR
Add wallet recovery cucumber test, seed words to file PR
Other
Add database concurrency check PR
For a summary of other recent major base node updates, check out the updates for v0.8.4 and v0.8.6. And keep an eye on your inbox for next week’s Substack newsletter, there might be some new 🔥 TTL Store Items dropping.
Want to get more involved with Tari?
Join us! The community would love to hear from you. Get more involved through these platforms:
Join us on Telegram
IRC (#Tari-dev on Freenode)
Reddit at r/Tari
Follow us on Twitter
Download the Aurora wallet