-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
fail spending opret and tapret allocations together #246
Comments
yes, there was a huge work done to make this work, and I had an impression that it was working before. Maybe I am wrong that we had checked that. Anyway this is a bug which I will work on |
With #252 the error changed from
to
|
This is how it should work: the tapret wallet can't use opret funds; a manual hacking Is required. Since you lack tapret RGB funds you can't fulfill the invoice. Spending opret results in creating a second transition bundle, since each transition bundle commits to the used closing method and can't spend both opret and tapret. But the second transition bundle can't pay to the seal defined in the first transition bundle - the receiver's wallet won't recognize that payment. Thus, if you received invalid opret transfer into a tapret wallet, you need:
|
I actually was able to write logic allowing creating two different transition bundles spending from both opret and tapret inputs - and figuring out which ones have enough funds (or how to combine them). The logic is extremely complex, especially in part related to change etc. I am not sure whether that complexity (with all the risks for bugs) worth UX improvements. Here is separate PR adding that specific bit for your consideration: #256 |
I confirm that with #256 the test wallet is able to spend both allocations. |
I've added a test that tries to receive with a tapret wallet using opret as closing method. You can run it by checking out to https://github.com/zoedberg/rgb-integration-tests/tree/tapret_opret and running
cargo +1.79 test --test transfers tapret_wlt_receiving_opret
.The transfer is succesful but when the wallet tries to spend the opret allocation together with a tapret one (the change from the 1st transfer) the
pay
method fails with:I recall this functionality (closing both an opret and a tapret seal in a single RGB transfer) was inteded to work, as discussed in Viareggio (because we discovered this wasn't working). A refactor should have then fixed this.
The text was updated successfully, but these errors were encountered: