|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
区块链脚本和合约公司 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-02-02 02:15:56
- 没有主要看涨催化剂的缺乏已成为当前比特币侧向运动和更广泛的加密货币市场的关键原因之一。
-
- 塑造行业的主要加密货币:比特币,以太坊及以后
- 2025-02-02 02:05:56
- 加密货币已成为金融界的重要资产类别,改变了个人和机构如何感知和与金钱互动。
-
- REMITTIX(RTX):PAYFI协议设置为竞争对手XRP
- 2025-02-02 01:55:56
- 虽然日本主要金融公司最近通过XRP的跨境解决方案听起来很大,但Remittix正在将其带入全球范围
-
- 目的投资档案草案提案的提案(XRP)ETF
- 2025-02-02 01:55:56
- 在担任第一个比特币和以太ETF背后的领导者之后,目的投资现在正在寻求在波纹市场中打破新的立场。