Skip to content

Commit

Permalink
Add comments for folders and files 为祖国母亲庆生而提交的代码
Browse files Browse the repository at this point in the history
  • Loading branch information
codrush committed Oct 3, 2018
1 parent 5c785c7 commit 6437a30
Show file tree
Hide file tree
Showing 20 changed files with 110 additions and 13 deletions.
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
# tinychain
A mini blockchain implementation in C++14
A mini blockchain implementation in C++14 构建迷你区块链——《深入浅出区块链》

构建迷你区块链——《深入浅出区块链》

## 简要说明 Smmary
## 简要说明 INTRODUNCTION
tinychain是一个业余的项目,旨在为大家提供微型的简单易懂的供学习的代码。
以下是涉及的一些基础技术:
* 加密库 - RSA
* 本地持久化存储 - sqlite3
* P2P网络 - 暂定gossip
* 网络文本协议 - JSON-RPC
* HTTP Server - mongoose
* 正在选取中...

## toolchain
## 锻造工具 Toolchain
* gcc/clang support C++14
* boost 1.56+ (datetime)
* cmake
* git
* sqlite3 (apt-get install libsqlite3-dev / brew install sqlite3)
* cryptopp (apt-get install libcryptopp-dev / brew install cryptopp)

## build
## 构建 Build
On workpath of tinychain:
```
$ mkdir -p build && cd build
Expand All @@ -36,7 +35,7 @@ Specifically, build on Windows (example):
```
Open tinychain.sln under build subfolder with Visual Studio to compile.

## run
## 运行 Run
On workpath of tinychain:
```
$ cd build/bin
Expand All @@ -52,15 +51,15 @@ Specifically, run on Windows (example):
> tinychain.exe
```

## 开发路径TODO-LIST
## 开发路径 TODO-LIST
1. 基础代码 - (DONE, to be improved)
1. PoW 挖矿代码 - (DONE, to be improved)
1. 加密与账户模型 (DOING)
1. P2P网络- (TODO)
1. 命令行与Web动态演示 - (DOING)
1. 共识可替换为PoS/DPoS etc - (TODO)
1. 共识可替换为PoS/DPoS/PBFT etc - (TODO)

## 仓库介绍
## 仓库介绍 Source code view
* cli-tinychain文件夹:命令行
* contrib文件夹:json与mongoose工具
* etc文件夹:tinychain演示网页等
Expand Down
9 changes: 8 additions & 1 deletion contrib/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
open source code lib here
# tinychain
A mini blockchain implementation in C++14 构建迷你区块链——《深入浅出区块链》

## 说明 INTRODUNCTION
json - 废弃版本
jsoncpp - 通过源代码集成的jsoncpp
mongoose - 通过源代码集成的开源微型嵌入式HTTP Server
sqlite - sqlite3官方接口
10 changes: 8 additions & 2 deletions include/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
MODULES
--------------
# tinychain
A mini blockchain implementation in C++14 构建迷你区块链——《深入浅出区块链》

## 说明 INTRODUNCTION
metaverse - 从元界移植过来的代码,提供HTTP Wrapper
mgbubble.hpp - 元界部分的头文件包含
sqlite3pp - 一个sqlite3的第三方C++11 wrapper
tinychain - 核心代码
5 changes: 5 additions & 0 deletions include/tinychain/blockchain.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Part of:
* Comments:
*
**/
#pragma once
#include <queue>
#include <tinychain/tinychain.hpp>
Expand Down
5 changes: 5 additions & 0 deletions include/tinychain/commands.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Part of:
* Comments:
*
**/
#pragma once
#include <jsoncpp/json/json.h>
#include <tinychain/tinychain.hpp>
Expand Down
5 changes: 5 additions & 0 deletions include/tinychain/consensus.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Part of:
* Comments:
*
**/
#pragma once
#include <tinychain/tinychain.hpp>
#include <tinychain/blockchain.hpp>
Expand Down
5 changes: 5 additions & 0 deletions include/tinychain/database.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Part of:
* Comments:
*
**/
#pragma once
#include <algorithm>
#include <tinychain/tinychain.hpp>
Expand Down
5 changes: 5 additions & 0 deletions include/tinychain/logging.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Part of:
* Comments:
*
**/
/**
* Copyright (c) 2011-2015 libbitcoin developers (see AUTHORS)
* Copyright (c) 2016-2018 metaverse core developers (see MVS-AUTHORS)
Expand Down
5 changes: 5 additions & 0 deletions include/tinychain/network.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Part of:
* Comments:
*
**/
#pragma once
#include <tinychain/tinychain.hpp>

Expand Down
5 changes: 5 additions & 0 deletions include/tinychain/node.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Part of:
* Comments:
*
**/
#pragma once
#include <thread>
#include <tinychain/tinychain.hpp>
Expand Down
5 changes: 5 additions & 0 deletions include/tinychain/sha256.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Part of:
* Comments:
*
**/
#pragma once
#include <string>

Expand Down
5 changes: 5 additions & 0 deletions include/tinychain/tinychain.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Part of:
* Comments:
*
**/
#pragma once

#include <tinychain/logging.hpp>
Expand Down
5 changes: 5 additions & 0 deletions src/blockchain.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Part of:
* Comments:
*
**/
#include <tinychain/tinychain.hpp>
#include <tinychain/blockchain.hpp>

Expand Down
5 changes: 5 additions & 0 deletions src/commands.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Part of:
* Comments:
*
**/
#include <tinychain/tinychain.hpp>
#include <tinychain/commands.hpp>

Expand Down
5 changes: 5 additions & 0 deletions src/consensus.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Part of:
* Comments:
*
**/
#include <algorithm>
#include <tinychain/tinychain.hpp>
#include <tinychain/consensus.hpp>
Expand Down
5 changes: 5 additions & 0 deletions src/database.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Part of:
* Comments:
*
**/
#include <tinychain/tinychain.hpp>
#include <tinychain/database.hpp>

Expand Down
5 changes: 5 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Part of:
* Comments:
*
**/
#include <tinychain/tinychain.hpp>
#include <tinychain/node.hpp>
#include <metaverse/mgbubble.hpp>
Expand Down
5 changes: 5 additions & 0 deletions src/network.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Part of:
* Comments:
*
**/
#include <tinychain/tinychain.hpp>
#include <tinychain/network.hpp>
#include <mongoose/mongoose.h>
Expand Down
5 changes: 5 additions & 0 deletions src/node.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Part of:
* Comments:
*
**/
#include <tinychain/tinychain.hpp>
#include <tinychain/node.hpp>

Expand Down
5 changes: 5 additions & 0 deletions src/tinychain.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Part of:
* Comments:
*
**/
#include <tinychain/tinychain.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>

Expand Down

0 comments on commit 6437a30

Please sign in to comment.