Blockchain~ish

Posted on Jun 5, 2021

This project is being built to ground my basic knowledge of crypto and the Blockchain. It is not necessarily practical because it is based off the assumptions that:

  • Every node that wants to contribute, owns a thermometer.
  • No node wants to replicate the Google Maps Big Data hack in this context, in the event that the Practical Improvements explained below are implemented.

How it works locally

  • Clone the repo git clone https://github.com/youthtrouble/Blockchain-ish
  • In the terminal, run the command go run cmd/main.go
    • This initialises a genesis block on the blockchain, this blockchain can then be updated by the other nodes on the TCP network.
  • Open as many terminals as you please and then connect them to the TCP network by running the command nc localost 8000 The port 8000 can be changed by updating the .env file :).
  • Fill the prompt for the Temperature Info using the format Temperature(in degrees celsius), Location.
    • The prompt generates a new Block based on the input and adds it to the Blockchain on the main terminal.
    • In 30-second Intervals, these other nodes(terminals) are updated with a verified copy of the Blockchain.

Practical Improvements

In the event that the aforementioned assumptions are true in the real-world, here are some ideas that could make this project practical:

  • Sorting and analysis: The data could be sorted and analyzed over a specific time period using practical weather optimized Algorithms to find the median Temperature per Location.
  • Updating an actual production Application per time period.

Example

Screenshot from 2021-06-18 01-05-44

Checkout the GitHub Repository, Suggest improvements if any, I’m open to ideas ;).