-
-
Notifications
You must be signed in to change notification settings - Fork 43
Failed asset transfer when using i9n #102
Comments
Thanks for reporting. Can you pls provide a full command line args you are using for doing the transfer? If you can, pls attach |
Regarding the origin of the error, this seems to be right. Clearly it can't read public key from PSBT. Will investigate with the command line options you provide |
Sure - the transfer:
issue_outpoint = assets.yaml here. Two possible causes I've thought of:
|
Re: network mismatch between rgbd and bitcoind, I think I am running into some of the config issues brought up here. Specifically, I am starting the rgb processes via |
Yes, seems related to #19. Let's see will the fix there solve this issue as well |
I've updated to v0.2.0-beta.4, and rgb-node now registers the given regtest chain param, which is great. However, I still have the same error from stash on transfer, so unsure what the root cause is. |
For more information on the origin of the error: -i9n::fungible, transfer method -> (RPC with TransferApi) Here we return |
I am working on PSBT analysis tool in Bitcoin Pro which I will use to solve the problem |
Ok, I found the reason of the issue (but not a solution yet). It's really wierd. PSBT, when read from Base64 in base64 deserialization: https://github.com/LNP-BP/rgb-node/blob/c3a15e92051f20009888e70dd77c88eb44768480/src/i9n/fungible.rs#L101 unknown: {Key { type_value: 254, key: [3, 82, 71, 66, 1] }: [33, 0, 3, 158, 255, 31, 84, 122, 29, 95, 146, 223, 162, 186, 122, 246, 172, 151, 26, 75, 208, 59, 164, 167, 52, 176, 49, 86, 162, 86, 184, 173, 58, 30, 249]} }] } } binary deserialization: https://github.com/LNP-BP/rgb-node/blob/c3a15e92051f20009888e70dd77c88eb44768480/src/cli/fungible.rs#L462 unknown: {Key { type_value: 254, key: [3, 82, 71, 66, 1] }: [3, 158, 255, 31, 84, 122, 29, 95, 146, 223, 162, 186, 122, 246, 172, 151, 26, 75, 208, 59, 164, 167, 52, 176, 49, 86, 162, 86, 184, 173, 58, 30, 249]} }] } Deserialization in @rajarshimaitra may you help me looking into this, spend several hrs and still not being able to figure out how this could happen |
The bug is clearly in rust-bitcoin; @rajarshimaitra I will ask you to help me finding it there. Currently made a workaround in RGB Node and the issue is closed here (we still need to file it to rust-bitcoin) |
Filed a bug in rust-bitcoin rust-bitcoin/rust-bitcoin#532 |
Actually it seems my fix does not work either. So when we do a |
That is indeed very strange - I will try to replicate, let me know if I can help in some other way. |
@dr-orlovsky, Noted. This looks interesting, I will dig it tonight. |
@dr-orlovsky seems strange from my end. I tried to reproduce the behaviour as per your comment #102 (comment). I have made this small test that is using the above two decoding methods to reproduce the behaviour
This above is passing all the assertions. Still trying to reproduce the bug. |
I have successfully issued an asset with the
issue
i9n function (validated with rgb-cli).However, when I try to transfer this asset, stashd returns an error after receiving the request to generate the consignment data.
Specifically, after the stash runtime receives the ConsignRequest, it returns this error:
ERROR rgb::contracts::fungible::runtime] Stash daemon has returned failure code: Failure { code: 3, info: "ServiceError { domain: Anchor(\"Incorrect public key data: {_0}\"), service: Stash }" }
AFAICT, the error originates here - all the addresses are bech32 and generated with rust-bitcoincore-rpc, so they should be valid.
I am using this PSBT:
cHNidP8BAFICAAAAAQGzz8+yqacT1Ht5YXmBF4DzgLj3nlPgWsCk1UTKoC0YAAAAAAD/////AVBEBCoBAAAAFgAU+DbfVBjpyC+SVNiB1hZqXX2q6oYAAAAAAAEAhQIAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////BAFFAQH/////AgDyBSoBAAAAFgAUpkvo4kwaLqiaQCDJdNVXblUJ/cgAAAAAAAAAACZqJKohqe3i9hw/cdHe/T+pmd+jaVN1XGkGiXmZYrSL69g2l06M+QAAAAABAR8A8gUqAQAAABYAFKZL6OJMGi6omkAgyXTVV25VCf3IIgYDsInjExR4/MdnmDzQ5TtrF/mpn1iaOoEiTzHKeCjmkmAQl905VQAAAIAAAACAAAAAgAAiAgJ4/wTVYOZ4rrY0kDMSgS4INs/9t7st5TjSlGQJFneXyxCX3TlVAAAAgAAAAIACAACAAA==
I have made successful transfers in the past using rgb-cli and similar PSBTs, around when rgb-node was version beta.4 - I am not sure if the required PSBT structure has changed since then.
The text was updated successfully, but these errors were encountered: