Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
share
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张振华
share
Commits
05241564
Commit
05241564
authored
May 05, 2019
by
张振华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
54d54509
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
7 deletions
+26
-7
DPOS共识算法介绍.md
dpos共识/DPOS共识算法介绍.md
+26
-7
No files found.
dpos共识/DPOS共识算法介绍.md
View file @
05241564
...
...
@@ -16,15 +16,20 @@ PoS 试图解决在 PoW 中大量资源被浪费的缺点,受到了广泛关
## 2 POS共识机制的优点
1.
省资源:不需要挖矿,不需要大量耗费电力和能源。
2.
更加去中心化:相对于比特币等PoW类型的加密货币,更加去中心化,相比PoW算法的51%算力攻击,PoS需要购买51%的货币,成本更高,没有攻击意义。
3.
避免通货紧缩:PoS机制的加密货币按一定的年利率新增货币,可以有效避免紧缩出现,保持基本稳定。
1.
省资源:
不需要挖矿,不需要大量耗费电力和能源。
2.
更加去中心化:
相对于比特币等PoW类型的加密货币,更加去中心化,相比PoW算法的51%算力攻击,PoS需要购买51%的货币,成本更高,没有攻击意义。
3.
避免通货紧缩:
PoS机制的加密货币按一定的年利率新增货币,可以有效避免紧缩出现,保持基本稳定。
## 3 POS共识机制的缺点
1.
开发者作恶:纯PoS机制的加密货币,只能通过IPO的方式发行,这就导致“少数人”(通常是开发者)获得大量成本极低的加密货币,在利益面前,很难保证他们不会大量抛售。
1.
开发者作恶:
纯PoS机制的加密货币,只能通过IPO的方式发行,这就导致“少数人”(通常是开发者)获得大量成本极低的加密货币,在利益面前,很难保证他们不会大量抛售。
2.
信用度低: PoS机制的加密货币,信用基础不够牢固。 为解决这个问题,很多采用PoW+PoS的双重机制,通过PoW挖矿发行加密货币,使用PoS维护网络稳定。或者采用DPoS机制,通过社区选举的方式,增强信任。
2.
信用度低:
PoS机制的加密货币,信用基础不够牢固。 为解决这个问题,很多采用PoW+PoS的双重机制,通过PoW挖矿发行加密货币,使用PoS维护网络稳定。或者采用DPoS机制,通过社区选举的方式,增强信任。
# 二、传统DPOS共识机制
...
...
@@ -250,8 +255,22 @@ Period切换时,要对已生成区块确认,并进行节点重新选举,
}
}
```
3.
chain33.test.toml
```
json
[
consensus.sub.dpos
]
genesis=
"14KEKbYtKKQm4wMthSK9J4La4nAiidGozt"
genesisBlockTime=
1514533394
timeoutCheckConnections=
1000
timeoutVoting=
3000
timeoutWaitNotify=
2000
createEmptyBlocks=
false
createEmptyBlocksInterval=
0
validatorNodes=
[
"127.0.0.1:46656"
]
blockInterval=
3
continueBlockNum=
12
isValidator=
true
```
## 4 代码配合时序
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment