Simple. The Theta community is awesome!! On a side note, however, one day my Theta Edge Node was effectively down - no votes/ broadcasts and no peers - without my knowledge, and the most I could do was search my wallet in the explorer and hope that randomness was responsible for no rewards over an extended period. As the reward-less period extended further I sat at the node hoping to see if I was overlooking anything. Finally I realized the node was 'submitting proof of uptime' but there were no peers and eventually I restarted it. There was also an instance where a node I could not check on as easily was down for many days without my knowing. I ultimately decided to work on a tool that would allow me to view current and past stats on my edge node's uptime. At last, I thought the community may perhaps appreciate this tool as well, so this hackathon entry is primarily so that the community knows it exists. I am also very interested in IoT, and the time series nature of the edge node uptime logs served as added motivation.

What it does

At its core EdgeStats provides near real-time statistics on Theta Edge Node uptime votes/ broadcasts and peers. An edge node must be connected to EdgeStats to enable the real time stats, however, as the EdgeStats server gets its data directly from the EdgeStats clients.

How we built it

EdgeStats comprises three components - client, server, and web ui - which work together to provide edge node uptime statistics. In particular, the EdgeStats client while on, simply watches an edge node's log file; scans the logs as they are created; filters the logs relevant to uptime and peers; sends relevant uptime data to the EdgeStats server/ database; and finally the web interface displays the edge node uptime stats.

Challenges we ran into

There were a few challenges. The first was attempting to understanding how the edge node really works and the edge node log generating process. Overcoming this challenge involved sampling multiple 'log.old' log files, categorizing the generated logs, and deciding which were relevant to an edge node's uptime. The second challenge involved mapping the various filters and sub-filters of each of the generated log categories to the data objects relevant to uptime. With the logs filtered to data objects, all that remained was to send to a server/ database and build a web interface. The server was for the most part straightforward, however, it involved more work than expected as I opted to go for an embedded database so as to have as few components as possible, which will hopefully make it simpler to run a private EdgeStats setup, i.e. no database config, etc. As a logical person the interface is always a challenge, but I believe the submitted version serves its purpose well.

Accomplishments that we're proud of

I am generally proud that I was able to complete this project as it is something that I use personally and I hope that the community will benefit from it as well. I view my edge nodes as important to both myself and the Theta Edge Network, and this tool allows me to check the stats/ status of my edges node remotely. There was once a time where I would sit at my edge node or view the explorer and attempt to infer whether the node missed any blocks. Now I just check EdgeStats.

What we learned

I learned a lot concerning how the edge node and edge network works. Also, as this is my first hackathon and community project, I learned a great deal about packaging software and structuring code so that it is somewhat presentable. Finally, I learned more about time series databases and IoT related things - think of the edge node as an IoT sensor device 🤔...

What's next for EdgeStats

Following the launch of EdgeStats, I hope to work with community artists/ designers to create Proof-of-Uptime NFTs (monthly, annually, etc.) to be awarded to edge nodes connected to EdgeStats that achieve commendable uptime statistics. I also intend to keep working on EdgeStats as the edge node and edge network expand their features and use cases - there will be more relevant edge node stats to collect that EdgeStats intends to make available to the community.

Built With

+ 4 more
Share this project: