I have been meaning to write a devlog post for a while, but it always takes a back seat to more urgent tasks. I want to talk about some of the "work" I've completed recently for various projects. And dump my brain for some things I started researching.
The current project that generates the most excitement is the MOON game (HiveNova open-source engine), which I have included at the end. Feel free to skip ahead if you'd like.
Multiple new things here worth mentioning:
Small change made to filter out some noisy Discord notifications. Enabled/disabled notifications were sent for nodes that are expected to frequently be enabled and disabled. I added a filter to stop sending those messages. Thanks for the suggestion .
The HE dockerization project started in 2023, and I have had some concerns about ease of use. Starting up the Docker cluster was complicated due to Hive-Engine's reliance on MongoDB replication sets. You must send the command rs.initiate() before the database can be accessed from NodeJS. I found a workaround for this, which is to call the initiate() and other setup commands from docker-start.sh script.
Dockerfile
docker-start.sh
docker-compose.yml
It allows a Hive-Engine node cluster to be spun up with two commands:
docker compose build && docker compose up
Switching the MongoDB version or NodeJS engine version is a single line code change.
While testing the Docker cluster, I observed a couple of cases where the node's blockchain data diverged from the network consensus. Therefore, dockerized HE requires further testing before being encouraged for broader usage. Additionally, I have not yet tested peer-to-peer (P2P) communication.
I believe MongoDB is run in replica set mode, allowing MongoDB tools, such as mongodump and mongorestore, to be used for archiving and restoring the database. The archive/restore enables node operators to load a snapshot for repairs rather than syncing from the genesis block.
MongoDB is designed for horizontal scaling, but to the best of my knowledge, no Hive-Engine witness node does any horizontal scaling. Maybe some of the core team infrastructure runs multiple instances of the DB for reliability.
When Hive-Engine node software reads blocks and executes smart contract code, it reads from and writes to MongoDB. The speed of the database is critical to the sync speed. Is another type of DB, such as LevelDB, PostgreSQL, or GraphQL, better suited for this task?
The Hive-Engine JSON-RPC API also serves requests and reads data from MongoDB. For this task, MongoDB appears well-suited, as it's designed for high throughput and distributed systems.
An interesting science experiment would be to profile the performance of Hive-Engine and replace MongoDB with another database technology.
There is so much to talk about I don't know where to start. We launched MOON less than 2 months ago. My previous DevLog post was 1 week after the launch of the game.
Here are some of the more notable changes:
There are endless things to build for MOON. Players have suggested many changes and improvements that we haven't gotten to yet. The MOON team also has many ideas for more web3 Hive integrations.
Here's a few top of mind items that need to get done:
That's all for now. Thanks for reading! Do you want to hear more about any of these projects? Please let me know in a comment.