rgb-node
rgb-node copied to clipboard
Add finalize_transfers API
In order to finalize an RGB transfer that sends more than one asset, I added a new finalize_transfers
API. I haven't changed the existing finalize transfer API since I don't want to break compatibility, but maybe in the future we can deprecate that in favor of this API. Moreover I haven't implemented the beneficiary
part to save some implementation time (since currently we are not using that feature) and the respective CLI command, but I guess we can open some "good first" issues for these features.
Hi @zoedberg
How are you?
That's a great feature!
I will try to reproduce the tests. Can you help with questions?
- Do you made all transfers using OpRet, correct?
- For each consignment file, it is necessary to have an output in PSBT file, correct?
Thanks
Hi! All good, thanks :) Sure, always happy to help!
- Do you made all transfers using OpRet, correct?
Yes, correct
- For each consignment file, it is necessary to have an output in PSBT file, correct?
No, all transfers are anchored on a single opret output
Hi! All good, thanks :) Sure, always happy to help!
- Do you made all transfers using OpRet, correct?
Yes, correct
- For each consignment file, it is necessary to have an output in PSBT file, correct?
No, all transfers are anchored on a single opret output
Thanks for reply, I will try make tests ASAP.
Thanks for reply, I will try make tests ASAP.
Hi @zoedberg ,
I tried to reproduce all steps, and add more than one contract into the psbt file, but when I executed rgb-cli transfer combine
the node returned Error:
The key is already present but has a different value.
Can you help me to reproduce the tests?
My Test
- Create two new contracts with different UTXO issuer.
- Create a new consignment file with each contract.
- Create two new state transitions with the same change output (with rgb20).
- Create one PSBT file with two inputs with UTXOs used in the first step (with descriptor wallet)
- Try embed and combining consignment files with PSBT.
PS: The new API seems correct!
Hi @crisdut,
Your test is a very high level one, not sure how to reproduce it. Are you doing this via CLI? If so please note there are some open issues and missing features on rgb-node CLI that I think prevent your test from working properly.
In rgb-lib we have a test send::receive_multiple_different_assets_success that does exactly what you say (using opret instead of tapret). So I believe the bug you're encountering is not in the rgb-node daemon or other RGB libraries. It could be an issue in one of the RGB CLIs or another issue in your setup.
Hi @zoedberg,
Your test is a very high level one, not sure how to reproduce it. Are you doing this via CLI? If so please note there are some open issues and missing features on rgb-node CLI that I think prevent your test from working properly.
Sorry, I didn't detail how I tested the feature. Yes, I'm doing with rgb-cli
to test.
In rgb-lib we have a test send::receive_multiple_different_assets_success that does exactly what you say (using opret instead of tapret). So I believe the bug you're encountering is not in the rgb-node daemon or other RGB libraries. It could be an issue in one of the RGB CLIs or another issue in your setup.
The error occurs when executing rgb-cli transfer combine
command in rgb daemon.
Well, I will investigate more. However, I agree this error is about tooling compatibility and not your feature.