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 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.
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
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.
#!/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.
#!/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
GitHub Account
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 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!
Or go to https://steemit.com/~witnesses
and type jrswab
in the box at the bottom.
.env
file would be a better place for the config settings like username and wif key.Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.
To view those questions and the relevant answers related to your post, click here.
Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Thank you for checking this out and chatting with me today!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Thank you for your review, @helo!
So far this week you've reviewed 5 contributions. Keep up the good work!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
I'm wondering do you collect fees from node hosters from their earnings? If so how many %?
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
The incoming payment for the pin request will be evenly divided between all nodes that pinned the hash that day and @nebulus. So if three nodes pin a hash then the STEEM is split by fourths.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
So 25% correct?
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Not really, if there are only two nodes that pin a hash then each would get 33%. As the number of nodes increase the total payout for each node goes down and the Nebulus portion should as well. At least that is what I am thinking of doing at this time.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Great to see the updates and the progress that's being made.. Ability to pin hashes without an account is big! I need to find some time to pop into discord and say hi, ask about a couple things..
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Please do and feel free to ask me anything. We can even hope on voice chat to make things easier.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
It's becoming my dream ❤️👍
Posted using Partiko Android
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Congratulations @jrswab! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :
Award for the total payout received
Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word
STOP
Do not miss the last post from @steemitboard:
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Hi @jrswab!
Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Awesome! 👍
Posted using Partiko Android
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Hey, @jrswab!
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!
Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).
Want to chat? Join us on Discord https://discord.gg/h52nFrV.
Vote for Utopian Witness!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit