-
Notifications
You must be signed in to change notification settings - Fork 85
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
1706 improve versioning for the light client contract #1800
1706 improve versioning for the light client contract #1800
Conversation
); | ||
} | ||
|
||
// that the data remains the same after upgrading the implementation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: test that the data remains the same after upgrading the implementation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorted here 7c3569c
assertEq(lcV1Proxy.frozenThreshold(), stateV1.threshold); | ||
} | ||
|
||
// that the data remains the same after upgrading the implementation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: test that the data remains the same after upgrading the implementation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorted here 7c3569c
@@ -0,0 +1,194 @@ | |||
# Smart Contract Upgrades | |||
|
|||
Code on the EVM is immutable but via proxies, smart contracts can be “upgraded”. A proxy contract acts as an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the documentation should be little more specific to our contracts - the _Example:_
section should have an example of how one should proceed if they need to upgrade LightClient.sol
. Otherwise I think, this becomes general documentation about smart contract upgradeability which can be found online. What are your thoughts on the same?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fair point, i'll add more info specific to LightClient.sol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorted in this commit and previous commits 105e26a
…initialization in new implementations of an upgradable contract
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Closes #1706
This PR:
virtual
keyword was added to functions in the LightClient contract so that they can be overridden in future versions of its implementationThis PR does not:
Key places to review:
How to test this PR:
forge test --match-contract LightClientUpgradeToV2Test
just sol-test
Things tested
To Do