-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for passing data from Bitcoin as inscriptions #2478
Comments
Zetachain Extending EVM Calldata Size From BitcoinIntroductionCurrently btc to zeta ominchain call cannot contain arbitrary long evm contract call data length. The current limit is 80 From a technical point of view, this comes from BTC "OP_RETURN" opcode that allows only 80 bytes. This document proposals a possible solution to extend to a larger calldata size by utilizing tapscript based solution, TapscriptSimilar to inscriptions used, this approach makes use of the tapscript in bitcoin. Unlike inscription, the current protocol
The caller will first makes a "commit" script that hashes the tapscript, then makes a "reveal" script that reveals the The indexer will have to listen to transactions with output targeting TSS address. Once a tapscript is detected, it will So with the above change, a new method is proposed
There should be no other changes to existing code. Deliverables and TimelineThere are two major deliverables:
|
@bitSmiley thank you for sharing this solution Just a note on the testing side, our general process for new feature and for validation is to introduce a E2E test. You can see more info on this in this doc: https://github.com/zeta-chain/node/blob/develop/docs/development/LOCAL_TESTING.md For example, a |
@lumtis Thx for the tip, I will check them out first. Will take some time to try it. |
With the above two PRs merged, the next step is really carrying out integration testing in btc networks:
|
Is your feature request related to a problem? Please describe.
Currently, ZetaChain supports passing data using the op_return opcode, which has an 80-byte limit. This limitation restricts the amount of data that can be included in cross-chain transactions, posing challenges for applications that require more data, such as omnichain NFTs and complex smart contract interactions.
Describe the solution you'd like
To address this limitation, we propose adding support for passing data as inscriptions. Inscriptions allow for longer messages by utilizing the witness portion of a Bitcoin transaction, enabling applications to include more comprehensive data.
Inscriptions involve wrapping data into a Taproot script and injecting it into the witness portion of a Bitcoin transaction. This process allows for data pushes up to 520 bytes, and larger data files can be managed through multiple data pushes. Creating an inscription requires a commit transaction (hash reference) and a reveal transaction (revealing the entire script).
We propose maintaining support for both op_return and inscriptions. The advantage of op_return is that it allows for a single transaction, making it simpler and potentially less costly for users. On the other hand, inscriptions support longer messages, providing more flexibility for applications that need to pass larger amounts of data. A user-facing app could potentially choose which method to use depending on the length of the data being passed.
Tasks
btcsuite
project-wise #2728The text was updated successfully, but these errors were encountered: