Hived@Home

in #beco132last year

A couple of months (or was it years?) ago I tried running a Hive-Engine witness node on my home PC. I could not find a recent database dump back then and replaying from the blockchain is impossibly slow, so I finally gave up. Recently I found out that the thing has been running on its own for some time. Apparently I had set a restart policy for the docker containers and had forgotten to delete them, so docker had them started at some point. As it is already close to finish (only 10M blocks behind) I will give it a chance. I even decided to run my own Hive node and synchronize the HE from it.

What I've learned so far from running hived

  • it is more lightweight and easy to set up than I expected
  • it runs in a Docker container
  • it doesn't require Hive account/keys to run, they are needed only for witness mode (which seems more fun)
  • as a database it operates with 2 main files - shared_memory.bin which seems like the actual database file, and blockchain_log which is the transaction log since day 1
  • respectively there are 2 main related concepts:
    • blockchain-replay - this is recovery of the database file (shared_memory.bin) from a pre-existing transaction log (blockchain_log). Necessary after any change in the local environment - e.g. new hived version, enable/disable of modules or what not
    • blockchain-resync - the process of getting entire blockchain_log from other nodes and recover local copy of database from it. No need to be done as long as there is a recent copy of the blockchain_log
  • full resync on my home PC takes more than 72 hours
  • full replay needs about 18-20 hours
  • the tricky part - it doesn't work with shared_memory.bin placed on HDD (4 HDDs in RAID10 in my case) - it requires more iops; runs quite good on tmpfs but then it has to be replayed after each reboot; nvme could be a better option, will try when I get one
  • getting block from my local node is +100x faster than internet - feels very satisfying; unfortunately hive-engine is not impressed at all and continues syncing at previous slow pace

That's all for now. In the near future I'll try to optimize the whole thing so it can be easily build and started at home. So far I've found some scripts and Dockerfiles but they are either incomplete/obsolete or part of some CI pipelines which are too complex for personal use. And perhaps I will become a witness one day, who would tell

Sort:  

Congratulations @beco132! You have completed the following achievement on the Hive blockchain And have been rewarded with New badge(s)

You distributed more than 73000 upvotes.
Your next target is to reach 74000 upvotes.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Check out our last posts:

Keep Hive Buzzing - Support our proposal!
Our Hive Power Delegations to the February PUM Winners
The Hive Gamification Proposal
Support the HiveBuzz project. Vote for our proposal!