使用Python實現一個“智能區塊鏈”

{"type":"doc","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"本文最初發佈於Medium網站,經原作者授權由InfoQ中文站翻譯並分享。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"前言"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在本文中,我們將使用Python語言實現一個簡單樸素的“智能區塊鏈”,並和一個區塊鏈做對比。我們希望通過這種方式,幫助開發人員和區塊鏈社區更清楚地瞭解並接納這種技術的主要概念和優勢。常見的“智能區塊鏈”網絡中有一個區塊生產者智能合約(BPSC)。爲了在網絡中成功交易,發送者必須先將加密貨幣轉移到(BPSC)錢包,然後(BPSC)立即將相同的加密貨幣自動發送到最終接收者的錢包。這個看似簡單的任務可以準確地保存(BPSC)智能合約中所有成功交易的數據,並確保數據不受篡改。本文由Somayeh Gholami和Mehran Kazeminia於2020年4月撰寫。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"開始之前的準備工作"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"如果你不熟悉“智能區塊鏈”,並且還沒有閱讀過我們以前寫的關於這種技術的文章,那麼可以在下面這篇文章中大致瞭解一下。本文的實現過程中也會給出必要的解釋。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/hackernoon.com\/what-is-smart-blockchain-4b134275e90f","title":"","type":null},"content":[{"type":"text","text":"https:\/\/hackernoon.com\/what-is-smart-blockchain-4b134275e90f"}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}}]}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章