-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
refactor(protocol): multiple improvements on implementation and tests #18483
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
refactor(protocol): multiple improvements on implementation and tests
🚨 Report Summary
For more details view the full report in OpenZeppelin Code Inspector |
dantaik
added
option.pinned
Will not be marked as stale automatically
option.do-not-merge
labels
Nov 10, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a large PR, with many changes aimed at adapting to recent updates. During your review, please focus primarily on storage and ABI upgradability aspects.
Introduced
IResolver
andDefaultResolver
This update refactors the address resolution process by replacing
IAddressManager
,IAddressResolver
, andAddressManager
with a new interface,IResolver
, and its implementation,DefaultResolver
. Previously,EssentialContract
relied on anaddressManager
contract for address resolution. Now,EssentialContract
points to anIResolver
instance directly. This update:Resolver
to reduce gas costs.EssentialContract.setResolver
.MainnetXXX
contracts, which previously handled caching, simplifying the structure.Test Cleanup
The test environment has been streamlined, with common logic refactored and dependencies on real provers minimized. The rollup protocol tests now have three main targets:
pnpm test:l1
pnpm test:l2
pnpm test:shared
You can also run all tests with
pnpm test
.Removed
TierRouter
Routing logic has been incorporated into the
TierProvider
implementation, allowing the deletion ofTierRouter
.Deployment Scripts
Many deployment scripts were designed for one-time use and are not intended for reuse. Redundant scripts were deleted, and others moved to
script/layer1/mainnet
andscript/layer1/hekla
. The GitHub workflow has been updated to ignore these scripts.Todos
script/layer1/DeployProtocolOnL1.s.sol
: Working on rewriting this deployment script to improve accessibility for users less familiar with the protocol design. The goal is to make it interactive and/or support input files, with modular scripts for reuse.test/genesis/
were temporarily removed. Please reintroduce them usingDefaultResolver
(avoid using files from thescript/
folder). Submit a separate PR.FOUNDRY_PROFILE=layer1 forge test -vvv --mt test_sp1_
.