-
Notifications
You must be signed in to change notification settings - Fork 26
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
add storage slots for future proxy upgrades #75
Conversation
WalkthroughThe recent updates primarily focus on storage optimization and mapping enhancements within the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 0
Review Status
Configuration used: CodeRabbit UI
Files selected for processing (6)
- contracts/core/Dispatcher.sol (3 hunks)
- test/Dispatcher.proof.t.sol (1 hunks)
- test/Dispatcher.t.sol (1 hunks)
- test/upgradeableProxy/Dispatcher.upgrade.t.sol (1 hunks)
- test/upgradeableProxy/DispatcherUUPS.accessControl.t.sol (2 hunks)
- test/upgradeableProxy/upgrades/DispatcherV2.sol (1 hunks)
Additional comments not posted (10)
test/upgradeableProxy/DispatcherUUPS.accessControl.t.sol (2)
35-35
: Ensure the new byte32 value used invm.load
correctly points to the intended storage slot for the dispatcher proxy's upgrade mechanism.
47-47
: Verify that the updated byte32 value used invm.load
accurately targets the correct storage slot for the light client address post-upgrade.test/Dispatcher.proof.t.sol (1)
68-68
: Ensure the updated nested mapping slot calculation aligns with the contract's storage layout and does not cause unintended overwrites or conflicts.test/upgradeableProxy/Dispatcher.upgrade.t.sol (1)
38-41
: Verify that the updated slot values for packet handling align with the contract's new storage layout and do not cause conflicts or unintended overwrites.test/upgradeableProxy/upgrades/DispatcherV2.sol (1)
34-34
: Ensure the size of the__gap
array is appropriately chosen based on the anticipated future needs of the contract to maintain storage layout compatibility with future upgrades.contracts/core/Dispatcher.sol (4)
35-36
: The addition of the__gap
array is a good practice for upgradeable contracts to reserve space for future variables.
61-61
: The addition of the_channelIdToConnection
mapping is a good practice for efficiently linking channel IDs with their respective connections.
58-58
: The modification in the initialization of_lightClient
follows standard practices for upgradeable contracts.
594-594
: Setting the channel to connection mapping in the_connectChannel
method is correctly implemented.test/Dispatcher.t.sol (1)
625-625
: Ensure the correctness of the storage slot calculation change fromuint32(107)
touint32(156)
in thetest_ack_packet_dapp_revert
function. This is crucial for accurately testing the contract's behavior.
LGTM |
This PR squashes these three commits from the
v2
branch.They have been tested with the e2e.
Summary by CodeRabbit
New Features
Bug Fixes
Refactor