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

Add script which deploys our contract to L1 & L2 as needed using ChugSplash #708

Closed
karlfloersch opened this issue Apr 30, 2021 · 2 comments
Assignees

Comments

@karlfloersch
Copy link
Contributor

Is your feature request related to a problem? Please describe.
With all of this chugsplash infrastructure, we need a script to actually automate a deployment. Additionally this script must be used in our CI in place of the current deployer.

Describe the solution you'd like
Create a script which, using the smart contract work & off-chain scripts that were developed in: #696 #697 #703 #706 and #707 performs a full chugsplash deployment.

After this has been implemented and tested in a 1-off environment, this should be hooked up to our CI and replace our current deployer! In order for this to be possible, we will need to:

  1. Remove constructors from our contracts as all environment variables will be set in the deployment step. Additionally, remove our address manager as it will no longer be used to resolve contract addresses.
  2. Write a chugsplash deploy template for L1 and L2 contracts.
  3. Update the env of our deployer image & make sure it is now using the new deployment mechanism by updating yarn deploy

All integration tests should still pass even though we are now using a new deployment mechanism!

Blockers
#696 #697 #703 #706 and #707

@annieke
Copy link
Contributor

annieke commented May 5, 2021

Most minimal

  • Take a json contract file and turn it into a series of inputs to a smart contract
  • A script/service which will making transactions and sending them to the chain
  • Open Qs: How do we want to handle errors? We can parallelize sending transactions that don't depend on each other (order of actions doesn't matter! yay)
  • Error cases: two clients trying to upgrade at the same time, avoid conflicts by randomizing the ordering and handling how clashing is still handled

Notes

Background

  • 3 types of contracts on l2: systems (must haves, eg execution manager, state manager, etc), predeployed contracts (useful but not CRUCIAL, contract wallets, messaging contracts), user contracts
  • execution manager really only needs to live on l2 until fraud proof, which requires a copy on l1 to verify execution
  • l2 contracts based on what we need: to prove correctness of executions - we need l2 smart contracts to match what an l1 smart contract would have done; blurry line of what should be executed by the sequencer: maybe everything should be written in go

L1 contracts

  • ideally: execution manager doesn't exist on l1; current version only gets deployed when there's a fraud proof
  • ctc, scc, fraud verifier are the only technically necessary contracts for l1; x-domain messaging contracts COULD be deployed by someone else

Action items

@smartcontracts
Copy link
Contributor

Closing this, we'll be reworking the ChugSplash project plan

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

No branches or pull requests

3 participants