loading...
Cover image for πŸš€ Dev Research Project!

πŸš€ Dev Research Project!

yucked profile image Yucked ・2 min read

Info!

In my fall 2019 semester (meant to be my last but became 2nd last), I applied for Undergrad research and worked on researching how blockchain works. My part of the research was to implement a simple yet functional blockchain that demonstrates the basics of it. It was a definitely a challenge considering I was taking 18 credits and had little room for another semester long project but worth it!

Demo Link

The demo link can be found on http://localhost:5000/! You will notice the webpage will say Unable to connect :( and you read that right! You will need to fork the project from GitHub and follow the setup process to run it: https://github.com/Yucked/Breadloaf#%EF%B8%8F-setup

Link to Code

The code can be found on GitHub, it is by no means a finished or polished product.

GitHub logo Yucked / Breadloaf

🍞 - Breadloaf is a .NET implementation of a Blockchain on Blazor server.


🍞 - Breadloaf is a .NET implementation of a Blockchain on Blazor server


πŸ“š BACKGROUND:

This project is part of my undergrad research I did at my college on Discovering Blockchain Technology. To demonstrate how Blockchain works, I decided to build an application with these capabilities in mind:

  • Is console based
  • Has some sort of UI (Web Pages)
  • Fast & easy to understand
  • Cross platform

Ideally, ASP.NET Core would have done it but Blazor is something new that I've been wanting to try out for some time but the websocket aspect of it poses a problem to have a fully functional Blockchain application.

βš—οΈ SETUP:

  • To run this project make sure you have .NET Core Hosting Bundle installed on your machine .NET Core 3.1 can be downloaded from here: DOWNLOAD

  • Once installed, open a command prompt or powershell in the project directory and run dotnet run to run the…

How I built it?

You ask an amazing question, wizard! It took me sometime to decide on what language/framework I wanted to use. For language it was either going to be C# or Python but since I'm a sucker for C# so yeah... that was a no brainer for me.

Next up was the application design and framework. Initially, I went with a simple .NET Core console application but once I realized I was going to be presenting to an audience that may not understand what my console is outputting, it became crucial for me to have some sort of visuals in my application.

Just around that time, Blazor was popping up and I thought hmmmm. Yes, all it took was a hmmmm and I moved everything to Blazor.

So, now my project breakdown was as follow:
Breadloaf.Models: Everything regarding my "blockchain".
Breadloaf: Where Blazor and Models come together in harmony.
tests: Testing models to make sure they do what I need them to do.

Blazor is essentially ASP.NET Core MVC template with additional stuff added.

Alt Text

So anyway, I started blasting. Bulma came to the rescue and I started designing.

The main page with my research abstract.
Alt Text

Explaining what a block is and let's you generate blocks.
Alt Text

Visualizing the whole chain.
Alt Text

I was able to visualize my project and I'm proud of it! The only thing left was to create some sort of P2P and that's where everything went downhill. Since, Blazor supports SignalR and encourages using that, I just wanted plain WebSocket's without much hassle.

Luckily, at the time of writing this I have figured out a way to use ConnectEndpointRouteBuilderExtensions#MapConnectionHandler<T>(). Perhaps, I'll get back to finishing it once I finish rest of my never ending projects unless... I come up with more project ideas and none of them can be finished 😩.

I'm not exactly sure why Azure pipelines never built my projectπŸ€”πŸ€”.

Final Note:

Alt Text

Thank you for reading!

Posted on May 20 by:

yucked profile

Yucked

@yucked

ERR: 🧠 Think organ malfunctioning.

Discussion

markdown guide