OP Stack
Last updated
Last updated
Note: Thanks to your contributions, cycle I of our TestNet Phase 3 journey has officially wrapped up! Now we're one step closer to onboarding the world to Bitcoin. Stay tuned for the next steps!
Nubit DA significantly enhances the OP Stack by offering an efficient, cheap, trustless, and secure solution for storing and retrieving batched transactions. Instead of sending these batches to Ethereum L1 (which is expensive), they are sent to Nubit DA. This reduces the local storage requirements for sequencers (operators) and users.
Optimism uses Ethereum as a DA layer. Currently, settlement and DA for Optimism are on Ethereum, both on-chain. The op-batcher
batches up rollup blocks and posts them to Ethereum. op-geth
handles execution, while the op-proposer
is responsible for state commitment submission.
By using Nubit as a DA layer, existing L2s can switch from posting their data calldata
on Ethereum to posting to Nubit. The commitment to the block is posted on Nubit, which is purpose-built for data availability. This is more scalable than the traditional method of posting this data calldata
on monolithic chains.
Technically, in our integration, we have op-batcher
realized two functionalities: batching the transactions and sending them to the Nubit DA while sending the data commitment to the op-batcher
. When reading op-node
, it simply reads the data back from the DA layer by first reading the data commitment from the op-batcher
, then reading the data from the DA layer using the data commitment. While previously op-node
reading from Ethereum calldata
, now reads data from Nubit.
After receiving the data, the Nubit backend returns a proof of data inclusion.
For an op-node
to retrieve the transaction data, it first fetches the corresponding data commitment from op-batcher
. Then, it retrieves the data from the DA backend and verifies it by the commitment.
After the integration, op-batcher
batches up rollup blocks and posts them to Nubit's DA network, reducing the operator overhead of posting data as calldata
. Compared with posting and fetching data from Ethereum calldata
, the current version is more efficient and the verification cost is significantly lower. Hence, scalability and security are further improved.
Ensure you have Docker
and Docker Compose
installed, and that your user has the necessary permissions to run Docker commands. Also, make sure to have python
with version >= python3.9.
Navigate to your home directory and clone the repository. Please contact the Nubit team for the repo access.
Install FoundryUp for managing the development environment.
Run the command to start the optimism devnet.
If the command runs successfully, you will see Devnet ready.
at the end.
Go to the op-e2e
directory.
Set the necessary environment variables. Replace <YOUR_NUBIT_AUTH_TOKEN>
and <YOUR_NUBIT_NODE_RPC_ENDPOINT>
with your specific values.
To run a Nubit light node and get your Nubit Auth token, please refer to Run a Node.
Furthermore, please Get NUB for your Nubit light node before running end-to-end test.
Execute the command to run the end-to-end tests. (Remember to keep your Nubit light node running at the same time!)
By following these steps, you can easily set up and run the integration demo.
Note: We have implemented the DA backend for the OP Stack chain to satisfy the requirements of collaborative projects.