create account

clique by sigmoid

View this thread on: hive.blogpeakd.comecency.com
· @sigmoid ·
clique
Ethereum PoA 합의 알고리즘은 문서가 부족하다.
코드를 분석하면서, 간단한 흐름도를 작성해 보았다.

PoA이기 때문에 authority라는 block producer리스트를 관리한다.
이 리스트는 투표를 통해 업데이트 할수 있고, 초기에 최소 1개의 프로듀서가 설정되어 있어야 한다.


생성자의 입장에서
기본적으로 마이닝 쓰레드는 계속 동작하지만, 내 순서가 아니기때문에 최종 블록이 생성되지 않는다. 내순서가 되면, 블록의 헤더를 생성하게 되는데 부모의 시간 + 나의 시간이 duration보다 작으면 wait을 호출하여 헤더 생성을 잠시 멈추는 방식으로  block duration을 조절한다.
이 후 블록이 Finalize되고 bloadcasting 된다.

수신자의 입장에서는 블록의 서명자가 authority리스트에 있으면 블록을 검증하고 추가한다.
투표내용이 있다면 수집하여 과반수 이상의 투표가 집계되면 인증자 리스트를 업데이트 한다.


![도표1.png](https://cdn.steemitimages.com/DQmQyAFvP2VmjtHpnp7hu3bj67ZYYsP4bRec57C7Mw7Gpo4/%EB%8F%84%ED%91%9C1.png)
👍  ,
properties (23)
authorsigmoid
permlinkclique
categoryclique
json_metadata{"tags":["clique"],"image":["https://cdn.steemitimages.com/DQmQyAFvP2VmjtHpnp7hu3bj67ZYYsP4bRec57C7Mw7Gpo4/%EB%8F%84%ED%91%9C1.png"],"app":"steemit/0.1","format":"markdown"}
created2019-04-20 03:55:09
last_update2019-04-20 03:55:09
depth0
children1
last_payout2019-04-27 03:55:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length597
author_reputation643,977,730,212
root_titleclique
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id83,417,765
net_rshares516,629,741
author_curate_reward""
vote details (2)
@steemitboard ·
Congratulations @sigmoid! You received a personal award!

<table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@sigmoid/birthday1.png</td><td>Happy Birthday! - You are on the Steem blockchain for 1 year!</td></tr></table>

<sub>_You can view [your badges on your Steem Board](https://steemitboard.com/@sigmoid) and compare to others on the [Steem Ranking](http://steemitboard.com/ranking/index.php?name=sigmoid)_</sub>


**Do not miss the last post from @steemitboard:**
<table><tr><td><a href="https://steemit.com/steemitboard/@steemitboard/steemitboard-witness-update-2019-05"><img src="https://steemitimages.com/64x128/http://i.cubeupload.com/7CiQEO.png"></a></td><td><a href="https://steemit.com/steemitboard/@steemitboard/steemitboard-witness-update-2019-05">SteemitBoard - Witness Update</a></td></tr></table>

###### [Vote for @Steemitboard as a witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1) to get one more award and increased upvotes!
properties (22)
authorsteemitboard
permlinksteemitboard-notify-sigmoid-20190512t061053000z
categoryclique
json_metadata{"image":["https://steemitboard.com/img/notify.png"]}
created2019-05-12 06:10:54
last_update2019-05-12 06:10:54
depth1
children0
last_payout2019-05-19 06:10:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,010
author_reputation38,975,615,169,260
root_titleclique
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id84,703,391
net_rshares0