📜 [專欄新文章] A Secure State Channels Framework for Ethereum by Liam Horne 解析以太坊上的安全狀態通道
✍️ 田少谷 Shao
📥 歡迎投稿: https://medium.com/taipei-ethereum-meetup #徵技術分享文 #使用心得 #教學文 #medium
Crosslink 第二天早上由 Liam Horne,狀態通道的主要開發團隊 L4 共同創辦人開場。本以為這場會提到筆者前一天晚上還看得霧煞煞的 Counterfactual ,沒想到這次的演講較為科普、以分享開發近況為主,也被以太坊基金會研究員 Chih-Cheng Liang 稱為最接地氣的一場!
何謂狀態通道?
比特幣的支付通道
若熟悉閃電網路,比特幣的支付通道是一個記錄支付行為的通道,只有開關通道時會接觸到區塊鏈。
假設A公司與B公司有頻繁的交易需求,兩方各自把 10 元放入支付通道中:
19:00 交易開始,兩方所擁有的錢: (10,10)
19:15 A->B 3元: (7,13)
20:10 B->A 7元: (14,6)
20:30 A->B 13元: (1,19)
21:45 B->A 4元: (5,15)
到了 21:45 時,交易結束,此時可以將交易結果 (5,15) 寫到區塊鏈上並分配結餘,而區塊鏈上有的紀錄就只有以下兩筆。
19:00 交易開始,兩方所擁有的錢: (10,10)
21:45 交易結束,兩方所擁有的錢: (5,15)
這代表著交易的結果能被記錄到區塊鏈上,卻大幅減少了要和區塊鏈互動的次數,不只可以降低交易雙方等待區塊鏈回應的次數與時間,也讓區塊鏈要處理的交易數量減少 。
以上只是提供一個很粗淺的例子,可以參考以下連結,精美圖示有助理解:
【動區專題】五分鐘看懂:圖說閃電網路 Ligntning Network
狀態通道 State Channel
由於狀態通道是在以太坊上,和比特幣的環境不同,所以實作方法不盡相同 (提示:UTXO),但本質上是相同的概念:只要牽涉到「狀態轉換 state-altering」,我們就能開一個通道讓交易參與者在通道中任意次數改變「狀態的值」,而最終將結果寫回區塊鏈上就好。
這邊我引用 Pelith 創辦人 Ping Chen 對於狀態通道精闢的解釋:
狀態通道通常是有別種邏輯疊在上面的通道 — 陳品
也就是說,相對於支付通道的邏輯就只是參與者虛擬貨幣的數量,狀態通道通常指的是該應用場景有自身的邏輯/規則。
舉例來說,在一遊戲中,玩家所擁有的虛寶就可以被視為是許多種狀態:遊戲中金幣及等級的是數值、但同時也是狀態;而 (0,1) 可以用來代表道具的擁有狀態 (沒有,有)。
假設一玩家 A 在遊戲中的起始狀態為 (電卷, 金牌, 鞍切, 金幣, 經驗值) = (0, 0, 0, 300, 1),隨著遊戲進行,虛寶/狀態的改變:
A 花費 100 金購買了金牌: (0, 1, 0, 200, 1)
A 首殺獲得 200 金、升兩等: (0, 1, 0, 400, 3)
A 花費 300 金用金牌合成了鞍切: (0, 0, 1, 100, 3) # 其實好像還要妖刀?xD
A 擊殺了 B 玩家,升一等: (0, 0, 1, 100, 4)
當玩家要登出、暫停遊戲時,最後的 (0, 0, 1, 100, 4) 就可以被更新到區塊鏈上,而下次登入時就會讀取這個區塊鏈上的狀態讓玩家繼續遊玩。
若了解了此例,就不難想像為什麼狀態通道被提出之時,遊戲以及虛擬貨幣的支付被視為最適合運用的兩個場景:給定參與者=玩家,在限定的場域中=遊戲,進行狀態的更新。
更多細節可以參考此一概念的提出人 Jeff Coleman 的解釋:點我
決策者 Mover
每一個狀態都有一位決策者,由通道中所有參與者輪流擔任。決策者透過對一狀態進行「簽署」來表達是否同意此狀態,也就是說狀態的正當性取決於當前的簽署是否來自正確的決策者。
狀態確認 Valid Transaction
狀態的先後順序是驗證狀態是否有效的方法。取決於應用的場景,有不同的實作方式。若簡單以一個計數器 counter 來實作,只要要求新狀態的計數值為舊狀態 +1,即可驗證。
state(N).counter + 1 == state(N+1).counter
關閉通道與終結性 Finality
當沒有更多交易或有參與者決定要結束交易時,只要全部參與者皆同意就可以關閉通道,ex: 給一 boolean 變數 isFinal,全部人都把自己的 isFinal 皆設為 true 就可以將通道關閉。
萬一有參與者半途消失了?Finality 終結性指的就是「每一個狀態都可以是最終的狀態」。假設部分參與者消失,只要有搭配的機制,例如:計時器,就一定會輪替到仍在線的人;即使參與者全部消失,當前的狀態因具備終結性,所以也能被提交為最終的狀態。
狀態通道實作的規劃與開發進程
Liam 將實作狀態通道的規劃劃分成上圖的六層:
Protocol & Contracts:
- State Progression Protocol
這邊就是上方的「決策者、狀態確認、關閉通道與終結性」。
除了以上所提及的內容,目前團隊也正在開發更方便的協議 Protocol Hardening:有別於交易的結束需要所有參與者的同意,目標是想做到「在特定時間內,任一參與者都能自行決定交易的推進或結束而不受其他參與者影響」。
- Channel Funding Protocol
此處是系統設計的另一個協議 Nitro Protocol,也就是如何開「子通道」,可以參考以下連結:
Nitro Protocol
Client & Hub:
- Client & Protocol Engine
這部分是講 Client 端彼此之間會傳送什麼訊息來進行溝通。
https://specs.counterfactual.com/en/latest/protocols/install-virtual-app.html#the-installvirtualappparams-type
- Client API & Wire Protocol
以下的 Github 專案就是將上方三部分的協議內容實作到網頁端:
counterfactual/monorepo
目前第一版的狀態通道已正在運行了,詳見下方額外學習資源的 Connext。Liam 列出了一些實作第二版時必須納入考量的點:
Robustly store states (i.e., guarantee no accidental money loss)
Automatic detection and responding to challenges
Ability to launch challenges directly with in-browser hooks
Go-to production quality hub software for apps and businesses to use
Browser Wallet UX:
- Wallet Integrations
這些是將狀態通道實作於現存的各種 Wallet 時,需要新增的內容:
https://github.com/counterfactual/monorepo/blob/d3b06b42710c0b7dd93839033cb43da9ac6e0a28/packages/types/src/node.ts
- Wallet UI
最後則是區塊鏈、也是所有新技術能否被廣泛使用的大哉問:該如何設計才能讓使用者有良好的體驗?
在此 Liam 提出實作 Wallet 時可以考慮的要點:
How should a user interact with a state channel?
What are the best patterns for acquiring user consent?
How much does the user have to trust the app?
To what extent can your channel wallet protect you?
What policies should a channel wallet be able to enforce?
額外學習資源
Liam 在本場演講及 Panel Discussion 中,都很鼓勵大家一起跳進來當開發者。他的大致建議如下:看懂相關文章、開發的要求 specs,就可以試著做做看。卡住的時候就到以下連結的討論區詢問他們,包含 Liam 在內的開發人員都會在上面回答問題:
State Channels - A community of state channels researchers from bitcoin, ethereum, and other blockchains
狀態通道的 Github:
State Channels
已成功實作第一版狀態通道的 Connext 專案:
Where will I be able to use v2.0 of Connext?
讓筆者看得霧煞煞的 Counterfactual ,可以進一步提升狀態通道的效率:
Counterfactual: Generalized State Channels on Ethereum
結語
本次演講實為筆者綜觀 Liam 在 Youtube 上的影片後,他對狀態通道最簡單、親民的一次演講,主要著重於介紹開發的進程、應注意的要點,也提供了初探此議題的新手很多學習資源、推坑大家加入開發的建議!
其實陳昶吾博士也曾於 Taipei Ethereum Meetup 詳細介紹過此議題(閃電網路為主),有興趣者可以看以下影片來得到更完整的認識:
最後,如果我的文章有幫助到你/妳,可以看看我的其他文章,歡迎大家一起交流 :)
田少谷 Shao - Medium
一如往常,感謝 Yahsin Huang 及 Chih-Cheng Liang 幫忙審稿,辛苦了!也特別感謝 Ping Chen 耐心回答素未蒙面的我的問題!!
A Secure State Channels Framework for Ethereum by Liam Horne 解析以太坊上的安全狀態通道 was originally published in Taipei Ethereum Meetup on Medium, where people are continuing the conversation by highlighting and responding to this story.
👏 歡迎轉載分享鼓掌
同時也有4部Youtube影片,追蹤數超過9,090的網紅每日幣研 Desmond,也在其Youtube影片中提到,Flow 專攻 NFT 市場和數字收藏品而為人熟悉,其加密貨幣價格一度由開售後急升越 400 倍,今集介紹的潛力幣種 Blocto 則是它的公鏈節點運營商,升值潛力同樣值得期待,可媲美 UNI 代幣。 00:00 Flow代幣介紹 02:15 Blocto平台背景介紹 03:24 Blocto 銀...
「bitcoin wallet教學」的推薦目錄:
- 關於bitcoin wallet教學 在 Taipei Ethereum Meetup Facebook 的最佳解答
- 關於bitcoin wallet教學 在 Taipei Ethereum Meetup Facebook 的最佳貼文
- 關於bitcoin wallet教學 在 大詩人的寂寞投資筆記 Facebook 的精選貼文
- 關於bitcoin wallet教學 在 每日幣研 Desmond Youtube 的最佳貼文
- 關於bitcoin wallet教學 在 我要做富翁 Youtube 的最佳解答
- 關於bitcoin wallet教學 在 五哥頻道 Youtube 的最讚貼文
- 關於bitcoin wallet教學 在 crypto教學的價格和怎麼買,動區動趨和PTT加密貨幣版 的評價
bitcoin wallet教學 在 Taipei Ethereum Meetup Facebook 的最佳貼文
📜 [專欄新文章] Pioneer A Financial Life on Ethereum with A Non-custodial Banking Replacement by Mel Gelderman…
✍️ 田少谷 Shao
📥 歡迎投稿: https://medium.com/taipei-ethereum-meetup #徵技術分享文 #使用心得 #教學文 #medium
Pioneer A Financial Life on Ethereum with A Non-custodial Banking Replacement by Mel Gelderman 在以太坊上開拓無需銀行託管的新金融生活
On the first day of 2019 Taipei Crosslink, the CEO of Monolith- Mel Gelderman gave a speech on their Monolith Ethereum Wallet + Tokencard and how people are starting to know and embrace Blockchain technology in our daily life, not for gambling or fraud, but for the real positive changes it can bring to the world!
monolith.xyz
Everything dates back to 2015 when Taipei Ethereum Meetup was merely a small group of people… Mel started off the speech with the memory of him stepping into the Ethereum ecosystem!
Story-telling time!
A brief description of Monolith
Monolith is a decentralised banking alternative on Ethereum, with its current business area in Europe. There are two main products: Monolith app is a contract wallet to transfer cryptocurrency to fiat money; Tokencard is a the debit Visa card that anyone can use just like a normal Visa card.
The Status Quo
Monolith has been through the FCA Sandbox in UK. However, AML(Anti-Money Laundering) and KYC(Know Your Customer) are policies Monolith has to comply with.
AML and KYC can be achieved by simply looking into the origin of the cryptocurrency or tokens, as everything on Ethereum is there, open and transparent: if an address is known to be of illegal source, banning it solves the problem.
Currently, there are already more than 1000 users using Monolith Wallet and Tokencard to cover daily expenditure!
TKN Token: Be our own bank!
Though the topic of TKN wasn’t brought up in the speech, TKN plays a crucial role in the ambition of Monolith: to return the interest of depositing money from banks to users. For more information: CLICK!.
If you’re interested in such ambition, also check out: Compound!
Demo Time
Mel demonstrated how to use their Monolith Ethereum Wallet. During the demo, there’s an anecdote really amused everyone:
The transaction time on Ethereum is surprisingly not really longer than the time on Visa lol
Apart from the above evidence that blockchain is rising ;) Here are a few notes about Monolith Wallet worth mentioning:
Monolith Wallet is a contract wallet with a recovery mechanism, which solves the problem of usual wallets that there is no way to get back your assets on blockchain once the private key is known to the attacker.
Whitelisted addresses are specific addresses not bounded by daily spend limit, and cannot be modified afterwards. Combining the two, even if an attacker gets to know the private key, the attacker can only transfer up to the daily spend limit, and the owner can transfer the remaining assets to the whitelisted addresses.
Monolith is also working on another recovery mechanism to deal with the situation of losing your phone. Stay tuned!
Monolith Tokencard also has every mechanism one needs for a normal debit card: freezing and unfreezing the card, reporting lost card, etc.
The workflow of using Monolith:
Decide the amount of cryptocurrency for exchange -> Decide the targetted fiat currency -> Wait for transaction confirmations on both Ethereum and Visa -> Success! This is now the debit card with money to spend :)
To wrap up this section, Monolith is the purest DeFi you can imagine! — Mel
Future Goal
Back in the days, it’s impossible to live solely on a Bitcoin wallet, as the exchange between cryptocurrency and real-world currencies was never easy.
However, with Monolith Wallet right now, the blockchain technology is mature enough for people to rely on the blockchain solution for daily payments, rather than trusting in banks to deal with our money.
It’s not hard to imagine that in the future, with the mass adoption of the blockchain technology, we might be able to receive cryptocurrency as salary and pay many things to anyone in every corner of the world with only a single wallet and a few clicks on your phone!
Questions
1. When or if it’s possible for Monolith to be available in Taiwan?
South Korea may be the first place for Monolith in Asia. Taiwan is on the list for sure, and hopefully, Monolith will be available by the next time when Mel visits Taiwan ;)
2. What is Monolith’s opinions on anonymity and privacy?
AML and KYC are the agreement Monolith made with Visa and FCA. However, Monolith is considering issuing a token to compensate users for going through these policies!
Conclusion
Mel’s is definitely one of the most inspiring speeches: Monolith and Tokencard visualize the dream that blockchain technology can really help make our society a more decentralised place and reduce the risk that we have always been staking on the centralised institutions!
In the end, I’d like to quote a line from Mel to summarize the speech and also his enthusiasm towards blockchain and Ethereum:
We are on the cusp of the most exciting moment in Ethereum since its creation!
Special thanks to Mel Gelderman for the friendly and patient feedback on my questions and recommending me COMPOUND!!! also, to Yahsin Huang for reviewing and her helpful advices and as usual to Chih-Cheng Liang for organizing the TEM column:)
Pioneer A Financial Life on Ethereum with A Non-custodial Banking Replacement by Mel Gelderman… was originally published in Taipei Ethereum Meetup on Medium, where people are continuing the conversation by highlighting and responding to this story.
👏 歡迎轉載分享鼓掌
bitcoin wallet教學 在 大詩人的寂寞投資筆記 Facebook 的精選貼文
某網紅的精彩虛擬貨幣錢包文章教學
https://chunting.me/bitcoin-hard-wallet-ledger-nano-s/
bitcoin wallet教學 在 每日幣研 Desmond Youtube 的最佳貼文
Flow 專攻 NFT 市場和數字收藏品而為人熟悉,其加密貨幣價格一度由開售後急升越 400 倍,今集介紹的潛力幣種 Blocto 則是它的公鏈節點運營商,升值潛力同樣值得期待,可媲美 UNI 代幣。
00:00 Flow代幣介紹
02:15 Blocto平台背景介紹
03:24 Blocto 銀包的特點
04:53 Blocto代幣介紹
05:44 Blocto未來升值潛力
錄影日期:2021年6月3日(三)
#幣安 #幣安幣 #BNB #以太坊 #以太幣 #ETH #FLOW #FTX #區塊鏈 #NFT #NFT藝術 #Blocto
_______________________________________________
相關影片
Binance幣安教學:3 分鐘開戶即享 20% 永久交易費折扣(全行最高)
https://youtu.be/boLIAwwETcA
比特幣是甚麼?分析挖礦、礦工和礦場的運作原理!
https://youtu.be/MTAZj9lNJ_c
回顧施傅BITCOIN教學影片:發明者中本聰錢包持比特幣數量如何?
https://youtu.be/txN0fNE96LI
比特幣、以太幣大跌 整合零碎幣市資訊和歷史分析崩盤原因
https://youtu.be/GHkUfLMofTE
升值潛力媲美幣安幣(BNB)的平台幣FTT
https://youtu.be/91xQ0mx9FsE
_______________________________________________
相關文章:
未來一段時間最有看頭的數位錢包 – Blocto(BLT token)
https://cryptowesearch.com/2021/05/02/blocto-wallet-from-taiwan/
幣安交易所(Binance) 完整教學,附獨家 20%永久交易折扣優惠碼
https://www.cryptowesearch.com/hkbinancespecialoffer
追蹤每日幣研,獲取更多比特幣和以太幣等加密貨幣的分析,以及區塊鏈行業的最新情報和教學。
官方網站:https://cryptowesearch.com/
Instagram:https://www.instagram.com/crypto_wesearch/
Facebook:https://www.facebook.com/cryptowesearch
Telegram 群組 (HK):https://t.me/cryptowesearch
Telegram 群組 (TW):https://t.me/cryptowesearchtw
Telegram 頻道:https://t.me/cryptowesearch_news
bitcoin wallet教學 在 我要做富翁 Youtube 的最佳解答
眼見比特幣價值猶如火箭般升空,很多人都心動想加入分一杯羹,當然現在是否仍是入貨時機,就要留待直播時留言問施傅或皇叔。不過要入貨,都要知道用甚至工具,今集施傅教學,會分享 3 個買比特幣以及其他虛擬貨幣的方法,以及它們的比較,清楚了解後,入場時才能揀選適合自己的工具。
════════════════════
?財務自由不是夢!把握機會免費體驗?
施傅【10年財務自由】1小時簡介+工作坊
立即試看:https://www.gregorysy.com/
════════════════════
❓有效 極速 儲存千萬❓
【零至千萬加速器】1小時簡介+工作坊
免費試看:https://edu.money-tab.com/pages/accelerator
════════════════════
茶敘50 《ALL or NOTHING》
立即購票:https://edu.money-tab.com/pages/teatalk-50-online
所有課程/活動一覽: https://money-tab.info/activity
施傅新書「量化交易」手冊
網上即買: https://www.money-tab.info/2020-book-purchase
✓ APP下載: http://onelink.to/mtapp
✓ 升級版: https://money-tab.com/membership
❖訂閱【富翁電視MTTV】頻道:
https://bit.ly/35dJW4Y
❖訂閱【我要做富翁】頻道:
https://bit.ly/35LOy2J
❖讚好Facebook專頁:
https://facebook.com/203349819681082
❖追蹤Instagram專頁:
https://www.instagram.com/money_tab/
#虛擬貨幣 #即日可用 #Bitcoin #施傅教學 #理財 #比特币 #美股
bitcoin wallet教學 在 五哥頻道 Youtube 的最讚貼文
買比特幣?http://bit.ly/2ts2nQP
交易所?https://cex.io/r/0/up124973289/0/
軟錢包?https://www.blockchain.com/
硬錢包?
?請支持五哥新平台? https://www.patreon.com/5gor
?五哥上左Youtuber GO好後悔?! https://youtu.be/YgVinPvvnTY
⭐️記得比個Like同訂閲我頻道? https://bit.ly/2F6Y2M8
?打賞鼓勵五哥?https://paypal.me/5minutesmaster
?????? 精選系列
陰謀+QAnon+QMap?http://bit.ly/2RW8oVd
WordPress自建網站?http://bit.ly/2TG34Ti
身心靈+吸引力法則?http://bit.ly/33F4LFg
Shopify廣東話教學?http://bit.ly/2zj5myF
建立網站教學?http://bit.ly/2UphcQz
五哥訪問系列?http://bit.ly/2KGNT9z
陰謀系列? http://bit.ly/2RW8oVd
比特幣教學?http://bit.ly/2Zh7oh2
生活小百科?http://bit.ly/31LEB1N
網上賺錢?http://bit.ly/2YLyt98
寫App教學?http://bit.ly/2HMnfwT
QAnon?http://bit.ly/2TIHKfU
旅遊?http://bit.ly/2NeajAN
YouTube秘技?http://bit.ly/2G8qBZr
樓市+時事+財經?http://bit.ly/2z8SlaI
Affiliate Marketing 聯盟行銷 教學?http://bit.ly/2YWhXXH
網址:https://www.5MinutesMaster.com
Medium:https://medium.com/@5minutesmaster
facebook:https://bit.ly/2QYmNyE
#五哥教學 #五維時空 #香港YouTuber