-
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
base: main
Are you sure you want to change the base?
Conversation
refactor(protocol): multiple improvements on implementation and tests
🚨 Report Summary
For more details view the full report in OpenZeppelin Code Inspector |
…-mono into address_resolver2
That is because the tier verifier address changes. I will re-generate proof for the test soon, can ignore these 2 (any maybe risc0 has the same problem) for now as it is not a problem with the code logic. |
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_
.