stacks-network / stacks-core

The Stacks blockchain implementation
https://docs.stacks.co
GNU General Public License v3.0
3.01k stars 667 forks source link

BNS Name-register and Name-update call do not register zonefile included in the attachment #4808

Open paradigma-cl opened 4 months ago

paradigma-cl commented 4 months ago

Describe the bug BNS Name-register and Name-update call do not register zonefile included in the attachment

Steps To Reproduce his issue was detected on our Domain Name registrar service https://domains.paradigma.global/ But we got the report of another user that also had the same issue with another Domain name registrar. We tried to find and solve the problem, but we couldn't solve it, since we think it is associated to the change of the platform release. We detected the following: Since a couple weeks ago detected that the zonefile is blank when creating any type of decentralized domain name (.stx, .app, .btc, or others) using the BNS smartcontract service. We use intesively the subdomain-register and is working fine. There is an issue when trying to retrieve the GAIA repository URL associated to the Stacks Address (default url was a gaia.blockstack.org/hub repository, but it was migrated to gaia.hiro.so/hub) it returns blank. Nevertheles, even when creating your fixed URL gaia hub or the hiro hub associated to the Stacks address, and passing it as attachment to the BNS smartcontract arguments call to the function name_register does not update the zonefile field. The same issue happens when executing the BNS smartcontract arguments call for update-name in order to fix the zonefile field. Both are set as blank. Here the image shows the smartcontract call: transaction_ubid_btc

The domain name gets registered, the zonefiles are set blank.

Here is an example after trying to fix the zonefile with name-update.

Example:

https://stacks-node-api.mainnet.stacks.co/v1/names/ubid.btc`
address | "SP3C4C4NXG7HFRCQ8VGVYKAM2SC8XMW79F3QS6KWY"
blockchain | "stacks"
expire_block | 413239
last_txid | "0x46600e0f061526ee7122e9a6fe1cbb8d03a586119ce4f217e37b585987e164b5"
status | "name-update"
zonefile | ""
zonefile_hash | `"f68689d6dfa2438b4ce78f4517b7654246df50af"

Expected behavior It should create a register like this, with a defined zonefile:

{
  "address": "SPW9XQWQ4VA5XH1EGTX3JPQ0G6BKWYK1EM56HZJX",
  "blockchain": "stacks",
  "last_txid": "0xcc0046f397e664b9e8d4c32e278c9a76f25ecfcda17bdddbce16052d10c0f574",
  "resolver": "",
  "status": "registered_subdomain",
  "zonefile": "$ORIGIN phillip.ubid.app.\n$TTL 3600\n_http._tcp\tIN\tURI\t10\t1\t\"https://gaia.hiro.so/hub/1DgkbhJGX5c6V2j3WyaHYZiyL9omZGTm3V/profile.json\"\n\n",
  "zonefile_hash": "3fd3c9935eac0de40cc811a667e1420b"
}

Environment (please complete the following information): Any OS

If you are encountering an issue with a smart contract, please include the smart contract code that demonstrates the issue.

https://explorer.hiro.so/sandbox/contract-call/SP000000000000000000002Q6VF78.bns?chain=mainnet

314159265359879 commented 4 months ago

Possible solution: https://github.com/stacks-network/stacks-core/issues/3270