2023-03-30
1804
#blockchain#go
Solomon Esenyi
84441
Mar 30, 2023 â‹… 6 min read

How to build a blockchain with Go

Solomon Esenyi Python/Golang developer and Technical Writer with a passion for open-source, cryptography, and serverless technologies.

Recent posts:

Build A Micro-Frontend Application With React

Build a micro-frontend application with React

Learn to build scalable micro-frontend applications using React, discussing their advantages over monolithic frontend applications.

Harsh Patel
Nov 4, 2024 â‹… 8 min read
Building A Real-Time Chat App Using Laravel Reverb And Vue

Building a real-time chat app using Laravel Reverb and Vue

Build a fully functional, real-time chat application using Laravel Reverb’s backend and Vue’s reactive frontend.

Rosario De Chiara
Nov 4, 2024 â‹… 12 min read
Solving The Node.js Console.Time Is Not A Function Error

Solving the Node.js console.time is not a function error

Explore the two variants of the `console.time is not a function` error, their possible causes, and how to debug.

Joseph Mawa
Nov 1, 2024 â‹… 6 min read
Why jQuery 4 Is A Good Reminder To Stop Using jQuery

Why jQuery 4 is a good reminder to stop using jQuery

jQuery 4 proves that jQuery’s time is over for web developers. Here are some ways to avoid jQuery and decrease your web bundle size.

Shalitha Suranga
Oct 31, 2024 â‹… 11 min read
View all posts

4 Replies to "How to build a blockchain with Go"

  1. With the above code, I’m getting prevHash : 30 for the first block while printing the block data. It should be empty right?

    I’m using the below function to print the data of the block :

    func printBlockInformation(block Block) {
    fmt.Printf(“\ttime: %s\n”, block.timestamp.String())
    fmt.Printf(“\tprevHash: %x\n”, block.previousHash)
    fmt.Printf(“\tHash: %x\n”, block.hash)

    }

    Can someone please help?

  2. What is the point of the proof of work step? Why can’t you simply calculate the hash once, and be done? Why do you have to waste CPU cycles on a loop, calculating millions of hashes just to prove that you did work? What is the practical point of the proof of work step?

Leave a Reply