Trust-Machines / BNS-V2

MIT License
17 stars 5 forks source link

Improper use of `block-height` over `burn-block-height` #61

Closed jcnelson closed 3 months ago

jcnelson commented 3 months ago

I noticed that the main contract continues to use block-height (i.e. the Stacks block height) instead of burn-block-height (i.e. the Bitcoin block height) for determining name preorder, namespace preorder, namespace launch, and name renewal times. Given that the block height value can advance on the order of seconds (instead of 10s of minutes) in the upcoming Nakamoto release, the code really ought to be using the underlying Bitcoin block height for measuring time. Note that this now measured in the (Clarity 3-only) tenure-height keyword.

In addition, in Nakamoto, you now have access to get-stacks-block-info? {height} time function, which gives you a best-effort wall-clock time. So, if you wanted to measure time independent of Bitcoin block arrivals, this is also an option.

Patotking12 commented 3 months ago

Ok noted!! Yes I'll update everything to be burn-block-height