Use golang to reproduce the basic blockchain

Blockchain_with_Go

Use golang to reproduce the basic blockchain

Update Panel

  • V0.1 No transactions but noly blocks are allowed.
  • V0.5 Transactions are now supported. One block can have multiple transactions.
  • V1.0 The UTXO module has been just supported. Users can now publish transactions to reallocate the coins.
  • V1.1 Wallet module has been added, but it is not fully supported by the blockchain yet.
  • V1.2 Now you can use the wallet address to make TxOutputs. Also you can use wallet address to refer the transactions.
  • V1.5 There is a big jump in this version. Wallet module can be fully supported (Signature and Validation has been done), and even an API for the future mining functionality has been created.
  • V1.6 Now supports the Merkle Tree and SPV.
  • V1.7 Add UTXO sets to accelerate finding the spendable outputs of a wallet instead of go through the whole blockchain.

Insight Future

Time is now to go straight forward to construct the P2P network step by step!

  • Write server and client programs. It should follow the P2P protocal and seperate the nodes into full nodes and others.
  • Activate the mining mechanism of the network.
  • Realize the self-adaption of difficulty (using RPC).

How to test and use

Recently I have made a .bat to test my program. If you want to know how to learn from this half-way program, just run the test.bat and see what I have done at this stage.

Requirements

module github.com/leo201313/Blockchain_with_Go

go 1.17

require github.com/dgraph-io/badger v1.6.2

require (
    github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96 // indirect
    github.com/cespare/xxhash v1.1.0 // indirect
    github.com/dgraph-io/ristretto v0.0.2 // indirect
    github.com/dustin/go-humanize v1.0.0 // indirect
    github.com/golang/protobuf v1.3.1 // indirect
    github.com/mr-tron/base58 v1.2.0
    github.com/pkg/errors v0.8.1 // indirect
    golang.org/x/crypto v0.0.0-20210915214749-c084706c2272
    golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 // indirect
    golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 // indirect
)
Similar Resources

Creating a blockchain in golang

blockchain-in-go Creating a blockchain in go Disclaimer : This code base is sour

Dec 26, 2021

Mini Blockchain Implementation In Golang Inspired by Go-Ethereum🚀

JP Blockchain 🚀 🚀 Mini Blockchain Implementation In Golang Inspired by Go Ethereum & BlockChain Bar by Lukas (Web3Coach) Features Working Core Compo

Aug 8, 2022

DERO Homomorphic Encryption Blockchain Protocol

DERO Homomorphic Encryption Blockchain Protocol

Homomorphic encryption is a form of encryption allowing one to perform calculations on encrypted data without decrypting it first. The result of the computation is in an encrypted form, when decrypted the output is the same as if the operations had been performed on the unencrypted data.

Dec 27, 2022

DERO: Secure, Anonymous Blockchain with Smart Contracts. Subscribe to Dero announcements by sending mail to [email protected] with subject: subscribe announcements

DERO: Secure, Anonymous Blockchain with Smart Contracts.  Subscribe to Dero announcements by sending mail to lists@dero.io with subject: subscribe announcements

Welcome to the Dero Project DERO News Forum Wiki Explorer Source Twitter Discord Github Stats WebWallet Medium Table of Contents ABOUT DERO PROJECT DE

Dec 7, 2022

run ABI encoded data against the ethereum blockchain

Run EVM code against a database at a certain block height - Note You can't run this against a running geth node - because that would share the db and

Nov 11, 2021

Go module for the Cardano Blockchain

cardano-go cardano-go is both a library for creating go applicactions that interact with the Cardano Blockchain as well as a CLI to manage Cardano Wal

Dec 1, 2022

Frontier Chain is a blockchain application built using Cosmos SDK and Tendermint.

Frontier Chain Frontier Chain is a blockchain application built using Cosmos SDK and Tendermint. Setup Initialize the blockchain with one validator no

Jul 12, 2022

Gochain is a Blockchain written in go

Gochain is a Blockchain written in go

gochain gochain is a proof-of-work blockchain written in go. Features Proof-Of-Work Persistence CLI Transactions Addresses Merkle Tree Network How to

Jul 14, 2022

LINE Financial Blockchain forked from gaia

LFB(LINE Financial Blockchain) This repository hosts LFB(LINE Financial Blockchain). This repository is forked from gaia at 2021-03-15. LFB is a mainn

Dec 21, 2022
A basic implementation of Blockchain

GoChain A basic implementation of blockchain in go. Building $ cd cmd $ go build -o gochain Usage Starting a node You can start as many nodes as you

Nov 26, 2022
A basic blockchain implementation written in Go

Blockchain Having fun implementing a blockchain using Golang. Using Minimum Viable Blockchain Keys The Blockchain uses ECDSA (224 bits) keys. When a u

Dec 29, 2022
A simplified blockchain implementation in Golang

A simplified blockchain implementation in Golang

Dec 31, 2022
chia-blockchain some function implement in golang

gochia chia-blockchain some function implement in golang Package bls-signatures implement blspy Usage? Now we can use it to generate plot memo and id,

May 27, 2022
Implementing blockchain using Golang ✔️
 Implementing blockchain using Golang ✔️

Implementing blockchain using Golang ✔️ Keys The Blockchain uses ECDSA (224 bits) keys.

May 24, 2022
Stackledger: a new blockchain written in golang

StackLedger Stackledger is a new blockchain. It is written in golang and uses a novel networking stack built from two primitives: channels and extensi

Feb 21, 2022
goBlockChain is a version of the classic blockChain with POW algorithms written in golang.

goBlockChain is a version of the classic blockChain with POW algorithms written in golang. May come in handy when learning about this technology.

Oct 31, 2021
The Cosmos-SDK is a framework for building blockchain applications in Golang.
The Cosmos-SDK is a framework for building blockchain applications in Golang.

The Cosmos-SDK is a framework for building blockchain applications in Golang. It is being used to build Gaia, the first implementation of the Cosmos Hub.

Nov 26, 2021
Pasaje de código de JS a Golang. Ejemplo de funcionamiento de una blockchain simple.
Pasaje de código de JS a Golang. Ejemplo de funcionamiento de una blockchain simple.

blockchain-dummy-test Pasaje de código de JS a Golang. Ejemplo de funcionamiento de una blockchain simple. Fuente: https://medium.com/geekculture/bloc

Oct 3, 2022
Implementation of blockchain using golang

go-blockchain Basic implementation of blockchain using golang. Initialize Blockc

Feb 18, 2022