Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP - v2 Golang Dispersal Guide #47

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions docs/integrations-guides/dispersal/v2/golang-client.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
sidebar_position: 1
title: Golang Client
---

# EigenDA Payment and Blob Dispersal Guide
This guide walks through the process of setting up payments and dispersing blobs using EigenDA.

## Setup
### Setting your account up
To disperse to the network you will need a balance to pull from. If you would like to learn more about EigenDA's Payment Module, check the reference *here*.

To start make sure you eth on holesky testnet, we'll deposit into the payment vault and then any other DA requests charges will be pulled from here.

To start we will deposit into the payment vault using `Foundry's` `cast`. If you have not installed foundry, follow their commands [here](https://book.getfoundry.sh/getting-started/installation).

This will deposit 1 ETH into the Payment Vault on Holesky.

```bash
cast send --rpc-url <YOUR_RPC_URL> \
--private-key <YOUR_PRIVATE_KEY> \
0x3660d586f792320a1364637715ca7e9439daa2c7 \
"depositOnDemand(address)" \
<YOUR_ADDRESS> \
--value 100000000000000000
```
Now that we have the account setup for on-demand payments, let's disperse a blob.

### Setting your disperser client
After depositing to the payment vault we'll set up the Disperser Client then send requests to the disperse

Let's start by setting up a project directory
```
mkdir v2disperse
cd v2disperse
```
Setup your environment by setting your private key in a `.env` file with the `EIGENDA_AUTH_PK` value set to your private key for the account dispersing data.

#### Dispersing data

***insert script***

4 changes: 2 additions & 2 deletions docs/integrations-guides/rollup-guides/op-stack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ deployed independently to power third-party rollups.

By default, the OP Stack sequencer's [op-batcher](https://github.com/ethereum-optimism/optimism/tree/develop/op-batcher) writes batches to Ethereum in the form of calldata or 4844 blobs to commit to the transactions included in the canonical L2 chain. In Alt-DA mode, the op-batcher and op-nodes (validators) are configured to talk to a third-party HTTP proxy server for writing (op-batcher) and reading (op-node) tx batches to and from DA. Optimism's Alt-DA [spec](https://specs.optimism.io/experimental/alt-da.html) contains a more in-depth breakdown of how these systems interact.

To implement this server spec, EigenDA provides [EigenDA Proxy](../../dispersal/clients/eigenda-proxy.md) which is ran as a dependency alongside OP Stack sequencers and full nodes to securely communicate with the EigenDA disperser.
To implement this server spec, EigenDA provides [EigenDA Proxy](../../dispersal/v1/clients/eigenda-proxy.md) which is ran as a dependency alongside OP Stack sequencers and full nodes to securely communicate with the EigenDA disperser.

## Deploying

Expand Down Expand Up @@ -81,7 +81,7 @@ When you are ready to onboard your rollup to mainnet you can fill out the follow

## Security Guarantees

This setup provides Stage 0 security guarantees without adding an unnecessary trust assumption on the EigenDA disperser. The EigenDA Proxy [docs page](../../dispersal/clients/eigenda-proxy.md) and [repo readme](https://github.com/Layr-Labs/eigenda-proxy/blob/main/README.md) explain how this is achieved.
This setup provides Stage 0 security guarantees without adding an unnecessary trust assumption on the EigenDA disperser. The EigenDA Proxy [docs page](../../dispersal/v1/clients/eigenda-proxy.md) and [repo readme](https://github.com/Layr-Labs/eigenda-proxy/blob/main/README.md) explain how this is achieved.

### OP Stack DA Challenge Contract

Expand Down
2 changes: 1 addition & 1 deletion docs/integrations-guides/rollup-guides/orbit/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Labs](https://www.offchainlabs.com/) to enable rollup developers to build

## EigenDA Proxy

Arbitrum nodes communicate with EigenDA via the proxy for secure communication and low code overhead. More information can be found [here](./../../dispersal/clients/eigenda-proxy.md). An instance of proxy **must** be spun-up to use this integration. In your node config, this will look like:
Arbitrum nodes communicate with EigenDA via the proxy for secure communication and low code overhead. More information can be found [here](../../dispersal/v1/clients/eigenda-proxy.md). An instance of proxy **must** be spun-up to use this integration. In your node config, this will look like:
```
"eigen-da": {"enable": true,"rpc": "http://eigenda_proxy:4242"}
```
Expand Down
2 changes: 1 addition & 1 deletion docs/integrations-guides/rollup-guides/orbit/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ For replicating EigenDA interactions in a local testing environment, we utilize

### EigenDA Proxy

[EigenDA Proxy](https://github.com/Layr-Labs/eigenda-proxy) is used for secure and optimized communication between the rollup and the EigenDA disperser. Arbitrum uses the [*Simple Commitment Mode*](https://github.com/Layr-Labs/eigenda-proxy?tab=readme-ov-file#simple-commitment-mode) for client/server interaction and representing DA certificates. Read more about EigenDA Proxy and its respective security features [here](./../../dispersal/clients/eigenda-proxy.md).
[EigenDA Proxy](https://github.com/Layr-Labs/eigenda-proxy) is used for secure and optimized communication between the rollup and the EigenDA disperser. Arbitrum uses the [*Simple Commitment Mode*](https://github.com/Layr-Labs/eigenda-proxy?tab=readme-ov-file#simple-commitment-mode) for client/server interaction and representing DA certificates. Read more about EigenDA Proxy and its respective security features [here](../../dispersal/v1/clients/eigenda-proxy.md).

### Posting batches to EigenDA

Expand Down
4 changes: 2 additions & 2 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,11 @@ const config = {
},
{
from: "/eigenda/integrations-guides/dispersal/disperser-golang-grpc-client",
to: "/integrations-guides/dispersal/clients/golang-client",
to: "/integrations-guides/dispersal/v1/clients/golang-client",
},
{
from: "/eigenda/integrations-guides/dispersal/clients/golang-client",
to: "/integrations-guides/dispersal/clients/golang-client",
to: "/integrations-guides/dispersal/v1/clients/golang-client",
},
],
createRedirects(existingPath) {
Expand Down