https://github.com/base/op-enclave
op-stack state(less) transition in an AWS Nitro enclave
https://github.com/base/op-enclave
Last synced: about 1 year ago
JSON representation
op-stack state(less) transition in an AWS Nitro enclave
- Host: GitHub
- URL: https://github.com/base/op-enclave
- Owner: base
- License: mit
- Created: 2024-08-16T00:11:42.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-31T19:02:20.000Z (about 1 year ago)
- Last Synced: 2025-04-02T08:49:51.272Z (about 1 year ago)
- Language: Go
- Homepage:
- Size: 1.12 MB
- Stars: 62
- Watchers: 13
- Forks: 32
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# op-enclave
`op-enclave` is a relatively small modification to the [op-stack](https://github.com/ethereum-optimism/optimism/)
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`:
```bash
IMPL_SALT=0 DEPLOY_PRIVATE_KEY= 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= 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= 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/docker-compose.yml up
```