From 79584f8abe2fc42a60ffc951fa38f47580f2d417 Mon Sep 17 00:00:00 2001 From: Karl Bartel Date: Fri, 3 Mar 2023 10:10:21 +0100 Subject: [PATCH 1/3] New CIP: Remove minimum client version --- CIPs/cip-remove_minimum_client_version.md | 68 +++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 CIPs/cip-remove_minimum_client_version.md diff --git a/CIPs/cip-remove_minimum_client_version.md b/CIPs/cip-remove_minimum_client_version.md new file mode 100644 index 00000000..f7fec442 --- /dev/null +++ b/CIPs/cip-remove_minimum_client_version.md @@ -0,0 +1,68 @@ +--- +cip: +title: Remove Minimum Client Version Check +author: Karl Bartel (@karlb) +discussions-to: +status: Draft +type: Standards Track +category: Ring 0 +created: 2023-02-27 +license: Apache 2.0 +--- + +## Simple Summary + +Remove the `minimumClientVersion` from the `BlockchainParameters` contract and all code using it. + +## Abstract + +The protocol contains a mechanism to store and update a minimum client version number on the blockchain. Celo clients should periodically read this version number and shut down if they are older than the specified version. This mechanism did not prove to be useful in practice, so this CIP suggests removing it. + +## Motivation + +The client version check has been added to avoid problems when incompatible client versions interact with each other. The past has shown that changes which cause such incompatibilities always happen along with a hard fork. The hard fork ensures that incompatible versions won't be on the same fork, making additional version checks unnecessary. + +## Specification + +Remove the following functions from the BlockchainParameters contract: + +- `setMinimumClientVersion` +- `getMinimumClientVersion` + +Celo clients will not call `getMinimumClientVersion` and continue operation regardless of their version number. + +## Rationale + +There is no specific need to remove this feature, but removal will simplify the code base and reduce the divergence from upstream geth, thereby making Celo clients more maintainable. Since there are no likely scenarios in which the feature would be helpful, the maintenance costs outweigh the benefits of having the feature. + +## Backwards Compatibility + +Removal of `getMinimumClientVersion` in the contract breaks backwards compatibility. The client can easily be changed not to call this function, but removing the functions from the contract must wait until the next hard fork to avoid breaking existing clients. + +## Implementation + +Remove the following elements from the BlockchainParameters contract: + +- `function setMinimumClientVersion` +- `function getMinimumClientVersion` +- `struct ClientVersion` +- `ClientVersion private minimumClientVersion` +- Remove `major`, `minor`, `patch` parameters from constructor + +PR: https://github.com/celo-org/celo-blockchain/pull/2026 + +Remove from `blockchain_parameters.go`: + +- [SpawnCheck](https://github.com/karlb/celo-blockchain/blob/a0df3fb5d946524d1d34d8b182d1013223c84984/contracts/blockchain_parameters/blockchain_parameters.go#L139-L153) +- [checkMinimumVersion](https://github.com/karlb/celo-blockchain/blob/a0df3fb5d946524d1d34d8b182d1013223c84984/contracts/blockchain_parameters/blockchain_parameters.go#L113-L129) +- The [version check](https://github.com/karlb/celo-blockchain/blob/a0df3fb5d946524d1d34d8b182d1013223c84984/cmd/utils/flags.go#L643-L646) flag and [its usage](https://github.com/karlb/celo-blockchain/blob/a0df3fb5d946524d1d34d8b182d1013223c84984/cmd/geth/main.go#L458-L469) + +PR: https://github.com/celo-org/celo-monorepo/pull/10204 + +## Security Considerations + +No known security considerations. + +## License + +This work is licensed under the Apache License, Version 2.0. From 219a6843fe98ed522e593edfa4180545c80b176c Mon Sep 17 00:00:00 2001 From: Karl Bartel Date: Wed, 19 Apr 2023 15:47:16 +0200 Subject: [PATCH 2/3] Use CIP number 53, link discussion --- CIPs/{cip-remove_minimum_client_version.md => cip-53.md} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename CIPs/{cip-remove_minimum_client_version.md => cip-53.md} (97%) diff --git a/CIPs/cip-remove_minimum_client_version.md b/CIPs/cip-53.md similarity index 97% rename from CIPs/cip-remove_minimum_client_version.md rename to CIPs/cip-53.md index f7fec442..92fc6a86 100644 --- a/CIPs/cip-remove_minimum_client_version.md +++ b/CIPs/cip-53.md @@ -1,8 +1,8 @@ --- -cip: +cip: 53 title: Remove Minimum Client Version Check author: Karl Bartel (@karlb) -discussions-to: +discussions-to: https://github.com/celo-org/celo-proposals/discussions/361 status: Draft type: Standards Track category: Ring 0 From 2ea4673a191ed9d7e1fc4b1e4c3a4ccb891c17b2 Mon Sep 17 00:00:00 2001 From: Karl Bartel Date: Wed, 19 Apr 2023 16:14:29 +0200 Subject: [PATCH 3/3] Set status to accepted --- CIPs/cip-53.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CIPs/cip-53.md b/CIPs/cip-53.md index 92fc6a86..02a896ad 100644 --- a/CIPs/cip-53.md +++ b/CIPs/cip-53.md @@ -3,7 +3,7 @@ cip: 53 title: Remove Minimum Client Version Check author: Karl Bartel (@karlb) discussions-to: https://github.com/celo-org/celo-proposals/discussions/361 -status: Draft +status: Accepted type: Standards Track category: Ring 0 created: 2023-02-27