Lightning-Network
怎麼會有人廣播中間閃電交易?網路費用從何而來?
假設 Alice 和 Bob 創建了一個通道,Alice 在其中鎖定了她的 100 mBTC。
Alice 100mBTC 和 Bob 0 mBTC ——–> 2-of-2 合約
Alice 通過這個渠道向 Bob 支付 30mBTC:
Alice Commitment Txn: Input: - Contract - Alice Signature - Bob Signature Output: - 70 mBTC (Alice's Balance) - - If revocation key then pay to Bob's Pubkey. - - Else Alice can pay herself after one day. - 30 mBTC (Bob's balance) - - Pay to Bob's pubkey
和,
Bob's Commitment Transaction: Input: - Contract - Alice Signature - Bob Signature Output: - 30 mBTC (Bob's Balance) - - If revocation key then pay to Alice's Pubkey. - - Else Bob can pay herself after one day. - 70 mBTC (Alice's balance) - - Pay to Alice's pubkey
然後 Alice 和 Bob 在發送下一個交易之前共享撤銷密鑰。
現在 Alice 通過這個渠道向 Bob 支付 10mBTC:
Alice Commitment Txn: Input: - Contract - Alice Signature - Bob Signature Output: - 60 mBTC (Alice's Balance) - - If revocation key then pay to Bob's Pubkey. - - Else Alice can pay herself after one day. - 40 mBTC (Bob's balance) - - Pay to Bob's pubkey
和,
Bob's Commitment Transaction: Input: - Contract - Alice Signature - Bob Signature Output: - 40 mBTC (Bob's Balance) - - If revocation key then pay to Alice's Pubkey. - - Else Bob can pay herself after one day. - 60 mBTC (Alice's balance) - - Pay to Alice's pubkey
Alice 試圖通過發布之前的交易來欺騙 Bob:
Alice Commitment Txn: Input: - Contract - Alice Signature - Bob Signature Output: - 70 mBTC (Alice's Balance) - - If revocation key then pay to Bob's Pubkey. - - Else Alice can pay herself after one day. - 30 mBTC (Bob's balance) - - Pay to Bob's pubkey
我無法理解 Alice 如何發布交易,因為在比特幣區塊鏈上確認交易沒有網路交易費用。
請幫助我了解我在這裡缺少什麼。
交易確實有費用,並且是在渠道打開之前協商好的。參與者將在創建交易之前確定要在承諾交易上設置的費用。因此,每筆承諾交易都包含交易費用,並且可以發送到網路。
這在單方面關閉的情況下是必需的。單邊關閉有一個參與者廣播最新的承諾交易。由於該承諾交易必須能夠確認,它必須支付交易費用。費用只能在創建承諾時設置,這就是所做的。