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

feat: w.r.t. system contracts repo should hold in the current repo _all_ historical versions of system contracts (methods&structs) #900

Open
david-bakin-sl opened this issue Aug 9, 2024 · 1 comment

Comments

@david-bakin-sl
Copy link
Member

At any given time the contracts/system-contracts directory holds the current definitions of system contracts - methods and structs. And that works for most developer who want to compile contracts that run on the current network.

But those things get versioned over time. And there are some use cases where it is needed to specifically refer to older versions as well as the current version. Most obvious one is in testing, esp. test frameworks, where a test setup for someone might need to test that it works with older as well as the current version of APIs.

Suggestion: Add to the smart contract repo a directory for "consensus node API" distinct from "current user API" (the latter being what we have). It would simply contain a directory for each distinct historical API - i.e., every time we modify an existing systme contract or add a new one we'd add a new version directory. Naming convention here TBD - could be dates, could be arbitrary v1 v2 v3 ... (completely independent of the repo's own release number).

(Another use case this would support would be being able to use the smart contract repo as ground truth in the smart contract service of the consensus node (and mirror node). I.e., being able to generate code from it. That use case needs all historically supported versions.)

@Nana-EC
Copy link
Collaborator

Nana-EC commented Sep 11, 2024

@david-bakin-sl checking but is this not captured by the contents of https://github.com/hashgraph/hedera-smart-contracts/tree/main/contracts-abi/contracts/system-contracts
What's an example of a consensus node API that isn't the user API?
Agreed and the intent should be each change on CN prompts a version bump in this repo with a note of the CN version also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

2 participants