-
Notifications
You must be signed in to change notification settings - Fork 2
fix: pp minors #458
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
fix: pp minors #458
Conversation
| //////////////////////////////////////////////////////////////*/ | ||
|
|
||
| /// @notice The Optimism Governor contract that will handle the voting phase. | ||
| IOptimismGovernor public immutable GOVERNOR; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also do the same for the governor and move to initialize?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really sure, it could somehow make sense to change the schema uid if the resolver changes by any chance
but I wonder in which context another governor would be deployed given that it is a proxy, and in case a new one is deployed, how compatible would it be with the existing validator
| "slot": "104", | ||
| "type": "mapping(bytes32 => struct ProposalValidator.ProposalData)" | ||
| "slot": "106", | ||
| "type": "mapping(uint256 => struct ProposalValidator.ProposalData)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Storage Corruption in Contract Upgrade
Critical storage layout corruption in the ProposalValidator contract. New state variables approvedProposerAttestationSchemaUid and topDelegatesAttestationSchemaUid were introduced as stored variables (previously immutable), inserting at slots 101 and 102. This shifts existing storage variables: proposalDistributionThreshold (101->103), votingCycles (102->104), proposalTypesData (103->105), and _proposals (104->106). Furthermore, the _proposals mapping's key type changed from bytes32 to uint256. These breaking changes cause data corruption and render existing state (including all prior proposals) inaccessible for deployed proxies, making the contract unusable after upgrade.
Locations (3)
* chore: use fixed variable for contract version * refactor: rename proposalHash to proposalId for governor consistency * chore: move attestation schemas uids to initialize function * chore: specify target modules in submit functions * refactor: proper naming for modules settings * fix: pre-pr
* chore: use fixed variable for contract version * refactor: rename proposalHash to proposalId for governor consistency * chore: move attestation schemas uids to initialize function * chore: specify target modules in submit functions * refactor: proper naming for modules settings * fix: pre-pr
No description provided.