PHP Class, API requests for scripting languages, and Harmony Node API Explorer

Thank you! Time to roll up the ol’ sleeves and get to work!

1 Like

I’ve sent my information in. I am attempting to set up Gnosis Safe. I have my two addresses ready but I don’t understand who the other four wallets are or what addresses would go in there. Any assistance would be greatly appreciated.

I just wanted to show you how my time recording software reports will work. I’m still having issues getting gnosis safe working. I don’t understand where the other 4 addresses come from.



Weekly Report 2022-3-11:

Set up time tracking software for the project to be able to show which goals have been worked on and how many hours on each specific task.

I got a good start this week by framing in as many api methods as I could. I am currently up to 58 of 63 methods framed in. I also did some midpoint type cleaning of the PHPH1 class. I still need to test every call that needs validated and see if I can break my code on any of them.

Along with this I have built most of the explorer pages that go along with the API methods. I’ve spent some hours cleaning up explorer pages so they are uniform in design, I still have about half to go. I’ve also worked on the explorer interface. There is now an included footer so one file can be edited and the changes take place site wide. I also added a dynamic floating back to top button to everything.

I have a small laundry list of things that need fixed on the API documentation side but I want to double check to make sure I didn’t miss something.

I did about 30 hours work on it so far. About 11% project completed.

Have a great week!

Weekly Report 2022-3-19:

Had a slow week on this as my business got a bit busy. I worked on this about 15 hours total for the week. Also, it is becoming apparent that I miscalculated my time somewhat. I believe I will be using less hours on the class and more hours on the UI/UX side of things (explorer work).

Added a dynamic floating back to top button and also dynamic page titles so every call should get picked up properly by the search engines.

Mostly worked on the explorer code for the methods. Most of the work was code consistency check and API documentation formatting and accuracy check.

I have a few methods which I don’t understand how they work and need more sample input for them than the API shows. I plan to check on the Discord and see if I can find some assistance there.

hmyv2_call
hmyv2_sendRawTransaction
hmyv2_sendRawStakingTransaction
hmyv2_estimateGas
hmyv2_getStorageAt

The following list is Harmony Side API documentation that should get looked at for consistency, I am unsure who/where to pass this on to:

hmyv2_getAllValidatorInformation

[epoch-apr] => Array
(
[0] => Array
(
[epoch] => 845
[apr] => 0.101690187756766156 <<<<< API documentation key says “Value”
)

hmyv2_getValidatorInformation - Output is not correct in API docs, mine is correct

hmyv2_isBlockSigner - Not in current documentation but exists

hmyv2_latestHeader - Harmony documentation doesnt match the output, still needs some descriptions

hmyv2_getHeaderByNumber - Same as hmyv2_latestHeader

hmyv2_pendingTransactions - docs say “See hmyv2_getTransactionByHash for transaction object definition” but the output is different

hmyv2_getMedianRawStakeSnapshot - API docs do not match output

hmyv2_getPendingCXReceipts - API docs do not match output

hmyv2_getStakingNetworkInfo - API outputs are out of order

hmyv2_getTransactionByHash - API outputs are out of order

hmyv2_getCode - No input output information in API explorer

hmyv2_pendingStakingTransactions - returns empty array every time I have tried it, not sure if working

hmyv2_getStakingTransactionByBlockNumberAndIndex - output does not exactly match hmyv2_getStakingTransactionByHash as stated in docs

hmyv2_getStakingTransactionByBlockHashAndIndex - output does not exactly match hmyv2_getStakingTransactionByHash as stated in docs

hmyv2_getLastCrossLinks - API outputs are out of order

hmyv2_getCurrentBadBlocks - Known issues with RPC not returning correctly

hmyv2_getNodeMetadata - API Docs do not match output

hmyv2_getBlockSigners - API inputs options are incorrect. This will only take a single block number

hmyv2_getBlockSignerKeys - Listed in API as “hmyv2_getBlockSignersKeys” but method is actually “hmyv2_getBlockSignerKeys”

hmyv2_getLatestChainHeaders - API Docs do not match output

hmyv2_getSuperCommittees - API docs do not match output

** Next 3 output are all identical **

hmyv2_getTransactionByBlockHashAndIndex - API docs do not match output

hmyv2_getTransactionByBlockNumberAndIndex - API docs do not match output

hmyv2_getTransactionByHash - API docs do not match output

hmyv2_getTransactionReceipt - API docs output missing item “root”

hmyv2_sendRawTransaction - unsure about input/output data needed to run request (need test data for input to test and create validation code)

Keep up the work! We are excited about this.

WEEKLY REPORT 2022-3-25:

Making great progress! I worked 31 hours on it this week.

Most of the week was spent working on doc blocks for the class documentation. You can see the current state at PHPH1 Class Documentation On the top right hand side of the functions you can click the <> link and view the current source of the phph1 class.

I uploaded everything where I finished off last night. So browsing to the homepage will let you see and play with things if you would like.

My google optimization is paying off. Right now, you can search google for any of the methods, and that method page is almost always in the top 5 results. Sometimes I even rank higher than the Harmony documentation. I have been using webalizer for stats since the end of February. The site is currently seeing around 60 visits a day on average this month. I have my addresses blocked from being used in the stats. You can see them by going to the site and adding /stats to the URL. I don’t want to post a direct link to keep it out of the eyes of bots.

I also decided the dropdown information pane on the method pages need descriptions of what each method does so I started adding them and am just over half done. I am also looking elsewhere at other EVM coin API docs to compile, hopefully, a more detailed and complete description for each method.

Added methods:
hmyv2_getDelegationsByDelegatorByBlockNumber
hmyv2_call
hmyv2_getStorageAt
hmyv2 _estimateGas

60 of 63 methods are in working but not perfect order (need reviewed and validation checks still)

Lost a day of work because I ran into a bug with the documenter software, fixed it for them and solved their bug report on Github. I needed the software so…

When this is finished, I believe I have an idea that is simple, useful, effective, and will help crypto users too. Especially new users.

Have a great week!

As a note. Today I cleaned up the stats by removing all the crawl bots I could out of it so the numbers have dropped. Just so people know that my numbers above aren’t blown up.

WEEKLY REPORT 2022-4-1:

I worked on the project 31.5 hours this week. Total hours worked is ~104.

I added a cheeseburger menu item and put links to the settings dialog, the PHP Doc output which will ship with the full package, a link to this bounty proposal page, and a link to github.

I am in the process of revamping some of the logic to expand developer usability and streamline the code. First of all. I am internalizing almost all of the Class functions, methods, and variables. Nothing happens within the view portion of the app unless it is necessary. Almost no raw data is available unless using functions within the class to return it. This should help in making the class extremely portable with minimal effort and most likely more secure. It definitely helps with other developers should they work on the class.

One other new addition to the process is good input. I want to make this as mobile friendly as possible. One of the big pains about mobile is copying and pasting all kinds of stuff into forms. What I have done is when validation happens, any form item that is good data is stored for later so the good data fields get refilled should one of the fields fail validation. This makes it so users have to resubmit as little information as possible when they have an input error.

I have also reassessed the validation errors portion of the code. I will be adding a file with all of the validation errors for each field in every method (most of them get reused over and over, block number, block hash, ONE address, ETH address etc etc.

And one last addition for the class will be a ban list. Should anybody be abusing it, there will be a ban file with a PHP array that can be filled with IP addresses. If somebody really wanted to lock it down they could limit access to specific IP addresses in their web server host file or .htaccess. I’ll add this to the howtos so people know how to do that.

Another great week working in the code mine!

Cheers!

WEEKLY REPORT 2020-4-9:

~20 hours worked

This week was an example of why I needed to pad to 90 days. I got swamped with a client and didn’t get to work on PHPH1 as much as I would have liked.

So what I have done is turned every variable within the class to private and created functions to set or get data. I felt this was imperative in order to make the class as portable as possible… Naturally in doing this a LOT of adjustments need to be made to the front end and that is what I worked on this week. I have a looong way to go because every method needs adjusted.

I added code that shows how long it took for the page to load in the footer. At some point in the distant future I’d like to log those times and the method used in maybe sqlite DB and build a dashboard where each method and its loadtime stats can be seen.

Once I get this stage over with I will be uploading the updates to Github and make them live on https://phph1.saddlerockit.com . At that point I should be ready to move onto tutorials and finish documentation. Once the full version is finished it should be easy to create a rpc only version and a bare class version for download on Github.

Getting very excited because the new version runs well, handles the largest of datasets I can muster on it too. getAllValidtorInformation with -1 pages in around 3 seconds.

Cheers!

@ILL_DIE_TRYING - Good to see your work. Keep this thread updated for the the community.

Thanks!

Thank you for the reminder. I just realized I didn’t do a report last week, my bad. To be honest I’ve had a nasty medical issue the last two weeks and have been struggling to get work done due to intense pain. It looks like I am on the mend now so things should pick up. I did do a BIG update on github and the live site is using the latest code now. I’ll just put the brief change log I did on github here. It should cover almost all progress made.

Everything has been adjusted and changed. Code revamp to internalize all class variables, PHPdoc documentation work, optimized how PHP handled the return data which sped up big requests and prevented the large data sets from crashing the server. A back to top button, hamburger menu with links to all the information. Validation methods changed, all methods have been streamlined.

Functionality I plan to enable:
Create a way to block ip addresses that may be abusing the system
Create a way to only allow specific ip addresses

I will also be starting on the front page documentation for the front end usage of the Method Explorer. Once this is done I will start in with github docs as well.

I do need help from someone with knowledge on the API. I need to know how raw transactions work (staking and regular). It would be appreciated if I didn’t have to keep asking for this one thing as it is preventing me form finishing the last couple of methods.

Have a good one and once again thanks for the reminder!

1 Like

Hi @ILL_DIE_TRYING thanks for the prompt response. I’ll include @jbeltran so we can review this topic together.

Weekly Report: 2022-4-30

The home stretch is almost in sight!

Added a way to block ip addresses, also added a way to allow only specific ip addresses. Also added a way to turn on and off the ability to use -1 in any requests that have that option. I still have to write the code into the phph1 class functions for the added option. Enhanced the debug data that is shown when debugging is turned on. Also cleaned some code from all the methods. Removed the debug warning lines to clean up the method files and added it in inc/index_body.php and inc/errors.php

Worked out some issues with page number. It seems the -1 option shown in the API docs does not work with the nodes. Did some work on Github README as well and created a test package in order to align front page docs with the process of extracting and putting the files on a webserver.

Worked on formatting and the start of the homepage documentation. Tested the first alpha release packages to ensure my directions matched what actually happens. To test I set up PHPH1 in a newly created SSL vhost. I also tested it in a random subdirectory of the vhost to ensure PHPH1 is very portable.

Synch dev to live and upload latest to Github. Generated the latest alpha package for pre-release

Updated the readme on Github. Almost got it just like the PHPH1 front page documentation.

Getting excited, she is working well and coming together nicely. I think I may come in some hours shy of the bounty estimate. Maybe use any leftover to produce a tutorial video?

1 Like

I don’t have my full weekly report yet, I will have it in the morning. I have to say. I am down to 51 hours left on the bounty and I would like to start having Harmony team members or whoever is official test and critique. That way if we have any changes we want to make, I’ll have some hours to tidy it up.

Be sure to click the input/output bar to see the documentation for each method. I have gone to great lengths to make sure my documentation exactly matches the output for each method and the API postman documentation needs a LOT of updating . There are also two methods I snagged form the EVM documentation that aren’t in the Postman docs.

I also need some sample data to test raw transaction and raw staking transaction. I’m unsure what to do there.

I will have the latest version live as well as on Github tomorrow morning before I post my report.

WEEKLY REPORT: 2022-5-8

Updated the readme on Github. Almost got it just like the PHPH1 front page documentation. I have to adjust and add the new stuff I did this week as well as update the current version.

Created a (I think) nice logo for PHPH1. Did some UI work as well as some more mobile testing. Just in case somebody wants to know I test mobile with the “Responsive Viewer” plugin for chrome and it allows me to see what the sit e looks like on mobile on several different phone models.

Added hmyv2_sendRawStakingTransaction and hmyv2_sendRawTransaction despite no help from harmony so far. Will just validate for hex characters for now and worry about possibility of length, formatting later. Verified all available methods are written including one not in the harmony docs. I believe there may be a few more if I spent the time to dig into eth2/EVM specs. I need to know more about the raw transactions hex string. Added phph1_reset so a person can write multiple methods into a single page using a single class handle. Created a validation method for transaction index, wrote some doc block stuff for newly added methods.

Iterated through the methods and fixed up almost all documentation in the inputs/outputs dropdowns. If there was nothing in the official documentation, I searched them out and found the proper definitions. Harmony team needs to go through all of these because they are correct and verifiable in the Explorer interface of PHPH1. This information could be used within the Postman docs for Harmony’s API as the Postman docs have a LOT of errors compared to what I have. As a note, I would be slow moving because I have limited familiarity with Postman but if Harmony would like me to do it when this is done I would be happy to do it for a reasonable bounty.

I’d also like to note while finishing this project up, I have a (what I and a couple others I have talked to think) is an AWESOME idea for a project for the Harmony ecosystem and not just devs. More on this later… I believe in proving I can make it happen first. I will also need to contact Covalent about a possible partnership somehow.

Once again… It is time for people to test and verify and critique this. We are winding down and I believe the project is almost over. I’ll have detailed reporting for when we get there.

I will have the latest package on Github today at some point. Things are extremely busy on this end right now with my business and I am working on a big project there while also doing this.

Cheers everyone!

I am getting very close to finished with this project and need to know the process for finishing it off please. Thanks!

1 Like

Report be a few days late. I have made some major changes and want to finish them to a good point before I report so I can have everything uploaded and package created. We are getting very close to finished but this last minute change extended the readiness time a little bit. I have to rewrite and expand on the documentation a bit due to this as well. I thought I was going to come in short but now I will be definitely coming in over with plans for more new features beyond reaching the goals in the bounty. Cheers! Also, I have tested PHPH1 in a POC for another project I am about to start on when this is finished and it works well so far!

One of the big things on my mind for the future is an add-on setup for queueing jobs via SQL DB in order to manage server load.

WEEKLY REPORT: 2022-5-17

Not a ton to write here but a BIG change.

I am in the process of adding the ability to use POST requests to PHPH1. The big deal about this is when using POST the server it is being hosted on will not be logging the request data like it does with GET requests. Also POST requests won’t cache the output nor hold the form data in browser history like a GET request will. it isn’t a HUGE security risk but I felt it should be the dev’s choice which to use.

In doing this, it has led me to building in error responses in JSON to respond to bad requests and API error messages from the API node. All in all this whole thing has pushed me to making the entire project more robust and flexible.

I have to figure out something as far as putting the POST javascript code in the method outputs as it has quite a bit of code and will muddy up the page.

Coming up on the end of this project… I have asked multiple times in multiple places about how we go about closing this out so when I am ready I can move forward in a proper fashion with no responses. Anyone looking at these updates at all?

Cheers!

2 Likes

Hey folks… does anyone look at these bounties anymore? I’ve worked very hard on completing my promised results, and very close, have asked the same question multiple times over multiple weeks with zero response. I’m not trying to spread FUD but this lack of communication and project monitoring is REALLY not looking good for the project. When we enter an agreement for these bounties, the is an inherent responsibility on both ends to communicate as the work gets done. I have consistently done my part as I have worked. Should I not expect the same from the Harmony end? Let’s move on this so I have the confidence in the Harmony project to built my next project on this blockchain. The project is already in the works and I think it will bring a HUGE positive change to the Harmony ecosystem.

Also… If you need somebody to handle watching over the approved bounty progress, HIRE ME. I’ll do it and stay on top of it like you could never imagine.

My Skills:

AAS Networking
BS IT&D
20+ years of Linux admin experience
10+ years of custom PHP application development
I run my own small IT company, my hours are mostly flexible, I work remote 90%+ of the time already
I can read code from almost any programming language and understand what it does 80% of the time
Mature and responsible 49 year old.

HIRE ME to watch over the bounty projects, you won’t regret it!

2 Likes