Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/v1/names/{name} does not reflect buying usernames from bids on marketplaces #1236

Closed
pradel opened this issue Jul 13, 2022 · 8 comments
Closed
Assignees
Labels
BNS P1 Priority 1 Critical functionality not working Impacts all/most customers released on @beta released on @stacks-2.1 released
Milestone

Comments

@pradel
Copy link
Contributor

pradel commented Jul 13, 2022

Describe the bug

I am not sure if this is a bug or intended behaviour. Creating the issue to open discussion regarding the behavior of the /v1/names/{name} endpoint.

Problem: When buying a new .btc domain via a bid from a marketplace, the /v1/names/{name} seems to return outdated data.

The https://stacks-node-api.mainnet.stacks.co/v1/names/dayslikewater.btc endpoint, return the last_txid field with the transaction that registered the name. In the payload, we can see that SP1TY00PDWJVNVEX7H7KJGS2K2YXHTQMY8C0G1NVP is the current owner of this name (which is correct), but the last_txid explorer link point to a transaction made by SPP117ENNNDQVQ1G3E0N1AP178GXBTC2YNQ3H7J. SPP117ENNNDQVQ1G3E0N1AP178GXBTC2YNQ3H7J is the account that bought the username at the beginning and then sold it to SP1TY00PDWJVNVEX7H7KJGS2K2YXHTQMY8C0G1NVP.

Shouldn't this endpoint reference the bid transaction in the last_txid result as the owner changed in this process?

Expected behavior

The https://stacks-node-api.mainnet.stacks.co/v1/names/dayslikewater.btc endpoint should return the last last_txid when the name was transferred to the new account.

@rafaelcr rafaelcr moved this to Recent issues in API Board Jul 21, 2022
@rafaelcr rafaelcr moved this from Recent issues to Backlog in API Board Aug 2, 2022
@rafaelcr rafaelcr added the P1 Priority 1 Critical functionality not working Impacts all/most customers label Aug 2, 2022
@rafaelcr
Copy link
Collaborator

rafaelcr commented Aug 2, 2022

This looks to be related to #1176 which is blocked by an issue on the Stacks blockchain itself

@rafaelcr rafaelcr added the BNS label Aug 29, 2022
@rafaelcr rafaelcr self-assigned this Aug 29, 2022
@rafaelcr rafaelcr moved this from Backlog to In Development in API Board Aug 29, 2022
@rafaelcr
Copy link
Collaborator

Related to #1287

@rafaelcr
Copy link
Collaborator

rafaelcr commented Aug 29, 2022

@pradel can you share the explorer link for the transaction that transferred this name via marketplace bid?

I think what's happening is that the API is only programmed to detect name-transfer events initiated by calling the BNS contract directly as opposed to those made through other contracts. It could be a simple fix but I'd need to see the original tx.

Thanks

@pradel
Copy link
Contributor Author

pradel commented Aug 29, 2022

@rafaelcr I think this is the transaction https://explorer.stacks.co/txid/0xa75ebee2c824c4943bf8494b101ea7ee7d44191b4a8f761582ce99ef28befb19?chain=mainnet

@rafaelcr
Copy link
Collaborator

Thanks for the quick response @pradel

@blockstack-devops
Copy link

🎉 This issue has been resolved in version 5.0.0-beta.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Repository owner moved this from In Development to Done in API Board Aug 31, 2022
@blockstack-devops
Copy link

🎉 This issue has been resolved in version 5.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@sabbyanandan sabbyanandan added this to the Q3-2022 milestone Sep 27, 2022
@blockstack-devops
Copy link

🎉 This issue has been resolved in version 7.0.0-stacks-2.1.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BNS P1 Priority 1 Critical functionality not working Impacts all/most customers released on @beta released on @stacks-2.1 released
Projects
Archived in project
Development

No branches or pull requests

4 participants