Skip to content

AkhilSharma90/GO-proof-of-work-blockchain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Few days back, we created a very simple blockchain on my youtube channel. It demonstrated what a blockchain is really well, but blockchains need some consensus mechanism.

In this example, I have shown a very simple POW consensus mechanism.

Uses GO for the same.

To run -

go run main.go

Open http://localhost:8080 in a browser and you will see one block.

To add blocks, you send a POST request to localhost:8080 using CURL. Send a BPM like {"BPM":75} in the body of this post request.

curl -X POST -H "Content-Type: application/json" -d '{"name": "75"}'

Your terminal will start performing the work.

Then hit the same terminal from a browser and you will an added block. Voila!

About

Created a simple Proof Of Work blockchain with GO.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published