Skip to content

Commit

Permalink
Merge pull request #6 from zeko-labs/MartinOndejka/more-docs
Browse files Browse the repository at this point in the history
More docs for casual users
  • Loading branch information
L-as authored Apr 15, 2024
2 parents 3f29956 + 8a3406c commit ba9a2b1
Show file tree
Hide file tree
Showing 6 changed files with 105 additions and 8 deletions.
37 changes: 36 additions & 1 deletion pages/da-layer.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,45 @@
---
title: Zeko data availability contracts
title: Zeko data availability
lang: en-US
---

# Zeko's Modular Data Availability Layer

A critical component of any rollup system is the data availability layer. This layer is responsible for storing all the transaction data that occurs on the rollup. Here's a breakdown of the DAL's role and its unique implementation within Zeko:

## What is a Data Availability Layer?

Imagine a rollup as a busy highway where transactions zip by. The main chain (Layer 1) can only handle a limited number of transactions, so rollups take the overflow and process them efficiently.
But for the system to be secure, everyone needs access to this transaction data.
That's where the DAL comes in. It acts as a giant archive, storing all the rollup's transaction data and making it readily available for anyone to verify.

## Why is a DA-layer Important for Rollups?

There are two main reasons:

1. **Security**: With the transaction data publicly available, anyone can check if the rollup is processing transactions correctly. This helps prevent fraud and ensures the integrity of the system.
2. **Decentralization**: By not relying solely on the main chain for data storage, rollups become more decentralized. This means they are less susceptible to censorship or downtime.

## What could happen without DA-layer?

Imagine a world where Zeko, or any rollup system, lacked a data availability layer.
In case the adverse sequencer would not share a batch of transactions, it would be impossible to reconstruct the rollup's state.
Without up-to-date state there is no way to apply new transactions.

## Zeko's Modular Approach to the DA

Unlike some other rollups, Zeko takes a modular approach to the DA. This means that the DA layer is a separate component that can be swapped out for different solutions. This offers several advantages:

- **Flexibility**: Developers can choose a DA-layer that best suits their specific needs. For example, they might prioritize cost-effectiveness, high security, or specific functionalities.
- **Customization**: Zeko allows developers to build their own custom DA-layer solutions, providing ultimate control and tailoring to their application's unique requirements.
- **Future-Proofing**: Zeko is actively exploring integration with solutions like Celestia, a dedicated data availability network. This integration will offer developers access to cutting-edge advancements in the field.

In essence, Zeko's modular DA-layer empowers developers with unparalleled flexibility and control over how their rollup stores and verifies its crucial transaction data.

# Zeko data availability contracts

Zeko currently uses temporary DA-layer, an fork of EVM chain ethermint with instant finality consensus. For more information you can read the [white paper](https://docsend.com/view/f9a6kgdr4tjwuqng).

## Installation

```bash
Expand Down
10 changes: 10 additions & 0 deletions pages/for_network_operators.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ title: network operators
lang: en-US
---

# Build Your Own Zeko Network: The Power of Customization

Zeko's modular architecture empowers you to create your own custom rollup network with tailored specifications. This ability to fine-tune your network offers several advantages:

- **Application-Specific Optimization**: Design your rollup with a specific application in mind. Choose parameters like the data availability solution, history archivation, or bridging to perfectly suit your needs.
- **Control & Security**: Running your own Zeko rollup means you remain in full control of security and governance parameters. This is crucial for sensitive applications or those with specific compliance needs.
- **Innovation Sandbox**: Custom Zeko networks act as innovation zones. Experiment with new ideas, or unique consensus models without impacting the wider Zeko ecosystem.

With Zeko, the possibilities are vast. Whether you desire a privacy-focused rollup, a gaming-optimized network, or a solution tailored for specific enterprise requirements, Zeko provides the tools to make it happen.

# For network operators

To run custom Zeko network refer to the [sequencer documentation](./sequencer.md#run).
16 changes: 12 additions & 4 deletions pages/for_zkapp_developers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,20 @@ For the zkapp to be sending transactions to the Zeko network, you need to add an

Following API calls are available in the Auro wallet to manipulate with the network:

- getting current network: [mina_requestnetwork](https://docs.aurowallet.com/general/reference/api-reference/methods/mina_requestnetwork)
- adding network: [mina_addchain](https://docs.aurowallet.com/general/reference/api-reference/methods/mina_addchain)
- switching network: [mina_switchchain](https://docs.aurowallet.com/general/reference/api-reference/methods/mina_switchchain)
- **getting current network**: [mina_requestnetwork](https://docs.aurowallet.com/general/reference/api-reference/methods/mina_requestnetwork)
- **adding network**: [mina_addchain](https://docs.aurowallet.com/general/reference/api-reference/methods/mina_addchain)
- **switching network**: [mina_switchchain](https://docs.aurowallet.com/general/reference/api-reference/methods/mina_switchchain)

## O1js custom network

To use O1js with custom network you need to specify it when specifying the Network.

TODO: add example once O1js implements this
```typescript
const network = Mina.Network({
networkId: "zeko",
mina: sequencerUri,
archive: sequencerUri,
});

Mina.setActiveInstance(network);
```
31 changes: 30 additions & 1 deletion pages/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,33 @@ Zekos modular architecture will allow for the creation of custom zkRollups, prov

Furthermore, Zeko serves as an L2 interoperability layer, facilitating composability and integration across different blockchain ecosystems. Through its recursive capabilities, Zeko enables the folding of L2 state into Mina zkApps, extending interoperability to both Layer 1 and Layer 2 protocols. This interoperability extends further with bridges, enabling seamless integration for cross-chain developers accessing Zeko directly.

In summary, Zeko is a versatile and powerful platform that enables developers to harness the full potential of ZK technology within the Mina ecosystem, paving the way for innovative zkApps.
In summary, Zeko is a versatile and powerful platform that enables developers to harness the full potential of ZK technology within the Mina ecosystem, paving the way for innovative zkApps.

# FAQ

## What is a zkApp?

A zkApp is a zero-knowledge smart contract on Mina Protocol.
These smart contracts leverage zero-knowledge proofs to correct state transitions, allowing transactions to be proved off-chain and verified without revealing private data.

## What are the benefits of building on Zeko?

1. **Enhanced scalability**: Faster throughput than Layer 1 Mina.
2. **Rapid finality:** Instant confirmation compared to Mina.
3. **Developer-friendliness**: Seamlessly compatible with Mina tools and infrastructure.
4. **Interoperability**: Bridge your funds to the layer 1 seamlessly.

## How is Zeko different from other Layer 2 solutions?

1. **Seamless Tooling Integration**: Existing Mina developer tools, libraries, and even front-end browser wallets work out-of-the-box with Zeko. No need to learn a new language or rebuild your tech stack.
2. **Rapid Onboarding**: Developers familiar with Mina can immediately begin building zkApps on Zeko without a steep learning curve. This accelerates development time significantly.
3. **Shared Community and Resources**: Zeko developers benefit from the rich and active Mina community, leveraging existing knowledge and support.

## What kinds of applications can be built on Zeko?

- Decentralized exchanges (DEXs)
- Privacy-focused gaming platforms
- Scalable social media protocols
- Anonymous identity solutions

...and many more!
10 changes: 8 additions & 2 deletions pages/internal-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ from emptying their accounts, meaning the sequencer's submitted transaction
would fail, DoSing the rollup.

There _are_ ways to solve this with `receipt_chain_hash`, but
1) They are complicated.
2) They can not work well when the `set_verification_key` permission is `Signature` or `Either`.

1. They are complicated.
2. They can not work well when the `set_verification_key` permission is `Signature` or `Either`.

We opt to instead push this responsibility onto the user.
The user can finalize the transfer if they can prove it hasn't happened before.
Expand All @@ -65,6 +66,7 @@ not have processed any transfers before!
#### Token approach

A transfer has two stages:

- Submission (add action)
- Processing (move funds from Zeko account to user account)

Expand All @@ -87,3 +89,7 @@ Thus, they can never make an update which isn't also underneath the inner/outer

To simplify this, we make the inner/outer account the token owner, removing
the need for tracking the public key of the token owner.

## More in white paper

If you are interested in reading more of internal design, please refer to the [white paper](https://docsend.com/view/f9a6kgdr4tjwuqng).
9 changes: 9 additions & 0 deletions pages/sequencer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ lang: en-US

# Zeko sequencer

## Zeko's Transaction Powerhouse

Think of the sequencer as the conductor of an orchestra in Zeko. It plays a vital role in keeping everything running smoothly. Here's what it does:

1. **Transaction Collector**: The sequencer acts like a tireless collector, gathering these transactions and applying them to the current state.
2. **Proof Verifier**: The sequencer prooves the validity of these transactions using zero-knowledge proofs. This ensures only legitimate transactions enter the system.
3. **Batch Processor**: The sequencer doesn't process transactions one by one. Instead, it efficiently groups them into batches for more efficient settling on layer 1.
4. **Layer 1 Bridge**: Once a batch is ready, the sequencer sends it to the main chain (Layer 1) via a smart contract. This keeps Layer 1 informed about the activity happening on Zeko.

## Build

```bash
Expand Down

0 comments on commit ba9a2b1

Please sign in to comment.