Nebulus 2.0.0 is Live & Ready For Nodes!
utopian-io·@jrswab·
0.000 HBDNebulus 2.0.0 is Live & Ready For Nodes!
 Nodes are ready to go, and your content can stay online forever! It has been a long while since the last update to Nebulus, and there have been a lot of stuff going on behind the scenes. All Steemians can now send a request to have their content from @dtube, @dsound, or any other dapp using IPFS "backed up." The cost is currently one STEEM and will never go above one USD worth of STEEM. The need for this kind of transaction is to pay the nodes on the network. These nodes will both make sure your content is always found but the more nodes we have, the faster your media will load no matter what time of day it is. If you want to run a node and earn STEEM, please [join our Discord](https://discord.gg/dKDuaST) group so you can have access to specific node chats where we will talk about how to make this service better for the nodes as well as the users. #### Repository https://github.com/jrswab/nebulus ### Bug Fixes #### The pin.py script started acting inconsistently after further edits. Set environment to python3 and removed a majority of modules. Not pictured is the removal of all BEEM modules except Account form beem.account.  The priceCheck function now uses a float instead of an integer to add more flexibility since the data that comes in is already a float in string form.  #### The pin script would wait a set number of seconds before checking if the pin finished this caused an unnecessary wait time for quick pins. Now the function checks itself every second and returns the data if found. No longer does a small pin have to take as long as a large pin. ```python def checkSubProc(pin, count): # if still running Popen.poll() returns None # else it ouputs the returncode of the command ran. if pin.poll() == None: print(count) # TODO: change amout for prod. time.sleep(1) # for looping on itself count += 1 if count <= 119: checkSubProc(pin, count) else: status = pin.poll() return status ``` ```python pin = subprocess.Popen('/usr/local/bin/ipfs pin add ' + format(quote(currHash)), shell=True) # give ipfs time to pin hash (in seconds) status = checkSubProc(pin, 0) # ipfs returns '0' when successful if status == 0: # if pinned write hash to file with open('hashList', 'a') as list: list.write(currHash) else: # kill pin process if still running kill(findPID()) ``` `pin.poll()` looks to see if the `subprocess.Popen()` assigned to "pin" is currently running. If the subprocess is running `poll()` returns `None` since if found no exit status. This loop continues until the command finishes or 120 seconds pass. ### New Features #### Ability to pin hashes on the home page without an account There is no need to have an account to pin your content around the Nebulus network. User accounts on the site are currently deprecated and will not be under any new development at this time.  #### Node directory to hold node scripts and for future Docker file. All scripts to be used for running a node are found in the node directory. Soon there will be a docker file that anyone can download and run to set up a node and earn STEEM by keeping the creator's media live. #### Ability to send node active status with custom JSON for future needs. This was added before the pin script was refactored to help determine how often to pin content. This is kept so that the payout script knows what accounts are said to be live. ```python #!/usr/bin/env python3 from beem import Steem from beem.account import Account # needed to form user data dictionary userFormat = ['user', 'wifLocation'] # grab steem user data with open('config/userData', 'r') as userData: steemInfo = dict(zip(userFormat,userData.read().splitlines())) # get private posting key from location with open(steemInfo['wifLocation'], 'r') as wifRaw: wif = wifRaw.read().replace('\n', '') # set up steem keys and account name steem = Steem(keys=[wif]) account = Account(steemInfo['user'], steem_instance=steem) # Send custom json init message steem.custom_json('nebulus_node', '{"node": "initialized"}', required_posting_auths=[account["name"]]) ``` #### A config file to hold user info such as steem account and wif location. Simplification of data and organizational structure to keep everything understandable. #### Script to request payment from Nebulus After a node pins a number of hashes, the node then sends data to the blockchain seeking payment for the pinned hashes. This payment comes from the amount of steem sent in the pin request. ```python #!/usr/bin/env python3 from beem import Steem from beem.account import Account # needed to form dictionary from userData userFormat = ['user', 'wifLocation'] # get steem user data with open('config/userData', 'r') as userData: steemInfo = dict(zip(userFormat,userData.read().splitlines())) # grab wif with open(steemInfo['wifLocation'], 'r') as wifRaw: wif = wifRaw.read().replace('\n', '') # set up steem key and account steem = Steem( nobroadcast=False, # set to true for testing keys=[wif] ) # set acc to the steem account in config/steemAcc acc = Account(steemInfo['user'], steem_instance=steem) # get pinned hashes with open('hashList', 'r') as hashList: hashes = hashList.read().split('\n') # send custom json with hashes steem.custom_json('nebulus_req', '{"hashes": ' + ', '.join(hashes) + '"}', ``` Nodes only need to store their private posting key and should never use any other key when running Nebulus. ### [Changelog](https://github.com/jrswab/nebulus/blob/master/CHANGELOG.md) #### GitHub Account https://github.com/jrswab <center> ###### All images came from royalty and attribution free sources unless specified. --- Looking to take your Steem based creations to the next level? Join us over at the [Creators' Guild](https://discord.gg/YDcyTJR) Discord group! We are here to encourage, support and increase the creation of quality content. --- ### Don't Forget to Vote! [ Click here to vote with SteemConnect!](https://steemconnect.com/sign/account-witness-vote?witness=jrswab&approve=1) Or go to https://steemit.com/~witnesses and type `jrswab` in the box at the bottom. ###### Want to know more about my witness? Feel free to message `jrswab#3134` on Discord, `jrswab` on steem.chat, or head over to [jrswab.cloud](https://jrswab.cloud) for maximum transparency. --- [SteepShot](https://alpha.steepshot.io/@swab) | [Mastodon](https://mastodon.xyz/@jrswab) | [Keybase](https://keybase.io/jrswab) | [Twitter](https://twitter.com/jrswab) | [Gab](https://gab.ai/jrswab)</center>
👍 patricklancaster, not-a-cat, hoovesreport, antoniel, evilest-fiend, creatorsguild, jennybeans, busy.pay, reazuliqbal, codebull, azizbd, shammi, steemtaker, ayasha, mhossain, sheikhsayem, tanzil2020, linco, boomtube, avengersayem2, gamerbd, priyanarc, dreamarif, jahedkhan, avengersayem, mrcheisen, kslo, techcoderx, blue-steens, cryptos, kubbyelizabeth, dreday20, coincadet, luigi-tecnologo, davidfnck, halcyondaze, sblue, teknomunk, rodeo670, crimsonclad, discordiant, jasonbu, jayna, amosbastian, seanlloyd, polbot, gmichelbkk, isleofwrite, council, grasozauru, agr8buzz, espoem, dunite, gamesjoyce, criticalbarny, khalilmuza, jrungi, lethsrock, uhatgaming, thisbejake, cartel, treflo, naruitchi, capnsostre, aceaeterna, justasperm, chansetheguy, ps4gamer, anarch0gam3rs, cgp, ajaxalot, calimeatwagon, helo, dnews, nebuladream, dlivestreamers, xurcrux, drkent, dlivecurator, cgbartow, imcore, youraverageguy, thatterrioguy, iauns, gray00, andrejcibik, ajayyy, carn, aaronsuncamacho, grzesiekb, therealwolf, kotik1, chillinph, kabibitak, dromzz, talaxy, streetsmart, cracksnews, steemnews-fr, alekau, steemroasted, captainsailor, dailyfeed, andy4475, frsvp, a1mtarabichi, tximeleta, shimaro, nafisacom, nsfw2, dongentle2, roshan77, vdux, solarparadise, travelmuse, naysayer, armageddonparty, jaysermendez, blazing, massive-pop, marcos1245, endlesstopics, gamer0815, bluntrunner, pkvlogs, diogosantos, agnessa, guyfawkes, mackcom, devytan, doctorspence, wakkylyon, ottto, gligli060, yannh, lrd, mystifact, francispalo, gbenga, laurabanfield, clubmillionaires, devtech, tastetwist, fightnight, startuplaunchpad, xevil, melissa-mccarthy, dream.trip, armadillocreek, hannesl, fuzzbox, gabbynhice, liverehab, err0rist, blackvapor, wordymouth, sizandyola, wil1liam, agcoeficiente10, shaloop, inmylife, axynos, whitecollar, anttn, freetousesounds, wanareis, touristpk, cygon, marshalllife, zpedro, thegreenfox, alexisdauliac, jlordc, linuslee0216, sunnyali, lila-wish-genie, oredebby, nuges, yasminep, petrajordan, joelsegovia, hanggggbeeee, andypalacios, city-of-dresden, enja18, evanprice, gyeryak, fouad, detlef-s, ehmkannde, svkrulze, overmybrain, v-hp, jinhwanlazy, echowhalex, ivoteonheroes, ccoin, hyipi, jnkb07, swisswitness, paradaise, ragnar01, wig319, deborism, katscorner, arnel, ground2feet, corina, tech4all, ramsteem, hodlorbust, techchat, mynaturebody, thomasmore, furie, fuerza-hispana, steemmaster, theswissguy, lawlees, syedubair, longphibtc11, farukcom, afrosiab, quotesbyharper, cryptoprice, fplacido, minhnguyen1994, zneeke, finkistinger, freddyfish, samhamou, synace, jona12, wllmdnnd, sourcherry, vgc5000, humankindness, piszozo, bonanza-kreep, vvk, emmyem84, paraxs, bypaul, silverwhale, pg-live-pt, trans-juanmi, kookmin, atmosblack, joxus, austenballard, dana-edwards, bennettitalia, instatrashed, steemitgifts, alnedkov, matajingga, ross-early, jbn, hardikv, emmycapable, gamsam, pjay96, johhnnyturbo20, anthonydigital1, scottcbusiness, meysam, agneslaczo, city-of-berlin, josevasquez, kylealex, cryptoprebz, mehta, masummim50, travelwithus, ubik, newgenespeed, phoenixdh, fronttowardenemy, voinnov111, olegnator, chrisdavidphoto, toocurious, jakeybrown, angelacs, fullofhope, carlpei, libertyranger, maninayton, fullcoverbetting, minloulou, maxer27, jerrycheung, detlev, steem-id, natalii46, goldsphex, stepway174rus, russianrockmusic, ana-maria, troopaloop, mitchhunter, truth-be-told, likeyou, sakhone, uche-nna, decentropia, valikos, qberry, mitthradiumn, judasp, procaptainjoe, kyuubi, jumaidafajar, mdnajir, momar, sam99, pi5000, stephen.king989, landonator, dshelton32, veritasvav, nyh, moisesmcardona, elena-singer, eforucom, rynergy, littleboy, qhuber, beautifulbullies, docsweettooth, aafrin, runorg, stayoutoftherz, rndness222, arshikhan, brandonp, abderrahimlafifi, captaincanary, intrepidphotos, jinlee, holm, funtraveller, indigoocean, schoolofthoughts, poetrycircl, hossary, aamirijaz, sostrin, lochitour, floridasnail, adept-forever, steemquebec, slickwilly, thally, spotlight, bscrypto, decuration, fractalnode, steemengines, dvf, steemjetmedia, bedusaini, jrswab, r0nd0n, pamela-paul, doughtaker, steem-ua, codingdefined, coconut-chanel, buddyup, calumam, smokingfit, pretty.dorky, sapphic, richardbmx, dungeoneersguild, utopian-io,