-
Notifications
You must be signed in to change notification settings - Fork 647
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
Add/update block height keywords in Clarity #4745
Conversation
Also update the docs for `block-height` to explain its removal in Clarity 3.
In addition to specifying a minimum version, when a builtin is first available, we can now also specify a maximum version, after which the builtin is no longer available. This is needed for `block-height`, which will not be available starting in Clarity 3.
`block-height` can no longer be used in Clarity 3 and above and will cause an analysis error. In its place is `stacks-block-height`.
Handle the `tenure-height` keyword in Clarity3, and using the same logic for `block-height` in Clarity 1 or 2.
I'm still checking on a couple of the integration tests, but @kantai, when you have some time, could you take a look at the approach here and let me know if you see anything troublesome. 🙏 |
Somehow related is the get-tenure-info #4716 |
With this commit, undo the MARF changes following the mechanism used for `block-height` and replace it with a Clarity based solution.
ba0f3cc
to
d8ee58e
Compare
fc5b94e
to
2dc5bc3
Compare
Also including some other improvements from PR review.
472c9a1
to
2b4b1c1
Compare
This is necessary after the new check was added to ensure that the tenure height is not set before epoch 3.0.
Ensure new keywords are still handled as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a test document somewhere that we can update so we can remember to put this PR through its paces on the Nakamoto testnet?
Description
Adding support for
stacks-block-height
andtenure-height
in Clarity 3. This also includes using thetenure-height
logic forblock-height
logic in Clarity 1 and 2.Applicable issues
block-height
in Nakamoto #3943Additional info (benefits, drawbacks, caveats)
Checklist
docs/rpc/openapi.yaml
andrpc-endpoints.md
for v2 endpoints,event-dispatcher.md
for new events)clarity-benchmarking
repobitcoin-tests.yml