stacks-core icon indicating copy to clipboard operation
stacks-core copied to clipboard

BNS `name-renewal` does not emit a print event if zonefile_hash is not provided

Open rafaelcr opened this issue 3 years ago • 1 comments

The name-renewal function in the BNS contract has the zonefile_hash argument set to optional so users can renew their names without having to provide this information. However, this has a side effect: the call to update-zonefile-and-props has to be skipped (since it requires a zonefile_hash) which in turn causes the "name-renewal" print event not to be emitted with the transaction (example tx here).

This issue was causing disruptions on the Hiro API, because names would not appear as renewed when they actually were. We were able to work around the issue by looking specifically for those contract calls instead, but it would be preferable if all BNS updates were reflected on contract print events.

Could there be an alternate print event emitted from that function instead?

rafaelcr avatar Sep 02 '22 02:09 rafaelcr

We could just patch the Stacks node so it prints the zone file hash on a successful contract-call to name-renewal.

jcnelson avatar Sep 06 '22 15:09 jcnelson

Temporarily assigning @rafaelcr to own this issue. Please feel free to re-assign or close as you see fit. It might be worthwhile to consider how BNSx changes the priority of this issue?

jcnelson avatar Feb 22 '23 02:02 jcnelson

Hi @jcnelson, sure. I think with BNSx on the way we can close this one out. I can reopen if needed in the future. Thanks.

rafaelcr avatar Feb 23 '23 04:02 rafaelcr