Contract versioning doc#229
Conversation
|
|
||
| To reduce unnecessary version bumps, contracts should be designed with extensibility in mind. | ||
|
|
||
| ### Extension State Pattern |
There was a problem hiding this comment.
This pattern adds globally mutable, non-type-safe state, which makes our code more difficult to understand and reason about, and increases the likelihood of bugs.
I would like to frame this pattern as a way to temporarily implement changes in a prior, deployed version in a upgrade-compatible way, only when strictly necessary. We should never use this pattern on the main branch, and should try to avoid it in general.
There was a problem hiding this comment.
agree, this is a temporary measure to implement missing behavior in already deployed contracts, and with a newer version these changes should be implemented with proper typing.
I still think it's still useful to have this escape hatch in the main branch to keep the contracts extendable and don't forget to add this field just before the deployment
There was a problem hiding this comment.
👍 agree, "never use" as in "the container is empty and not referenced", not "the container doesn't exist"
| All changes must be: | ||
|
|
||
| * Backward-compatible | ||
| * Deployable to the same contract address |
| | `v0` | Current deployed mainnet version | | ||
|
|
||
| * `main` is free to introduce breaking changes | ||
| * `v0` is stable and represents the exact deployed contract set |
There was a problem hiding this comment.
do we need to describe or indicate anything about contract naming on these branches? do we want to have any rulesets for that?
There was a problem hiding this comment.
added a section regarding contract naming
Closes: #???
Description
contract versioning strategy and some suggestions
For contributor use:
masterbranchFiles changedin the Github PR explorer