op-enclave

module
v0.0.1-rc6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2025 License: MIT

README

op-enclave

op-enclave is a relatively small modification to the op-stack that proves state transitions in a AWS Nitro Enclave, and submits the resulting state roots to the L1 chain. This removes the need for the 7-day challenge period, and allows for immediate withdrawals.

Directory Structure

├── bindings: Go bindings for various contracts, generated by `make bindings`
├── contracts: Solidity contracts
├── op-batcher: Batcher modification that submits batches immediately after withdrawals are detected
├── op-da: Data availability service for writing to S3 / file system
├── op-enclave: Stateless transition function, for running in an AWS Nitro TEE
├── op-proposer: L2-Output Submitter, communicates with op-enclave and submits proposals to L1
├── op-withdrawer: Withdrawal utility for submitting withdrawals to L1
├── tools: Tools for registering enclave signer keys with SystemConfigGlobal and verifying PCR0s
├── testnet: Dockerized testnet for running the op-enclave stack

Running a testnet

  1. Deploy the Nitro certificate manager using make deploy-cert-manager:
IMPL_SALT=0 DEPLOY_PRIVATE_KEY=<privatekey> RPC_URL=https://sepolia.base.org make deploy-cert-manager
  1. Deploy the system contracts using make deploy:
IMPL_SALT=0 DEPLOY_PRIVATE_KEY=<privatekey> DEPLOY_CONFIG_PATH=deploy-config/example.json RPC_URL=https://sepolia.base.org make deploy
  1. Generate a testnet genesis block and deploy the proxy contracts for a new chain using make testnet:
DEPLOY_PRIVATE_KEY=<privatekey> L1_URL=https://sepolia.base.org make testnet
  1. Copy testnet/.env.example to testnet/.env and fill in the environment variables, in particular the # per deploy section at the top.

  2. Run the testnet:

docker-compose -f testnet/docker-compose.yml up

Directories

Path Synopsis
op-batcher
cmd command
op-da
cmd command
da
op-enclave module
op-proposer
cmd command
example command
tools
register-signer command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL