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

feat(protocol): introduce ForkManager to improve protocol fork management #18508

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dantaik
Copy link
Contributor

@dantaik dantaik commented Nov 23, 2024

Currently, the TaikoL1 protocol required each fork's codebase to contain implementations for both the current fork and the next fork within the same contract. This created unnecessary code complexity and tight coupling between fork versions.

With the new ForkManager, we can:

  • Split fork implementations into separate, focused contracts
  • Maintain cleaner separation of concerns between fork versions
  • Support multiple forks as long as their storage layouts remain compatible

This change improves code maintainability and makes the fork upgrade process more modular.

BTW, I'm aware of Diamond proxy design but I'm in favor of this ForkManager implementation for its simplicity.

@dantaik dantaik marked this pull request as ready for review November 23, 2024 07:04
@dantaik
Copy link
Contributor Author

dantaik commented Nov 23, 2024

The storage layout of ForkManager is compatible with the layout of TaikoL1.

Screenshot 2024-11-23 at 15 05 37

@dantaik dantaik enabled auto-merge (squash) November 23, 2024 07:06
Copy link

feat(protocol): introduce ForkManager to improve protocol fork management

Generated at commit: b01e6c3abe604c6c873fe7c7b4d3ea17f167a316

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
3
3
0
7
42
55
Dependencies Critical
High
Medium
Low
Note
Total
0
0
0
0
0
0

For more details view the full report in OpenZeppelin Code Inspector

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant