This project implements a PoW-based blockchain and simulates the existence of a group of fork attack attackers.
Final project for SJTU IS416.
See Final Lab BlockChain-PoW.md
for details. (Chinese avalable only)
Open a terminal, enter:
go build
.pow
If you want to change the output of the program, modify the handler
function of the class monitor under the node.go
file:
func (m *Monitor) handler(msg Block)
There are still some problems with the program, such as
- The verification function does not verify the difficulty of the blockchain
- The adjustment accuracy of the difficulty value is not enough
If you find any problem, welcome to contact me.
If you think this project is helpful to you, please click star, it is very useful to me. 如果你觉得本项目对你有所帮助,欢迎点star,这对我很有用。
Note: This project is just a final assignment of a school curriculum, and there are many things that are not good enough. It is only for novice learning and schoolmates' reference. It is not recommended to use it in any of your projects.