Skip to content

op-stack state(less) transition in an AWS Nitro enclave

License

Notifications You must be signed in to change notification settings

base/op-enclave

Folders and files

NameName
Last commit message
Last commit date
Dec 12, 2024
Feb 18, 2025
Feb 11, 2025
Feb 13, 2025
Feb 11, 2025
Feb 11, 2025
Mar 5, 2025
Mar 5, 2025
Feb 11, 2025
Feb 11, 2025
Feb 24, 2025
Dec 12, 2024
Feb 11, 2025
Aug 16, 2024
Jan 9, 2025
Feb 18, 2025
Feb 13, 2025
Jan 9, 2025

Repository files navigation

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