DLUX community gets it's first node runner

in #stem4 months ago

It couldn't have been easier

So you've decided to run a DLUX node and you got in contact with me. You're a little technical, maybe having run a bitcoin node or something in the past. In @qwoyn's case he's a long time friend of mine. We worked together to build the first Hashkings game on Steem.

So he made a new account @qwoyn-dlux and loaded it up with 120HP (delegation works too). 120HP is enough Resource Credits to run all necessary transactions for the DLUX sidechain... This is less than the cost for GAS of running one UniSwap transaction on Ethereum. Now with this mostly empty account he felt comfortable enough to set up the DLUX node software on a Continuous Integration pipeline to allow for rapid development and stay in consensus.

After that he set two .ENV variables: HIVE account name, active key. Then deployed.

He was done. The software automatically checks for the latest consensus report, it then downloads the state file from IPFS, loads it into memory, and starts processing Hive blocks. When it gets the flag that it's at the Hive HEAD it sends off its status to Hive via Custom_JSON, starting the process to be added to the node pool. With-in 10 minutes his node was elected to the node runners. This new account didn't have any DLUX so it wouldn't have been able to immediately handle DEX transactions, but getting crediting for helping to establish consensus you can see that it was awarded 30.287 DLUX tokens by the network. He can now help handle transactions up to 15 DLUX at a time.

Screenshot from 20201222 142832.png

Every 5 minutes his nodes current state gets uploaded to IPFS and the received hash is used to establish consensus and becomes the new starting point for new nodes and consensus failure restarts.

This morning I noticed that fetching new blocks was failing on the public APIs again, so I wrote a function to swap APIs and start processing blocks again. As downloading states and processing new blocks always takes less than 5 minutes, we can ensure that nodes responsible for handling DEX transactions always make their escrow transactions in a timely manner. The network wins. Hive's feeless transactions and 3 second blocks make building side chains easy, and their setup even easier.

I want your skilled help to test the functions and security and bring the software to a stable release candidate. I want to make a generic version of this software so a few accounts can run lightweight processes with a few dollars worth of HIVE Power and enable communities like never before.


Very easy to run! Happy to help :)

For those of you reading this post, please help @disregardfiat out. DLUX is an amazing project on the HIVE chain!

Where is the software run? Is it on just a pc or laptop or does it require a server?

I'm running it on a heroku instance but I bet you could get away with running it on a pc. I do recommend using heroku, I'm using a paid dyno for 7 bucks a month but not even sure if that is necessary. Will find out after running it for a month. Do you happen to know system reqs @disregardfiat ?

I spin it up on my laptop before I commit changes, The state file is currently less than 100Kb, almost all of which is 24 hours of pertinent transaction feed. It's significantly slower trying to read blocks on my home internet connection.

This is light enough currently to run on just about anything. If you want to run it on your home computer or PC and there is a power or network failure that prevents execution of escrow transactions you may lose your collateral. But if you're technically savy enough to set up the Node.js environment you're good to go.

Nowhere near technically savvy enough to do much of anything.

Alas I will have to leave it to the experts. Hopefully a lot of others sign on to help out.

I will forward this on to those who I know have some technical expertise. Maybe they will jump on this.

Nice, let me know if you need testing help!

How often is the software updated(wanting to see if I need to use CI)? I can throw one up on a spare VM I've got.

depends if i'm adding a new feature: once or twice per working day... or trying to fix something that broke: as often as a commit every 5 minutes.

So a quick and easy script to git pull it is :)

Perfect :)
I'm also down to set up webhooks on github as well.

How long does it take for the account to start broadcasting custom-json's? Mines is still silent.

I noticed yours is silent... It should have broadcasted almost immediately after catching up. My best guess is your account/active key aren't properly set.

I modified them right into the config.js file instead of the .env, but that shouldn't make a difference(unless it uses the .env somewhere else?).

Edit: I just restarted it and that seemed to work. Age old trick :)

I just wrote a little feedback into the start routine. But glad it's working for you.

So one of the issues with not using an .env is when you pull a new commit it will overwrite the config file.

Whoops, that was meant to go from my account, my bad.

Screen Shot 20201222 at 12.44.48 PM.png

Started over on the rishi556-dlux account.

Congratulations @disregardfiat! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s) :

You received more than 2500 upvotes. Your next target is to reach 2750 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

Do not miss the last post from @hivebuzz:

HiveFest⁵ feedback and contest results
It's today! Do not miss the opening of HiveFest⁵

Hi, @disregardfiat.
I've followed instructions and this is the result:

I need something more? Is the node well mounted?

It was my first try.

It looks like it's online in read-only mode. Which just means it might not have an active key.

Ok, I've edited config.js and added active and memo keys. Could you revisit and tell me please? 🙏

https://discord.gg/Beeb38j has an actions feed in it where I still haven't seen your node bid the network. I'd prefer to help you there and place you in a group so you can get notifications for updates or other technical help.

Ok, see you there.