Skip to content

Commit

Permalink
Add README
Browse files Browse the repository at this point in the history
  • Loading branch information
mdehoog committed Dec 12, 2024
1 parent 5a4b174 commit 8bf5571
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# op-enclave

`op-enclave` is a relatively small modification to the [op-stack](https://github.com/ethereum-optimism/optimism/)
that proofs 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

<pre>
├── <a href="./bindings">bindings</a>: Go bindings for various contracts, generated by `make bindings`
├── <a href="./contracts">contracts</a>: Solidity contracts
├── <a href="./op-batcher">op-batcher</a>: Batcher modification that submits batches immediately after withdrawals are detected
├── <a href="./op-da">op-da</a>: Data availability service for writing to S3 / file system
├── <a href="./op-enclave">op-enclave</a>: Stateless transition function, for running in a AWS Nitro TEE
├── <a href="./op-proposer">op-proposer</a>: L2-Output Submitter, communicates with op-enclave and submits proposals to L1
├── <a href="./op-withdrawer">op-withdrawer</a>: Withdrawal utility for submitting withdrawals to L1
├── <a href="./register-signer">register-signer</a>: Registers a enclave signer key from a Nitro attestation with the SystemConfigGlobal contract
├── <a href="./testnet">testnet</a>: Dockerized testnet for running the op-enclave stack
</pre>

## Running a testnet

1. Deploy the Nitro certificate manager using `make deploy-cert-manager`:
```bash
IMPL_SALT=0 DEPLOY_PRIVATE_KEY=<privatekey> RPC_URL=https://sepolia.base.org make deploy-cert-manager
```

2. Deploy the system contracts using `make deploy`:
```bash
IMPL_SALT=0 DEPLOY_PRIVATE_KEY=<privatekey> DEPLOY_CONFIG_PATH=deploy-config/example.json RPC_URL=https://sepolia.base.org make deploy
```

3. Generate a testnet genesis block and deploy the proxy contracts for a new chain using `make testnet`:
```bash
DEPLOY_PRIVATE_KEY=<privatekey> L1_URL=https://sepolia.base.org make testnet
```

4. Copy `testnet/.env.example` to `testnet/.env` and fill in the environment variables,
in particular the `# per deploy` section at the top.

5. Run the testnet:
```bash
docker-compose -f testnet/Dockerfile up
```

0 comments on commit 8bf5571

Please sign in to comment.