Neo SPCC has published v0.98.0 of NeoGo, its Go node and SDK. The release features full compatibility with the recent Neo 3.1.0 update, adding new features such as WitnessScope rules, NEP-11 transfer tracking, and a range of other improvements. The team also released an article showcasing the latest benchmark milestones.

v0.98.0 is the first NeoGo version to support Windows, though the support is considered experimental and lacks some functionality compared to the Linux build. Node runners on Linux that are upgrading from previous versions will be required to resynchronize the chain. 

For those looking to build dApps, the most notable improvement is the new automated testing framework, which makes it possible to write and run tests for smart contracts in Go. The test package presents yet another option in a growing number of testing tools coming online for Neo N3 contract developers.

Other improvements targeting the contract development experience include new constants and an Abort method in the interops package and a range of compiler upgrades: method overloading in the manifest, struct field slices, and GAS cost optimization for type conversions to name a few.

NeoGo v0.98.0 also brings several bug fixes to the table. Errors were found and resolved across the RPC, network, core, and CLI. A full list of bug fixes can be found in the changelog.

Performance upgrades

As the team had communicated alongside previous releases, support for BadgerDB and RedisDB has been dropped. This is intended to afford the team more opportunity to optimize for LevelDB and BoltDB moving forward. 

Some changes of this nature have already made it into v0.98.0, and the benefits can be measured. A recent article covering the latest round of tests revealed the performance gains.

For its initial test to compare the baseline performance gains from v0.97.2 to v0.98.0, the team used the same hardware and test environment as the previous iteration. The single node benchmark sees it processing 1M transactions pushed by 10 worker threads, with the node set to a block time of 1 second and with a maximum mempool size of 50K. As before, the hardware is a Ryzen 9 5950X, equipped with 64GB RAM and an SSD for storage.

This single node test, using LevelDB, produced the 30,300 TPS result in the last round of benchmarking. With v0.98.0, the performance increased to 34,800 TPS:

Single-node test results for v0.97.2 (Source: Neo SPCC)

Single-node test results for v0.98.0 (Source: Neo SPCC)

However, the story doesn’t end here. The sawtooth pattern found in both graphs is a sign of hitting a known limit, the mempool size. A node can’t put more transactions in a block than it has in its mempool, and it can’t fill up its mempool until the current transactions are persisted. That means there will be a period of time where it has to wait and refill its mempool with new transactions, time that could be spent pushing more full blocks.

Neo SPCC designed a new test to get a better idea of the node’s maximum performance. First the mempool size was doubled, giving the node the ability to hold two full blocks worth of transactions. The number of workers pushing transactions over RPC was tripled to 30, ensuring minimal downtime with a depleted mempool. Finally, the number of transactions pushed to the node was increased from 1M to 3M.

NeoGo node exceeds 50K TPS average with BoltDB in single-node testing (Source: Neo SPCC)

The results from this test revealed the expected improvements. The sawtooth pattern is minimized, with the LevelDB node achieving a new height of 42,400 TPS. However, the new record was set using BoltDB. Though omitted from the last round of testing due to negligible differences in performance, the BoltDB backend benefited especially from changes in v0.98.0, and set a new record high of 52,100 TPS in the single node test.

The four-node tests did not receive an apples-to-apples comparison due to the previous round of testing reaching close to its theoretical limits. 5 second blocks, 50K mempool, 10 workers and 1M transactions were replaced with 2 second blocks, 128K mempool, 30 workers and 3M transactions. 

The results showed how the recent changes also benefited networked setups: increasing from an average of 8,800 to 12,500 TPS with LevelDB, and 15,400 TPS with BoltDB.

More information on the latest NeoGo performance tests can be found at the link below: