-
Notifications
You must be signed in to change notification settings - Fork 700
Setup for Clarity 4 and implement contract-hash?
#6403
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
base: develop
Are you sure you want to change the base?
Conversation
See clarity-lang/reference#88 and stacks-network#6320 for dicsussion about this new builtin function.
For now, this is only accessible via the CLI: ```sh stacks-inspect contract-hash <path-to-contract> ```
Also adds Epoch 3.3 and costs-4 to support this new function and removes the MAST implementation from the previous proposal.
This is not needed since it will actually execute a read-only call in the Clarity version for the called contract. Removing this allows us to safely set `ClarityVersion::latest()` to return `Clarity4`.
Fix issues with different Clarity versions and add some more fake results from the test DBs.
These failing integration tests all pass locally. I don't recall seeing these be flaky in other PRs. I will take a look to see if I introduced a new source of flakiness somewhere. |
I believe the flakiness I saw before is solved by #6420. |
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.
This looks good to me, just have a few comments
Will be updated to 3.3 once all of 3.3 is implemented.
What I've come up with is to do this in memo: if cfg!(test) && target_epoch.epoch_id > StacksEpochId::latest() {
vec![marker_for_epoch(target_epoch.epoch_id).expect("Unsupported epoch")]
} else {
vec![STACKS_EPOCH_LATEST_MARKER]
}, |
Also harden the `test_epoch_3_3_activation` test a bit.
Actually, I realized just have a test version of |
The test implementation returns epoch 3.3 while the non-test version returns 3.2.
Description
This is the first step in the Clarity 4 proposal (see SIP PR #218). This changes adds Epoch 3.3, Clarity version 4, and costs-4, which is needed for the new builtins. Epoch 3.3 is currently set to activate at Bitcoin height 33,000,000, and Clarity 4 does not activate until 3.3, so it should be safe to merge into develop.
Checklist
docs/rpc/openapi.yaml
andrpc-endpoints.md
for v2 endpoints,event-dispatcher.md
for new events)clarity-benchmarking
repo