Skip to content
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

[costs] Represent cost functions for Clarity 2 functions #2717

Closed
gregorycoppola opened this issue Jun 17, 2021 · 3 comments
Closed

[costs] Represent cost functions for Clarity 2 functions #2717

gregorycoppola opened this issue Jun 17, 2021 · 3 comments
Assignees

Comments

@gregorycoppola
Copy link
Contributor

Is your feature request related to a problem? Please describe.
We don't have a way to represent costs for Clarity 2 functions. This means that existing cost functions have to be arbitrarily reused.

Additional context
I think the reason this is non-trivial is because it would be a consensus breaking change?

#2691 (comment)

@kantai
Copy link
Member

kantai commented Jun 17, 2021

Thanks for opening @gregorycoppola -- yeah, I think this is just a little subtle to implement without altering the consensus before the epoch switch.

I think that in order to implement this, we would need to:

  1. Add a new default cost contract instantiation at the "epoch-switch" boundary.
  2. Change the CostTracker implementation to use that default cost contract for Clarity2 functions.
  3. Change the CostTracker implementation so that it only matches new cost functions based on the active Clarity version (not the contract version)

@jcnelson
Copy link
Member

Closing in favor of #3115. Most of this work is done already in 2.05.

@blockstack-devops
Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@stacks-network stacks-network locked as resolved and limited conversation to collaborators Nov 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants