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

Draft: Supporting PoX locks in Clarinet #1074

Closed
wants to merge 1 commit into from
Closed

Conversation

kantai
Copy link

@kantai kantai commented Jul 12, 2023

One of the issues with testing PoX in Clarinet is that Clarinet doesn't apply account locks when PoX methods are invoked (these require defining a special case handler).

This PR adds this to Clarinet, but it does it in a little bit of clumsy way.

There's kind of two or three questions in my mind about adding this support to Clarinet:

  1. Is adding PoX lock handling to Clarinet a useful feature generally or is that something just people working on PoX care about? I could imagine this would make contract writing for things like pools easier. If it's not generally useful, then perhaps allowing a dynamic link here would help.
  2. Does it make sense for this to be configurable in some way? Currently, this applies the locks to the boot contracts (which Clarinet does publish). But I guess I could imagine this being a toml configured option to match different Contract IDs. This would allow a "new" PoX contract to be tested in the same way any other clarity contract would.
  3. Ideally, this code wouldn't need to be re-implemented between the stacks-blockchain repo and this repo. This code is actually fairly easy to separate from the rest of the stacks codebase (as this PR sort of demonstrates). So maybe this isn't so much a question for the Clarinet folks, because really, this could be another library output from the stacks-blockchain repo. So, I guess my question is, do you all think this is worthwhile enough to engage with refactoring on the stacks-blockchain side?

@lgalabru
Copy link
Contributor

I'm a supporter of having PoX being supported in clarinet!

@kantai
Copy link
Author

kantai commented Jul 18, 2023

I'm a supporter of having PoX being supported in clarinet!

Great. I'll try to update this PR so that it pulls the locking logic directly from a stacks-node library (see stacks-network/stacks-core#3793)

@hugocaillard
Copy link
Collaborator

Hey @kantai
Thx for this PR, I rebased it and converted it to draft.
What's the status of this PR? Do you think you'll have time to pursue the effort?

@hugocaillard
Copy link
Collaborator

Superseded by #1375
Thanks @kantai for starting the work here and showing us the way 🙌

@hugocaillard hugocaillard deleted the feat/pox-handler branch March 11, 2024 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants