hirosystems / stacks-devnet-api

The Stacks Devnet API runs a server that can be used to deploy, delete, manage, and make requests to Stacks Devnets run on Kubernetes.
Apache License 2.0
2 stars 0 forks source link

Add versioning support for Devnet API #86

Closed sabbyanandan closed 9 months ago

sabbyanandan commented 11 months ago

As a Platform user, when using Devnet, I would like to have the option to switch between Clarinet 1.x and 2.x (especially when sBTC is supported in clarinet integrate) so that I can switch the scope of my Devnet environment in the Platform depending on the sBTC requirement in my contracts.

If Devnet API is backward compatible, the above need is a no-op, and the issue can be closed. :)

MicaiahReid commented 9 months ago

Hey @sabbyanandan, I've got some questions on this one.

switch between Clarinet 1.x and 2.x

The change from Clarinet 1.x to 2.x introduces the new test framework, but none of that should impact how the devnet operates. If we wanted both the old and new test frameworks available for Platform users, that would be independent of the devnet API.

switch the scope of my Devnet environment in the Platform depending on the sBTC requirement in my contracts

From my understanding, sBTC will just be a contract that is deployed (as is pox-1, pox-2, etc.), and the conditions for these contracts being deployed is configurable by the user in the Devnet.toml.

On the other hand, if we want users to be able to switch between pre and post nakamoto, I think that would be a little trickier. The stacks node and API images are completely different for the nakamoto release, so I think it would require some customization to allow both. However, I don't really see the use-case for this. And, from my understanding, the nakamoto release is backwards compatible until pox-4 is enabled, and when this is enabled is configurable in the Devnet.toml.

So I think this issue is a noop, but please let me know if I'm misunderstanding you or the spec for the coming changes to the ecosystem!

sabbyanandan commented 9 months ago

Thank you very much for checking! Appreciate the thoughtful response.