ethereum-optimism / ethereum-optimism/optimism
ISemver policy
- Dominant language
- Go
- Stars
- 6.5k
- Forks
- 4k
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 145
Description
This issue stems from a discussion with @maurelian about whether RISC-V.sol should implement the `ISemver` interface and the need to clarify and potentially standardize our policy on the use of `ISemver` across contracts.
The file [RISC-V.sol](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/vendor/asterisc/RISCV.sol) is currently vendored and does not inherit from `ISemver`. This might be due to its origin as a copy-paste from another repository where `ISemver` does not exist. While its inclusion could improve consistency, this raises questions about our general approach to vendor contracts and `ISemver`.
In our discussion, we also noted that `ISemver` is primarily used to enforce implementation of versioning. However, this practice might be inconsistent with other parts of the codebase.
Questions that raised:
- Should all on-chain contracts, including vendor contracts like RISC-V.sol, implement `ISemver`?
- Should we enforce the `ISemver` interface only through checks rather than inheritance, especially for vendor contracts?
Contributor guide
Research direction
Start by reviewing packages/contracts-bedrock/src/vendor/asterisc/RISCV.sol and the existing uses of ISemver, then trace the referenced discussion with @maurelian. Done means reaching and documenting a clear project-wide policy for vendor contracts and ISemver, including whether RISC-V.sol should inherit from it or be checked another way.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- solidity
- Domain
- blockchain
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100