hirosystems / stacks-blockchain-api

API for the Stacks blockchain
https://stacks-blockchain-api.vercel.app
GNU General Public License v3.0
170 stars 108 forks source link

Wrong owner of bns name #1333

Closed friedger closed 1 year ago

friedger commented 1 year ago

Describe the bug The endpoint https://stacks-node-api.mainnet.stacks.co/v1/names/ape.mega shows SPC0KWNBJ61BDZRPF3W2GHGK3G3GKS8WZ7ND33PS as owner. However, the nft is owned by SPV48Q8E5WP4TCQ63E9TV6KF9R4HP01Z8WS3FBTG through tx https://explorer.stacks.co/txid/0xf9f9144793f6d4da9aba92a54ab601eb23bfe7f44c1edb29c2920bf5e7d2ac16?chain=mainnet

To Reproduce Compare the two links provided

Expected behavior the endpoint should show SPV48Q8E5WP4TCQ63E9TV6KF9R4HP01Z8WS3FBTG as owner

rafaelcr commented 1 year ago

Thanks @friedger ... this looks like it's caused by the API not handling a name-register and name-transfer in the same transaction. I'll take a further look.

blockstack-devops commented 1 year ago

:tada: This issue has been resolved in version 6.0.0-beta.9 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

badonyx commented 1 year ago

The endpoint is not consistently showing the correct address still. Oddly it is switching back and forth when I fetch the endpoint a few times.

rafaelcr commented 1 year ago

@0xBabo that behavior is part of our normal release process... we're deploying the API v6 right now (which contains the fix) but we do a rollout so we can slowly send traffic into the new env. If everything looks good we do the full switch, which as far as I can see is going along fine and will happen perhaps tomorrow.

badonyx commented 1 year ago

Thanks for the update. Probably worth noting that this actually resulted in 2 erroneous NFT transfers just last night, but I think I can contact the Ryder address owners to sort it out.

blockstack-devops commented 1 year ago

:tada: This issue has been resolved in version 6.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

rafaelcr commented 1 year ago

FYI @0xBabo v6 is now live in production with this fix

badonyx commented 1 year ago

I am only seeing the wrong result now, and old version at https://stacks-node-api.mainnet.stacks.co/extended/v1/status

"server_version": "stacks-blockchain-api v5.0.1 (master:499065fb)"
Murgo12 commented 1 year ago

Hi! I have this issue:

  1. During last month I had juice.btc replaced by SP3CFGFXW243Z2E3736HQJV2K5C3RF288WV6E0ARY (rob.btc). All nfts from surveys, giveaways, with juice,btc name participated, was sent to this wallet. Can we get them out ?
  2. https://stacks-node-api.mainnet.stacks.co/v1/names/juice.btc now shows SP252Z93VEGQ5TKY5RMCETHEXG6CF215GGT1EVS2T as owner. However, the name nft is owned by SP3QC4R6M7M0DAZBXSZCW4FWGDCNDD05FV8Y0AY8C.
rafaelcr commented 1 year ago

Hi @0xBabo @Morguf apologies for the setback, we had to rollback to v5 temporarily while we fix an unrelated bug, we'll re-deploy v6 ASAP which will fix the name owners and display them correctly again

blockstack-devops commented 1 year ago

:tada: This issue has been resolved in version 7.0.0-stacks-2.1.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

Murgo12 commented 1 year ago

Hi! The issue was met once again a month ago. NFT was transferred to SP3CFGFXW243Z2E3736HQJV2K5C3RF288WV6E0ARY instead of SP3QC4R6M7M0DAZBXSZCW4FWGDCNDD05FV8Y0AY8C https://explorer.stacks.co/txid/0x821e10c720e21250145853f0e514da9721cf3005de2c014f845c30b965ae6951?chain=mainnet

rafaelcr commented 1 year ago

hi @Morguf the tx you shared is a contract deploy. Could you share the tx where the name was transferred between those addresses so we can take a look?

Murgo12 commented 1 year ago

https://explorer.stacks.co/address/SP3CFGFXW243Z2E3736HQJV2K5C3RF288WV6E0ARY?chain=mainnet - last transaction cx-tokens transfer

https://gamma.io/rob.btc

rafaelcr commented 1 year ago

@Morguf the transaction you shared did not emit a name-transfer BNS event. This event is necessary for a name to go from one owner to the next. Perhaps there's still another step you need to take with that contract to make the transfer happen?

badonyx commented 1 year ago

https://stacks-node-api.mainnet.stacks.co/v1/names/juice.btc

@Morguf the API shows the address SP3QC4R6M7M0DAZBXSZCW4FWGDCNDD05FV8Y0AY8C for the name juice.btc. Does not seem like an API issue. In this case you should contact the sender to figure out why they sent to the wrong address.