Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/designhhuang/blockchain
一个简单的python编写的区块链
https://github.com/designhhuang/blockchain
blockchain flask http python3
Last synced: 6 days ago
JSON representation
一个简单的python编写的区块链
- Host: GitHub
- URL: https://github.com/designhhuang/blockchain
- Owner: DesignHhuang
- Created: 2018-07-17T06:53:09.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-07-17T07:15:52.000Z (over 6 years ago)
- Last Synced: 2024-11-07T14:33:27.111Z (about 2 months ago)
- Topics: blockchain, flask, http, python3
- Language: Python
- Size: 1.95 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# blockchain
一个简单的python编写的区块链简单介绍:
- 此例子中使用的PoW比较简单:找到一个数字,使得它与前一个区块的 proof 拼接成的字符串的 Hash 值以 4 个零开头(一般区块链中可能会要求有30个零,计算量就很大很大了)。
- 一致性问题解决:默认找网络上最长的链。例子中的地址为节点的地址,自行配置(可使用postman测试)
### 1.挖矿接口(http://192.168.22.135:5000/mine)
### 2.创建新交易的接口(http://192.168.22.135:5000/transactions/new)
### 3.查看区块链的接口(http://192.168.22.135:5000/chain)
### 4.注册节点接口(http://192.168.22.135:5000/nodes/register)
### 5.处理区块链节点数据一致性接口(http://192.168.22.135:5000/nodes/resolve)