From 8bf5571d6f57471df28ef942c05bb736473b5b88 Mon Sep 17 00:00:00 2001 From: Michael de Hoog Date: Wed, 11 Dec 2024 19:44:20 -1000 Subject: [PATCH] Add README --- README.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..3e33726 --- /dev/null +++ b/README.md @@ -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 + +
+├── 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 a 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
+├── register-signer: Registers a enclave signer key from a Nitro attestation with the SystemConfigGlobal contract
+├── 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/Dockerfile up +```