RGB-WG / rgb-std

RGB standard libs for WASM & low-level integrations (no FS/networking)

Home Page:https://rgb.tech

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

recipient fails to accept a transfer spending a blank allocation

nicbus opened this issue · comments

Using commit f9813b7 plus a cargo update to include rgb-std #193 I face an issue.

This is what I'm doing (wallet 1 is the issuer/sender, wallet 2 is the recipient):

  • issue a NIA asset on wallet 1
  • issue a CFA asset on wallet 1
  • send some NIA assets from wallet 1 to wallet 2
  • send some CFA assets (spending blank allocation) from wallet 1 to wallet 2

The 2nd transfer fails when the recipient tries to accept it with the following error:

Error: anchors for the same witness do not match each other.

I need the second consignment and the data directories from both sender and receiver

Ok, I found a problem, here the data are not needed. The problem is related to comparison code for two anchors when they provide different proofs for different contracts

The solution is three-part one (all are v0.11 branches, so just do cargo update). Basically, instead of comparing anchors I had to do a dedicated operation which takes into an account that equivalent anchors may still have different parts concealed.

Sorry, I mistakenly merged PR and it closed this issue. Feel free to re-open it if the PR hasn't fixed it.

Re-tested after a cargo update and transfer accept is now successful.