proveownership and verifyownership don't work correctly yet? #895
Replies: 2 comments 1 reply
-
Thanks for the detailed report. This does look weird at first glance. But in order for me to attempt to reproduce, can you give me some additional details please? For example, the two assets that exist (ID Are you sure that user 1 doesn't also have an asset output of Also, please note that ownership is defined by who owns the private key of the script key of an asset. So since you use the same script key for both commands with the same user, the proofs are both expected to be valid (and the unexpected behavior is about two assets with different IDs but same script key being available). If you can reproduce, could you post the exact commands you used to mint and distribute the assets to the two nodes so we can reproduce? |
Beta Was this translation helpful? Give feedback.
-
Thanks for following up about this. Let me answer your queries in detail. The first asset in play here:
This asset was minted by USER 2 in a quantity of A few days ago, I sent USER 1 GENERATES ADDRESS TO RECEIVE ASSET
USER 2 SENDS ASSET TO USER 1
At this point, although this was committed to the blockchain (https://mempool.space/tx/3676c63b9b1e01c1f4b177ddf2edee237a06239b0913b8f4f15ee29e4a8de792#vout=1 ) .... I did not find that the transfer successfully completed.... I ran I also found that there was not an USER 2 EXPORTS PROOF
At this point, I think I somehow "synched" this proof with a universe... unfortunately I don't have the record of any command(s) I used to do this.... note that USER 1 has in its federation the universe But then I was able to run Next, regarding asset Regarding this:
I don't quite understand this. My guess is that |
Beta Was this translation helpful? Give feedback.
-
I have a concern about the
tapcli
commandsproveownership
andverifyownership
.These two commands are documented here:
https://lightning.engineering/api-docs/api/taproot-assets/asset-wallet/verify-asset-ownership
https://lightning.engineering/api-docs/api/taproot-assets/asset-wallet/prove-asset-ownership
I have two separate LND + TAPD instances running, and I'm testing how a two different users could validate ownership of an asset.
Both are running TAPD from the
main
branch, updated a few days ago, and LND from this docker containerlightninglabs/lnd:v0.18.0-beta.rc1
.USER 1
This user owns an asset, and wants to prove ownership of the asset.
tapcli assets list
Then, using the
asset_id
andscript_key
, USER 1 constructs this command:This command generates this binary file (I have put in in ZIP so I could upload it here):
this-proof-should-be-good.zip
Then, USER 2 accepts the
this-proof-should-be-good.proof
file, and runs this command:Here is the response:
Good!
Now, back on USER 1, I construct another
proveownership
command:Note I have made two changes to this command:
The
asset_id
is now an asset that is NOT owned by USER 1.And I have changed the export filename to:
this-proof-should-be-bad.proof
This command produces another file
this-proof-should-be-bad.proof
.this-proof-should-be-bad.zip
And I have my first concern... shouldn't
proveownership
return an error if this user does not own this asset? It seems strange thattapcli
would produce the proof without returning an error?But.... moving on, on USER 2
Here is the response:
.... Shouldn't USER 2 get a message here that this is NOT a valid proof?
thanks
Beta Was this translation helpful? Give feedback.
All reactions