Share on Twitter
Share on Facebook
Share on Reddit
Share via Email
Share on LinkedIn
Share via RSS

Neo SPCC has released a new milestone update to the NeoGo project. It includes compatibility with the core Neo3 Preview4 implementation and brings a range of other improvements across the node, SDK, and compiler.

The team recently put the node to the test in performance benchmarks, publishing its findings in a detailed comparison between the C# and Go node implementations. The results showed substantial throughput improvements for both nodes since Preview3, both being capable of processing thousands of transactions per second with single block finality.

Preview4 compatibility

Released at the end of 2020, the new version provides a reliable environment for developers looking to get up to speed with the latest Neo3 protocol changes. Alongside the laundry list of fixes and general improvements since the last preview, v0.92.0 brings with it a number of new features that were released as part of Preview4.

A number of native contracts were introduced, including the oracle, designation, and management contracts from the core, alongside a proposed notary contract to assist multisig transaction collection.

Contract developers will quickly notice the updated opcode pricing model, which reduces GAS costs across the board while making prices adjustable through the governance mechanism. This new system was introduced to the core through the efforts of Roman Khimov, one of the NeoGo maintainers.

The update introduced support for the new NEP-17 standard and it’s onPayment functionality. The governance and GAS distribution models were also brought in line with the core.

Developers looking to start experimenting with the Neo3 network or app development with Go will find new functionality in NeoGo’s compiler and SDK. For example, defer and recover support will allow applications to take advantage of the improved exception handling capabilities, and Base58 encoding/decoding interops will help contracts to parse Neo3 addresses.

v0.92.0 is noted to be the most tested NeoGo release so far, reaching 83% coverage compared to the 66% found in the Neo2 implementation. Developers should be aware that although the release has been tested with the Preview4 TestNet, there are some known storage change mismatches caused by differences in JSON handling between the Go and C# nodes.

A comprehensive list of changes, fixes, and improvements can be found in the changelog at the link below:
https://github.com/nspcc-dev/neo-go/releases/tag/v0.92.0

Performance benchmarks

To assess the recent Preview4 improvements across the C# and Go implementations, Neo SPCC ran the new builds through its benchmark tool, neo-bench. The tool was recently updated, most notably changing the transaction-pushing code to better handle congested node mempools.

The test results showed significant improvements for both nodes since their Preview3 iterations. Initial benchmarks were run using the same hardware setup as past tests, using an i7-8565 CPU with 16GB RAM.

Tests were performed in both single (1 second block) and four-node (5 second block) setups, using 10 worker threads constantly pushing transactions over RPC. In the single-node test, the Go node increased its average TPS from 2975 to 10,300 since Preview3. The C# node also improved its average from 1888 to 3100 TPS.

Single and four node results on the i7 quad-core system (Source: Neo SPCC)

In the four-node tests, both nodes saw their TPS double since Preview3. The Go and C# implementations achieved 1750 and 600 average TPS respectively.

Due to the high load placed on the testing machine during four-node tests, the Neo SPCC team decided to up the ante, introducing a more high performance setup to get a better idea of real world performance:

“Sixteen real and sixteen virtual cores make Ryzen 9 5950X a good CPU for any kind of benchmarking. Paired with 64 GB of RAM (and a nice SSD, of course), this system allows to unleash more of real node potential (for any implementation). It also has enough room to see how nodes scale. We’ve run the same set of tests using this machine, and the results we have are quite interesting.”

Equipped with the new hardware, both implementations saw a significant performance improvement. In the single-node test, the C# node reached an average TPS of 5350. The Go node reached dramatic new heights, achieving 19,600 TPS with LevelDB and 21,900 TPS with BadgerDB.

Single and four node test results on the Ryzen 16-core system (Source: Neo SPCC)

In the four-node setup the results were more realistic, with C# and Go nodes averaging 1100 and 6100 TPS respectively. These results provide positive insight into the changes in Neo3.

The investigation also revealed new ways for each implementation to reach greater heights. In particular, Neo SPCC detected performance drops in the C# node which appeared to be connected to block sizes approaching the current memory pool capacity size of 50,000 transactions. For NeoGo, the four-node tests showed stable block times, but the relatively low CPU/memory usage compared to the C# node revealed that NeoGo could still stand to improve throughput by making better use of available resources.

Further measurements, such as transactions per block, CPU usage, and memory usage, can be found in the original article at the link below:
https://neospcc.medium.com/neo-3-0-0-preview4-nodes-benchmarking-bb4ef291dcca