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

scripts: Stage 1.4 deployment #65

Merged

Conversation

pcw109550
Copy link
Collaborator

@pcw109550 pcw109550 commented Jun 17, 2024

Description

Added deployment script to deploy necessary contracts for stage 1.4, referring to FPACOPS.sol and Deploy.s.sol from the monorepo. I chose not to use safe contracts to make the implementation more simple. All the new contract's ownership will be set to deployer, not the safe contract.

Deploying below contract is necessary:

  • Proxies: ProxyAdmin, DisputeGameFactoryProxy, AnchorStateRegistryProxy
  • Implementations: DisputeGameFactory, AnchorStateRegistry, RISCV

We reuse existing contracts. They are already deployed:

  • PreimageOracle for deploying RISCV
  • DelayedWETH for creating initial Fault Dispute Game.

After deployment, we setImplementation and setInitBond for asterisc by interacting with DGF.

DisputeGameFactory factory = DisputeGameFactory(mustGetAddress("DisputeGameFactoryProxy"));
factory.setImplementation(GameTypes.ASTERISC, fdg);
factory.setInitBond(GameTypes.ASTERISC, 0.08 ether);

After local devnet deployment, I get below new contract addresses:

{
  "AnchorStateRegistry": "0x2132d12d15eC63aD95C0Bd3178d0f2B096E8F70b",
  "AnchorStateRegistryProxy": "0x78e6B135B2A7f63b281C80e2ff639Eed32E2a81b",
  "DisputeGameFactory": "0x86912570FAeAe8c182CB918F468E1A9fb198AF92",
  "DisputeGameFactoryProxy": "0x71a9d115E322467147391c4a71D85F8e1cA623EF",
  "ProxyAdmin": "0x93C7a6D00849c44Ef3E92E95DCEFfccd447909Ae",
  "RISCV": "0x09300b0C74F1724BD1Da84cF6e16657e1e9bFaAa"
}       

Tests

Manual testing done. Did the following:

  1. Deploy L1 contracts using the stage 1.4 deployment script.
  2. Run op-proposer to make Asterisc games.
  3. Run op-challenger to list games and claims.

Did not play the actual dispute games, but only initalized them. Will test manually using local devnet then sepolia.

To test the script locally,

cd rvsol/lib/optimism && make devnet-clean && make devnet-up && cd -
cd rvsol
TARGET_L1_RPC_URL=http://localhost:8545 \
TARGET_L2_DEPLOYMENT_FILE=./lib/optimism/packages/contracts-bedrock/deployments/devnetL1/.deploy \
TARGET_L2_DEPLOY_CONFIG=./lib/optimism/packages/contracts-bedrock/deploy-config/devnetL1.json \
./scripts/deploy_stage_1_4.sh

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.25%. Comparing base (5a20396) to head (034a86a).

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #65   +/-   ##
=======================================
  Coverage   72.25%   72.25%           
=======================================
  Files          16       16           
  Lines        2725     2725           
=======================================
  Hits         1969     1969           
  Misses        671      671           
  Partials       85       85           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pcw109550 pcw109550 force-pushed the tip/pcw109550/asterisc-deploy-no-devnet-no-critical-path branch from 034a86a to 78caca4 Compare June 17, 2024 19:58
@pcw109550 pcw109550 requested review from ImTei and clabby and removed request for ImTei June 19, 2024 17:52
@pcw109550 pcw109550 self-assigned this Jun 19, 2024
@pcw109550 pcw109550 marked this pull request as ready for review June 19, 2024 17:52
Copy link
Member

@clabby clabby left a comment

Choose a reason for hiding this comment

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

Looks great! One small change for the ASR deployment.

rvsol/scripts/Deploy_Stage_1_4.sol Outdated Show resolved Hide resolved
@pcw109550 pcw109550 added this pull request to the merge queue Jun 19, 2024
Merged via the queue into master with commit 36d7355 Jun 19, 2024
8 checks passed
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.

3 participants