Skip to content

Conversation

@0xiamflux
Copy link

Add specifications for the L2ContractsManager project. These enable deterministic hard fork upgrades of L2 predeploys.

  • L2ProxyAdmin: L2-specific implementation of universal ProxyAdmin with upgradePredeploys() and ERC1967-only overrides
  • L2ContractsManager: Orchestrates predeploy upgrades, deployed per hard fork as part of NUT bundles
  • ConditionalDeployer: A wrapper around the Create2Deployer predeploy, allowing for non-reverting deterministic deployments in case of address collision.
  • TransactionGenerationScript: A periphery contract that generates Network Upgrade Bundles for its execution during hard forks.

Includes invariants, assumptions, function specifications, and security considerations.

Design document

* feat: add initial version of predeploys and l2-contracts-manager

* chore: moves files to experimental

* chore: remove unrelated functions

* chore: make clear all network config is gathered

* feat: clarify use of gather config

* fix: update flow diagram

## Overview

## L2ProxyAdmin

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maurelian seems like if we want to exclude the different proxy types we would need to create an L2ProxyAdmin from scratch because we cant override the functions if we inherit from ProxyAdmin.
If we dont care about removing the different proxy types then we can inherit from ProxyAdmin and just add the upgradePredeploys spec

deploying the `L2ContractsManager` for the target hard fork, and calling `L2ProxyAdmin.upgradePredeploys()`.
The bundle is client-agnostic and can be consumed by any implementation:

```json

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will probably need a few more field on the JSON like a commit hash from where this bundle got created, what else?

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.

2 participants