-
Notifications
You must be signed in to change notification settings - Fork 369
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
Adding a contract to store minimum required client version #1081
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1081 +/- ##
==========================================
+ Coverage 66.47% 66.59% +0.11%
==========================================
Files 262 257 -5
Lines 7648 7394 -254
Branches 509 430 -79
==========================================
- Hits 5084 4924 -160
+ Misses 2462 2375 -87
+ Partials 102 95 -7
Continue to review full report at Codecov.
|
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.
Looks good. Just an ask around e2e tests and some style fixes. Here's the Solidity style guide to fix the function declarations.
packages/protocol/contracts/governance/BlockchainParameters.sol
Outdated
Show resolved
Hide resolved
packages/protocol/contracts/governance/BlockchainParameters.sol
Outdated
Show resolved
Hide resolved
packages/protocol/contracts/governance/BlockchainParameters.sol
Outdated
Show resolved
Hide resolved
packages/protocol/contracts/governance/BlockchainParameters.sol
Outdated
Show resolved
Hide resolved
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.
It looks like the 16_elect_validators migration was accidentally renamed to 51_elect_validators
packages/protocol/contracts/governance/BlockchainParameters.sol
Outdated
Show resolved
Hide resolved
I renamed the migrations because they are the ones that have to run last. |
Rather than rename it to 51, can we keep the sequential naming? |
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.
Exciting!
* @dev For example if the version is 1.9.2, 1 is the major version, 9 is minor, | ||
* and 2 is the patch level. | ||
*/ | ||
function setMinimumClientVersion(uint256 major, uint256 minor, uint256 patch) public onlyOwner { |
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.
Should this be external rather than public?
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 call it from the initializer, that's why it is public...
packages/protocol/contracts/governance/BlockchainParameters.sol
Outdated
Show resolved
Hide resolved
* master: (35 commits) [Wallet] Fix top of emojis cut off in the activity feed (#1243) Adding a contract to store minimum required client version (#1081) Revert "Feature #909 proxy delegatecall (#1152)" (#1241) Use ContractKit to get addresses for Blockchain API (#1175) Feature #909 proxy delegatecall (#1152) Fix Faucet done message (#1217) Updated SETUP.md with new yarn process (#1224) Adding `increaseAllowance` and `decreaseAllowance` methods (#1196) extracting function signatures (#1061) Fix integration hardcode (#1208) Fixing flaky governance test (#1155) Restore CI branch (#1223) [wallet] e2e back to green (#1210) [Wallet] Implement new import wallet flow designs (#1209) [Wallet] Fix disable conditions for butons on Enter Invite screen (#1214) [protocol] Rename infrastructureFraction to proposerFraction (#1174) [ck] Proper promise treatment to avoid UnhandledPromises (#1219) [ck] Transform StableToken parameters from fixidity format (#1218) [wallet]Store encrypted local signing key (#1188) 2019-10-03 alfajores deployment (#1200) ...
Description
This is a smart contract where the variables can be changed using governance. As a first variable, we have the minimum client version. In celo-blockchain PR, the client will check this variable and will exit if the required version on the blockchain is higher than current version.
Tested
There is a unit test for the contract, not sure where to add a test where geth exits.
Other changes
Changed migration numbering.
Related issues
Backwards compatibility