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

CIP-53: Remove minimum client version #318

Merged
merged 3 commits into from
Jun 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions CIPs/cip-53.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
cip: 53
title: Remove Minimum Client Version Check
author: Karl Bartel (@karlb)
discussions-to: https://github.com/celo-org/celo-proposals/discussions/361
status: Accepted
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.