Daniel Van Flymen이 오픈소스로 블록체인 프로젝트를 만든 이후 많은 사람들이 그의 글을 기반으로 튜토리얼들을 올렸습니다. [Learn Blockchains by Building One: The fastest way to learn how Blockchains work is to build one](https://hackernoon.com/learn-blockchains-by-building-one-117428612f46) [dvf/blockchain](https://github.com/dvf/blockchain) [그의 오픈소스 프로젝트에 참가하는 개발자들을 위한 슬랙 단톡](https://nyc-crypto.slack.com/) 그리고 이것은 그의 오픈소스 프로젝트로 저는 자바스크립트로 포팅하는 작업(part 1)을 진행 후 현재 transaction verification을 위해 asymetric cryptography로 만들어지는 디지털 서명을 이용한 protocol을 pyNaCl으로 개발해보면서 part2에 기여중입니다. 그런데... [[블록체인] 파이썬으로 블록체인을 구현해보자 - 1](https://blog.naver.com/PostView.nhn?blogId=pjt3591oo&logNo=221181592127&redirect=Dlog&widgetTypeCall=true) [golbin/g-coin](https://github.com/golbin/g-coin) [골빈해커님의 g-coin 분석 1부](https://tykimos.github.io/2018/01/21/g_coin_analysis_part1/) [골빈해커님의 g-coin 분석 2부](https://tykimos.github.io/2018/01/21/g_coin_analysis_part2/) - 골빈해커님의 g-coin은 암호화폐라고 부르기 애매한 부분이 있습니다. 바로 채굴을 서버에서 하고 보상도 주지 않는다는 점입니다. 김태영님께서 언급한 마이너에 대한 블록은 그저 블록체인의 보안을 지켜주는 previous_hash를 위한 genesis block입니다. --- 위 튜토리얼들에는 여러가지 아쉬운 점들이 있습니다. - **heartbeat loop이 없습니다.** 매번 REST API 서버에서 /mine 으로 request처리하는 것으로 마이닝이 되긴 하지만 만약 request를 안 보내면 소는 누가.... - **'previous_chain' property를 다루지 않습니다.** 보안에 있어서 블록체인의 **최고 존엄**은 바로 얘입니다. 체인이라는 단어가 얘가 없으면 붙지를 않습니다. 얘가 없으면 consensus과정에서 그냥 가장 체인이 긴 마이닝 노드가 어떻게 거래를 해놨던 간에 맞는 블록체인으로 되어버립니다. - **디지털 서명**을 이용해 transaction을 verify하지 않습니다. 블록을 보낼 때 transaction verification과정에서 체크해봐야할 게 있습니다. 1. 과연 transaction이 **거래자 본인**이 보낸 것인지(**Authentication**) 2. **거래자가 정말 취소 안하고 보낸 것**인지 확인할 수 있는지(**non-repudation**) 3. 전송 도중에 **데이터가 손상**되지는 않았는지(**integrity**) bitcoin은 디지털 서명을 위해 [타원 곡선 암호](https://en.bitcoin.it/wiki/Elliptic_Curve_Digital_Signature_Algorithm)를 사용하고 있습니다. 그래서 해쉬를 돌려서 만드는 거 외에도 api server에 보낼 때 만든 해쉬값을 private key로 encrypt해서 전자 서명을 한 다음 public key랑 같이 넣어서 블록체인 서버에 보냅니다. 그러면 블록체인 서버는 받은 public key를 가지고 전자 서명된 해쉬값을 decrypt할 테고 전송 도중에 데이터가 깨지거나 다른 사람이 이 거래내용을 보내지 않는 한 해독한 해쉬값이 보낸 내용을 해쉬 함수로 돌린 해쉬값과 일치하게 되는 것입니다. # **그리고 사실.... 이 튜토리얼에서 제공한 코드는 완전한 블록체인이 아닙니다.** 아직 part 2 article이 남아있습니다(위와 같이 말한 transaction verification, 나중에 도입될지도 모르는 uPnP protocol). --- 따라서 저는 이번에 제가 전에 글로벌 제주 해커톤에서 블록체인 프로젝트를 통해 같이 뜯어보고 **종합적으로** 설명하고자 합니다.(물론 도중에 피드백 주시면 감사합니다...) 일단 레퍼런스부터 밝히자면 # Reference ![해커톤.jpg](https://steemitimages.com/DQmUv9k4ELNjSuyQErwFN6MbJkJFPGYvrnSMB9Rd7iaPbyG/%E1%84%92%E1%85%A2%E1%84%8F%E1%85%A5%E1%84%90%E1%85%A9%E1%86%AB.jpg ) 저희 팀은 왼쪽에서부터 - [Crystal Chow](https://www.linkedin.com/in/crystal-chow-capm-7a2a0b90/)(PM, 비즈니스 모델) - [강형석](https://www.linkedin.com/in/hyungsuk-kang-5217a7103/)(팀장, 서버 개발) - [김소진]()(일러스트레이터) - [홍승의](https://github.com/zaeval)(Android, 클라이언트 개발) - [정다혜]()(UI/앱 디자인, 일러스트레이터) 로 되어있고요. - [heroku에 올린 블록체인 겸 얼마나 많은 **유저**가 얼마나 많은 **코인**들을 **몇 회** 교환했는지 보여주고 체인도 덤으로 아래에 달려있는 백엔드 웹 앱](http://naturecoin.herokuapp.com/visualize) request나 response는 다른 튜토리얼들이랑 동일합니다. - [안드로이드 지갑 앱](https://github.com/zaeval/Naturecoin/tree/master/muzimuzi) - [그리고 추후에 UN이 개최한 Asia Pacific Low Carbon Lifestyles Challenge에 top 50로 shortlist된 project](https://www.slideshare.net/ssuser27ef07/nature-coin-81741560) 들을 만들었습니다. 일단 기존에 있었던 코드들부터 차근차근 설명해드리도록 하겠습니다. 그럼 시작합니다! # 참고 댓글에 javascript로 배우고 싶은 사람은 알려주세요. javascript로 튜토리얼을 쓰는 게 좋은지, python으로 튜토리얼을 쓰는 게 좋은지 궁금합니다.
post_id | 33,424,669 |
---|---|
author | hskang9 |
permlink | 34zraz |
category | blockchain |
json_metadata | "{"app": "steemit/0.1", "format": "markdown", "links": ["https://hackernoon.com/learn-blockchains-by-building-one-117428612f46", "https://github.com/dvf/blockchain", "https://nyc-crypto.slack.com/", "https://blog.naver.com/PostView.nhn?blogId=pjt3591oo&logNo=221181592127&redirect=Dlog&widgetTypeCall=true", "https://github.com/golbin/g-coin", "https://tykimos.github.io/2018/01/21/g_coin_analysis_part1/", "https://tykimos.github.io/2018/01/21/g_coin_analysis_part2/", "https://en.bitcoin.it/wiki/Elliptic_Curve_Digital_Signature_Algorithm", "https://www.linkedin.com/in/crystal-chow-capm-7a2a0b90/", "https://www.linkedin.com/in/hyungsuk-kang-5217a7103/", "https://github.com/zaeval", "http://naturecoin.herokuapp.com/visualize", "https://github.com/zaeval/Naturecoin/tree/master/muzimuzi", "https://www.slideshare.net/ssuser27ef07/nature-coin-81741560"], "image": ["https://steemitimages.com/DQmUv9k4ELNjSuyQErwFN6MbJkJFPGYvrnSMB9Rd7iaPbyG/%E1%84%92%E1%85%A2%E1%84%8F%E1%85%A5%E1%84%90%E1%85%A9%E1%86%AB.jpg"], "tags": ["blockchain", "cryptocurrency", "tutorial", "kr"]}" |
created | 2018-02-18 04:02:57 |
last_update | 2018-02-18 07:43:33 |
depth | 0 |
children | 7 |
net_rshares | 559,696,938,088 |
last_payout | 2018-02-25 04:02:57 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 2.780 SBD |
curator_payout_value | 0.418 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 3,322 |
author_reputation | 21,654,868,736 |
root_title | "블록체인을 만들어봅시다." |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
centering | 0 | 144,953,713,714 | 7% | ||
hanmomhanda | 0 | 614,503,785 | 100% | ||
tabris | 0 | 406,947,829,001 | 100% | ||
hskang9 | 0 | 0 | 0% | ||
astriker | 0 | 615,320,000 | 100% | ||
hellocrypto | 0 | 0 | 100% | ||
kophoenix3 | 0 | 593,118,543 | 100% | ||
ribai | 0 | 2,845,298,561 | 100% | ||
whalebebe | 0 | 72,694,135 | 2.1% | ||
excepter | 0 | 604,364,091 | 100% | ||
neoteny | 0 | 580,156,901 | 100% | ||
ownyoo | 0 | 521,365,278 | 100% | ||
thewriting | 0 | 1,348,574,079 | 10% |
좋은 프로젝트네요 추천합니다^^
post_id | 33,514,697 |
---|---|
author | ribai |
permlink | re-hskang9-34zraz-20180218t134135974z |
category | blockchain |
json_metadata | "{"app": "steemit/0.1", "tags": ["blockchain"]}" |
created | 2018-02-18 13:41:36 |
last_update | 2018-02-18 13:41:36 |
depth | 1 |
children | 1 |
net_rshares | 615,320,000 |
last_payout | 2018-02-25 13:41:36 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 17 |
author_reputation | 23,927,035,221,506 |
root_title | "블록체인을 만들어봅시다." |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
hskang9 | 0 | 615,320,000 | 100% |
감사합니다! 배우고 싶은 언어를 파이썬이나 자바스크립트 중 골라서 댓글에 달아주십시오!
post_id | 33,519,944 |
---|---|
author | hskang9 |
permlink | re-ribai-re-hskang9-34zraz-20180218t140918838z |
category | blockchain |
json_metadata | "{"app": "steemit/0.1", "tags": ["blockchain"]}" |
created | 2018-02-18 14:09:21 |
last_update | 2018-02-18 14:09:21 |
depth | 2 |
children | 0 |
net_rshares | 0 |
last_payout | 2018-02-25 14:09:21 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 48 |
author_reputation | 21,654,868,736 |
root_title | "블록체인을 만들어봅시다." |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
좋은 프로젝트네요 ㅎ python으로 튜토리얼 써주시면 감사하겠습니다.
post_id | 33,527,469 |
---|---|
author | jinsukim |
permlink | re-hskang9-34zraz-20180218t144750376z |
category | blockchain |
json_metadata | "{"app": "steemit/0.1", "tags": ["blockchain"]}" |
created | 2018-02-18 14:47:51 |
last_update | 2018-02-18 14:47:51 |
depth | 1 |
children | 1 |
net_rshares | 615,320,000 |
last_payout | 2018-02-25 14:47:51 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 39 |
author_reputation | 379,217,952,383 |
root_title | "블록체인을 만들어봅시다." |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
hskang9 | 0 | 615,320,000 | 100% |
알겠습니다.
post_id | 33,629,298 |
---|---|
author | hskang9 |
permlink | re-jinsukim-re-hskang9-34zraz-20180219t005520528z |
category | blockchain |
json_metadata | "{"app": "steemit/0.1", "tags": ["blockchain"]}" |
created | 2018-02-19 00:55:21 |
last_update | 2018-02-19 00:55:33 |
depth | 2 |
children | 0 |
net_rshares | 0 |
last_payout | 2018-02-26 00:55:21 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 6 |
author_reputation | 21,654,868,736 |
root_title | "블록체인을 만들어봅시다." |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
python 추천할게요 ㅎㅎ
post_id | 33,614,878 |
---|---|
author | astriker |
permlink | re-hskang9-34zraz-20180218t231113947z |
category | blockchain |
json_metadata | "{"app": "steemit/0.1", "tags": ["blockchain"]}" |
created | 2018-02-18 23:11:12 |
last_update | 2018-02-18 23:11:12 |
depth | 1 |
children | 1 |
net_rshares | 603,013,600 |
last_payout | 2018-02-25 23:11:12 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 15 |
author_reputation | 0 |
root_title | "블록체인을 만들어봅시다." |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
hskang9 | 0 | 603,013,600 | 100% |
알겠습니다.
post_id | 33,629,368 |
---|---|
author | hskang9 |
permlink | re-astriker-re-hskang9-34zraz-20180219t005551029z |
category | blockchain |
json_metadata | "{"app": "steemit/0.1", "tags": ["blockchain"]}" |
created | 2018-02-19 00:55:51 |
last_update | 2018-02-19 00:55:51 |
depth | 2 |
children | 0 |
net_rshares | 0 |
last_payout | 2018-02-26 00:55:51 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 6 |
author_reputation | 21,654,868,736 |
root_title | "블록체인을 만들어봅시다." |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
Congratulations @hskang9! You have completed some achievement on Steemit and have been rewarded with new badge(s) : [![](https://steemitimages.com/70x80/http://steemitboard.com/notifications/firstpayout.png)](http://steemitboard.com/@hskang9) You got your First payout Click on any badge to view your own Board of Honor on SteemitBoard. For more information about SteemitBoard, click [here](https://steemit.com/@steemitboard) If you no longer want to receive notifications, reply to this comment with the word `STOP` > Upvote this notification to help all Steemit users. Learn why [here](https://steemit.com/steemitboard/@steemitboard/http-i-cubeupload-com-7ciqeo-png)!
post_id | 35,266,117 |
---|---|
author | steemitboard |
permlink | steemitboard-notify-hskang9-20180226t064247000z |
category | blockchain |
json_metadata | "{"image": ["https://steemitboard.com/img/notifications.png"]}" |
created | 2018-02-26 06:42:45 |
last_update | 2018-02-26 06:42:45 |
depth | 1 |
children | 0 |
net_rshares | 0 |
last_payout | 2018-03-05 06:42:45 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 673 |
author_reputation | 38,705,954,145,809 |
root_title | "블록체인을 만들어봅시다." |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |