It has been a while since my last post, but that’s just because I’ve been lazy about reporting, not because there’s not a lot going on. As it happens, we’ve added several new programmers to our Hive development team since my last post, so if you look at the hive repo and haf repo, you’ll see several new people there making commits.
Below are a few highlights of the Hive-related programming issues worked on by the BlockTrades team in the past few months.
Hived (blockchain node software)
Since my last post, witnesses have upgraded the Hive network to hardfork 27 (1.27.x) and we’ve made several “point” releases (1.27.1, 1.27.2, 1.27.3 to fix problems, improve usage and maintenance of hived, and improve it’s performance in various ways based on our production testing. You can click on the links for each release to see detailed changes made in each release, but I’ll briefly summarize some of the more important changes at a high-level:
- Upgraded the secp256k1 encryption library (speeds up blockchain validation time by about 42% as it reduces the time to verify transaction signatures).
- Various improvements to the command-line hive wallet (this wallet is mostly used by exchanges and “power users”).
- Added a minimum allowable RC (resource credit) delegation amount to avoid transaction spamming and also improved processing of RC delegations.
- Improved realism of RC cost calculations for recurrent transfers.
- New API calls and improvements to other ones to get more statistics and info related to RC usage.
- Fixed longstanding bugs in market history API calls so that they return correct ticker-related data.
- Fixed filtering of list_proposal_votes API call.
- New tool for managing the block log (file containing the history of blockchain transactions). This tool includes features for comparing two block_log files for consistency (to detect corrupted files), truncating blocks from the end of a block log (to remove corrupted blocks from the end of a block_log file if, for example, a copy of a block_log file gets interrupted while it is in the middle of writing a block), and generating a checksum of the uncompressed block_log contents without having to actually decompress the block_log (this allows comparing checksums of two block_log files that were compressed differently without having to decompress the files, avoiding consuming more disk space).
- Prevent nodes from crashing when they received a get_ops_in_block API call with just one parameter (longstanding bug).
- Fixed bug in fc::uint128 decimal conversion.
- New regression tests.
- Improvements to testing code to make existing tests more stable.
Hive Application Framework (HAF) and related apps
- Added an applied_hardforks table to the HAF database to simplify tracking of the block when each hardfork became active.
- Improved performance of hive.get_block_from_views API call and fixed a problem with the returned order of transactions in the block.
- Many improvements to ease upgrading an existing HAF database to a new version.
- Various improvements to dockerized HAF configuration.
- Improved stability of HAF tests.
Hivemind and HAF hivemind
We’ve released new versions of legacy hivemind (v.1.26.3) and HAF-based hivemind(v.1.27.3.0.0) and both are currently deployed on various production API nodes.
Here’s some of the major changes:
- Many performance optimizations specific to moving from PostgreSQL v10 to v12 or v14.
- Used data stored in the HAF database itself instead of making some account history calls to hived. This led to a significant performance improvement for the initial “massive sync” process required to initially setup a hivemind server for production usage.
- Fixed the dockerized setup of HAF hivemind (this got broken in the previous version).
- Updated deployment documentation for HAF and HAF apps such as HAF-hivemind.
New versioning convention of HAF and HAF apps
This is the first official release of the HAF-based hivemind application (prior ones were "experimental" and mainly only deployed on our node): 1.27.3.0.0
Along with the official release of HAF-based hivemind, the astute reader may notice a change in our versioning for haf-based hivemind: the first three numbers (1.27.3) indicate the minimum version of hived required, the fourth number (0) indicates the associated sub-version of HAF required (i.e. 1.27.3.0), and the fifth number indicates the sub-version of hivemind itself (this is the first release of HAF hivemind for HAF version 1.27.3.0).
HAF block explorer
Work continued on the HAF block explorer and it is near completion now (mainly testing and bug fixes). This work has also led to some of the changes to the data collected by HAF via the sql_serializer so that HAF data is more complete for potential HAF applications.
Some upcoming tasks
- Continue supporting Hive API node operators and witnesses as they continue upgrading their node infrastructure.
- Re-use docker images in CI tests when possible to speedup testing time.
- Continue work on HAF-based block explorer
- Collect benchmarks for a hafah app operating in “irreversible block mode” and compare to a hafah app operating in “normal” mode (low priority)
- Finalize plans for changes to hived and HAF in the coming year that the BlockTrades team will be working on.
- Work out schedule for creation of various HAF-based applications (most important one here will be a HAF-based smart contract processing engine).