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

feat: add initialization script #257

Closed
wants to merge 3 commits into from

Conversation

jhkimqd
Copy link

@jhkimqd jhkimqd commented Dec 5, 2024

Rationale

This PR adds a bash script initialize_env.sh to automate the op-succinct contract deployment steps and to fill in the .env files as necessary:

  • It depends on having the Kurtosis optimism-package as a local L1 and L2.
  • It depends on the existence of a .env file (example below)
L1_RPC="http://el-1-geth-lighthouse:8545"
L1_BEACON_RPC="http://cl-1-lighthouse-geth:4000"
L2_RPC="http://op-el-1-op-geth-op-node-op-kurtosis:8545"
L2_NODE_RPC="http://op-cl-1-op-node-op-geth-op-kurtosis:8547"
PRIVATE_KEY="bcdf20249abf0ed6d944c0288fad489e33f66b3960d9e6229c1cd214ed3bbe31"
ETHERSCAN_API_KEY=""
SUBMISSION_INTERVAL="10"

# Known after deploying mock verifier
VERIFIER_ADDRESS="0xEE0fCB8E5cCAD0b4197BAabd633333886f5C364d"

# Known after deploying oracle  
L2OO_ADDRESS="0x086f77C5686dfe3F2f8FE487C5f8d357952C8556"
OP_SUCCINCT_MOCK="true"

# Upgrading oracle
EXECUTE_UPGRADE_CALL="true"

# Server logs
RUST_LOG="info"
RUST_BACKTRACE="full"
  • This PR also fixes the docs using --elf flag to --elf-name
  • This PR also modifies the docker-compose.yml file to properly attach the op-succinct services to the local Kurtosis enclave

Running the initialization_env.sh script will:

  • Automatically look for the Kurtosis services and fill in the env variables as necessary
  • Run the just commands to deploy the mock verifier and the L2 oracle contracts
  • Update the env variables to be compatible with docker-compose

Example

  1. Have a running Kurtosis optimism-package devnet in the background
  2. Simply create a .env file with the above format
  3. Run ./initialize_env.sh
  4. Build images as necessary
  5. Run docker compose up

@ratankaliani
Copy link
Member

@jhkimqd Don't think this makes sense to upstream into this repo, as it's specific to the Kurtosis devnet setup.

Other users use the Docker Compose for running testnets.

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