Skip to content
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

Split FaultProof initialization to new function initializeAnchorStateRegistry() #286

Open
wants to merge 13 commits into
base: celo10
Choose a base branch
from

Conversation

jcortejoso
Copy link
Member

The PR splits the FaultProof initialization to new function initializeAnchorStateRegistry(). Also removes the "testing" fault proof game times (Alphabet, Asterisc, Fast) that are not intended for production networks.

With these changes, L1 deployment process would look like:

  1. Run Deploy.s.sol run() function as normally. With the changes, Fault Game implementations are not deployed, and AnchorStateRegistry is not initialized (and cannot be initialized at this point without registering a game by the admin, with error execution reverted: Proxy: implementation not initialized). Command to deploy the L1 contracts:
DEPLOY_CONFIG_PATH=./deploy-config/$DEPLOYMENT_CONTEXT.json \
forge script scripts/deploy/Deploy.s.sol:Deploy --private-key $GS_ADMIN_PRIVATE_KEY --broadcast --rpc-url $L1_RPC_URL --priority-gas-price 1 --legacy
  1. Proceed with the deployment. Generate L2 genesis.json and rollup.json. Get the outputRoot for the L2 migration block (or genesis if a new testnet) and replace the values faultGameGenesisBlock and faultGameGenesisOutputRoot in the rollup config.

  2. Initialize the Fault Proofs, with the command:

DEPLOY_CONFIG_PATH=./deploy-config/$DEPLOYMENT_CONTEXT.json CONTRACT_ADDRESSES_PATH=./deployments/$L1_CHAIN_ID-deploy.json \
forge script scripts/deploy/Deploy.s.sol:Deploy --private-key $GS_ADMIN_PRIVATE_KEY --broadcast --rpc-url $L1_RPC_URL --priority-gas-price 1 --legacy --sig 'setupFaultGames()'

@jcortejoso jcortejoso force-pushed the jcortejoso/fault-proofs-deployment branch from 3d16ab7 to 4a7ecb6 Compare December 17, 2024 08:53
Copy link

socket-security bot commented Dec 17, 2024

No dependency changes detected. Learn more about Socket for GitHub ↗︎

👍 No dependency changes detected in pull request

@jcortejoso
Copy link
Member Author

@SocketSecurity ignore pypi/[email protected]

Copy link

github-actions bot commented Jan 2, 2025

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Jan 2, 2025
@karlb karlb removed the Stale label Jan 6, 2025
@jcortejoso jcortejoso requested a review from palango January 10, 2025 09:32
@jcortejoso jcortejoso force-pushed the jcortejoso/fault-proofs-deployment branch from 83d2311 to 380a18f Compare January 10, 2025 09:33
@palango
Copy link

palango commented Jan 10, 2025

What is meant by

and replace the values faultGameGenesisBlock and faultGameGenesisOutputRoot in the rollup config.

Are those taken from step 1?

waitReachable(config.client.l1.public, 10_000),
waitReachable(config.client.l2.public, 10_000),
waitForNextGame(config.client.l1.public, chainConfig.l2, 60_000),
waitReachable(config.client.l1.public, 60_000),
Copy link

Choose a reason for hiding this comment

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

Are those changes related to this PR?

@@ -1,5 +1,5 @@
certifi==2024.7.4
cffi==1.15.1
cffi==1.17.1
Copy link

Choose a reason for hiding this comment

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

Also, related to the fault registry changes?

Copy link

@palango palango left a comment

Choose a reason for hiding this comment

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

Contract changes look good from my side, maybe let @pahor167 have a look as well.

karlb and others added 3 commits January 22, 2025 12:31
* mark it as executable
* allow running on both MacOS and linux (GNU vs BSD tool differences)
* terminate on errors
* less strict go.mod matching to allow applying it directly to upstream
* [Automatic] - Update op-geth dependencies

Update the go package dependency and the devnet
docker container reference of the `l2` service
to the latest commit (`0162ce9d029819807bcba2dc94875888c72aa88d`)
in the `celo10` ref.

* Adapt address-getters to op-geth library changes

* Update cffi python package

---------

Co-authored-by: Javier Cortejoso <[email protected]>
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.

4 participants