SteemAX Update: v0.2 Release

SteemAX is is an auto-upvote exchange

that allows Steemit users to exchange upvotes with each other for an agreed upon length of time. Please visit https://github.com/artolabs/steemax for more information and installation instructions using either pip or git clone.

SteemAX uses Python 3.0, MySQL and the Steem-Python library to utilize the Steemit/Steem blockchain technology.

steemax0.2release.jpg

Updates

I've been incredibly busy updating and refactoring code so that SteemAX can be a stable and robust system capable of handling thousands of exchanges per hour. Primarily, I've been focused on finishing the authorization process, which will conclude when I have finished integrating SteemConnect.

Currently, the system still uses private posting keys for the authority to exchange upvotes, and it uses SBD transactions as a way of authenticating a user's account. In order for a SteemAX user to initiate an invite, or a barter, or to accept an invite, they must prove they are the owners of their account by sending any amount of SBD to SteemAX along with a memo message that contains an ID associated with that particular exchange. The SBD that is sent to SteemAX is forwarded to the other party of the exchange, unless the memo ID or it's associated action is invalid in which case the SBD is refunded. It's this system that is now completed at the command-line level. Below I have a complete flowchart and pictorial walk-through so that this process can be fully understood.

Here is a non-exhaustive list of updates that have been made in the last 16 days:

  1. Practically the entire code base has been refactored into neatly organized classes instead of module definitions. The code is a thousand times cleaner, easier to read and runs faster. Hundreds of lines of redundant code was removed and made to be more pythonic.

  2. A logging and error messaging system as implemented throughout all classes giving a plethora of new information about all SteemAX transactions and invites. This creates a log file named "error.log" and when logging is set at the "INFO" level all transaction activities are logged.

  3. A new MySQL database was created to keep track of all authorization transactions. Each time SteemAX processes its transaction history, a record is made of the transaction including all relevant actions taken. This is used to prevent redundant transactions and keep track of the last transaction that was processed so that new transactions can be identified.

  4. The authentication process was made more robust, and a number of bugs were removed. Steemax can now be run on my home laptop and perform almost all of its primary functions. Now that's efficiency!

  5. Doc strings have been created and comments have been embellished so that they are more informative to those reading the source code. This will be an ongoing process so that as much confusion as possible is dispelled from the inner workings of SteemAX.

  6. Two new modules were created to handle SteemAX transactions (axtrans.py) and messages printed to screen as well as to the logging file (axmsg.py).

  7. All transactions are now handled using the steempy cli wallet and the installation instructions have been updated to provide details for configuring the steempy with SteemAX.

  8. The new command process has been added to the command-line interface. Typing this command will cause SteemAX to run axtrans.py and process all new transactions containing memo IDs.

Exchange Invite and Authentication Process

Currently the invite process is command-line driven and requires both parties to be present at the same terminal. However, you can imagine, during this pictorial walk-through, each instance a command is entered via the command line will be replaced by a proper GUI running on a public server accessible anywhere.

steemax2.png

To start the invite process a user must submit their Steemit account name, which generates a report like this.

walkthrough1.jpg

Then the invitee's Steemit account name is entered.

walkthrough2.jpg

Then, once both accounts are verified as existing accounts, the inviter is asked to enter their private posting key (soon to be SteemConnect authorization), along with the percentage of their upvote they would like to exchange, the ratio between their upvote and the invitee's upvote, and the duration in days that the exchange should occur. SteemAX then generates a Memo ID and appends the start command to it.

walkthrough3.jpg

The inviter then sends any amount of SBD to SteemAX along with the generated Memo ID and start command.

walkthrough3a.jpg

Typing the process command at the SteemAX command prompt processes all new transactions that contain a Memo ID and responds accordingly. This command will eventually be run by crontab at a time interval suitable to the amount of traffic SteemAX incurs. In the future the blockchain will be streamed and transactions will be responded to in real time.

walkthrough3b.jpg

Then the invitee receives the invite. When the SteemAX GUI is fully implemented the invite will contain a link to a web-page that will allow the invitee to grant SteemAX permission to upvote by way of their private posting key, or soon, their SteemConnect token.

walkthrough4.jpg

Currently the invitee accepts at the command line by entering the command accept then their private posting key. SteemAX then shows the invitee the Memo ID with the accept command appended.

walkthrough5.jpg

To authenticate their account and initiate the exchange the invitee then sends any amount of SBD to SteemAX along with the Memo ID and accept command as shown previously.

walkthrough6.jpg

The process command is run again to process new transactions.

walkthrough7.jpg

The inviter receives a message that the exchange has been accepted.

walkthrough8.jpg

Bartering

At any point after both the inviter and invitee have submitted their private posting keys (or soon, SteemConnect tokens) and a Memo ID has been generated, a barter offer may be sent. Creating a barter offer pauses the exchange until it is accepted.

The SteemAX user enters the barter command at the SteemAX command-line prompt to start the barter process. They then enter the Memo ID associated with that particular exchange. SteemAX calculates the new upvote exchange values and gives a report along with the Memo ID, and appended to it the barter command, the percentage, the ratio, and the duration, in that order.

In the future SteemAX will present a list of current exchanges that a user is engaged in. When this is implemented a user will be able to start a barter simply by returning to the SteemAX GUI and clicking the "barter" link on the appropriate exchange. The user will not need to know the Memo ID at this point as it will be contained within the link. Mockups for this part of the SteemAX GUI will be made and submitted with the next update.

walkthrough9.jpg

The user making the barter offer then sends any amount of SBD to SteemAX along with the Memo ID and barter command. If the user is already adept to using SteemAX and knows the Memo ID already, they can skip using the GUI and start a barter just by sending this transaction.

walkthrough10.jpg

Once again the process command is run and SteemAX forwards the SBD along with the offer.

walkthrough11.jpg

To accept a barter a user simply sends the Memo ID back along with the accept command just as described earlier. Or they may generate their own barter offer and send that back instead.

Canceling an Exchange

To cancel an exchange a user simply needs to send the Memo ID with the cancel command appended and the exchange will be canceled and the other party will be notified. An exchange can be canceled at any point in the process, including immediately after an invite has been sent, as a sort-of "undo" function.

Future Tasks

The database will be converted to a true relational database by creating a separate table to contain user keys/tokens, and thus remove the repetition of keys in the database that can be caused by a user as they create more exchanges. This will also have the added benefit of alleviating the need for a user to enter their private posting key/SteemConnect authorization each time they wish to create a new exchange. However, users will always have to visit the SteemAX GUI and pass the captcha check in order to create an invite.

  • The memo messages that are parsed by SteemAX need to be filtered and sanitized for security.

  • Memo messages that are sent by SteemAX to users need to be cleaned up, given better formatting and provide clearer information.

  • SteemConnect will be utilized in the authorization process and a system for creating and storing SteemConnect tokens will be created.

  • Mockups for the SteemAX GUI that display a list of a users current exchanges and pertinent information will be created.

  • Tasks need to be created soon to have a SteemAX logo made along with a web page design guide and color guide so that the logo and web page design are matching.

  • There is currently a problem with the way a poorly matched ratio between accounts is recalculated. In other words, when a user enters a ratio that is not possible between two accounts (say a whale tries to match 100% of their vote with a minnow at a 1:1 ratio), the ratio entered will be rejected, and SteemAX will suggest a new ratio. The user will then have an opportunity to enter new values. The rejection process works fine, however that new ratio suggested sorely lacks in accuracy. This is not really a programming problem as it is a math problem, as I currently do not know how to calculate this new suggestion. If possible, I'd like to create a Utopian task to solve this math problem, however I'm not sure that would be acceptable, so if anyone reading this would like to pose a suggestion in the comments below it would be helpful.

Visit ArtoLabs on GitHub

Visit: https://mike.artopium.com

Contact: https://discord.gg/97GKVFC

Sort:  

Hey bro. I missed your last post, I was under the impression that if I followed you, your posts would show up in my feed. This project seems like a lot of work. Looking forward to the GUI. You kinda lost me with the command line.

ha thanks for finding me. :) and yeah, I got to start somewhere. nobody will see the command line but me in the end. but I need something to test the back-end with! And I need to show my progress. Expect GUI next update! :)

Oh I see, so it's off the ground now. Cool! Looks like you're doing much better on this account. :D

Yeah, I am trying to participate in utopian-io but I'm becoming disgruntled. See comments below. It's not quite off the ground yet but it's getting there.

Although the upvotes are bigger here I definitely enjoy the comments I receive on my Artopium blog more. And I work really hard for the upvotes you see here, and in comparison, the ratio of work to payout is actually better on Artopium. The goal of utopian-io is to "incentivize" programmers like myself to contribute to open source projects but I'm seriously considering making steemax proprietary and selling the code rather than put up with this crap.

Hey, good morning! :) lol

Hahaha. I see. Alright then. Good evening from here too! :D

Thank you for your contribution. It's great to see that you have taken the feedback and improved a lot in this contribution. Though refactoring is not considered as a new feature, and I feel the feature added in this contribution is not much.

One more thing, have you thought about SQL Injection because I can see you are using Update Statement into the db and if you do not take care of that it might corrupt your database.

Your contribution has been evaluated according to Utopian rules 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]

Thank you for your feedback but although I absolutely love Utopian, the feedback I've received lately as me baffled.

Thanks for noticing that I refactored the code, but I'm taken aback by your comment that not much has been made to "this contribution". First of all, "this" contirbution is entirely my project as no one has yet added to it but me. So it is "my" contribution. Second, I added more code and functionality in this update than was previously there, thus more than doubling the code base. The entire pictorial walk-through describes functionality that was not there before this update. Is there not a shit ton of new functions??? So I'm left wondering what it takes to impress a developers mod that I have indeed "contributed much" to the project??? I've literally spent the last 2 weeks coding for hours every day.

It also leaves me wondering why you would have left a comment about SQL injection when I clearly state that user input needs to be filtered and sanitized in my "future tasks" list. So it really seems to me that you did not read my post entirely, nor did you have a clear idea of the history of this project. Also, I'm sure a quick look at the commit history on my github repository would have given you a better clue as to the amount of code added since my last post.

Thanks again for your feedback. I really appreciate you taking the time to look at my code. If the amount of code contributed, and the quality of that code all determines the value of a utopian upvote, than I honestly expected a bigger upvote than the one previous. But hey, nothing's perfect. Thanks again.

You correctly said that the project is your and you have made the update and not anyone else but refactoring the code is great but wouldn't it be done on the first place itself. What I mean is that according to Utopian Rules "Outdated or low quality code will lead to rejection.", thus we accept the contributors to submit the refactored code, but we know that we all are learning and will not be perfect from the starting. And when I said that " I feel the feature added in this contribution is not much", means other than Refactoring the code base I do not see many updates to make it as a too good of a contribution.

When I said "SQL Injection", I have just given my suggestion after looking at the code and not by overlooking this sentence "The memo messages that are parsed by SteemAX need to be filtered and sanitized for security."

Seriously? What part of "doubled the code base" do you not understand? What part of "add two new modules" do you not understand? How did you become a moderator? Let me hold your hand and take you through the CODE that I ADDED to this VERY RECENT project.

https://github.com/ArtoLabs/SteemAX/commits/master

If you bother to go to this link and open my commit history like a professional utopian moderator, than you will see that the refactoring I did constitutes less then 10% of the work I did for this update. Yet for some reason you can't see this? Also, if you bother to look, you'll see two new branches that were created on the repository. The entirety of the history of those two branches constitutes the work I've done for this update.

You state:

What I mean is that according to Utopian Rules "Outdated or low quality code will lead to rejection.", thus we accept the contributors to submit the refactored code, but we know that we all are learning and will not be perfect from the starting.

Honestly, this is somewhat nonsensical English, which is obviously not your first language, but if I'm to surmise it's meaning than I suppose you're trying to say that SteemAx is old and that I simply refactored it? REALLY???? Please tell me I'm misunderstanding you.

I feel the feature added in this contribution is not much", means other than Refactoring the code base I do not see many updates to make it as a too good of a contribution.

Nope. You really can't see the work I've done. What a shame.

At this point, I simply want you, a Utopian moderator, to admit making this mistake. You have obviously COMPLETELY overlooked the work I did, made terrible assumptions that were flat out wrong, and have insulted me and the work I've done.

At this point I do not need a new review score. I am not trying to get a better upvote. I'm trying to get YOU to admit to a mistake, so that I can have faith in utopian moderators once again.

Thank you.

Let me go through the list of Updates you have stated in your Contribution -

Practically the entire code base has been refactored into neatly organized classes instead of module definitions. The code is a thousand times cleaner, easier to read and runs faster. Hundreds of lines of redundant code was removed and made to be more pythonic. - Seems like a Refactoring

A logging and error messaging system as implemented throughout all classes giving a plethora of new information about all SteemAX transactions and invites. This creates a log file named "error.log" and when logging is set at the "INFO" level all transaction activities are logged. - Part of Refactoring

A new MySQL database was created to keep track of all authorization transactions. Each time SteemAX processes its transaction history, a record is made of the transaction including all relevant actions taken. This is used to prevent redundant transactions and keep track of the last transaction that was processed so that new transactions can be identified. - Cannot call it a feature

The authentication process was made more robust, and a number of bugs were removed. Steemax can now be run on my home laptop and perform almost all of its primary functions. Now that's efficiency! - Utopian Rules says "Bug Fixes for contributor’s Own Projects will not be accepted, unless the Bugs were caused by third party dependencies."

Doc strings have been created and comments have been embellished so that they are more informative to those reading the source code. This will be an ongoing process so that as much confusion as possible is dispelled from the inner workings of SteemAX. - Documentation does not mean the actual development

Two new modules were created to handle SteemAX transactions (axtrans.py) and messages printed to screen as well as to the logging file (axmsg.py). - As you said these are the two new modules, agreed.

All transactions are now handled using the steempy cli wallet and the installation instructions have been updated to provide details for configuring the steempy with SteemAX.- Dont call it as a feature though, part of refactoring.

The new command process has been added to the command-line interface. Typing this command will cause SteemAX to run axtrans.py and process all new transactions containing memo IDs. - Wasn't it connected to the axtrans.py.

Now if you go through the "https://review.utopian.io/result/3/2322321", I accept that for this question "How would you rate the knowledge and expertise necessary to fix the bug / implement the added feature(s)?", it should be Average and not Low, that is my mistake.

One more thing, if you are open to take feedback, its better to link the Commit Ids along side the Updates Stated in the contribution. In that way it will be easier for the moderators to evaluate it.

Hey @learnelectronics
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Contributing on Utopian
Learn how to contribute on our website or by watching this tutorial on Youtube.

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Loading...

Coin Marketplace

STEEM 0.17
TRX 0.15
JST 0.028
BTC 62007.73
ETH 2389.39
USDT 1.00
SBD 2.49