Skip to content

Commit

Permalink
feat(ct): add SOLIDITY_UPGRADES document
Browse files Browse the repository at this point in the history
Adds SOLIDITY_UPGRADES.md to contracts-bedrock. Please note that
this document makes some references to a unified Solidity version.
This will be true in a few days...
  • Loading branch information
smartcontracts committed Oct 2, 2024
1 parent 91f67eb commit e7566ce
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/contracts-bedrock/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ Please refer to the [CONTRIBUTING.md](https:/ethereum-optimism/optim
OP Stack smart contracts should be written according to the [STYLE_GUIDE.md](./STYLE_GUIDE.md) found within this repository.
Maintaining a consistent code style makes code easier to review and maintain, ultimately making the development process safer.

### Solidity Versioning

OP Stack smart contracts are designed to utilize a single, consistent Solidity version. Please
refer to [SOLIDITY_UPGRADES.md](./SOLIDITY_UPGRADES.md) to understand the process for updating to
newer Solidity versions.

## Deployment

The smart contracts are deployed using `foundry`. The `DEPLOYMENT_OUTFILE` env var will determine the filepath that the
Expand Down
78 changes: 78 additions & 0 deletions packages/contracts-bedrock/SOLIDITY_UPGRADES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Solidity Versioning Policy

This document outlines the process for proposing and implementing Solidity version updates in the
OP Stack codebase.

## Unified Solidity Version

The OP Stack codebase maintains a single, unified Solidity version across all contracts and
components. This ensures consistency, simplifies maintenance, and reduces the risk of
version-related issues.

**Important**: New Solidity versions must not be introduced to any part of the codebase without
going through the formal version update proposal process outlined in this document.

## Update Process

1. **Minimum Delay Period**: A new Solidity version must be at least 6 months old before it can be
considered for adoption.
2. **Proposal Submission**: Before any Solidity version upgrades are made, a detailed proposal must
be submitted as a pull request to the `ethereum-optimism/design-docs` repository in the
`solidity/` subfolder, following the standardized format outlined below. This applies to the
entire codebase; individual components or contracts cannot be upgraded separately.
3. **Review and Approval**: A dedicated review panel will assess the proposal based on the
following criteria:
- Is the Solidity version at least 6 months old?
- Does the proposed upgrade provide clear value to the codebase?
- Do any new features or bug fixes pose an unnecessary risk to the codebase?
4. **Implementation**: If the proposal receives unanimous approval from the review panel, the
Solidity version upgrade will be implemented across the entire OP Stack codebase.

## Proposal Submission Guidelines

To submit a Solidity version upgrade proposal, create a new pull request to the `ethereum-optimism/design-docs` repository, adding a new file in the `solidity/` subfolder. Use the following format for the file name and content:

### File Name

```txt
solc-update-[current-version]-to-[proposed-version].md
```

### File Content

```markdown
# Solidity Version Upgrade Proposal

**Current Version:** [e.g., 0.8.20]
**Proposed Version:** [e.g., 0.8.25]

## Benefits to the OP Stack

[Explain specific feature(s) in the new version that would benefit the OP Stack codebase, with a clear explanation of their potential impact and usefulness]

## Summary of Changes

[Provide a comprehensive summary of all significant features, changes, and bug fixes introduced between the current version and the proposed upgrade]

## High-Risk Features or Notable Bug Fixes

[Highlight any high-risk features or notable bug fixes that require special attention during the review process]

## Changelog Links

[Provide links to the Solidity changelog for each version between the current version used in the codebase and the proposed new version]

## Additional Notes

[Any other relevant information or considerations]
```

Please ensure that all sections are filled out comprehensively. Incomplete proposals may be delayed or rejected.

## Review Process

The review panel will evaluate each proposal based on the criteria mentioned in the "Review and Approval" section above. They may request additional information or clarifications if needed.

## Implementation

If approved, the Solidity version upgrade will be implemented across the entire OP Stack codebase. This process will be managed by the development team to ensure consistency and minimize potential issues. The upgrade will apply to all contracts and components simultaneously.

0 comments on commit e7566ce

Please sign in to comment.