Skip to content
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

feat: Allow multiple data pushes in OP_RETURN output #245

Closed
victorkirov opened this issue Mar 19, 2024 · 21 comments · Fixed by #259
Closed

feat: Allow multiple data pushes in OP_RETURN output #245

victorkirov opened this issue Mar 19, 2024 · 21 comments · Fixed by #259
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@victorkirov
Copy link

Currently, the Bitcoin Ledger app only supports OP_RETURN outputs with a single data push. This is a limitation that is not present in the Bitcoin protocol itself, and it would be great to see this limitation removed in the Ledger app.

This would allow for more flexible use of the OP_RETURN output, and would allow for more complex data to be stored in the blockchain.

Primary short term Use case - Support for RUNES Protocol (going live with the next halving):

The Runes protocol aims to introduce a robust fungible token protocol on Bitcoin. It could significantly benefit the ecosystem by attracting more transaction volume, developers, and users. Runes aims to offer a simple, UTXO-based token system that minimizes on-chain footprint and integrates seamlessly with Bitcoin's architecture, avoiding the complexities and limitations of existing token protocols.

Current token solutions on Bitcoin suffer from issues like high complexity, reliance on off-chain data, UTXO proliferation or the need for a native token, which hinders adoption and user experience. Runes proposes a straightforward approach: token balances are held by UTXOs and OP_RETURN outputs are used for protocol messages. This ensures ease of use, reduced onchain footprint & more responsible UTXO management.

Other use cases - Bitcoin ecosystem apps & Bitcoin L2s (Q2 2024):

By enabling multiple data pushes in OP_RETURN outputs, the Ledger app would also support a wider range of applications, including Bitcoin layer 2 networks which rely on them for pegging/bridging operations to and from Bitcoin mainnet.

@bigspider bigspider added enhancement New feature or request good first issue Good for newcomers labels Mar 20, 2024
@scienmanas
Copy link

Hi, can you give some idea regarding the project, I saw the good first issue mark and really want to work on issue, can please give me more idea on the and how to start work on it.

@victorkirov
Copy link
Author

Hi, can you give some idea regarding the project, I saw the good first issue mark and really want to work on issue, can please give me more idea on the and how to start work on it.

Looks like this logic needs to change: https://github.com/LedgerHQ/app-bitcoin-new/blob/develop/src/common/script.c#L135

@victorkirov
Copy link
Author

victorkirov commented Mar 25, 2024

Here is an example txn which is currently unsignable with Ledger: https://mempool.space/testnet/tx/cf32d8c280ca48b0d0a67335a39ae6fd4fefba9338793c87165ffacf691848a1

The OP_RETURN script being 6a0952554e455f544553541e0203049deebbe8878ad4d50e010b0383480546000080e2aee9a598ff0001, or in ASM:

OP_RETURN
OP_PUSHBYTES_9 52554e455f54455354
OP_PUSHBYTES_30 0203049deebbe8878ad4d50e010b0383480546000080e2aee9a598ff0001

@bigspider
Copy link
Collaborator

bigspider commented Mar 25, 2024

Note for anyone coming from the Summer of Bitcoin: please note that I will unfortunately not be mentoring this year, and there will be no project related to this repository; so if that was the intention, you should probably look at other projects.

Looks like this logic needs to change: https://github.com/LedgerHQ/app-bitcoin-new/blob/develop/src/common/script.c#L135

Correct, that's the main place.

Of course, due care needs to be taken to check if the new rules affect MAX_OPRETURN_OUTPUT_DESC_SIZE, and one or two tests should be added to cover the new rules.

@AlastairPreacher
Copy link

I've just stumbled across this as I realise since starting to buy Runes on BTC (https://support.xverse.app/hc/en-us/articles/26031360456973--Ledger-Device-UNKNOWN-ERROR-0x6a82-Error-Message-When-Minting-or-Sending-Runes).

Unfortunately, there were no warnings on the purchase of items, and my runes are stuck in my xverse wallet. This is somewhat of a big issue - are you able to give an update on when this will be fixed?

Thanks

@victorkirov
Copy link
Author

@AlastairPreacher please contact Xverse support via a ticket. We have a solution for you.

@AlastairPreacher
Copy link

Hey @victorkirov - that's great to hear. I've reached out to them so await to hear back.

@AlastairPreacher
Copy link

AlastairPreacher commented Apr 26, 2024

Hey @victorkirov there's some confusion going on. Here's the response I received from xverse

Currently, this issue needs to be handled by Ledger. We know they are aware, and we will continue to monitor the progress.
They have also recently updated their website to advise on the current compatibility issues and that they are working on the update.
 
"While we develop an upgrade for the Ledger Bitcoin app that will enable rune sending with your Ledger device, we recommend [using Xverse](https://www.xverse.app/) as a hot wallet to manage your runes for the time being."
 
https://support.ledger.com/hc/en-us/articles/18281497320861-How-to-store-and-manage-Bitcoin-runes-with-your-Ledger-device-and-Xverse-wallet?docs=true

Are you able to help?!

My concern is that the xverse wallet was set up selecting ledgerlive is NOT used which is contrary to what is in the link above.

@victorkirov
Copy link
Author

@AlastairPreacher Sorry, I thought we built a solution for this. Once the next version of Xverse comes out, you can use Magic Eden to transfer your Runes out or list directly on ME from your Ledger. Listing currently works fine on ME from Ledger but if you try to transfer it will incorrectly tell you that you're going to burn your runes. You can list on ME now if you wish, otherwise, I'd suggest waiting another day or 2 for the new patch and transfering your runes out then.

@AlastairPreacher
Copy link

AlastairPreacher commented Apr 27, 2024 via email

@bigspider bigspider added this to the 2.2.3 milestone Apr 29, 2024
@bigspider bigspider self-assigned this Apr 29, 2024
@eezdev
Copy link

eezdev commented Apr 30, 2024

+1

Hi guys, any news on the fix that makes runes transferable from a ledger? I think this is a high priority issue.

Thanks

@wfyhehe
Copy link

wfyhehe commented May 3, 2024

+1
I updated to the newest version 0.34.2 but still not able to transfer my runes using Xverse+Ledger. Is anyone working on this?

@tarunmahe
Copy link

+1

@eezdev
Copy link

eezdev commented May 5, 2024

@AlastairPreacher Sorry, I thought we built a solution for this. Once the next version of Xverse comes out, you can use Magic Eden to transfer your Runes out or list directly on ME from your Ledger. Listing currently works fine on ME from Ledger but if you try to transfer it will incorrectly tell you that you're going to burn your runes. You can list on ME now if you wish, otherwise, I'd suggest waiting another day or 2 for the new patch and transfering your runes out then.

Hi Victor, is xverse working on a workaround to transfer runes using xverse+ME? is there any ETA? Ledger seems very slow to address this and seems going to take ages for a core fix

@victorkirov
Copy link
Author

We have a very basic web portal that will allow you to send out your runes from the Ledger address. You can get in touch with support for the details.

As for full Ledger support, @bigspider opened the above PR which will allow full Runes support with Ledger 🙌 🎉

@eezdev
Copy link

eezdev commented May 11, 2024

Thanks @victorkirov, @bigspider it's great to see this being fixed!! Do you know when the next release will be published?

@Madyson10
Copy link

hello good afternoon. I sent some tokens to my xverse wallet and I can't withdraw them because I'm using the ledger on it, so what do I do now? It was easy to send it, now I can't get it out. I need a solution.

@Madyson10
Copy link

Tokens Runes

@wfyhehe
Copy link

wfyhehe commented May 17, 2024

Hi @bigspider. Thanks for your work. Is this included in the newest release? I updated to 0.35.1 today but sending runes is still not working.

@victorkirov
Copy link
Author

@wfyhehe this is a Ledger update, not an Xverse one. You will need to wait for the next version of the Ledger Btc app to be released.

@bigspider
Copy link
Collaborator

FYI: Version 2.2.3 should go live some time next week. Thanks for your patience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants