|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
區塊鏈腳本和合約公司 sCrypt 透過展示如何在一個區塊鏈上進行支付並在另一個區塊鏈上接收資產,贏得了 2024 年比特幣奧運黑客馬拉松(萊特幣賽道)的冠軍。
Blockchain scripting and contract firm sCrypt has shown how it’s possible to make a payment on one blockchain and receive an asset on another, in a project that won the 2024 Bitcoin Olympics Hackathon (Litecoin Track).
區塊鏈腳本和合約公司 sCrypt 在贏得 2024 年比特幣奧運會黑客馬拉松(萊特幣賽道)的項目中展示瞭如何在一個區塊鏈上進行支付並在另一個區塊鏈上接收資產。
The two-man team of software engineers Mihael Šinkec and Yusuf Idi Maina used SPV and the opcode OP_CAT on the BTC Signet to demonstrate a transaction where a buyer used Litecoin to purchase BTC Ordinal tokens.
軟體工程師 Mihael Šinkec 和 Yusuf Idi Maina 兩人團隊使用 SPV 和 BTC Signet 上的操作碼 OP_CAT 來示範買家使用萊特幣購買 BTC Ordinal 代幣的交易。
The demonstration expands the potential for DeFi applications, exchanging one type of digital asset for another directly between transacting parties, without needing coordination between the two parties and without needing to trust third-party intermediaries like exchanges.
該演示擴大了DeFi 應用的潛力,在交易雙方之間直接將一種類型的數位資產交換為另一種類型的數位資產,無需兩方之間的協調,也無需信任交易所等第三方中介機構。
Šinkec said constructing such a transaction using raw BTC ASM (assembly code used to create custom scripts) would be complicated, so the pair used sCrypt’s SDK, which lets developers work in more familiar TypeScript to focus instead on the contract logic.
Šinkec 表示,使用原始BTC ASM(用於建立自訂腳本的彙編程式碼)建構這樣的交易會很複雜,因此兩人使用了sCrypt 的SDK,它讓開發人員可以使用更熟悉的TypeScript 工作,從而專注於合約邏輯。
They verified transaction preimages on the stack and verified them with “a straightforward function call” in a BTC covenant.
他們驗證了堆疊上的交易原像,並透過 BTC 契約中的「簡單函數呼叫」對其進行了驗證。
This process also uses Simplified Payment Verification (SPV) on Litecoin, reconstructing a transaction’s Merkle Root by using its data and Merkle Path and then comparing it to the transaction’s Block Header. Using SPV, the client checks the Block Header’s validity without requiring a full download of the blockchain.
此過程還使用萊特幣上的簡化支付驗證(SPV),透過使用交易的數據和 Merkle Path 重建交易的 Merkle Root,然後將其與交易的區塊頭進行比較。使用 SPV,客戶端可以檢查區塊頭的有效性,而無需完整下載區塊鏈。
Šinkec explained the process in more detail on Medium, writing that it was a challenge to verify a Litecoin transaction proof using BTC script since the two blockchains use different PoW algorithms.
Šinkec 在 Medium 上更詳細地解釋了這個過程,並寫道,由於兩個區塊鏈使用不同的 PoW 演算法,因此使用 BTC 腳本驗證萊特幣交易證明是一個挑戰。
The team used an oracle that could attest to the validity of Litecoin transactions and Lamport signatures that could be verified in BTC script.
該團隊使用了一個可以證明萊特幣交易有效性的預言機,以及可以在 BTC 腳本中驗證的 Lamport 簽名。
The Litecoin SPV proof was then used to unlock a BTC Ordinal token placed in a BTC covenant and transfer the asset to the receiver’s BTC address. A “covenant” allows a programmer to impose constraints on how specific coins may be spent in future transactions.
然後,萊特幣 SPV 證明用於解鎖放置在 BTC 契約中的 BTC Ordinal 代幣,並將資產轉移到接收者的 BTC 位址。 「契約」允許程式設計師對未來交易中特定代幣的使用方式施加限制。
Šinkec explained the covenant transaction in more detail:
Šinkec 更詳細地解釋了契約交易:
“Enabling OP_CAT on BTC opens up many possibilities such as covenants and validation of Merkle Proofs. We leveraged both these mechanisms to implement an Ordinal sales listing as a covenant on BTC. It accepts Litecoin as a payment option without going through an intermediary, such as an exchange.”
「在 BTC 上啟用 OP_CAT 開啟了許多可能性,例如契約和 Merkle 證明的驗證。我們利用這兩種機制來實施序數銷售列表,作為 BTC 上的契約。它接受萊特幣作為支付選項,而無需通過交易所等中介機構。
OP_CAT is an opcode that existed in the original 2009 Bitcoin protocol, allowing programmers to concatenate two items on the stack. This enables the potential for more sophisticated transaction scripts and thus expands Bitcoin’s range of applications and potential use cases.
OP_CAT 是 2009 年原始比特幣協議中存在的操作碼,允許程式設計師連接堆疊上的兩個項目。這使得更複雜的交易腳本成為可能,從而擴大了比特幣的應用範圍和潛在用例。
However, in a move similar to the one that imposed BTC’s ‘temporary’ 1MB block size limit, OP_CAT and other original opcodes were disabled very early in Bitcoin’s existence due to fears bad-faith actors could use them to “spam” or overwhelm the network before it had the resources to combat such actions.
然而,與施加BTC「臨時」1MB 區塊大小限制的舉措類似,OP_CAT 和其他原始操作碼在比特幣存在之初就被禁用,因為擔心惡意行為者可能會使用它們來「垃圾郵件」或壓垮網路在它有資源打擊此類行為之前。
The BSV blockchain re-enabled OP_CAT along with other original opcodes in 2019/2020, one of many moves that expanded BSV’s functionality and restored Satoshi Nakamoto’s original vision for Bitcoin.
BSV 區塊鏈在 2019/2020 年重新啟用了 OP_CAT 以及其他原始操作碼,這是擴展 BSV 功能並恢復中本聰對比特幣最初願景的眾多舉措之一。
There are also moves to re-enable OP_CAT on the BTC main network, but at the time of writing that hasn’t happened yet. For now, sCrypt’s cross-chain transaction works only on the BTC Signet, a more closed-off alternate testnet for blockchain apps, and experiments with new transaction types. OP_CAT has been re-enabled on the BTC Signet.
BTC 主網路上也有重新啟用 OP_CAT 的舉措,但在撰寫本文時尚未發生。目前,sCrypt 的跨鏈交易僅適用於 BTC Signet(區塊鏈應用程式的更封閉的替代測試網),並正在嘗試新的交易類型。 OP_CAT 已在 BTC Signet 上重新啟用。
Since sCrypt’s prize-winning project connects the Litecoin and BTC Signet blockchains, it’s more theoretical than immediately usable as things currently exist. However, OP_CAT works on BSV and has done so for five years now, meaning developers could use the process to enable cross-chain payments. BSV has shown time and time again that more creative uses for blockchain technology are available for creative developers looking for new opportunities.
由於 sCrypt 的獲獎項目連接了萊特幣和 BTC Signet 區塊鏈,因此它更具理論性,而不是現有的立即可用的東西。然而,OP_CAT 適用於 BSV,並且已經這樣做了五年,這意味著開發人員可以使用該流程來實現跨鏈支付。 BSV 一次又一次地表明,對於尋找新機會的創意開發人員來說,區塊鏈技術有更多創造性的用途。
免責聲明:info@kdj.com
The information provided is not trading advice. kdj.com does not assume any responsibility for any investments made based on the information provided in this article. Cryptocurrencies are highly volatile and it is highly recommended that you invest with caution after thorough research!
If you believe that the content used on this website infringes your copyright, please contact us immediately (info@kdj.com) and we will delete it promptly.
-
- 匿名分析師布倫茨警告加密貨幣市場可能正在接近牛市頂峰
- 2025-01-21 21:30:41
- 一位以及時做出加密貨幣預測而聞名的分析師就該資產類別可能徘徊在牛市高峰附近的可能性發出了警報。
-
- Remittix:實用之王推翻了狗狗幣和瑞波幣
- 2025-01-21 21:30:41
- 隨著像官方川普這樣的迷因幣越來越受歡迎,投資者正從狗狗幣和瑞波幣轉向以公用事業驅動的競爭者 Remittix。